This site is no longer active and is available for archival purposes only. Registration and login is disabled.

2d Platform Game - Random Level Generation


2d Platform Game - Random Level Generation

Postby brendan » Oct 3, 2002 @ 2:13am

Hi all,
I'm creating a platform game, and was wondering if anyone has any good ideas on creating random levels, the levels consist of multiple layers:

Layer 1: (background)
Layer 2: (objects) etc etc etc....

these are in the form of a linked list etc....

the random generation would have to produce (plaforms, walls, etc) the background behind the layers would be std... it would also be good for it to add items to the level, i.e a key to open a door, items to collect to complete the level etc, as well as the bad guys ;-)


The levels range from [20][20] to [500][500] in size, so there is quite a range.

Does anyone have any "good" way of doing this, or is there some code out there already?

The way I see it there are 2 ways, create the path first, then put in "bugus" material, or randomly create and test until it is playable.....

anyhow ideas?
User avatar
brendan
pm Insider
 
Posts: 451
Joined: Oct 23, 2001 @ 2:51am
Location: Hobart, Australia


Postby sponge » Oct 3, 2002 @ 2:18am

Can't help much, but I have a feeling this will be a tough project. Never seen randomly generated sidescroller levels before. You could have a preset bank of sorts, sections of levels, and have these sections of levels pieced together. That would ensure the quickest, playable random generator.
holy internets batman.
User avatar
sponge
Not sponge
 
Posts: 12779
Joined: Jan 13, 2002 @ 8:04am
Location: New Hampshire


Postby brendan » Oct 3, 2002 @ 3:45am

yes, that may work, if they consisted of about 8x8 "blocks", but then you would have to define then as a 1-16 block for entry/exit points, i.e left,right,up,down or any combination 2^4 and then you would have to make sure the entry/exit point existed in the "middle" of the 8x8 section...

All you then need to do it have a start group and an end group of blocks... creating the groups in between types 1-16, there could also be a few different variation on a group block etc ie 16 types of group type 1 (left exit etc), this could be selected randomly.

this should simplify the random generation part, i.e just checking theres a path.... but with 16 type of blocks with 16 variations etc it would look random enough!

I suspect the code would be somewhat like a "pipe" game with the water comming down the line....

;-)

(anyhow still complicated)
User avatar
brendan
pm Insider
 
Posts: 451
Joined: Oct 23, 2001 @ 2:51am
Location: Hobart, Australia


Postby sponge » Oct 3, 2002 @ 4:37am

holy internets batman.
User avatar
sponge
Not sponge
 
Posts: 12779
Joined: Jan 13, 2002 @ 8:04am
Location: New Hampshire


Postby TechMage » Oct 3, 2002 @ 7:30am

User avatar
TechMage
pm Insider
 
Posts: 2223
Joined: Sep 16, 2001 @ 5:40pm
Location: In Your Head


Postby Guest » Oct 3, 2002 @ 8:38am

Guest
 


Postby pazazzo » Oct 3, 2002 @ 9:53am

already heard of the unofficial fullscreen weeboo ? take a look at this 4mb .avi file:
[edit] if the .avi link doesn't work try this one:

again, this is not official, it was another experiment since i've been a big weeboo fan from the very beginning of its availibility. so, the game idea, it's name and the used sound effects in this video are copyright by frederik malmer ! everything else (graphics & code) was done by me...

maybe, if someone really likes to release a final version, featuring more levels, i could provide code or help a little here and there, there's also a small level-editor i made for this version...

anyway, the whole thing is still courtesy of frederik malmer, so he really should be asked first ;)
pazazzo
 


Postby Guest » Oct 3, 2002 @ 10:05am

delete?
Guest
 


Postby Malmer » Oct 3, 2002 @ 2:42pm

pazazzo.

Howcome you never told me of this? It's cool.

As for Weeboo, I won't give out the sourcecode to it, because it is so crappy I'm somewhat ashamed of it. Was a port of a DHTML game I made, so it is basically translating JScript code into C++. Add to that that I had to change some things and it eventually turned out to be pretty messy. In other words: It is a wonder it even works.

Either way...this is so fun. Just one thing. My name is spelled the swedish way: Fredrik Malmer. No extra 'e' in Fredrik.

Oh...for all you fans out there...if there is time in the future there might be a future for a new Weeboo game. I mean...quite a lot could be done with the little hairy guy. Oh, incase you didn't know. Weeboo is a rabbit. :)
All your base are belong to us
User avatar
Malmer
pm Member
 
Posts: 768
Joined: Apr 26, 2001 @ 5:15pm
Location: Sweden


Postby Malmer » Oct 3, 2002 @ 2:44pm

Oh, the reasons for weeboo not being fullscreen are:

1) Quite bad code makes it slow so on lowerend devices (MIPS, SH3) it really wouldn't run very well
2) The DHTML version had that size, so I feel like changing all too much.
All your base are belong to us
User avatar
Malmer
pm Member
 
Posts: 768
Joined: Apr 26, 2001 @ 5:15pm
Location: Sweden


Postby pazazzo » Oct 3, 2002 @ 3:34pm

pazazzo
 


Postby Jadam » Oct 4, 2002 @ 12:00am

User avatar
Jadam
I'm a STAR!
 
Posts: 3245
Joined: Apr 9, 2002 @ 7:24pm
Location: Stony Brook, NY


Postby Dave H » Oct 4, 2002 @ 12:32am

Dave H.
Lead Programmer (Repton PPC/7650)
[url=http://www.handango.com/PlatformProductDetail.jsp?productId=43741]
Buy Repton Online here!
[/url]
User avatar
Dave H
pm Member
 
Posts: 164
Joined: Oct 3, 2002 @ 5:01pm


Postby TechMage » Oct 4, 2002 @ 7:19am

User avatar
TechMage
pm Insider
 
Posts: 2223
Joined: Sep 16, 2001 @ 5:40pm
Location: In Your Head


Postby brendan » Oct 7, 2002 @ 3:35am

User avatar
brendan
pm Insider
 
Posts: 451
Joined: Oct 23, 2001 @ 2:51am
Location: Hobart, Australia


Next

Return to Windows Mobile


Sort


Forum Description

A discussion forum for mobile device developers on the Windows Mobile platform. Any platform specific topics are welcome.

Moderators:

Dan East, sponge, Digby, David Horn, Kevin Gelso, RICoder

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron