Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / 2D top down shooter questions

Author
Message
Suicidal Sodacan
14
Years of Service
User Offline
Joined: 25th Feb 2010
Location:
Posted: 26th Feb 2010 06:28
So I'm creating a top down shooter similar to Smash TV. The player will be able to move and shoot in any direction simultaniously. I want to use the arrow keys to move, and the mouse to aim and shoot.

Currently, I have the player moving about the screen and facing the mouse, but my attepts to create a bullet object that travels toward the mouse when clicked have resulted in nothing but failure and frustration.

If anyone can help, I would greatly appreciate it.
Manga Tiger Boy
15
Years of Service
User Offline
Joined: 24th Aug 2009
Location:
Posted: 26th Feb 2010 15:19
Can you show us some of your code? In particular how you are currently attempting to "fire the bullets" in the mouse's direction?

Join the dark side. We have cookies!
Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 26th Feb 2010 16:09
make a structure that includes bullet info, like direction and position and size, etc, also include x/y which will be the "target" for the bullet, then, when the player clicks the mouse, set the target x, y to the mouse position, then point the sprite to there, and move it

maicl
17
Years of Service
User Offline
Joined: 19th Jun 2007
Location:
Posted: 6th Mar 2010 00:44 Edited at: 6th Mar 2010 00:45
You need to use the dbATANFULL Command , try this :

Login to post a reply

Server time is: 2024-11-19 15:38:33
Your offset time is: 2024-11-19 15:38:33