PDA

View Full Version : game levels: hand design or random generator?


Najdorf
2003.03.26, 05:46 PM
While I like to program the general ideas for a game, I often get frustrated adjusting the details (balancing loads of constants such as speed,...).
So, I really hate deciding levels by hand: there are so many ways to get them wrong, I would stay on one an hour to say... hmmm: is it good? who knows!? THen realising I got other 100 to do! So I decided all of my games will have levels generated by a random generator: I just need to do that ok, and all levels will be ok.

skyhawk
2003.03.26, 05:52 PM
while random generation can come out okay in a few cases, it is always good to have both if your game can work fine with randomly generated results. The hardest part about random generations is having them contrain to rules. perhaps you could tell us what kind of game levels it needs to make. Then again, a simple editor that uses a mouse and palettes and such tends to go a long way.

DoG
2003.03.26, 06:09 PM
What do you do considering random number generators? Do you want to auto-generate terrain, or just place items, or randomly distribute enemies, or all?

I think it is not so important to hand-make levels if they typically fit on the screen as a whole, as there is not so much diversity in that, but I would find it difficult to make a level for an FPS random.

Najdorf
2003.03.26, 06:10 PM
Actually it' s only a shoot' em up, the differences between levels are:
-The ships speed
-The background
-The enemy ships colour
-Your ships and enemy size
-Number of enemies
-Your ships energy (restored different every level)
-Bosses: 0,1 or more at a time
-Bosses energy
-Time limits
-how many enemies you must kill to pass the level

that are actually all numerical parameters, that I hate to set personally;)

DoG
2003.03.26, 06:28 PM
I wouldn't mess too much with the player's health/energy, as it might make him feel that he doesn't have any control, and the game is just random (no pun intended).

I think it is a good idea to rather place some obstacles, and vary the enemies behavoir (though I don't know how much there is to vary in your case). Games which have no end, like tetris, apeiron, space invaders, naturally generate levels at random, with ever increasing difficulty. But remember that those have to be finely tuned, too, so they are not too monotonic, not too difficult, and at the same time hook the player, still be challenging.

Maybe you should consider a random generated background, too. I think a lot can be done by combining a handful of fractals and noise functions.

But in general, I would say don't consider purely graphical differences as part of the gameplay. If it sucks, the graphics wont help. But if gameplay is ok, a little eye candy could make it much more enjoyable and fun than the average.

macboy
2003.03.26, 06:36 PM
CloneShooter is an example of a game that uses both. For example, in-game it randomly generates a level every time for replayibility (plus an easier job on my part :D ), while the user can open up the editor (that JD *should* be making ;) ) and create their own custom level by placing the enemies, hostages, and other stuff.

Komick
2003.03.26, 08:31 PM
This might be a little off topic, but I've been looking for info on writing a level editor. Several people have mentioned that creating a level editor can relieve much of the stress of level design, but I've never found any info on actually writing one. Anybody know where I can find some examples or a guide on level editor building?

skyhawk
2003.03.26, 10:33 PM
Originally posted by Komick
This might be a little off topic, but I've been looking for info on writing a level editor. Several people have mentioned that creating a level editor can relieve much of the stress of level design, but I've never found any info on actually writing one. Anybody know where I can find some examples or a guide on level editor building?
1) what kind of level editor (tile based, non tiled base)
2) what kind of game

I am currently writing a tile based level editor for my rpg. Pretty much I extended upon the game engine that I had wrote up until that point. added scrollbars to move around. created palettes to choose tiles from. easy switching between sprite layers.

Komick
2003.03.28, 07:55 PM
Any kind really, but tile-based if possible. I'm wanting to put a graphical front end on a MUD-type game that I'm designing, so having a tile-based editor would be hugely beneficial. I also want to dabble with side-scrolling shooters, so some kind of level editor would be nice. But I'm having trouble wrapping my head around the mechanics of building a level editor.

Mars_999
2003.03.28, 08:37 PM
Originally posted by Komick
Any kind really, but tile-based if possible. I'm wanting to put a graphical front end on a MUD-type game that I'm designing, so having a tile-based editor would be hugely beneficial. I also want to dabble with side-scrolling shooters, so some kind of level editor would be nice. But I'm having trouble wrapping my head around the mechanics of building a level editor.

Well how I would go about it and maybe I am wrong but anyway here I go.

First decide is this for OSX or OS9 and earlier OS's?
If OSX and newer use Cocoa if OS9 and OSX use Carbon.

First you will have to learn Cocoa or Carbon so you can use a GUI so people can basically click and point to and paste the tiles they want to setup for a level. Code up a GUI window and add in menus and functionality to it. Saving the map, loading a map, new map, ect...
Code up a texture loading routine QT or someother gfx library. Display the tileset so people can choose from the tiles they want and paste them onto the map. Now you have to save the whole image to a binary or text file however you decide to save the information so it can be reloaded into your engine so it can display the map. You can setup each tile with its own id# so when you load up the tiles in your tiling engine it displays them accordingly. I hope that is a start, and maybe I am wrong but this is what I am going to be starting on soon, once Java is done at college next month!! Probably use Cocoa with C++ though?

OneSadCookie
2003.03.28, 08:44 PM
Probably use Cocoa with C++ though?

Cocoa is not accessible from C++ (nor could it ever be). It's accessible from Objective C, Java, AppleScript, Perl and Python, though only the first 3 are supported by Apple.

It is possible to use C++ in an Objective C program, or Objective C in a C++ program. This is called Objective C++.

Mars_999
2003.03.28, 09:05 PM
Originally posted by OneSadCookie
Cocoa is not accessible from C++ (nor could it ever be). It's accessible from Objective C, Java, AppleScript, Perl and Python, though only the first 3 are supported by Apple.

It is possible to use C++ in an Objective C program, or Objective C in a C++ program. This is called Objective C++.
My bad, I meant to say use C++ inside of ObjC when coding Cocoa. I should be able to use C++ for file I/O right in ObjC code? And be able to use C++ for all my texture loading code right? This is what I meant. Sorry to mislead.

OneSadCookie
2003.03.29, 12:12 AM
Yes you can, but it will compile 3x as slow and it's easier to do in Cocoa anyway...

Mars_999
2003.03.29, 09:37 PM
Originally posted by OneSadCookie
Yes you can, but it will compile 3x as slow and it's easier to do in Cocoa anyway...

You mean do the whole Map editor in Cocoa with ObjC? The file I/O, texture loading, ect...

OneSadCookie
2003.03.29, 10:22 PM
Sure. I might be tempted to use QuickTime for loading the textures, but I certainly wouldn't involve C++ anywhere!

Komick
2003.03.31, 06:55 PM
Originally posted by Mars_999
Well how I would go about it and maybe I am wrong but anyway here I go.

I hope that is a start, and maybe I am wrong but this is what I am going to be starting on soon, once Java is done at college next month!! Probably use Cocoa with C++ though?

Certainly sounds simple, maybe I'm just overthinking this... anyways, thanks a lot for the input. I'm certainly impressed with how quick and easy it is to implement an interface with IB, so maybe this won't be as big a project as I thought.

Are there any specific features to a level editor that anyone feels are necessary, or would be really nice to have? I've only really used the old Bolo map editor, so my experience is rather limited.