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.

Code Snippets / Airplane style movement(DBP)no media

Author
Message
bass guy1669
17
Years of Service
User Offline
Joined: 24th Mar 2007
Location: The Zone
Posted: 12th Apr 2007 01:23
here is my code for airplane style movement


enjoy

you can live with a man for all his days, but you really find what he really is like when hold him over a volcano
dark coder
22
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 12th Apr 2007 03:07
Quote: "no media"




Also you don't need to create any extra cameras as DBP by default has a camera 0. Also your code is quite inconsistent as you declare one function without brackets and another with, your media ID handles are rather random and you have indented one line only, but it's better than nothing I'd suggest cleaning it up as said above to make it useful for other users.

bass guy1669
17
Years of Service
User Offline
Joined: 24th Mar 2007
Location: The Zone
Posted: 12th Apr 2007 03:23 Edited at: 12th Apr 2007 21:43
sory forgot to take that out

@dark coder, i see a lot worse coding practicing than this

you can live with a man for all his days, but you really find what he really is like when hold him over a volcano
TEH_CODERER
21
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 12th Apr 2007 14:20
Well I made this a few days back whilst trying to help someone so I may aswell post it here in case you find it useful.


bass guy1669
17
Years of Service
User Offline
Joined: 24th Mar 2007
Location: The Zone
Posted: 13th Apr 2007 02:58
no one else

you can live with a man for all his days, but you really find what he really is like when hold him over a volcano
Dabbler
17
Years of Service
User Offline
Joined: 3rd Mar 2007
Location: Minnesota
Posted: 13th Apr 2007 05:11
@bass guy1669
Perhaps more like some sort of hover craft.

@TEH_CODERER
This is more like it. I may have to dabble with this for a while.
Drag, lift, rudder, aileron, elevator and of course thrust. Just for starters.

Hey, thanks for the start.


Whatever...
TEH_CODERER
21
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 13th Apr 2007 11:43
No problem Dabbler. Glad it helped someone!

bass guy1669
17
Years of Service
User Offline
Joined: 24th Mar 2007
Location: The Zone
Posted: 21st Apr 2007 21:00
here is the current version of the code


you can live with a man for all his days, but you really find what he really is like when hold him over a volcano
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 21st Apr 2007 22:25
bass guy1669:

I agree with comments about indentation - the lack of it looks tacky.

So, try this - you'll get less complaints!

http://forum.thegamecreators.com/?m=forum_view&t=104344&b=5

TDK_Man

bass guy1669
17
Years of Service
User Offline
Joined: 24th Mar 2007
Location: The Zone
Posted: 22nd Apr 2007 04:39 Edited at: 22nd Apr 2007 04:42
Thanks TDK!! that helped alot
here is the updated code


you can live with a man for all his days, but you really find what he really is like when hold him over a volcano
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 22nd Apr 2007 05:21
In these examples listed, you can even make the plane from primitive shapes etc..

http://forum.thegamecreators.com/?m=forum_view&t=16180&b=6

bass guy1669
17
Years of Service
User Offline
Joined: 24th Mar 2007
Location: The Zone
Posted: 22nd Apr 2007 05:35
thanks i'm sure that will come in handy

you can live with a man for all his days, but you really find what he really is like when hold him over a volcano
Dabbler
17
Years of Service
User Offline
Joined: 3rd Mar 2007
Location: Minnesota
Posted: 5th May 2007 05:48
I think that is rather easy to create an airplane from primitives. (Possibly enhanced)

Here is a simple plane: (Stealth Cube)



What I am looking for is some simple aircraft physics. Not a full blown flight simulator. Not arcade type flight.

Just an easy flyer.


Whatever...
bass guy1669
17
Years of Service
User Offline
Joined: 24th Mar 2007
Location: The Zone
Posted: 5th May 2007 07:12
is my code not worthy of a comment exept you Dark Coder, so that you feel compelled to post others code here so please review my code.

Bass guy1669

you can live with a man for all his days, but you really find what he really is like when hold him over a volcano
Dabbler
17
Years of Service
User Offline
Joined: 3rd Mar 2007
Location: Minnesota
Posted: 5th May 2007 23:31
@bass guy1669
I am sorry if you think my previous post was an insult or an attempt to hijack your thread. The Stealth Cube was included as a gift to you(and others); yet another example of a non-media aircraft.

Just a couple of comments.

The following code:



Keys are tested and variable changed, but they do nothing in the main loop or functions. You may want to remove this or add the rotation and altitude controls.

It may be personal preference, but I would put all movement control in a single function and pass the easy/advanced flag to it.

It's a good start, I hope you will continue to work on it.

Thank you.


Whatever...
bass guy1669
17
Years of Service
User Offline
Joined: 24th Mar 2007
Location: The Zone
Posted: 6th May 2007 00:37 Edited at: 6th May 2007 00:38
its ok dabbler it was 10:30 PM when posted that so thanks for the sugjustions(sorry) so what FPS did you get i usally get 50-60 FPS

you can live with a man for all his days, but you really find what he really is like when hold him over a volcano
Dabbler
17
Years of Service
User Offline
Joined: 3rd Mar 2007
Location: Minnesota
Posted: 6th May 2007 04:11
@bass guy1669
At present I am using a very old and slow computer. Just divide by three. I hope to get my other machine fixed soon, then maybe I can get some decent frame rates again.


Whatever...
bass guy1669
17
Years of Service
User Offline
Joined: 24th Mar 2007
Location: The Zone
Posted: 6th May 2007 04:43
ouch thats about 20 FPS thats about as much as one of my FPSC games. Well good luck on fixing your other computer.

you can live with a man for all his days, but you really find what he really is like when hold him over a volcano
n008
17
Years of Service
User Offline
Joined: 18th Apr 2007
Location: Chernarus
Posted: 20th May 2007 06:25
@teh_coder That's crazy awesome how do you know all that!?

Ling creckt tsi nocreckto havela? NASA chetallnar mo lu'ul nasding!
bass guy1669
17
Years of Service
User Offline
Joined: 24th Mar 2007
Location: The Zone
Posted: 20th May 2007 06:32
yeah teh_coderer thanks but can someone please sa something about MY code not teh_coderer's thank you

you can live with a man for all his days, but you really find what he really is like when hold him over a volcano
n008
17
Years of Service
User Offline
Joined: 18th Apr 2007
Location: Chernarus
Posted: 20th May 2007 06:40
Ok, i have one Q, why can't you dive? And it runs slow, but better than anything i could do

Ling creckt tsi nocreckto havela? NASA chetallnar mo lu'ul nasding!
bass guy1669
17
Years of Service
User Offline
Joined: 24th Mar 2007
Location: The Zone
Posted: 20th May 2007 06:56
diving is being worked on. Runs slow? huh i get 60 FPS on my 6 year old comp. well i've bin using dbpro for less than a year.

you can live with a man for all his days, but you really find what he really is like when hold him over a volcano
n008
17
Years of Service
User Offline
Joined: 18th Apr 2007
Location: Chernarus
Posted: 20th May 2007 07:48
by slow, i mean SLOOW. 30 fps, and the camera acts up.

Ling creckt tsi nocreckto havela? NASA chetallnar mo lu'ul nasding!
bass guy1669
17
Years of Service
User Offline
Joined: 24th Mar 2007
Location: The Zone
Posted: 20th May 2007 07:54
the camera can't be fixed with my knowledge, i'm used to 30 fps i use FPSC but it shouldn't go THAT low hmmm

you can live with a man for all his days, but you really find what he really is like when hold him over a volcano
Xsnip3rX
17
Years of Service
User Offline
Joined: 20th Feb 2007
Location: Washington State
Posted: 22nd Jun 2007 05:31
im only getting 80-90 FPS

bass guy1669
17
Years of Service
User Offline
Joined: 24th Mar 2007
Location: The Zone
Posted: 22nd Jun 2007 06:02
i dropped this project a loooooooooong time ago, if you want to inprove it go right ahead.

come see night shift at http://forum.thegamecreators.com/?m=forum_view&t=106003&b=25 see you there

Login to post a reply

Server time is: 2024-11-22 18:49:36
Your offset time is: 2024-11-22 18:49:36