Ramble

Ramble is the name I've given to a computer game I'm writing for my kids (in Tcl/Tk, of course). I've begun posting a series of essays about the game's design on my weblog [L1 ]; some of them delve into things of interest to Tcler's, so I'm going to put links to them here. -- WHD

There's now a Ramble Home Page, with downloads: [L2 ].

  • Background: [L3 ]
  • Efficient Matrices: [L4 ] (and tangentially on an efficient implementation of fori)
  • Randomness: [L5 ]
  • Matrix Coordinates: [L6 ]
  • On Visibility: [L7 ]
  • Ramble 0.1: [L8 ]
  • Key Sequences: [L9 ] (has some obscure details about multiple-key event bindings)
  • Ramble 0.2: [L10 ]
  • Things to Avoid: [L11 ]
  • Quest: [L12 ] (an earlier attempt of mine at a tile-based game)
  • Maze Generation 1 [L13 ] (Basic mazes--and hey, there's Tcl code!)
  • Ramble 0.3: [L14 ] (Lots of new stuff.)
  • Combat 1: [L15 ]
  • Maze Generation 2 [L16 ]
  • Ramble 0.4 [L17 ] NEW -- 2/15/2005

Maze Generation

DKF: I'd add comments on your blog pages, but then I'd have to futz around with creating an account for myself...

I've done quite a bit of work on the automatic generation of random mazes in the past. It turns out that (for dense mazes of the sort you seem to be using) there is a way to do the random generation that makes them random in a, well, pleasing way. The key thing is that there is a tunable factor that seems to control how pleasing a maze is; too much one way and you get something very highly branching and where the "centre" of the maze is very easily findable, but too much the other way and you get very long (though twisting) passages with very few junctions. You can grab it off my webpages (and feel free to cannibalize bits out of it).

WHD: I've been working on an essay about that on and off; the essay's coming together only very slowly, but the actual code is working pretty well. For my purposes, a plain maze isn't that useful; it's more what you do with it after it's been generated. Let me write it, and then you can tell me whether you've got anything I should look at.

DKF: The Think Labyrinth page (linked off "Maze Generation 1" for those following along at home) is good fun! Very interesting!


Peter Newman 26 January 2005: I just downloaded the Windows Starkit, and it crashes on start-up if you store the kit in a directory whoose pathname has spaces in it. Looks like you're missing some braces somewhere.

WHD I had an ill-behaved eval in the start-up code. I wish {*} had been added to 8.4....Anyway, thanks very much for reporting it!


Larry Just a couple comments from my first impression:

  • If you have a high-resolution screen the graphics become too small for my 40+ year old eyes. I'd really like to see some sort of zoom. It is very hard to discern closed doors from walls.
  • The graphic n and D are so close that it is way easy to mistake one for the other. It was a moment before I realized what the LAUDDRY was for. The JUDK DEALER was also a head scratcher, especially since I initially took it for a two-sides vendor like ARMOR and WEAPONS, so DEALER seemed very generic and I had no idea was a JUDK was.
  • reverting to a character menu in a gui program is way inelegant. Would it be that hard to pop up a dialog with a list box?
  • in the past, I have used a random number generator I call a "mill" - mills are just your favorite random number generator but they can be initialized with some particular seed (or seed sequences, if you are using something like the mersenne twister) and they can be cloned. This makes them very effective at producing (and re-producing) game elements. In tcl-ish terms, you might have a "mill" proc taking subcommands "new", "copy", "reset" followed by other params, and "gen" - which would produce your random number. "new" would return a new mill initialized with the parameters that followed. "copy" would return a copy of the current mill in its current state - subsequent calls to the new mill and the old will produce the same sequence of random numbers from that same point. "reset" would put the mill back to its initial state. So, suppose you have your top-level map which has a dungeon marked. Entering the dungeon would create a mill based on the coordinates of the dungeon (this means the mill that will create the dungeon will create the same dungeon at that same location and a different one at any other location) and this mill would be used to spawn more mills - one for each level, and so on.

WHD: Just a couple of responses, shot from the hip. :-)

  • Regarding the resolution and graphic character set issues, you're right, of course. It ought to be possible to select the fonts used in the log and elsewhere as well. Maybe someday.
  • Regarding "mills" -- that's an interesting idea. I don't wish to use it everwhere, but it could be effective in its place. I'll have to ponder that.
  • Regarding the character menus--the games of this kind that I enjoy playing are all largely driven by the keyboard. Angband, for instance, has a very finely tuned UI that's one of the best character-cell-based UI's I've ever seen. When I'm playing Angband, the UI mostly vanishes, which is perfect. I want to do something that's at least as functional, and every bit as keyboard based, in Ramble. What I've got now is basically a stopgap.