frankdev Posted April 27, 2013 Share Posted April 27, 2013 Just was fooling around with a little bit of a pvp "shooter" and I couldn't really think of a good bullet function. Right now, you fire, and once the bullet leaves the screen, you can fire again. I would prefer a rapid firing system where you hold down the key and it fires over and over. I am a beginner and I have ordered some of those books The game is here: www.lionela.site90.com Controls: WASD and Q fire and Arrow Keys and Space fire Quote Link to comment Share on other sites More sharing options...
Mike Posted April 27, 2013 Share Posted April 27, 2013 Here take one:http://www.youtube.com/watch?v=pMUEeljMwWs But as you made, one bullet to be shot just call the function again or make a logic like this: if ("space" is pressed) {game.firebullet();} and with this in the game loop as long as the space is pressed the bullets will fire. Also as you say that you are new, it good practice to make a pool of objects like 100 bullets and reuse them,or if you don 't do this at least destroy your bullet once it left the game view port. And as I saw you are using CraftyJS check this game's code: http://blackscorp.github.io/cron/ There a lot things you could just pick off Quote Link to comment Share on other sites More sharing options...
BlackScorp Posted July 16, 2013 Share Posted July 16, 2013 Lol my game is linked here? didnt even knew there is a HTML5 GameDev Forum:D Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.