The Legend of Zelda: Relics of the Past
Moderator: MaxCoderz Staff
are you using code like this?
...PrgmENMYMNGR
:For (0,A,N): “N being the Number of enemies
:L1(A*4-4)->I
:L1(A*4-3)->L
:L1(A*4-2)->X
:L1(A*4-1)->Y: “this stores a set of variables for each enemy
:If I=1:prgmSLIME: “if it is a slime, treat it so
:If I=2:prgmMNSTR: “If it is a monster…
:I -> L1(A*4-4)
:L -> L1(A*4-3)
-> L1(A*4-2)
:Y -> L1(A*4-1): “updates the list
:END
:RETURN...
(this is an excert from a little file on multiple enemy AIs for people who haven't tried such things befor, will be a complete (though simple game) and I should finish it very soon)
...PrgmENMYMNGR
:For (0,A,N): “N being the Number of enemies
:L1(A*4-4)->I
:L1(A*4-3)->L
:L1(A*4-2)->X
:L1(A*4-1)->Y: “this stores a set of variables for each enemy
:If I=1:prgmSLIME: “if it is a slime, treat it so
:If I=2:prgmMNSTR: “If it is a monster…
:I -> L1(A*4-4)
:L -> L1(A*4-3)
-> L1(A*4-2)
:Y -> L1(A*4-1): “updates the list
:END
:RETURN...
(this is an excert from a little file on multiple enemy AIs for people who haven't tried such things befor, will be a complete (though simple game) and I should finish it very soon)
.....wow....that's weird. my code's almost exactly like that! (sorta weird considering i never read that thing) only i dont use a *for* statement. instead, everytime i run it, it add one to want would be your A. i find that this way there is not a horrible lag with any amount of enemies. enemies go a LITTLE slower, but with good AI it should be hard to tell
(i also have more var.s for the monsters and how the disp them it the end)
(i also have more var.s for the monsters and how the disp them it the end)
-
- Calc King
- Posts: 2195
- Joined: Sun 27 Mar, 2005 4:06 am
- Location: sleeping
- Contact:
alrite, over teh weekend, i got 8 of the enemies done. also, i'm thinking about having 4 instead of 3 dungeons. i wont be prgming any of the map until i make a C++ ascii-based tile-mapping prgm to do a lot of the dirty work for me. that's about it. if you know of any PC tilemapping prgms for xLib with a GUI, let me know about it. i dont know how to use the GUI in C++ cuz im going to learn it in Java anyway.
-
- Calc King
- Posts: 2195
- Joined: Sun 27 Mar, 2005 4:06 am
- Location: sleeping
- Contact: