Skeik-Sprite's Banner
Skeik-Sprite

Age/Gender: 18, Male
Location: Ohio
Job: Student

Eh

Newgrounds Stats

Sign-Up Date:
6/19/05

Level: 15
Aura: Light

Rank: Safety Patrol
Blams: 57
Saves: 262
Rank #: 25,863

Whistle Status: Normal

Exp. Points: 2,320 / 2,500
Exp. Rank #: 12,743
Voting Pow.: 5.70 votes

BBS Posts: 1,399 (0.84 per day)
Flash Reviews: 148
Music Reviews: 38
Trophies: 5
Stickers: 0

Entry #29

Jump to Entry: [ 11326 | 27 | 28 | 29 | 30 | 31 | 323539 ]


Skeik-Sprite

Procedurally Generated City

Posted by Skeik-Sprite May. 26, 2009 @ 8:29 PM EDT

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

Updated: 05/26/09 8:30 PM Log in to comment! | Share this!

The People Have Spoken

4 Comments

May. 26, 2009 | 8:34 PM ThePortalGuru says:

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.

May. 26, 2009 | 8:53 PM Skeik-Sprite responds:

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

Updated: May. 26, 2009, 8:53 PM

May. 26, 2009 | 8:39 PM FrozenFire says:

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

May. 26, 2009 | 8:52 PM Skeik-Sprite responds:

HE IS.


May. 26, 2009 | 8:47 PM Regularjoe says:

Sounds cool.

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

May. 26, 2009 | 8:49 PM Skeik-Sprite responds:

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


May. 27, 2009 | 6:53 AM LordZeebmork says:

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

May. 27, 2009 | 11:02 AM Skeik-Sprite responds:

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

Jump to Entry: [ 11326 | 27 | 28 | 29 | 30 | 31 | 323539 ]