Sonic and Sega Retro Message Board: Random Levels Project - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
  • 4 Pages +
  • 1
  • 2
  • 3
  • Last ►
    Locked
    Locked Forum

Random Levels Project v0.1.1

#1 User is offline DigitalDuck 

Posted 23 April 2017 - 01:59 PM

  • Arriving four years late.
  • Posts: 4607
  • Joined: 23-June 08
  • Gender:Male
  • Location:Lincs, UK
  • Project:TurBoa, S1RL
v0.1.1 available, details here

Original post follows below:

v0.1: DOWNLOAD


Controls - as Sonic 1, plus:
- down+A/B/C while standing: Spindash (Sonic 2)
- up+A/B/C while standing: Peelout (Sonic CD)
- up while rolling: unroll
- down or A/B/C while airborne: curl in air
- A while paused: regenerate level (only loses progress since last checkpoint)

------------

About S1RL:

S1RL: Random Levels Project is a hack/mod of Sonic the Hedgehog that allows the game to generate its own levels in real-time. Other changes have been made with this in mind: Sonic's moveset is now tailored for maximum control rather than risk/reward payoffs; acts are much longer than usual; the timer now shows hours, minutes, and seconds, and the time limit has been extended to 24 hours; the life system has been removed entirely, with any death resulting in going back to the previous checkpoint; the camera moves in front of Sonic to reveal more of the level ahead; checkpoints trigger when going past them at any height; and there are multiple palettes to each level that change either with time or with a monitor. There are also numerous other minor cosmetic changes and bugfixes.

S1RL contains a number of monitors additional or changed from the original game.
- Static: changes the level palette
- S: gives both invincibility and speed shoes
- Eggman: hurts Sonic
- Sonic: produces a number of rings

Code added to the game was written in 68k ASM. Data added to the game was first produced by a program written in C#, and then tweaked by hand.

This is version 0.1. Only Green Hill Zone is playable in this version.

------------

Development backstory:

The idea for this hack first came about in 2009. I was writing a maze generator and experimenting with tiling patterns and fitting different types of tiles together with different rules, and I wondered if the same could be done with the large chunks in a Sonic game. In 2010 I tried with limited success, getting Sonic 2 generating usually traversable levels in this way in the timespan of ~12 seconds. However, the levels weren't frequently traversable enough, nor was the generation time low enough, for myself to consider it a success. At the time I was also suffering a nasty breakup as well as needing to focus on my Games Computing degree, and the stress of it all left me abandoning it entirely for a while.

For my Final Year Project I chose to study real-time adaptive track generation in racing games, creating a racing game which dynamically produces a road ahead of the player tailored to their driving style, and writing a dissertation about it, complete with user testing showing its effectiveness. It was successful enough that I was asked to cut down the dissertation into journal paper format and submit it to GAMEON'2012 with help from my supervisor.

During that time I read a lot about procedural generation, took a thorough look at how other games used it and how well it worked, and began forming new ideas about creating random levels in a Sonic game. Gone was the original tile-based generator, replaced with a strip-based generator instead. Objects could and should be attached to chunks that they're not contained in, and even in entirely different strips, provided it makes sense for them to be there. Strips that are otherwise the same can be duplicated to allow object placements that prevent certain tile placements, making the objects as much part of the level generator as the terrain.

However, I couldn't work on it in any serious capacity. I was too busy applying for jobs and attending interviews (and not getting the jobs), working with a team and a publisher as my own company to produce a shmup (and getting rejected by the publisher), spiralling into a depression at the first two not going anywhere, getting a new girlfriend, and working on my own mobile games - I still intend to make this professional when I eventually find software I like. I had a few small attempts at it; inspired by Sonic Runners in 2014 I recreated the boss and playstyle, testing the infinite-level concept in S128, along with using strips that were 8 chunks long and tall and attempting to tile them correctly. I also made a quick prototype of S1RL towards the end of 2015 and... it was a massive improvement over my 2010 attempts.

But after simply not finding any engine up to snuff, I got stuck in a rut again. I still wanted (nay, needed) to code, and the focus shifted back to S1RL. I had no distractions. Studies were over, job well was dry, relationship was stable, and mobile games were going nowhere. So I dug deep into 68k (I'd learned it previously, but only with frequent reference to an instruction list), learnt how the game engine works, which parts needed to change and how, and plugged away at it. I didn't manage to do everything I wanted to, but I'm happy enough with the results to release it now. Of course, I'm going to continue working on it...

------------

How you can help:

This hack is far from finished, and certainly not bug-free. Reporting anything you feel shouldn't belong is appreciated, even if I've already been made aware of it and it's in the list below. What I find particularly important in this case is identifying any problems with the generated level - perhaps two strips are joined together incorrectly, or perhaps two objects are overlapping when they shouldn't be. Because of the nature of the hack, I will not be able to fix these without a savestate in the affected area and a full description of what's wrong and how it should look.

Known bugs:
- Objects respawn after hitting a checkpoint. This is not so much a bug as a workaround; I couldn't figure out the OPL routines, so I chose to have objects consistently respawn rather than unpredictably despawn/respawn/not load in the first place.
- Checkpoints sometimes load already activated, causing the level beyond to stop loading. I'm not sure what causes this, but regeneration (start+A) usually fixes it.
- Signposts sometimes load earlier than they should, with corrupted graphics and typically causing death shortly after touching it. Again, I'm not sure what causes this, but regeneration (start+A) usually fixes it.
- Demo does not lock Sonic's controls and cannot be ended with the start button. (fixed for next release)
- Dying with speed shoes causes music to stay at the faster speed until more speed shoes are collected.

------------

Credits:

Original game by SEGA and Sonic Team
Modified by Digital Duck using the Sonic Retro disassembly with great help from the SCHG How-to guides

Special thanks to all involved in making the disassembly and guides
This post has been edited by DigitalDuck: 17 July 2017 - 01:12 PM

#2 User is offline Ralakimus 

Posted 23 April 2017 - 03:40 PM

  • All I wish is gone away...
  • Posts: 188
  • Joined: 16-April 13
  • Gender:Male
  • Project:sekrit
After playing for a while, besides the aforementioned bugs, this was the only bug I could find:


This post has been edited by Ralakimus: 23 April 2017 - 03:41 PM

#3 User is offline The Prof 

Posted 24 April 2017 - 04:45 AM

  • The Island Professor
  • Posts: 107
  • Joined: 23-April 08
  • Gender:Male
  • Location:Orkney, Scotland
  • Project:Sonic 1 Yarmar Edition
  • Wiki edits:4
Wow, this is really awesome! I didn't expect object generation to be a part of it, never mind as good as that. The levels generated flowed very nicely, and all the chunks fit together well. I played through it for about 15 minutes and found it to be far better than a novice human's level design, and nearly on par with a journeyman human's level design.

It wasn't without problems though - there were a lot of bottomless pits where I think an experienced level designer would place an alternate route. I could understand it in a later level, but in the first three levels or so, there ought to be a minimum of (ideally well telegraphed) bottomless pits, in my opinion.

Certain things tended to repeat quite a lot, for example I ran into a lot of double backwards facing red springs with an upwards facing red spring behind them, and groups of three monitors just sat in the road. I know this is a fairly standard thing with procedural generation, but if it could be minimised it would really help the hack shine.

The last (and most minor) problem was that object design was occasionally rather unorthodox. I came across quite a few swinging platforms that led to nowhere and ring formations that just didn't belong. This never affected my enjoyment, but made it stick out that the levels were randomly generated.

Don't let the fact that I've spent longer on cons than pros put you off though. I found this amazing, and one of the best hacks I've played in some time, I just thought you'll appreciate help to improve it more as a dev. If that improvement gets made, then the hack will go from good to great.

#4 User is offline Brainulator 

Posted 24 April 2017 - 05:04 AM

  • Regular garden-variety user
  • Posts: 199
  • Joined: 11-October 15
  • Gender:Male
  • Location:somewhere. Where? You pick.
  • Project:ideas I shouldn't let out


So far, this looks like an interesting hack. I'll have to try it out.

#5 User is offline DigitalDuck 

Posted 24 April 2017 - 09:20 AM

  • Arriving four years late.
  • Posts: 4607
  • Joined: 23-June 08
  • Gender:Male
  • Location:Lincs, UK
  • Project:TurBoa, S1RL

View PostRalakimus, on 23 April 2017 - 03:40 PM, said:

After playing for a while, besides the aforementioned bugs, this was the only bug I could find:


Noted, thanks. Normally I'd need a savestate to identify where the problem is, but the breakable wall narrows it down enough for now.

View PostThe Prof, on 24 April 2017 - 04:45 AM, said:

It wasn't without problems though - there were a lot of bottomless pits where I think an experienced level designer would place an alternate route. I could understand it in a later level, but in the first three levels or so, there ought to be a minimum of (ideally well telegraphed) bottomless pits, in my opinion.


It's actually very easy to remove bottomless pits; the problem is that it would then reduce the variety of the level even further than it already is.

View PostThe Prof, on 24 April 2017 - 04:45 AM, said:

Certain things tended to repeat quite a lot, for example I ran into a lot of double backwards facing red springs with an upwards facing red spring behind them, and groups of three monitors just sat in the road. I know this is a fairly standard thing with procedural generation, but if it could be minimised it would really help the hack shine.


Yes, the problem with this is the lack of data. I created 36 acts of Green Hill Zone to use as a basis, but I'd need to do a couple of hundred to get any real variety out of it. I'll see what I can do to solve this problem, though.

View PostThe Prof, on 24 April 2017 - 04:45 AM, said:

The last (and most minor) problem was that object design was occasionally rather unorthodox. I came across quite a few swinging platforms that led to nowhere and ring formations that just didn't belong. This never affected my enjoyment, but made it stick out that the levels were randomly generated.


This is something I can fix easily, but it has to be on a case-by-case basis. If you provide savestates of when this happens, I can tweak the data to either remove the swinging platforms or add places for them to go, and fix the ring formations.

View PostThe Prof, on 24 April 2017 - 04:45 AM, said:

Don't let the fact that I've spent longer on cons than pros put you off though. I found this amazing, and one of the best hacks I've played in some time, I just thought you'll appreciate help to improve it more as a dev. If that improvement gets made, then the hack will go from good to great.


No problem. There's a reason it's only v0.1 :v:

#6 User is offline steveswede 

Posted 24 April 2017 - 09:29 AM

  • Posts: 4820
  • Joined: 13-April 09
  • Gender:Male
  • Location:Ask my hand
  • Project:Saerching for Google alternatives
  • Wiki edits:6
I haven't got anything to say really. Is a thumbs up good enough?

Posted Image
This post has been edited by steveswede: 24 April 2017 - 09:30 AM

#7 User is offline KingofHarts 

Posted 24 April 2017 - 10:28 AM

  • Posts: 1546
  • Joined: 07-August 10
  • Gender:Male
  • Project:Sonic 1 Complete
  • Wiki edits:1
I like what I see so far. My biggest takeaway that hasn't been mentioned... you have a nice little thing where the background still goes on while the game is paused. A very small feature, but I like it.

#8 User is offline The Prof 

Posted 24 April 2017 - 12:34 PM

  • The Island Professor
  • Posts: 107
  • Joined: 23-April 08
  • Gender:Male
  • Location:Orkney, Scotland
  • Project:Sonic 1 Yarmar Edition
  • Wiki edits:4

Quote

It's actually very easy to remove bottomless pits; the problem is that it would then reduce the variety of the level even further than it already is.


Quote

Yes, the problem with this is the lack of data. I created 36 acts of Green Hill Zone to use as a basis, but I'd need to do a couple of hundred to get any real variety out of it. I'll see what I can do to solve this problem, though.


Presumably the end goal is for the hack to feature 6 zones with three randomly generated acts (if not then feel free to disregard this), so lack of variety won't stand out half as much as it does right now. The original GHZ takes about 2-3 minutes to run through, maybe about 5 if you're quite slow at it. The lack of variety won't stand out in bite-sized chunks like that.

Speaking of chunks, would making new chunks to allow for new set pieces not be a good way of increasing perceived variety in your level design? The vanilla GHZ chunks are some of the easiest in the game to work with, but they can get repetitive if you're making long levels. It gets a lot worse in zones like Marble and Spring Yard.
This post has been edited by The Prof: 24 April 2017 - 12:35 PM

#9 User is offline DigitalDuck 

Posted 24 April 2017 - 01:36 PM

  • Arriving four years late.
  • Posts: 4607
  • Joined: 23-June 08
  • Gender:Male
  • Location:Lincs, UK
  • Project:TurBoa, S1RL

View PostKingofHarts, on 24 April 2017 - 10:28 AM, said:

I like what I see so far. My biggest takeaway that hasn't been mentioned... you have a nice little thing where the background still goes on while the game is paused. A very small feature, but I like it.


It's a feature the 8-bit version had that I liked. I figured it'd be fun to keep.

View PostThe Prof, on 24 April 2017 - 12:34 PM, said:

Presumably the end goal is for the hack to feature 6 zones with three randomly generated acts (if not then feel free to disregard this), so lack of variety won't stand out half as much as it does right now. The original GHZ takes about 2-3 minutes to run through, maybe about 5 if you're quite slow at it. The lack of variety won't stand out in bite-sized chunks like that.


Not quite, but it won't be the same as it is now, no. I'll probably abandon the act system for the most part and just have each zone be one act.

View PostThe Prof, on 24 April 2017 - 12:34 PM, said:

Speaking of chunks, would making new chunks to allow for new set pieces not be a good way of increasing perceived variety in your level design? The vanilla GHZ chunks are some of the easiest in the game to work with, but they can get repetitive if you're making long levels. It gets a lot worse in zones like Marble and Spring Yard.


GHZ has an extra thirty chunks added to it over the original, and I'll be adding more chunks in other zones too.

#10 User is offline Brainulator 

Posted 24 April 2017 - 01:47 PM

  • Regular garden-variety user
  • Posts: 199
  • Joined: 11-October 15
  • Gender:Male
  • Location:somewhere. Where? You pick.
  • Project:ideas I shouldn't let out
Just a note: once you get into the demos, you won't get out until you reset.

#11 User is offline DigitalDuck 

Posted 24 April 2017 - 02:44 PM

  • Arriving four years late.
  • Posts: 4607
  • Joined: 23-June 08
  • Gender:Male
  • Location:Lincs, UK
  • Project:TurBoa, S1RL

View PostBrainulator, on 24 April 2017 - 01:47 PM, said:

Just a note: once you get into the demos, you won't get out until you reset.


Huh. You can also partially control Sonic for the brief period he's on-screen, although you can't move him.

I'll fix that for next time.

#12 User is offline Brainulator 

Posted 24 April 2017 - 04:32 PM

  • Regular garden-variety user
  • Posts: 199
  • Joined: 11-October 15
  • Gender:Male
  • Location:somewhere. Where? You pick.
  • Project:ideas I shouldn't let out
I did notice that, hehe.

I have two musical notes (pun not immediately intended, but I'll take it):

  • To make sure, is the invincibility music supposed to be off? I assume yes, but I want to address this elephant in the room.
  • I feel like that with the length of the acts/zones given, it seems to become a very real possibility that you can get tired of the music after a while. Do you think palette changes (time or monitor) could create variation with the music to make the experience less monotone, or perhaps pressing a button while paused can enable or disable music?


When writing this message, I had a third non-musical note (teehee) in mind, but I forgot it. When I think of it, I'll let you know.

How come I can't see most images or videos here though?

#13 User is offline DigitalDuck 

Posted 24 April 2017 - 05:15 PM

  • Arriving four years late.
  • Posts: 4607
  • Joined: 23-June 08
  • Gender:Male
  • Location:Lincs, UK
  • Project:TurBoa, S1RL

View PostBrainulator, on 24 April 2017 - 04:32 PM, said:

To make sure, is the invincibility music supposed to be off? I assume yes, but I want to address this elephant in the room.


Yes and no. It wasn't initially intended, but I kept it in.

View PostBrainulator, on 24 April 2017 - 04:32 PM, said:

I feel like that with the length of the acts/zones given, it seems to become a very real possibility that you can get tired of the music after a while. Do you think palette changes (time or monitor) could create variation with the music to make the experience less monotone, or perhaps pressing a button while paused can enable or disable music?


Disabling the music is something I already have planned and half-implemented. I considered the music changing with the time of day, but I don't know how to create music in a format I can use in-game, and it's more effort than I wanted to do for now (my focus was on the level generation). It's something on my to-do list, though.

#14 User is offline ExecByte 

Posted 24 April 2017 - 07:07 PM

  • Posts: 98
  • Joined: 10-May 06
  • Gender:Male
  • Location:Ohio
  • Project:Sonic: The Lost Worlds
  • Wiki edits:11
Nice! I remember years ago thinking about randomly generated levels but, never got into 68k asm enough to do it. Also was busy with my hack and haven't had time since. Good to see it being done!

#15 User is offline Irixion 

Posted 24 April 2017 - 10:59 PM

  • Posts: 1496
  • Joined: 30-December 04
  • Gender:Male
  • Location:Ontario, Canada
  • Project:Life
  • Wiki edits:152
If I have to listen to the Green Hill theme again, I'm going to kill myself. I played through the level for 18 straight minutes, with no end in sight. Very interesting concept, but after 18 minutes, it makes me wanna die inside. :v:

  • 4 Pages +
  • 1
  • 2
  • 3
  • Last ►
    Locked
    Locked Forum

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users