Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

JOGL and Games advice?

Options
  • 30-10-2004 7:40pm
    #1
    Registered Users Posts: 1,785 ✭✭✭


    Hey all,

    I'm currently learning JOGL (Java & Open GL) and planning on making a car racing sim with it. Just wondering if anyone has used this before or has any comments on it?

    Also for this game i'm going to be creating a games engine, whilst i've made games before i've never actually coded a game engine and am wondering if anyone here has done this before or knows what excactly i should be aiming for?

    Cheers

    Farlz


Comments

  • Closed Accounts Posts: 612 ✭✭✭Phil_321


    I've been messing about with JOGL in college a bit recently. I plan on doing some kind of terrain engine with it if I get the time.
    I'm not used to using OpenlGL with Java but it seems fairly straightforward and has all the same functions as regular Ogl.

    Are you planning on doing a 2d or 3d game?


  • Registered Users Posts: 1,785 ✭✭✭Farls


    3D game, i'm trying to make a realistic simulation of a vehicle, ie. when the car goes too fast into a corner it powerslides, when it takes off quick the front of the car rises, etc.

    I haven't done much in OGL but i know Java pretty good and i'm almost finished reading the red book on OGL so the only problem i'm hitting at the moment is how and where to put my coding in!

    Farlz


  • Closed Accounts Posts: 612 ✭✭✭Phil_321


    Yeah, the opengl stuff won't be as much of a problem for a realistic simulation as the physics side of things.
    Have a look at these for ideas:
    http://www.oxforddynamics.co.uk/
    http://www.gamedev.net/community/forums/topic.asp?topic_id=210961
    It's a serious task to do it right. First thing you'll have to do is create some terrain for the car. This would also serve as a good introduction to ogl.

    I'm not sure what you mean by where to put your code in.... Do you mean something like how to structure it? For example:
    Initialization --- (ie. initialize ogl and and any textures/models etc......)
    Loop
    {
    Get input
    Update physics
    Update graphics
    }
    Shutdown


  • Registered Users Posts: 1,481 ✭✭✭satchmo


    Yeah the OpenGL stuff won't be nearly as hard as the car physics. If you've never done any physics programming before I'd advise you to check out David Baraff's Siggraph course notes on physically based modelling, they're quite a good starter, if fairly heavy on the maths... but then again that's unavoidable for what you want to do! ;)

    I don't know how well it would work, but the first thing I'd try is some sort of stiff mass-spring model for the suspension. Watch out for the Euler integration in this example though, it's not very stable and has a tendency to make the simulation explode if roughed up too much - you'll probably need a more stable integrator.

    One thing's certain, car dynamics aren't nearly as simple as they seem!


  • Registered Users Posts: 1,785 ✭✭✭Farls


    I understand the maths side of things is going to be very deep, i got notes from an engineering lecturer at college which explain the math side of things okay. I'm trying to get some sort of prototype up and running in the next week or 2 so if anyone here is interested in this stuff send me a pm.

    What i meant about where to put code in was where to start, i suppose terrain is where i should start then? get a small area made then put a box in it and apply forces upon it etc?

    Here's a question actually i downloaded milkshape 3D and am wondering if i create a 3D image of a car with it can i then use it in my game as the car? bearing in mind its JOGL i'm using not DirectX

    Most of the game work i've done before has been basic, ie space invaders, pong, card games etc so a lot of this is new to me.

    Once i get this going the game engine would be the next step, what the game does; car wise; would be game specific and not in the engine?

    Cheers for the help anyway i'm finding this (JOGL) very interesting and thought some of the rest of ye might feel the same.

    Farlz


  • Advertisement
  • Closed Accounts Posts: 612 ✭✭✭Phil_321


    Yeah, 3d stuff is very interesting. I've written a fairly comprehensive terrain engine in c++/opengl but it was hard-coded so I was planning to re-write it as an editor. Seeing as how I'm doing Java in college and gui stuff is a cúnt in c++ I'm planning to do it with jogl.
    Eventually, like yourself, I want to get some realistic physics going on by incorporating a vehicle.

    You can create your car in Milkshape and export it as whatever you want, .obj would probably be the most suitable. Then, you just need to write a .obj loader so you can import into your engine. There should be plenty of tutorials on the net for .obj loaders.

    Check out this page for some terrain ideas, you could have a basic terrain up and running in a couple of hours.
    http://www.gametutorials.com/Tutorials/opengl/OpenGL_Pg4.htm

    Basically, you then put the car in and start applying the forces. This takes some serious math(if you want proper realism), more than you'd use for graphics programming, for example. You'd probably be better off creating some small scale physics simulations first to get gist of how they generally work.


Advertisement