Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - eyenot

Pages: [1]
1
Design / Scripting and storing level generation
« on: February 06, 2015, 10:28:57 PM »
I've been planning a roguelike for awhile and I feel like coding it, now.

One of the first thoughts I had was that all of the procedures for generating a level could be scripted. "Fill a square of random height and width with a certain terrain feature." "Pepper a random number of this sort of enemy at various distances from this location." "Build a random box out of wall tiles. Draw a path of dirt tiles between two random points using 1/2 drunken walk and replacing any stone walls encountered with doors." "Make a room between these two corners filled with maze algorithm #4." Etc.

This is interesting to me because it would allow me to script themed levels and to store those themes in files that are packaged with the game. This would allow me to keep the level generation out of the code and inside some files, instead.

For the sake of creating these scripts I've been thinking of coding a mapping program. It would allow you to select various procedures and to see them implemented in front of you. For example, to build an underground cave, you would start with a command to fill the level with solid rock. Then you would pick a random point and fill a circle of random radius with dirt floor. Drunken walk to another random point, digging out the rock the whole way, and blow up another circle. Etc. So as you do these things, the level appears in front of you step by step. When you save the level, you are actually just saving the specific script commands into a little file. You can re-run the script numerous times to see what kinds of levels could be generated and if any glitches come up.

I obsess with scripting a roguelike so much because if it can be managed, then you can mix elements of "fixed" RPGs like Dragon Quest or Final Fantasy with procedural generation. Things like drama could be scripted for the NPC's using the script language and stored in files.

This would also make expanding on the roguelike and player modification much easier.

This level scripting idea has obsessed me for quite some time. Since I'm going to implement this scripting and map making before starting in on the actual game, I'd like to solicit input from other roguelike designers.

What sort of things would you want to see in a level generation script like this?

What sort of versatility would you expect an app like this to provide? Should squares of map be able to carry an expandable amount of data, or is there a basic set of data (terrain type, elevation, object/s present or pile index reference, actors present, presence of traps or triggers) that is useful enough to assume?

Would you be able to generate all the levels you have in mind using a script like this and just a few registers, or would you need to be able to declare your own variables?

Would you rather something like this is stored in plain text and CSV, or as binary values?

Pages: [1]