00:00
00:00
Skeik
Matthew @Skeik

Age 32, Male

Developer

University of Toledo

Ohio

Joined on 6/19/05

Level:
17
Exp Points:
2,944 / 3,210
Exp Rank:
19,038
Vote Power:
5.88 votes
Audio Scouts
1
Rank:
Safety Patrol
Global Rank:
25,169
Blams:
60
Saves:
333
B/P Bonus:
6%
Whistle:
Bronze
Trophies:
6
Medals:
812
Supporter:
10y 2m 18d

Procedurally Generated City

Posted by Skeik - May 26th, 2009


Hey. I'm bored and I wanted to do something to remind myself I don't suck at ActionScript, because the last few games I've released have been utter crap. A lot of the games I make are bug filled, now that I look back. But besides that.

A week ago I had the great idea of randomnly generating a tile based city. For large games, it would make it so I didn't have to take time to create each town and every town by hand. For small games, I could create something replayable by giving the player a different experience everytime they play. It wont be the best looking thing, but for mainly black and white games it would work out well. And when I say city, that also includes the interior of buildings. This will work well with a few ideas I have, a lot of boss rush games come to mind, and possibly a racing game, or an assassination game. The sky is the limit. And it will MOST DEFINITELY be in my PO3 game, but I'm not telling what that game is yet.

.....
Wtf layout?
I started off the project by googling procedural city's, to see if anyone had done it yet, and so I could steal ideas from them. Luckily, someone had done it and documented every step of the process in 3D. http://www.shamusyoung.com/twentysided tale/?p=3185

So the main thing to do first would be to procedurally generate buildings. Buildings in a 2d sidescroller are mainly rectangles, with different levels. So basically rectangle shaped rooms stacked on top of each other are going to be the base for all the buildings. Taking a hint from the Shamus Young, I'm going to create different building styles, but each style will have to be created on their own. Right now I'm working with the main, basic office building. And basic it is indeed.

http://spamtheweb.com/ul/upload/260509 /72695_City.php

I worked on this for about 6 hours so far. It may seem basic, but I ran into a wall with a huge bug I just resolved a couple minutes ago. This code as of now generates a random building, with random height and random width. It's a basic rectangle that vaguely represents a building so far. The holes in each level are where the stairs or a ladder would go, for the player to travel from floor to floor.

It's really basic right now but when I post my progress next week, it'll be much sexier, lol. I've got a lot of ideas for this, so don't dismiss it :P


Comments

I think you have a pretty solid basic procedural generation engine so far! Looking forward to seeing what this might be part of later on.

Oh it's going to be a part of somethin'

Coolies :D Me likey. The 3d version looks amazing that Shamus is a masta

HE IS.

Sounds cool.

Kinda like a more complicated version of the randomizer Dino Run used?

I didn't know Dino Run was random. I'm going to go look into that.

Procedurally generated levels are always fun for replayability. Nobody gets tired of, for example, Nethack, manly because its level generation is fucking brilliant.

If you like nethack, check out this game called Spelunky.