My first serious attempt at a good game.

Started by
14 comments, last by Jeremiah Griffin 17 years, 9 months ago
I'm glad you like my game. The memory values are initially 0.

Most of your most recent script was correct, but you never tested what the memory values were. You should put something to the effect of..

compare memory2 0
flag0 mR
compare memory2 1
flag0 mL

etc, just before you define mR,mL,mU, and mD
Advertisement
Actually, I tested, but it was only after I declared the mR, mL, etc. By the way, here's my newest script:

compare memory3 0flag1 BANZAYflag0 CAWABANGAGoOncompare memory1 0flag0 Iniciatecontinuecompare memory4 5flag1 noMovecompare abs nearestFoodX abs nearestFoodYflag1 MoveOnXflag0 KeepWalkingflagNeg1 MoveOnYsplitMoveOnXcompare currentFood 60flag1 noMovecompare nearestFoodX 0flag1 mRflag0 KeepWalkingflagNeg1 mLMoveOnYcompare currentFood 60flag1 noMovecompare nearestFoodY 0flag1 mUflag0 KeepWalkingflagNeg1 mDmRmemory2 0moveRightmDmemory2 1moveDownmLmemory2 2moveLeftmUmemory2 3moveUpbreedsplitKeepWalkingflagBool canMoveLeftflag0 mRUflagBool canMoveRightflag0 mLDflagBool canMoveUpflag0 mRDflagBool canMoveDownflag0 mLUcompare memory2 0flag0 mRcompare memory2 1flag0 mDcompare memory2 2flag0 mLcompare memory2 3flag0 mUcompare memory2 4flag0 mRUcompare memory2 5flag0 mRDcompare memory2 6flag0 mLUcompare memory2 7flag0 mLDmRUmemory2 4compare memory3 0flag0 moveRightflag1 moveUpmRDmemory2 5compare memory3 0flag0 moveRightflag1 moveDownmLUmemory2 6compare memory3 0flag0 moveLeftflag1 moveUpmLDmemory2 7compare memory3 0flag0 moveLeftflag1 moveDownIniciatememory1 1memory2 randomInt 0 3memory4 randomInt 0 5goto continueBANZAYmemory3 0goto GoOnCAWABANGAmemory3 1goto GoOn


This one has the wall colision working! It became a lot more complicated to work with... I began to misspell my labels, etc. I also tried to make my organisms suicide so that there would be more food left for the rest of the rest of them, but it turned out that, even at level 34 (look! I made until 34... but I needed several lucky attempts), the 16 food avaliable was enought for everybody... they were just having a hard time finding it.
Awesome :)

I'm very pleased to see that someone else can pick up on the syntax. I had hoped it wouldn't be too difficult to learn.

Thanks for doing such a thorough test of my program, I really appreciate it.

Testing your script for myself right now...

Wow, I like it a lot. One small recommendation for you - Let the organism get Very close to the piece of food before telling it to not move. If it will only take 1 or 2 frames to get to the food, it is easier to snatch the food as soon as you dip below a certain hp level. And have you looked at the stat system? You got the food at 60hp when you could have raised your maximum health a little bit.

Just some suggestions :)

I'm glad you like my "game", thanks for your comments,
Adam
Well, thanks for the input, it worked! It needed a little teaking, so that the organisms would still stop like before, but I managed to reach to level 30 before things became a matter of luck (well, they were already starting to become... I can't really tell you the division).

About the stats.. yes, I knew about them, I actually tweaked several times if them, trying to figure out wicth ones were more important (I used to think it was food detecting and food loss rate, but hit points actually really made a diference, now that you mentioned). The numbers in the script had to me changes from time to time, but to tell the truth, I had kind of "forgoten" the 60 over there... and just kept the hit points as low as possible.

Now, about the script itself...
I don't think that it isn't really dificult, but it is really scary. It was a matter of luck (well, more about free time than luck) that, instead of giving up, I managed to build a simple 'seek the food' script. My initial script didn't dealed with memory, flagBools or random, so it was somewhat simpler. Still, I had to deal with the flag system. However, with that being said, make scripting fun is surely not an easy task, I think you got something.

Also, considering the simplicity (in a good way) of the scrip, you could even make a drag-and-drop type of interface, or things like that (with pretty icons and simple but working exemples, plus your documentation that is allready very good, I don't think it will be that hard to learn).

And one thing that I was thinking os if there is any way I can turn off the 5x limit thing on early levels (the one that level up before the timer is over)? Well, I was just curious to see those guys crowding the first level, but this might bring some problems to the program (I mean, you have to run the script once for each organism for each frame, right? that's a lot!)

Here's the recent version of the script (stoping close to the food)
compare memory3 0flag1 BANZAYflag0 CAWABANGAGoOncompare memory1 0flag0 Iniciatecontinuecompare memory4 5flag1 noMovecompare abs nearestFoodX abs nearestFoodYflag1 MoveOnXflag0 KeepWalkingflagNeg1 MoveOnYsplitMoveOnXcompare currentFood 120flag1 TryRestingXcontinueXcompare nearestFoodX 0flag1 mRflag0 KeepWalkingflagNeg1 mLMoveOnYcompare currentFood 120flag1 TryRestingYcontinueYcompare nearestFoodY 0flag1 mUflag0 KeepWalkingflagNeg1 mDmRmemory2 0moveRightmDmemory2 1moveDownmLmemory2 2moveLeftmUmemory2 3moveUpbreedsplitKeepWalkingflagBool canMoveLeftflag0 mRUflagBool canMoveRightflag0 mLDflagBool canMoveUpflag0 mRDflagBool canMoveDownflag0 mLUcompare memory2 0flag0 mRcompare memory2 1flag0 mDcompare memory2 2flag0 mLcompare memory2 3flag0 mUcompare memory2 4flag0 mRUcompare memory2 5flag0 mRDcompare memory2 6flag0 mLUcompare memory2 7flag0 mLDmRUmemory2 4compare memory3 0flag0 moveRightflag1 moveUpmRDmemory2 5compare memory3 0flag0 moveRightflag1 moveDownmLUmemory2 6compare memory3 0flag0 moveLeftflag1 moveUpmLDmemory2 7compare memory3 0flag0 moveLeftflag1 moveDownIniciatememory1 1memory2 randomInt 0 3memory4 randomInt 0 5goto continueBANZAYmemory3 0goto GoOnCAWABANGAmemory3 1goto GoOnTryRestingXcompare abs nearestFoodX 10flagNeg1 noMovegoto continueXTryRestingYcompare abs nearestFoodY 10flagNeg1 noMovegoto continueY
I would really recommend using an existing script language, like LUA or Python. Python will soon be a first-class .NET language, too, so that might be the way to go for you.
Very nice. Can't really think of any suggestions (it's already so good! =)).

This topic is closed to new replies.

Advertisement