I just wonder whether each bullet should be a sprite object? for determine the collision with other sprite objects. if there are too much bullet. whether waste too much memory?
or how to handle simple bullet?
I just wonder whether each bullet should be a sprite object? for determine the collision with other sprite objects. if there are too much bullet. whether waste too much memory?
or how to handle simple bullet?
for a game like xenon, raptor etc i would strongly recommend
not to store them as sprite and only keep track of them in an array. this array could be a limitation of X bullets but you need no object allocation and would set all non used bullets into a passive (non drawing, non cycling) mode.
i think you should only use sprites if you need complex behaviour like changing animation sequences, a.i. or something like that.
but most bullets only fly and collide
The answer is - it depends.
It depends on what platform you are targeting,
what type of game you are writing,
how structured, readable and reusable you want your code to be, etc etc etc.
Unless you are targeting a limited memory platform such as J2ME, there is no good reason not to encorporate them into your GameObject heirarchy.
hmmm, as we are currently in j2me forum right now, i really think xqwww wants to develop with j2me (!?).
So we are