Monday, February 18, 2008


Can any
of my older/more learned readers recall the names of any of those classic programming magazines? The kind of thing that would feature little snippets of BASIC code and simple algorithms. I'm still toying with roguelike stuff and it's tough to get a grasp on things. There are a few reasons for this:

1. The old code is in very old languages. Not only can they be very hard to understand but the implementation may be so vastly different that it won't be useful with a newer language.
2. The newer/maintained code has grown incredibly complex and fragmented. You have to understand every single part if you want to extract even one piece of it.
3. Some of the really inventive, new stuff isn't open-source. Both Incursion (which has a very robust implementation of the d20 SRD in it) and Dwarf Fortress (which is mind-boggling) are closed-source with no apparent plans to open-source. I don't think Dungeon Crawl Stone Soup is open-source, either.

Any suggestions?


Andrew Doull said...

The Angband code base has received praise for it's clean design and open-sourceyness. I'd recommend downloading either the NPPAngband or Sangband source code at the moment, because Angband itself is in a transition / reorganisation phase, but any copy of the Angband source code up to the inclusion of Lua (pre 3.0.0 essentially) is probably worthwhile looking at.

JohnnyPi said...

Yeah, I'm pretty sure I've looked at it or one of its variants. The problem for me is that full-fledged code like that is beyond my current level of understanding. Everything is interdependent and I don't know enough to isolate stuff out and get it to work. I'm looking for really step-by-step simple stuff that covers everything. I think I've got every roguelike source available and they're all way too big for me to tackle until my proficiency is much higher.

symbioid said...

The one I remembered was "Family Computing"...

This site seems to have a variety of those types of magazines. I'm thinking this is what you're talking about.

James McNeill said...

Compute! magazine was one of those with the BASIC code listings. I typed in a few largish games out of it back in the day.!

Good luck on the Roguelike project! I've got several of my own that I'm plugging away on after work.

JohnnyPi said...

Wow, seriously, thank you. These are exactly what I had in mind. Some of them even have content online. And now I have stuff to dig for at libraries and book sales.

It helps that BASIC is largely free of specialized syntax, so I can see the actual math that does stuff instead of tripping over every extends and three-mile long built-in DirectX functions. Makes it a lot easier to adapt it to my needs as well instead of needing to know five languages and ten libraries just to convert someone's creature function.

Andrew Doull said...

The traditional approach with Angband is start modifying the edit files in lib/edit first, and then use that as a means of diving into the source. You may also want to look at the Unangband articles I've written at my Ascii Dreams blog.

You may find that generate.c is self-contained enough to at least understand some cave generation functions.