Register FAQ Search Today's Posts Mark Forums Read
Go Back   JazzJackrabbit Community Forums » Open Forums » Beyond Jazz Jackrabbit 2

why no scripting language yet?????

Reply
 
Thread Tools
EvilMike

JCF Member

Joined: Jun 2001

Posts: 3,478

EvilMike is OFF DA CHARTEvilMike is OFF DA CHARTEvilMike is OFF DA CHARTEvilMike is OFF DA CHART

May 20, 2005, 12:12 AM
EvilMike is offline
Reply With Quote
I vote the syntax is made it look more like a proper scripting language and less like a mangled mIRC script.
Stijn

Administrator

Joined: Mar 2001

Posts: 6,968

Stijn is a splendid one to beholdStijn is a splendid one to beholdStijn is a splendid one to beholdStijn is a splendid one to beholdStijn is a splendid one to beholdStijn is a splendid one to beholdStijn is a splendid one to behold

May 20, 2005, 05:12 AM
Stijn is offline
Reply With Quote
I'd rather see something like choosemusic("filename.j2b", true). Or just
Code:
level.music.file = "filename.j2b"
level.music.loop = true
Which would work in the same way for objects:

Code:
player.position.x = 5
or
player.posx = 5
Though the event trigger system of mIRCscript might be useful:

Code:
trigger WARP_ENTER {
  player.position.x = WARP_TARGET[0]
  player.position.y = WARP_TARGET[1]
  print(PLAYER_ID." warped to ".WARP_TARGET." via warp number ".WARP_ID)
}
Where WARP_TARGET and WARP_ID would be assigned a value automatically when WARP_ENTER would be triggered. PLAYER_ID would contain the id/name of the player that triggered the event (or maybe it should be called OBJECT_ID, if other sprites like enemies could also trigger this). The print() function would output text to the console/spy window.

Just some ideas.

Last edited by Stijn; May 20, 2005 at 05:22 AM.
Stijn

Administrator

Joined: Mar 2001

Posts: 6,968

Stijn is a splendid one to beholdStijn is a splendid one to beholdStijn is a splendid one to beholdStijn is a splendid one to beholdStijn is a splendid one to beholdStijn is a splendid one to beholdStijn is a splendid one to behold

May 20, 2005, 05:28 AM
Stijn is offline
Reply With Quote
A special spawning function wouldn't be needed then, you could just do something like this:

Code:
create_object("foo")
foo.position.x = 5
foo.position.y = 9
foo.status.active = true
foo.status.visible = true
foo.gameplay.behaviour = BEHAVIOUR_TURTLE
foo.gameplay.friendly = false
foo.sprite = SPRITE_TURTLE
Would create an enemy turtle at position 5,9. This is a lot more flexible, as it could easily be extended by other properties (foo.gameplay.points for the points it could earn you, foo.gameplay.damage for the damage it takes before dying, etcetera)

Last edited by Stijn; May 20, 2005 at 06:04 AM.
Grytolle

JCF Member

Joined: Sep 2004

Posts: 4,126

Grytolle is a forum legendGrytolle is a forum legendGrytolle is a forum legend

May 20, 2005, 10:32 AM
Grytolle is offline
Reply With Quote
Let's go for the IRC-commandish way instead, so they can be used in game like (*presses "T"* /kill Chiyu "Server killed you, becasue he wanted to.").
__________________
<center></center>
Torkell

Stealth Admin

Joined: Jul 2004

Posts: 2,153

Torkell is a forum legendTorkell is a forum legendTorkell is a forum legend

May 20, 2005, 10:56 AM
Torkell is offline
Reply With Quote
I'd prefer a VB-style syntax as it's easy to pick up and use. And object-orientated sounds good, as that makes it easy to dynamically drop stuff in.
__________________
-- Torkell



n0

JCF Member

Joined: Mar 2001

Posts: 2,291

n0 is a forum legendn0 is a forum legendn0 is a forum legend

May 20, 2005, 11:37 AM
n0 is offline
Reply With Quote
And this is why there is no scripting language yet. We haven't settled on a script.
__________________
<.<
>.>
-.-
Stijn

Administrator

Joined: Mar 2001

Posts: 6,968

Stijn is a splendid one to beholdStijn is a splendid one to beholdStijn is a splendid one to beholdStijn is a splendid one to beholdStijn is a splendid one to beholdStijn is a splendid one to beholdStijn is a splendid one to behold

May 20, 2005, 12:44 PM
Stijn is offline
Reply With Quote
Quote:
Originally Posted by Grytolle
Let's go for the IRC-commandish way instead, so they can be used in game like (*presses "T"* /kill Chiyu "Server killed you, becasue he wanted to.").
Code:
trigger KEY_PRESS {
  if(KEY_ID==116) {
    $allow_respawn = true
    Chiyu.kill($allow_respawn)
    Chiyu.send("Server killed you, because he wanted to")
  }
}
Link

Untitled

Joined: Apr 2001

Posts: 2,099

Link is doing well so far

May 20, 2005, 01:04 PM
Link is offline
Reply With Quote
I support Monolith's idea of incorporating a scripting language designed for incorporation, such as Python, TCL, or Lua. This would be much easier than inventing (and parsing\interpreting\etc.) our own. However, it's still a good idea to brainstorm function and object ideas like Odin, Bloodrabbit, and sers have been doing.

Realize, though, that we don't have direct access to anything. All properties and actions would have to occur through memory hacking. There is currently no known way of spawning players or objects.
__________________
With our extreme gelatinous apology,
We beg to inform your Imperial Majesty,
Unto whom be dominion and power and glory,
There still remains that strange precipitate
Which has the quality to resist
Our oldest and most trusted catalyst.
It is a substance we cannot cremate
By temperatures known to our Laboratory.

~ E.J. Pratt
 
Torkell

Stealth Admin

Joined: Jul 2004

Posts: 2,153

Torkell is a forum legendTorkell is a forum legendTorkell is a forum legend

May 20, 2005, 02:40 PM
Torkell is offline
Reply With Quote
You could always be fancy, and use the MS Scripting parser thing (and let people write in VBScript or JavaScript). That way all you have to do is provide a bunch of objects for use by the script. Whatever's used should be something designed for this, and not something like IRC syntax (which has its uses but not as a scripting language).

I'd suggest at a minumum Game, Player and Event classes. You could then add subclasses like Baddie, Boss, Weapon, Shield, Food and so on.

Game would be the grand-daddy of them all, and do things like manage game state and provide a method for accessing and adding Players and Events. Player would contain access to the state for a specific player, like health, ammo, gems, coins, etc. Event would contain the event params and location. Child classes of Event could have more specific details, like the current health and location of a baddie.
__________________
-- Torkell



ImportantGuy

JCF Member

Joined: Feb 2005

Posts: 2

ImportantGuy is doing well so far

Jul 13, 2005, 03:39 AM
ImportantGuy is offline
Reply With Quote
Completely unrealistic. Not going to happen. Just think about the synching problems between the game network sending a "shot fired" event, and your scripting network doing the same.

(On a side note, if you ARE going to try this, I suggest lua.)
Old Jul 13, 2005, 06:24 AM
White Rabbit
This message has been deleted by White Rabbit.
Newspaz

JCF Member

Joined: Jan 2001

Posts: 2,678

Newspaz has disabled reputation

Jul 14, 2005, 08:59 AM
Newspaz is offline
Reply With Quote
I'm in favor of what Link says. I'm even considering making such a thing. I've been working with Python quite a bit lately and I like it a lot.
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump

All times are GMT -8. The time now is 08:38 PM.