Skip to main content
GameDev.net gamedev.net
🔒 Locked

simple question

Started by flares Dec 26, 2002 at 9:06 PM 1 replies 250+ views
Original Post
flares
flares
this might be a dumbquestion but how do you implement a bullet firing system, i tried arrays but, i''m not sure bout it, is there tutorials or examples on simple game programming concepts ? any help is welcome, thnkz
vtwin
vtwin
What would you need an array for?

Unless you want to see the bullets (in which case you probably aren''t seeing bullets, but rather "slow moving projectiles"), you simply use line of sight to determine if you''re aiming at an enemy unit while firing, and if so, inflict damage.


swift URL | browse my bookmarks [server may not always be on]

Sensimed | Info/download
athos_musketeer
athos_musketeer
i use an array for a shooting game to take control of my bullets.

i have a function that return a bool value true if the bullet keeps in the screen or false if it doesn''t..
you have to keep a the max number of shoots

for (all the bullet) {
if (!bulets->paint()) {
maxShoots--;
bullets[i] = bullets[maxShoots];
i--;
}
}

i hope that had help you

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.