Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
0 user currently in Programming. | 3 guests
Acmlm's Board - I2 Archive - Programming - Simple scripting languages | |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
User Post
Kyoufu Kawa
I'm not bad. I'm just drawn that way.
Level: 70

Posts: 2013/2481
EXP: 3008456
For next: 7355

Since: 03-19-04
From: Catgirl Central

Since last post: 14 hours
Last activity: 13 hours
Posted on 08-21-05 08:51 PM Link | Quote
Having written something not quite unlike a scripting language before (Jesus, used in Catnip Dreams), I want to write something for Unkillable as well to handle basic enemy AI, animation and maybe cutscenes.

Here's all the controller code I have now, hardcoded in C:
case CRAZYFROG:
{
AI_DoLocatorBound(i);
if(DIST < 4096) //if we're close enough (say a couple grids)
setsoundvol(5, 255 - (DIST >> 4)); //compute new volume from distance and set it
else //if we're out of range
setsoundvol(5, 0); //mute it out
if((DIST < 256) && (ZDIST <= 50))
{
//TODO -- Insert proper effect of getting hit here.
//Use a version of the car's code below if one must.
sysmessage("Frog hit ya.");
}
break;
}

case CAR1:
{
AI_DoLocatorBound(i);
if((DIST < 256) && (klabs(PZ) <= SZ - 1000))
{
sysmessage("Car hit ya.");
//TODO -- Insert screen flash here
//TODO -- Figure out how to whap the player to the side.
Player.posz -= 64 << 8;
Player.horiz = 175;
HurtAPlayer(-30,-1,i);
}
break;
}

case CIVILIAN1:
{
if((DIST < 512) && (CANSEEPLAYER))
{
if(Player.GTAStars > 1) //Does he fear you?
sysmessage("Civvie: \"Stay away from me!\"");
else
sysmessage("Civvie: \"Hi.\"");
}
break;
}
case CIVILIAN1_DIE1:
{
if(TIMEPASSED(16))
{
sprite[ i].extra = lockclock;
SP = CIVILIAN1_DIE2;
}
break;
}
case CIVILIAN1_DIE2:
{
if(TIMEPASSED(16))
{
sprite[ i].extra = lockclock;
SP = CIVILIAN1_DEAD;
}
break;
}
case CIVILIAN1_DEAD:
{
changespritestat(i, 0);
sprite[ i].lotag = 100;
Kawa_GetStar(); //Ooooops!
break;
}
The engine I intend to write should be able to do AT LEAST this. I have done ASM-like if clauses in Jesus, so that's no problem.

However, I want this code to be in a human-readable form. Where Jesus code is interpreted in bytecode form and written with a simple translator program, this stuff should be read in the same format it's written.

I kinda liked the Cave Story code, which was basically a terminator character ("<" if I remember correctly) with a three-letter mnemonic for each actual command.

Any suggestions before I burn my hands very badly trying to write this thing? Or can any one of you guys recommend a non-GPL scripting language that's relatively easy to snap in?


(edited by Kawa-oneechan on 08-21-05 11:51 AM)
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 6449/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 08-21-05 09:19 PM Link | Quote
This may not be appropriate for a game, but if you're lazy, I believe there's a way to fire up the IE scripting engine and run VBScripts.
Kyoufu Kawa
I'm not bad. I'm just drawn that way.
Level: 70

Posts: 2014/2481
EXP: 3008456
For next: 7355

Since: 03-19-04
From: Catgirl Central

Since last post: 14 hours
Last activity: 13 hours
Posted on 08-21-05 09:41 PM Link | Quote
Originally posted by HyperHacker

This may not be appropriate for a game, but if you're lazy, I believe there's a way to fire up the IE scripting engine and run VBScripts.
In C? And would these VBScripts have access to the sprite[] array and such?
score_under

Level: 4

Posts: 4/10
EXP: 271
For next: 8

Since: 08-20-05

Since last post: 71 days
Last activity: 52 days
Posted on 08-21-05 09:49 PM Link | Quote
You'd probarbly have to return values then interpret them, then use another script!
Kyoufu Kawa
I'm not bad. I'm just drawn that way.
Level: 70

Posts: 2015/2481
EXP: 3008456
For next: 7355

Since: 03-19-04
From: Catgirl Central

Since last post: 14 hours
Last activity: 13 hours
Posted on 08-21-05 09:53 PM Link | Quote
That's what I thought, _. I'm spazzing Sourceforge now... so far, no good...

Edit: And all this because I'm not allowed to use Duke's CON system.


(edited by Kawa-oneechan on 08-21-05 12:54 PM)
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
Acmlm's Board - I2 Archive - Programming - Simple scripting languages | |


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.014 seconds.