So as you know, I'm trying to get a game done, it might take years, but as long as I get it done by the time I retire and it's a hit, well, I'll have my retirement money.
So, I got to the point were I thought, I need to design levels, and my original code [warning geeky bit coming up] basically read in a file that was hand-drawn using Tiled (3rd party tile/map editor), and then draw it to the screen, but it was too restricted for me, if I wanted to make the level bigger I'd have to draw it. That I can't be bothered with.
So I decided to try to do random level generation, now I'd tried this a while back, I'd watched YouTube videos and copied what they did, while it worked, it was too slow. I'd read about how the guy who did Spelunky did it, and again, I tried (this was a while back) and it failed, so it sorta put me off.
One day, I was doing something else around the home, and all of a sudden I had a thought "what if I did it this way" so for the past month, I've been working on random level generation.
All it does, [geeky alert] it's a lot of if/then statements, saying, ok, the room to my left has this opening, so the next room can only be one of these, also check the room above (if there is one), and it does this, 12 rooms across by 12 rooms down, I can go to about 18 by 18, but after that the generation is too slow and I don't want the user to be waiting (unless I put a [please wait] thingy in there, but we'll see). So, you'll see by the little animation below, I'm hitting R on the keyboard and a new level is being generated. I could make levels smaller, so I can use that as 'level difficulty'
I've got other ideas in my head at the moment, but for now, I wanted to show 'some' progress. I'll try to remember to put some stuff up as I can.
You can download the .exe from my site here and test it yourself. The boxes and numbers and 'deleted spaces' are all 'debugging' routines, as I want to make it as 'correct' as possible.
[geeky people, SRE = Single Runtime Executable and POC = Proof Of Concept]
Feel free to provide feedback, most of you will have my email address, if not, get me on FB, Twitter, Blogger, Tumblr, etc.