Programming Levels

Started by
7 comments, last by Maverick Programmer 16 years, 7 months ago
What is the most efficient way of getting levels into games? I don't have much knowledge when it comes to this, and all I can think of is to load one big model for the level.
Advertisement
It depends on the game. I slice up my levels into square "cells" and then work from there, but that approach would be totally inappropriate for a first person shooter, for example.
The levels will be pretty big, because it will be an aerial combat game.
flight simulators should use heightmaps for rough and predefined-seed rand() for detailed terrain. "save" you aircrafts by their possitions, movement vectors and custom stuff such as current loadout and amount of fuel and the likes.
That depends on the kind of game you're making, if you want a game that uses mainly interior scenes then you may use an existing game level editor like QuakeIII or Doom3 to model your levels and then import them in you engine, there are a lot of tutorials on the web about it. One advantage of them is that they come with performance optimization stuff (eg. portals, bsp's, etc.) that you may use to speed up your game.

If you're looking for a more simple thing, then you can just model the entire level in 3DsMax and export it to a common 3D file format, ASE for example is very easy to read.
I'm using a series of hacks to get scripts into a 3d modeling format. I create an object, label it "SCRIPT" and in the data string, put the code. When the level is loaded, the geometry of the script object is not loaded, and I'm currently working on writing the basics of a scripting language.

I just wanted to see if he would actually do it. Also, this test will rule out any problems with system services.
"I'm currently working on writing the basics of a scripting language"

Making a game is hard enough, throwing a compiler into the mix just compounds the difficulties. Scripting languages are popular with companies because they allow the designers to do some programming.

Anyway, nobody starts out writing game engines. Most of us make a few games without creating a game engine. Game engines are very complicated pieces of software, and while there is no definition of a game engine, I assume that you mean a re-usable engine which, without any re-compilation, can be modded to become an entirely new game.

back on topic:

How about this for an idea: use or download a loader for a common file format, such as .3ds, and then write a converter which changes it into an internal file format, such as BSP map.

Most file formats allow you to label certain parts of the geometry. Do this to put entities inside your game. WHen your converting from the file format into your internal format, store these objects seperately.

Are you really ready to write games in 3d? I dove right in at the deep end, going right from making tic-tac-toe and space invaders to making a clone of GTA3.
I just wanted to see if he would actually do it. Also, this test will rule out any problems with system services.
Quote:
What is the most efficient way of getting levels into games? I don't have much knowledge when it comes to this, and all I can think of is to load one big model for the level.


Break the level up in to 'sections'. A very good example of this would be Metroid Prime. As big as the game was, the rooms are pretty small. They divided the rooms in between the doors up, and when you crossed paths with the doors, the other room would be rendered and the last room would 'disappear'. Games like Halo did things like this as well. When the Master chief made a 'checkpoint' this would also load the other half of the level up and remove the other you just crossed and vise versa for going back [hence the delay-lag].

I hope I helped.
Holy crap, you can read!

This topic is closed to new replies.

Advertisement