Lunar Lander

Blitz3D Forums/Blitz3D Beginners Area/Lunar Lander

Eric(Posted 2004) [#1]
I am playing with a Lunar Lander Game, It was my favorite as a kid, I decided to do it in 3D, but I am having problems. Things I have working. I can fly my lander around, with Gravity working. I am using as close to real physics as I can. SSwift help me with that. Currently, if my forward Velocity if greater than gravity, I can actually achieve orbit, For me that is so cool.
Anyhow, my problem. When I come in for a landing, asuming it is a soft one, I don't know how to make My 'LEM' Lunar Excursion Module. Settle into a proper position. I tried Align to vector. but that did not work. I have a Sphere for my planet right now, with a lot of quads to make it smooth and round.



Regards,
Eric


WolRon(Posted 2004) [#2]
Find the normals of the polygon(s) below the LEM and then align the LEM to those normals.

(sorry no code, I'm lazy)


Rob Farley(Posted 2004) [#3]
You want to put a collision sphere on each foot.
I assume you have 3 legs.
If you've got 4 legs you've got to have suspension which will be a right pain in the arse to deal with.

Anyway...

Now you know if a foot is touching the ground align to vector the lander based on the positions of the 3 feet (collision sphere)

Now work round the other 2 feet doing the same.

And finally reposition the collision spheres on the feet again, the collision spheres will get out of place otherwise the more times you land!

Check out my lander screenies in the gallery.

http://www.blitzbasic.com/gallery/view_pic.php?id=7&gallery=hr&page=6


Eric(Posted 2004) [#4]
Rob,

I do have 4 legs, But lets say I choose three, Would you be willing to share your code or a sample of what your talking about? I would really like to stay with 4 legs. I was looking at the driver demo, which I am sure everyone else has. I would like to use something like that. but I never add code to my programs that I don't understand. And for some reason. The Driver Demo, confuses me. Do you Understand it?

Regards,
Eric


Rob Farley(Posted 2004) [#5]
If you have 4 legs you're going to have to implement suspension which is going to be a cake load of work.

Think of trying to put a chair on an uneven surface, it rocks around all over the place, even if the surface is in the slightest bit uneven.
Tripods on the other hand settle first time no problem.

I've seen 3d lander games where they make it so you have to land on certain landing pads that are 100% flat. If you do that cop out your can have your 4 legs without suspension. But then you don't need to worry about anything at all.

What part of my explaination don't you understand?


Eric(Posted 2004) [#6]
You have said nothing that I don't understand. What I was talking about was the Driver Demo.

I know what the word suspension means, but how to implement that is beyond me, I am going to have to do more research. I don't want to take a cop out and do the Flat landing pads besides A moon is round not flat right. unless I make it so big that the surfaces are so close to flat, that you can't tell the difference. :)

Anyhow...Did you ever finish your lander game? Would you show me a snipet of code that shows how you aligned your craft.

Regards,
Eric


Eric(Posted 2004) [#7]
Although I have played around with Tokomak.. I don't want to use it. I am thrilled that I have gotten this far, and plan to continue, at my own pace.

"The way I aligned the lander in my game was a total hack so I don't want to share that as it's embarassing!"

At least you got it to work, that shouldn't be embarassing. If you change your mind, It would be appreciated.

Can you send me a Demo of the game, Even if it is compiled, I would like to see it.

Regards,
Eric


Agamer(Posted 2004) [#8]
I would as well


WarpZone(Posted 2004) [#9]
I've taken the tiniest of peeks at Tokomak, and I think it would be absolutely ideal for something like this.


Eric(Posted 2004) [#10]
Can anyone help me with a good camera routine... Since the lander is obviously in 3D, I need a camera that works well, I can't seem to get anything to function properly, which makes controlling the Lander a bear!!... Please if anyone has some good Ideas I would appreciate some advice.

Regards,
Eric

PS I am using Tokamak, and it is cool as Hell


Eric(Posted 2004) [#11]
On my Lander Game, I have solved My Physics Problems, I started using Tokamak... Pretty amazing stuff (Is that cheating?? ) And I Have a really nice and smooth camera. Now I want to spice it up a little.. I want to add Rocket Exhaust.. Obviously I am going to build up a particle system.. I have looked around and found a few nice Engines.. Particle Candy and Lotus... But they are over kill for what I need.. Does anyone have a decent trimmed down version of a particle system that I can look at the inner workings and make something for my Game.

Thanks,
Eric


sswift(Posted 2004) [#12]
"Pretty amazing stuff (Is that cheating??"

Even the pros these days seem to be using pre built physics libs. Seems to be the future of the game industry. Just as it is not cheating to use Direct 3D to render 3D graphics, it is not cheating to use a physics lib to do your physics.

However a physics lib won't always do everything you want to do, so you should try to learn some physics anyway. :-)