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 / Noob in Distress

Author
Message
Gillypie
19
Years of Service
User Offline
Joined: 5th Jun 2005
Location: In Front Of My Computer
Posted: 14th Aug 2005 22:07 Edited at: 14th Aug 2005 22:22
I've only used db for a couple of months and i got a problem. i want my rocket to turn and i don't no where to start. Please help!


PS: I know its a naff game
Gillypie
19
Years of Service
User Offline
Joined: 5th Jun 2005
Location: In Front Of My Computer
Posted: 14th Aug 2005 22:09
im using db classic
Mr Pointless
19
Years of Service
User Offline
Joined: 17th Oct 2004
Location: Stuck in the UK
Posted: 14th Aug 2005 22:49
If I remember my maths (and a couple of B***z tutorials), you'll need to use DBC's sin and cos commands.

Ryu, you idiot! When I press for a Hadoken, DO A BLOODY HADOKEN!
Gillypie
19
Years of Service
User Offline
Joined: 5th Jun 2005
Location: In Front Of My Computer
Posted: 14th Aug 2005 22:56
wot do u meen
Mr Pointless
19
Years of Service
User Offline
Joined: 17th Oct 2004
Location: Stuck in the UK
Posted: 14th Aug 2005 23:07
No offence, but you don't need to make your posts look like text messages.

Anyway...

Say you wanted to move the ship a pixel at a time and your rocket was at an angle of 45 degrees:

You'd need to move the ship along the x axis by using "sin(45)" and along the y axis using "cos(45)"

Basically create a variable for the rocket's angle which increases and decreases based on the direction keys pressed (use wrapvalue to keep the variable within 0 to 360), and move the ship using sin and cos on the variable. I think. Look in your help file.

Ryu, you idiot! When I press for a Hadoken, DO A BLOODY HADOKEN!
Gillypie
19
Years of Service
User Offline
Joined: 5th Jun 2005
Location: In Front Of My Computer
Posted: 14th Aug 2005 23:15
i sorta get it.

u cldnt show me a bit of code about this. i've never used sin and cos before (i'm only 12)

I like playing games and i'm addicted but i suppose its better than fagssssssssssssssssssssss.!! boogy
Mr Pointless
19
Years of Service
User Offline
Joined: 17th Oct 2004
Location: Stuck in the UK
Posted: 14th Aug 2005 23:25
http://www.thegamecreators.com/?m=codebase_view_code&i=2a5a502aeb06129aad1258c927face5f

I don't have any code but this was the first thing I found after a quick snoop of the CodeBase. Try looking there or the Code Snippets forum.

Ryu, you idiot! When I press for a Hadoken, DO A BLOODY HADOKEN!

Login to post a reply

Server time is: 2024-09-24 01:35:25
Your offset time is: 2024-09-24 01:35:25