Jump to content
  • Advertisement
Sign in to follow this  
hero79

Game world format

This topic is 4813 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

Hello, could anybody help me with specifying game world format for indoor/outdoor scenes ? I`ve spent some time studying IBSP for quake 3, but i don`t understood it completely and i`d like to create my own format for learning purposes. Can anybody send me tutorial for this topic or write me basic steps, what should i do ? Thanks.

Share this post


Link to post
Share on other sites
Advertisement
Someone is going to disagree, but might I suggest that you use XML for setting up the scenes and a model format of your choice for storing the geometry.

TinyXML is highly reccomended on these forums, and I must say it does the job quite nicely.

In my personal expirence I've found that writing a custom file format for geometry is much easier than writing say a full fledged importer for an existing format. However, if you're 3dmodeling program isn't scriptable or doesn't support plugins, then I would suggest using a predefined model format.

I'm sure there are plenty of other users that can suggest a good geometry format.

Share this post


Link to post
Share on other sites
I'm quite a beginner myself, but I have been planning to do this myself to. From my experience, you can basically take three approaches, all depending on the requirements of your game/program.

Method A: 'borrow' a specific file format

If you know of a world format -such as BSP- that suits your needs, you could just use that. The main advantages of this approach are that you get a mature format with little effort and that there already are a lot of tools available to edit it. The disadvantages are that these mature formats can be a bit overwhelming to learn and that they either have redundant features you'll never use, or that they don't support your game specific requirements.

If you are still looking for more info on BSP maps btw, do a quick search on these boards because it has been dealt with extensively here.


Method B: program & world specific file format

This is probably the most intuitive approach and should work out best for simple worlds. Just create a struct (or multiple ones) with all the info you'd want for your game world and dump this to a file. For simple terrains, this might include info on height, width, which heightmap to use, which textures to use etc. This approach probably isn't suited for more complex game maps, especially first person games, but it might just work out for a simple RTS game.

Advantages of this approach are that it's easy to implement and fast to load/save. The downsides of it are that it is quite limited and that it can become quite large and thus unmanageable if you want to control many aspects of the world.


Method C: world definition using generic file formats

This approach is inspired by Bioware's excellent file formats (good reads for anyone intested in game file formats & resource management). Basically you start with a flexible generic file format, like Bioware's GFF format, in which you can define general variables. Another generic format, like XML or whatever, would probably also work out fine.

Using a generic file format like this, you can thoroughly define the structure of your world information and define values for specifc variables, regardless of their position in the file (a big advantage over using 'flat' structs). This approach gives somewhat more 'semantics' to your format, which allows you to easily add new properties to your world format without breaking existing maps.

As you could guess, I am planning to use method c for my little project. It's advantages far outweigh it's disadvantages in my opinion, though it all still depends on your game requirements. The disadvantages are that it may be a bit bloated and hard to get started on. The advantages are that you get a very flexible but standardized way of storing data in general, which is always a good thing.

If you want more info on Bioware's approach, I recommend you take a look at the page I linked to and check out the GFF file format -which is the generic file format used to store data- and their AREA formats that consists of 3 structured GFF file types for storing world specific data.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!