Level Generator :D

Tools, Editors and other programs around SMC.

Moderator: SMC Team

Level Generator :D

Postby Guest_xD » 16 Oct 2010 12:44

Yo!

I might be making a Level Generator (notice the might, if I lose interest I will quit) for SMC.

Basically it is an application that allows you to set several things (ie tileset, difficulty, width, height) and then auto generates a level after your guidelines.

Right now I'm at the very beginning. Heres a small feature list for you though:
-Allows to set Difficulty Level from Easy to Crazy (no effect on the level yet)
-Allows to set Tileset (only green and castle are supported yet)
-Creates a small base floor for Maryo at the beginning
-Creates background gradient and images dependant on the tileset

The next step is to make it create platforms and floors throughout the level (based on difficulty level and tileset + randomness), then place enemies, pipes etc on them.
After that place decoration (for castle torches, bones or such and for green hedges bushes etc).
The final step is to create warps to bonusses and the exit.

Lets see if I will ever complete it and how it will turn out :)

For those who care, I'm coding it in C#.

Best regards
...
User avatar
Guest_xD
Turtle boss
Turtle boss
 
Posts: 988
Joined: 23 Nov 2008 18:01
Location: Asdfdorf

Re: Level Generator :D

Postby mrvertigo27 » 18 Oct 2010 08:37

ooh.... .net.... evilness! hope it works though, might be cool!
I'm A YouTube Gaming Commentator https://www.youtube.com/user/Spitfire25565
User avatar
mrvertigo27
SMC Team
SMC Team
 
Posts: 2316
Joined: 20 Aug 2009 16:10
Location: the state of insanity

Re: Level Generator :D

Postby Guest_xD » 18 Oct 2010 11:29

mrvertigo27 wrote:ooh.... .net.... evilness! hope it works though, might be cool!


I've had some problems lately, now I thought up a way to solve them, I just don't feel like coding on it right now, so it will wait some time...

It works like this:
First it generates the new level.
Then it generates the settings and maryo (at the standard position, x=50, y=200 or so if I remember correctly).
Then it checks for your tileset and generates a background gradient + images (also little randomness here ^^) into the level.
After that is done, the actual level is made this way:
It generates a certain amount of platforms (depending on how big the level should be (you can choose: Small, Medium, Big, Gigantic) in the tileset.
And now the step where I got stuck but have a solution up now: It goes over the platform and connects some of them to create bigger ground pieces in total

That is about what it does right now, so the levels it generates right now are just a set of empty platforms with nothing on them at all....
But it will evolve :)

Best regards
...
User avatar
Guest_xD
Turtle boss
Turtle boss
 
Posts: 988
Joined: 23 Nov 2008 18:01
Location: Asdfdorf

Re: Level Generator :D

Postby Crabmaster » 18 Oct 2010 15:08

This sounds like a good idea, and it shouldn't be to hard to do for a 2D platformer, if a 3D game I play can do it too. :mrgreen:
World takeover plans got me busy!
User avatar
Crabmaster
SMC Team
SMC Team
 
Posts: 1684
Joined: 05 Sep 2009 00:18
Location: CrabWorld

Re: Level Generator :D

Postby Guest_xD » 18 Oct 2010 16:48

Crabmaster wrote:This sounds like a good idea, and it shouldn't be to hard to do for a 2D platformer, if a 3D game I play can do it too. :mrgreen:


It's harder than you might think.
Right now I have a tilelist and write that, after all tile transformations are done, to the level.
So basically I now have to think up some clever algorithm that makes the tiling perfect and how a good editor would make it.

When everything tiles good and as it should, I can think about adding decoration tiles, enemies, blocks, secrets, bonusses, and whatnot...

Long way to go.

Best regards
...
User avatar
Guest_xD
Turtle boss
Turtle boss
 
Posts: 988
Joined: 23 Nov 2008 18:01
Location: Asdfdorf

Re: Level Generator :D

Postby mrvertigo27 » 18 Oct 2010 17:23

yah that might be tough, youd have to set the program to check for tile width and possibly height and place them accordingly.... plus generate random gaps and enemy stoppers, boxes, enemies etc.
I'm A YouTube Gaming Commentator https://www.youtube.com/user/Spitfire25565
User avatar
mrvertigo27
SMC Team
SMC Team
 
Posts: 2316
Joined: 20 Aug 2009 16:10
Location: the state of insanity

Re: Level Generator :D

Postby Guest_xD » 18 Oct 2010 17:28

mrvertigo27 wrote:yah that might be tough, youd have to set the program to check for tile width and possibly height and place them accordingly.... plus generate random gaps and enemy stoppers, boxes, enemies etc.


Right now it only supports tilewidth/height 64 and tilesets that support all tiles (including middle left/right bottom/top)...

I dont think I will extend it over that degree of support and just give you only the tilesets that are able to be supported as choice when generating a level (f.e. green tileset and castle tileset are possible like this).

Random gaps, that is already taken care of, enemy stoppers will do along with enemies (just place some on platforms, maybe rokkos, gees, etc), boxes also shouldnt be a problem.
Im more worried about the fact that spawning decoration in a level wont be easiest due the fact that I have to find out how to check for an images width/height and then place them accordingly on the terrain.

Best regards
...
User avatar
Guest_xD
Turtle boss
Turtle boss
 
Posts: 988
Joined: 23 Nov 2008 18:01
Location: Asdfdorf

Re: Level Generator :D

Postby Guest_xD » 18 Oct 2010 20:38

Sorry for doublepost, but I just noticed that this would fit better in the "Add-Ons and 3rd Party Things" forum.

Please move it there

Thanks in advance
...
User avatar
Guest_xD
Turtle boss
Turtle boss
 
Posts: 988
Joined: 23 Nov 2008 18:01
Location: Asdfdorf

Re: Level Generator :D

Postby Yoshis_Fan » 18 Oct 2010 20:50

Moved!
~Yoshis_Fan~

I'm from Germany, my English is not the goodest ^^ I know, "best"! ^^
User avatar
Yoshis_Fan
MVP
MVP
 
Posts: 941
Joined: 25 Nov 2008 16:11
Location: Deutschland/Germany

Re: Level Generator :D

Postby Guest_xD » 18 Oct 2010 20:56

Yoshis_Fan wrote:Moved!

Thanks =)
...
User avatar
Guest_xD
Turtle boss
Turtle boss
 
Posts: 988
Joined: 23 Nov 2008 18:01
Location: Asdfdorf

Re: Level Generator :D

Postby Guest_xD » 19 Oct 2010 17:19

I'm making fairly well progress.

Enemy creation nearly works, there just is one bug left.
Because I'm too lazy to explain the details of the bug, here a screenshot so you can see what it does:

Image

It has something to do with the program separating the tiles in "TileBlocks"...

Hopefully I will find the cause and will be able to fix the bug.
EDIT: Fixed, finally :) Now moving on and setting the level exit and boxes with mushrooms etc =)
Other than that, tiling and enemy creation is working just fine :)

Best regards
...
User avatar
Guest_xD
Turtle boss
Turtle boss
 
Posts: 988
Joined: 23 Nov 2008 18:01
Location: Asdfdorf

Re: Level Generator :D

Postby smc_gamer » 20 Oct 2010 01:17

Wow... just wow. :shock:
That's amazing!
Only problem now is that no one will make levels any more. :mrgreen:
smc_gamer
Blog | "If good things lasted forever, would we appreciate how precious they are?" -Hobbes
User avatar
smc_gamer
Static Saw
Static Saw
 
Posts: 245
Joined: 15 Aug 2010 13:49
Location: United States

Re: Level Generator :D

Postby Crabmaster » 20 Oct 2010 01:33

Well people will still make levels, levels like castles and levels that are for stories and level-sets will still need to be customized. :nutcase:
World takeover plans got me busy!
User avatar
Crabmaster
SMC Team
SMC Team
 
Posts: 1684
Joined: 05 Sep 2009 00:18
Location: CrabWorld

Re: Level Generator :D

Postby smc_gamer » 20 Oct 2010 01:43

It was merely a joke. :bshroom:
smc_gamer
Blog | "If good things lasted forever, would we appreciate how precious they are?" -Hobbes
User avatar
smc_gamer
Static Saw
Static Saw
 
Posts: 245
Joined: 15 Aug 2010 13:49
Location: United States

Re: Level Generator :D

Postby Guest_xD » 20 Oct 2010 09:57

Right now, the Generator has one scheme to make levels, meaning the generated levels barely have variety.
A possible way to resolve this issue is to input several ways to create a level (ie one huge tileblock instead of a bunch, some creative things like riding a rokko should also be possible) and let it choose one at random so the levels have at least SOME variety.
I've added a goal door at the end of each level and there still are several bugs to fix (ie sometimes you go higher than -4000 on y, but it ALWAYS sets the cam limits to the default 20000 and -4000).

If you have ideas for schemes that are possible to generate with a program, tell me, I will try to add as much variety in the levels it generates as possible :)

Also, for those who are too excited about what the generator is now, just go ahead, take it and try it out for yourself.. The levels are playable but are barely fun right now.
Windows Users Only... I guess
Note all the stuff I told you above:
-I'm not done coding it yet
-The levels lack variety and fun (they are playable though)
-The levels lack Power-Ups and Boxes
-The levels have a good chance to be buggy in one or another way (if it is about the level exceeding the cam limit, don't tell me, if you find another bug, tell me :P)

EDIT: On my computer it needs from 20 to 2000 ms to create a level, where a higher size and difficulty degree increase the time it needs. I'm using a Win 7 Home Premium Acer Aspire (@2.0 GHz Dual, 2 GB RAM)

Best regards
...
User avatar
Guest_xD
Turtle boss
Turtle boss
 
Posts: 988
Joined: 23 Nov 2008 18:01
Location: Asdfdorf

Re: Level Generator :D

Postby mrvertigo27 » 20 Oct 2010 16:05

asw a point of clarification this program can be run semi reliably in mono on linux as well. (I tested) :mrgreen:
I'm A YouTube Gaming Commentator https://www.youtube.com/user/Spitfire25565
User avatar
mrvertigo27
SMC Team
SMC Team
 
Posts: 2316
Joined: 20 Aug 2009 16:10
Location: the state of insanity

Re: Level Generator :D

Postby Guest_xD » 20 Oct 2010 22:06

mrvertigo27 wrote:asw a point of clarification this program can be run semi reliably in mono on linux as well. (I tested) :mrgreen:


Thanks for testing it ^^
I guess I will continue working on it tomorrow and add support for bonusboxes containing powerups and such..

Best regards
...
User avatar
Guest_xD
Turtle boss
Turtle boss
 
Posts: 988
Joined: 23 Nov 2008 18:01
Location: Asdfdorf

Re: Level Generator :D

Postby smc_gamer » 21 Oct 2010 20:54

I tried this out earlier. It works nice, and, even on my poor netbook, the levels were generated in 230 milliseconds. The levels themselves weren't bad, but I did notice a lot of Rokkos, one right after another. My favorite part was the use of vines. That was great.
smc_gamer
Blog | "If good things lasted forever, would we appreciate how precious they are?" -Hobbes
User avatar
smc_gamer
Static Saw
Static Saw
 
Posts: 245
Joined: 15 Aug 2010 13:49
Location: United States

Re: Level Generator :D

Postby Dr. Luygi » 21 Oct 2010 22:14

It's great so far! but the levels lack creativity and most levels are very alike. So far, so good!
Hello again, old friend.
Dr. Luygi
Gee red
Gee red
 
Posts: 368
Joined: 05 Oct 2010 22:33

Re: Level Generator :D

Postby mrvertigo27 » 21 Oct 2010 23:14

once it is fully implemented we can tweak it and make it more usable, i like the way this is going.
I'm A YouTube Gaming Commentator https://www.youtube.com/user/Spitfire25565
User avatar
mrvertigo27
SMC Team
SMC Team
 
Posts: 2316
Joined: 20 Aug 2009 16:10
Location: the state of insanity

Next

Return to Add-Ons and 3rd Party things

Who is online

Users browsing this forum: No registered users and 1 guest

cron