Jul 29, 2012

More fun with ASM!

I'm not doing a whole lot with the enemies for now. Handling their spawning, collision checks and animation will be dealt with at a later time. Most of that stuff is simple coding everyone using GM deals with. I've finished the basic movement code for Skeletons, Firemen, Knights, Medusa Heads, and Wing Demons. I'm torn between continuing to use timelines for the skeletons and axe knights or a recursive alarm, which is how CV3 handled them.

Today I'm working on bats. I assumed the bats used the same sine wave code as the Medusa Heads and Wing Demons. When the sleeping bats awaken, an alarm is set. While that alarm is counting down, the integral and fractional speed bytes are subtracted from (actually they're added to, but since the value added is over $80, it's a subtraction). This is what causes the bat to drop down then swoop back up.

I haven't dealt with the alarm yet, but that code that deals with the bat before the alarm goes off has a fun little effect if you leave the alarm out -- the bat drops down from its perch then flies up and away in an elegant parabola!  It's a nifty effect I might use in my game if I ever get around to making it. I think this is the effect crows and owls use, but we shall see.

Flying enemies are the easiest because you can handle all the code within one page in the Step Event. No collisions except with Belmont.

No comments:

Post a Comment

©TheouAegis Productions™. Powered by Blogger.