Archived

This topic is now archived and is closed to further replies.

frizb

Development question

Recommended Posts

Here''s my problem. I have most of my classes written, but I''ve never made a multi level game. (It''s a generic shooter) I''m not sure how to go about setting up a level and advancing and starting a new level. Should I use generic level classes? Right now, the only way I can figure out how to do it is by hard-coding everything in, which is obviously not what I want to do. If anyone can point me in the right direction that would be cool. Still Learning...

Share this post


Link to post
Share on other sites
You should make a file format so that you can save different maps. Include all information which you need for describing the level in a file format struct (or class), when loading you read the members of the struct from the file.

Visit our homepage: www.rarebyte.de.st

GA

Share this post


Link to post
Share on other sites
There are many free level editors out there, for games like Quake or halfLife. Look for Qoole, WorldCraft (<-my favorite) or programs like that. Then you can make your level relatively fast and save the time of coding your own editor. The only problem is to read the output of the editor and convert it into your polygon data, but that''s not impossible.

Share this post


Link to post
Share on other sites
Thanks. I guess I should have mentioned its a 2D game though. It can have anywhere from 10-20 800x600 bmps for backgrounds on each level. I''m still learning how to work with Direct3D.

Still Learning...

Share this post


Link to post
Share on other sites
Maybe you should make a level manager class, one that keeps track of all the enemies that have already flown, and maybe the moving offset of the screen, if it''s a vertical overhead shooter (rai-den) keep track of the y offset, then when it hits a certain value or above, you can switch to boss fighting mode (no scrolling) or simple end the level, and stop the enemies. This class could also read in a file that specifies everything about a level backround image, enemy formations, bonus points, maximum y offset, scrolling speed. You can just keep them in flat files (unencrypted ascii) untill everything works, then you can serialize the data so it''s harder to mess with.

Level1.props:
-----------------
BGimage = ./level1.bmp
maxYoffset = 5120
scrollspeed = 3
totalEnemySquads = 6
enemyPatternArray = A,X,A,B,Y,L,T
...

and so on.

Share this post


Link to post
Share on other sites
If you need something like a campaign, you moght be interested in using linked lists where you store a pointer to the next object (the map in this case) in the current object. Therefore, when changing levels, you simply point the current object to the next one. For more on this, look at Andre Lamothe's book.

BTW, where is Carlsbad Caverns?

Edited by - Darkor on June 20, 2000 6:38:56 AM

Share this post


Link to post
Share on other sites