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 / Airplane Movement

Author
Message
Megaman Zero
21
Years of Service
User Offline
Joined: 25th Jan 2003
Location: United States
Posted: 19th Apr 2003 02:24
Ok, its been a while since ive said something, but I need some help with a few things. I will list them, all I would like, would be for someone to tell me what commands to find so I can start making my code. Here is what I need someone to steer me in the right direction on...

1. Airplane Movement
2. Transformations
3. Model Animations For MD2 Objects

1: All I want on this one, is to figure out what commands control the player. I need to learn how to make custom controls for my games, & this is going to be my first thing to try & learn.

2: I think this would be made with different animations for the models. I have an airplane that transforms into 2 things, & I would like it to be on one key (I think I know how, I just need help with #3, unless I come back with a problem.)

3: I need to learn how to code animations in my games, for my MD2 models. I asked this once, & someone helped, but it didnt really help, as the command he wanted me to look for, returned an error. So can someone give me an example of a walk sequence for an MD2 model? Something along the lines of frames 2-6 at start. I can alter & work on the code from there, on my own. And all of the frames of the animations are on the same model, so I need to be able to specify the frame numbers or something.

Thank you for any help ahead of time,
NachoMan
21
Years of Service
User Offline
Joined: 14th Apr 2003
Location: United Kingdom
Posted: 19th Apr 2003 15:54
hey, i had a problem with airplane movement cos if u use the usual rotate camera (1st person inside the plane) then it messes up and inverts the controls once you turn 180. So if you use free movement such as "turn camera left" then it is independant of any axes and you can use it with ease. Hope this helps, Nick
Scorpyo
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 19th Apr 2003 21:41
mmmmmmm..if you read my thread in the Discussion section (zrotate object) you'll see that you don t have much hope with the first one, unless you are using DBC 1.13 instead of DBPro
Megaman Zero
21
Years of Service
User Offline
Joined: 25th Jan 2003
Location: United States
Posted: 20th Apr 2003 02:39
Hmmmmm, I guess I will have to try some stuff to make it work. Is there a way, that I can increase the speed of my object, but make it so that if my joystick (or keyboard) = 0, then have it fall to the ground, so I can make it stall, if not above a certain number or something.

I will try some stuff out with Dark Basic Pro, & see if I can get some stuff to work on #1, but what about #2 & #3? If someone can help with 3, I can probably make 2 work.

Thanks for all of the help, as always,

Scorpyo
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 20th Apr 2003 14:12
suppose you have a speed# value (i guess you have ) for your plane

( i.e. move object plane,speed#)
you code in order that your plane will fall below a certain speed# value
if speed# < minimumvalue then y#=y#-1:position object plane x#,y#,z#

if you want the fall speed linked to the speed as normally it is, you could do:
if speed# < minimumvalue then y#=y#-speed#:position object plane x#,y#,z#
Scorpyo
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 20th Apr 2003 19:37
sorry the last above should be:
if speed# < minimumvalue then y#=y#-(value+speed#):position object plane x#,y#,z#
Megaman Zero
21
Years of Service
User Offline
Joined: 25th Jan 2003
Location: United States
Posted: 21st Apr 2003 11:29
Good idea, I just noticed the move camera (or object, cant remember), & looked into it. I think, if the ceiling this is a problem, something so that, when you aim directly up, you will go up, but you cant go past a certain point (like in a FPS style game.) I think I will replace the FPS code that I got from the tutorial that comes with Dark Basic Pro, with a cutsom made code, where I take out the gravity thing, & change some things to give an airplane effect.

I dont know to what extent it will work to, but I will give it a try right now, before I go to bed.

Thanks again, but does anybody know how to make md2 model animations, from one file only (frames?) This is probably the only help I need at this current time.

If I have some problems with my code, I will post it, & ask for help at that time.

Thanks again,

Bluedeep
21
Years of Service
User Offline
Joined: 3rd Feb 2003
Location: Finland
Posted: 22nd Apr 2003 11:32
Hou hou hou... i just want to say that best way to do airplane movements is to use real physics. And that´s for sure, thrust me, i know what i am talking about.
Scorpyo
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 23rd Apr 2003 00:32
Give us an example Bluedeep
Megaman Zero
21
Years of Service
User Offline
Joined: 25th Jan 2003
Location: United States
Posted: 23rd Apr 2003 10:57
An example would be nice, for both questions. Until I can get my models into my game, I cant get my game even started, other than maps & the models themselves (which I have.)

I had an idea for airplane movement though. Take a first person shooter code, take away the gravity (free float), then add speed to it.

Something to that extent, it would allow for an airplane type movement, but it wont go up past a certain point (streight up), so it wont be a real airplane airplane, but a desired effect.

I noticed this on a game that I bought, the exact show (game from show) I am trying to make an RPG of. But until I can get my model problems solved, I am stranded, without anywhere to go.

Most of my models will be in MD2 to MD3 format, so it needs to be done in that, anyone have a clue? My manuel is missing some stuff from it, or its in there, but it gives me an error, when I try to use it.

Im going to go look around some more, but I doubt that I will be able to find anything for md2 and/or md3 model animations.

Megaman Zero
21
Years of Service
User Offline
Joined: 25th Jan 2003
Location: United States
Posted: 23rd Apr 2003 10:59
Bluedeep
21
Years of Service
User Offline
Joined: 3rd Feb 2003
Location: Finland
Posted: 24th Apr 2003 13:03 Edited at: 24th Apr 2003 13:04
Ok... example, let me think.
I don´t know much about airplane physics, i only know car physics.
But i´m sure you need forces like drag, lift, weight and turbineforce.
You must separate weight to right, left, front and back.
dragforce=0.5*Cd*A*rho*v^2
where Cd is coefficient of friction what depends on the shape of the airplane.
A is the frontal area of airplane.
rho is air density whith is normally 1.29 Kg/m3, but you can make so that the air density drops when you are higher.
v is speed of the airplane.
You can start with turbineforce and dragforce, so when you take weight and lift away your airplane flyes straight.
Before you get velocity you must calculate acceletarion.
Here is example of calculating velocity:

This is good way to start making your game.
My Cd, A and mass values may be wrogn, but you can find them from internet or you can test and get good values.
And remember that airplane is steered by wings, so don´t make code like: (if leftkey()=1 then turn camera left)
instead try moving those wings and get airplane rotate trugh physics.
It´s maybe hard, but it´s lot better way to do.
Megaman Zero
21
Years of Service
User Offline
Joined: 25th Jan 2003
Location: United States
Posted: 25th Apr 2003 06:29
Actually, they airplanes are controlled by the mind (neural devices.) Very little is controlled by the arms & legs, thus making for precision movements. Sound familliar?

So with the precision of the future, I could in fact do rolls for the airplane mode, for the other things, I will probably do a left then turn camera left thing, or the whole walking script thing, etc.

Physics can be an anoying thing, but luckily, I have a friend who makes planes (and I plan to getting my pilots license & builders license soon.) So I guess the physics would be a good thing to fix up the code for, I may even be able to use it in my course, as extra cred.

Anyhow, im going to go work on the code now, & now, the only thing that I need, is the animation codes. I would hate to have to remake these planes, that I did not make in my first place, that are fully transformable, in .x format, when I could just keep trying to figure out the md2 format animations, anyone?

Thx,

Login to post a reply

Server time is: 2024-09-20 06:34:59
Your offset time is: 2024-09-20 06:34:59