The Case of Joseph Curwen

Previous topic - Next topic


Looks good Erico, same as Ian, I'm a big fan of TBS.  :good:


"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)


Not much happened on this game as I thought to rewrite it and clean code.
But I did poke with level creation these past months and came up with some pleasant outcomes.

Here some screenies of the output.
I´m working with a 10x10 zones where each contains 5x5 blocks (16x16 pixels each).
Yeah all 2 colors black and white gfx.

I first work with the plotting zones, then I look into its content and finally, I run through the whole map a few times block by block doing final touches.

edit: the thing looks a bit RND and that is because the final output is to be an ancient forgotten sematary in the woods. It fits the purpose of the game when the light sistem is on. Still, this map generator is somehow code configurable. :P

Ian Price

I'd forgotten all about this. Good to see that progress is on-going :)
I came. I saw. I played.


I thought I´d let you know how maps get drawn here:
-generate 50x50 map array.
-generate 10x10 zone array.
[The zone array was first created to work with pre-made blocks that would get created on an specific 5x5 array before getting plotted on the map but I ditched the idea since I thought that for my wanted output, this would be overkill.]
[Also, 1 zone on each side is more or less a dead one, I generate over it but you won´t be able to go into it on the final game, it is just done so that the map dosen´t have visual dead/empty boundaries , like when you get on the border things just don´t disappear, you have some 5 blocks of ´scenary´. The other reason was that I didn´t wanna bother with array limits while dealing the map, ye no out of bound calls. So the safe zone is actually 8x8]
-generate a start zone on the lower part of the safe zone skipping 1 extra zone each side.
-here comes a very strange algorithm to draw a path like a snake from the start zone, I avoid backtrack and diagonal movements.
-then I pick a random zone within this path and a random clear map zone and connect them, here diagonals are allowed.
-These ones are now called path zones, I RND some ground textures on the equivalent map.
-On the non-path zones, I RND some high density zones (the brow darker ones).
-I run trough the zone array checking for high density zones and draw mid density ones on each side if it is not a path zone.
-All other clear zones, non-path ones, becames low density zones...enough of zones ::) jump to map array.
-RND bricks according to density on the map array.
-Run 2x a 2x2 diagonal analyses on the map checking for diagonal bricks and changing the lower ones to broken bricks, here I´d like to avoid diagonal brick blocks.
-Run a cross check on each non-brick tile to kill single spaces enclosed by bricks. Double or more remains.
-Run horizontal check looking for bricks that are 1 to 5 empty tiles apart and draw metal fence, RND broken ones. I also check up and down so fences don´t get drawn stacked over each other.
-Generate graves, destroyed graves, lamps.
-RND trees all over.
-Run through the map growing each tree tile on its sides if empty, do that again.
-Run through the map growing leaves tiles around the tree tiles if empty, do that again.
-Voila, there is the map. :)

It may look a bit noisy but it fits the game needs as I want to depict an abandoned ancient graveyard.
I should upload a gif of it working, but it dosen´t show much, some steps are a bit invisible to showscreen.

I got inspired by this article here on Brogue on map generation, take a read:


Wow nice insight erico,



Thanks Nabz, did you check the brogue link?
I have tried to do some homework on map generation for inspiration and that article just came out yesterday, very inspiring stuff.
It is nice to see people´s approach on the subject, I have a crush for rogue games.
Say, that is one kind of game that could even beat the author. :)
Cheers. :good:


That article is amazing, a lot of insight is given there on random map creation.
After having taken that "graphs and optimizing" course at our college I am eager to
try out some of the optimized pathfinding algorythms.

Maybe I could add a random map generation function to my level editor.


I got 4 t's


We need you to master TYPE!
We wouldnt steer you wrong brother, use them, they will unlock your imagination and unleash your amazing art skills!
Youre looking for time shortcuts? ...TYPE is #1
You see, it will not only simplify your ideas in an orderly way, but itll also allow you change the entire game if you change the rules.
Bing ChatGpt is pretty smart :O


I will get there Hemlos! :good: