PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Shoot em up in Gapidraw

Hello all! I'm a bit of a newbie so sorry in advance if I end up sounding like 4 year old...:) I've recently discovered the wonders of gapidraw and am currently learning how to put a side scrolling shooter (think r-type kinda thing) together. My current headache is writing the code to move the baddies (or their bullets) around the screen. Quite frankly, I don't know where to begin. I've bodged a crude bit of code that gives the aliens coordinates and basically just does a x++ and y++ (or --) till those coords are reached. I'm thinking that isn't the best way to do things. Can anyone point me in the right direction as to where I can find the answer to this? I've scoured the net to no avail! :(

Thanks!
whaleyboy wrote:Hello all! I'm a bit of a newbie so sorry in advance if I end up sounding like 4 year old...:) I've recently discovered the wonders of gapidraw and am currently learning how to put a side scrolling shooter (think r-type kinda thing) together. My current headache is writing the code to move the baddies (or their bullets) around the screen. Quite frankly, I don't know where to begin. I've bodged a crude bit of code that gives the aliens coordinates and basically just does a x++ and y++ (or --) till those coords are reached. I'm thinking that isn't the best way to do things. Can anyone point me in the right direction as to where I can find the answer to this? I've scoured the net to no avail! :(
Thanks!


well, you could use splines :
http://www.ibiblio.org/e-notes/Splines/Intro.htm some of the links have code for them + interactive applets to understand it, so have java activated

or you could record the patterns the ships follow, usually r-type like games have the same ship moves over and over

I hope it helps
Kak
Kak wrote:well, you could use splines :
http://www.ibiblio.org/e-notes/Splines/Intro.htm some of the links have code for them + interactive applets to understand it, so have java activated


Excellent link Kak!
eek...the spline method looks a bit daunting! 8O I'm not sure how I would go about incorporating that into my program. You mentioned recording the movements...could you expand on that a little?

Oh, and is there any source code available that I can look at for reference on this subject?

:)