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.

The 20 Line Challenge / [DBP] Fake Helicopter Physics w/Gamepad Support

Author
Message
Coldfire
15
Years of Service
User Offline
Joined: 22nd Oct 2008
Location: Indiana
Posted: 4th Jun 2009 07:02 Edited at: 4th Jun 2009 07:05
its been a while since ive actually posted anything on these forums, and i got bored so i threw this together real quick. its a very simple helicopter sim that includes gamepad support.

as controllers vary, i've set this up to work with my xbox 360 controller. you can use the left joystick to control pitch and roll, the left and right triggers to change your heading. `fire button a` will build up your thrust.

the alternate controls are a combination of mouse and keyboard... actually very simular to the battlefield series helicopter controls: `W` adds thrust, `A` and `D` change heading, and the mouse controls both pitch and roll.

i know this isnt very complex but i found myself lost just playin with it so i figured id share. i hope you enjoy

coldfire

jeffhuys
17
Years of Service
User Offline
Joined: 24th May 2006
Location: No cheesy line here.
Posted: 8th Jul 2009 01:16
Cooool



You're the 'th to view this signature!
wickedly kick it
17
Years of Service
User Offline
Joined: 13th Jul 2006
Location: Fort-worth Texas
Posted: 9th Jul 2009 21:49
very nice add a hide mouse/position mouse at center of screen, and maybe make it a tad more sensitive and it's perfect looks great!

Coldfire
15
Years of Service
User Offline
Joined: 22nd Oct 2008
Location: Indiana
Posted: 10th Jul 2009 00:42
I actually set the sensitivity different for the controller and mouse... one of which i noticed was pretty slow... I rewrote this and added in a flat shaded city--no collision tho-- i just thought it would be nicer to have a view other than the matrix .

i could tweak it up a bit to make it more realistic(i.e directional velocity and such, but i jump around doin different projects too much. I will, however, toss up the expanded version with city, but that will be after at least a week, because i will be out of state till then.

Thanks for the replys

Madscientist
14
Years of Service
User Offline
Joined: 23rd Aug 2009
Location: Between a rock and a hard place
Posted: 28th Aug 2009 17:14 Edited at: 28th Aug 2009 20:39
I used some of your code for a game I'm making but for some reason I fall through the matrix. Could anyone tell me what I did wrong?

EDIT: I fixed the problem, nevermind.



If it hasn't exploded yet, I haven't touched it.
thenerd
15
Years of Service
User Offline
Joined: 9th Mar 2009
Location: Boston, USA
Posted: 19th Sep 2009 21:43
Quote: " I will, however, toss up the expanded version with city"
i am dying to see that!


forever loading...
Coldfire
15
Years of Service
User Offline
Joined: 22nd Oct 2008
Location: Indiana
Posted: 20th Sep 2009 14:10 Edited at: 20th Sep 2009 14:52
actually, i forgot all about this, lol, but i'll give it a rewrite... it was only a couple hour project even including the simple flat shaded city.

@mad scientist:

the way i stopped from falling into the terrain/matrix was by checking weather it was under it and if it is under, place it back on top. Sorry I know I'm not explaining it well, but I just rolled outta bed and haven't gotten to my caffeine yet, lol. Its really just a hack.

alright... caffeine run then i'm gonna start my rewrite...

if anyone has suggestions feel free to voice them.

Edit: after giving some thought to it, I think I'm gonna actually turn this into more of a game and try a couple of things with it... such as use newton for the physics(i duplicated the same sample in Leadwerks which also uses Newton and it was SO much better), Possibly use L-Systems for a city gen, and last but not least, my cheap little 3d clouds... Of course as I make progress it will be updated in WIP.
thenerd
15
Years of Service
User Offline
Joined: 9th Mar 2009
Location: Boston, USA
Posted: 23rd Sep 2009 21:49
that will be really cool!


forever loading...

Login to post a reply

Server time is: 2024-04-20 08:29:15
Your offset time is: 2024-04-20 08:29:15