Sign in to follow this  

3D models...

This topic is 3741 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi! I want to make a 3D game, so I'm thinking of doing this: 1. Creating the models + their movements with "Blender" 2. exporting the models to MD2 format. 3. reading the models in my game from the MD2's. Is it ok? Is there a better and more common way of doing this? and i notice some games use python scripts... anybody knows why? thanks in advance! [Edited by - Idov on September 18, 2007 11:32:40 AM]

Share this post


Link to post
Share on other sites
Quote:
Original post by Idov
Hi!
I want to make a 3D game, so I'm thinking of doing this:
1. Creating the models + their movements with "Blender"
2. exporting the models to MD2 format.
3. reading the models in my game with from the MD2's.

Is it ok?
Is there a better and more common way of doing this?


MD2 files were created when CPU time was a lot more valuable than it is nowadays, you might be better off with a skeletal based format.

Quote:

and i notices some games use python scripts... anybody knows why?

thanks in advance!


Because its easier to code the actual "game" with a scripting language rather than having to compile the whole thing every time you decide to change an entity behavior or a conversation menu, etc.

Keep the engine and the game separate.

Share this post


Link to post
Share on other sites

>> Is it ok?
>> Is there a better and more common way of doing this?

Yeah, why not? But keep in mind that MD2 is a somewhat old format. It's using morphing animations instead of a skeleton. So if you are planning to do ragdolls, or animations where bodyparts move seperate from each other (a head that follows a target while the upperbody is shooting, and the lower body is running for example), MD2 might not be the best solution though... A format with a skeleton (such as SMD or MD5) simply gives you more options, but might also be a little bit harder to implement.


>> and i notices some games use python scripts... anybody knows why?

Because Python scripts don't need a compiler like C++. Your application itself will "compile" (don't know if that's the right word) them. So, you can modify scripts, without rebuilding your program/engine itself. A modder for example only needs notepad to do the job. It's a nice way to seperate specific game-code (like rules for a game, interactive stuff, GUI, or even AI) from the more uniform engine code.

Greetings,
Rick

Share this post


Link to post
Share on other sites
so if i'm writing an adventure game, the python file will include the dialogs for example? isn't it complicated to syncronize the real game with the python scripts?

And can you recommand a file format instead of MD2?
I've seen blender can export a 3ds but i read somewhere that this format is "closed" so nobody knows exactly what's going on in there...

Share this post


Link to post
Share on other sites
>> so if i'm writing an adventure game, the python file will include the dialogs for example? isn't it complicated to syncronize the real game with the python scripts?

Maybe you might want to store the actual text strings itself into another file, in case you want easily support multiple languages. But yes, this is possible. You can call Python functions whenever you want, and vice-versa, you can let Python call functions from your engine. For example:

// pseudo code
<engine code>
onTriggerObject()
{
Python.triggerObject( objectID, action, button, ... )
}

<Python> With the help of the parameters, check out what to do, for example:
triggerObject( ... )
if (action == talk)
if (button == 1) engine.writeText( "Yes" ) else
if (button == 2) engine.writeText( "No" ) else
engine.writeText( "Press 1 or 2" )




>> And can you recommand a file format instead of MD2?
I don't think the 3ds format is closed, probably its format can be found on www.wotsit.org, just like many other formats. But I don't think it supports animations. You could have a look at MD5 (used in Doom3/Quake4), its not that hard to create a reader for that. Although I haven't seen good exporters for it (but that was half a year ago, maybe there are now).

Greetings,
Rick

Share this post


Link to post
Share on other sites
You might want to try the Cal3D format:

http://home.gna.org/cal3d/

There are exporters available for blender and 3d studio max. They also provide a library to read in the models and do the actual skeletal animations; it's licensed under the LGPL (so you can use it in commercial projects).

Share this post


Link to post
Share on other sites
woah, slow down guys.

Firstly, you don't necessarily want to build a game "engine" when your just starting out, which it sounds, (correct me if I'm wrong) like the OP is doing. As you get more experienced you will be getting closer to the ability to build a game "engine". To start with, you just need to learn how to make a game. jpetrie has written an article but I can't find it, I wish somebody would post a link.. <ahem>

Secondly, to begin with you won't be adding a python scripting engine to your game. That comes later on. First learn the basics, because if you start out with intent on creating a full blown, reusable, python scripted game "engine" you will run out of patience. It takes years.

Share this post


Link to post
Share on other sites

This topic is 3741 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this