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.

Newcomers DBPro Corner / Space sim shooting

Author
Message
Dark Master Ev
15
Years of Service
User Offline
Joined: 18th Nov 2008
Location: That is a very good question...
Posted: 14th Jun 2009 08:50 Edited at: 15th Jun 2009 04:54
I'm making a space Sim and I'm trying to make it shoot but I've had no luck and I've tried searching this forum but i other couldn't get the code to work with my game or it is just too confusing for me to understand.

I've used the forum to make what i have
here is my code.

LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 15th Jun 2009 05:01 Edited at: 15th Jun 2009 05:05
I didn't see where you have anything in the code to make it shoot. I had a little trouble making it fly with the controls configured to use a joystick and the keyboard at the same time. I would suggest the following
1. (For now) make the input one way or the other or perhaps make it dual. i.e. joystick left() and leftkey() do the same thing.
2. I would strongly suggest that you not use 'disable escapekey' until you are nearly finished with the program.
3. Use functions and organize your code

Here is something I put together quickly:



The code makes up to five spheres to shoot from the camera's perspective (use [ENTER] to shoot). I still don't like the controls that much, but you can customise it the way you want. The Z key rolls left and the x key rolls right.

Hope this helps,

LBFN


So many games to code......so little time.
Dark Master Ev
15
Years of Service
User Offline
Joined: 18th Nov 2008
Location: That is a very good question...
Posted: 16th Jun 2009 07:04
thanks LBFN that really help and sorry i didn't put my attempt at shooting i probably got frustrated and deleted it.
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 16th Jun 2009 15:59
Glad to help

Good luck with your game.


So many games to code......so little time.

Login to post a reply

Server time is: 2024-09-28 08:19:38
Your offset time is: 2024-09-28 08:19:38