-
|
This is actually more of a question then idea but does level wrapping exist in sonic worlds next? AKA, Zones like Labyrinth or Metropolis have a feature where when you reach the bottom of the level, you are teleported to the top of the level seamlessly. Does sonic worlds next have that? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
|
Not built in, no. the reason the level wrapping worked in Sonic 1, 2, and 3 was actually because of a technical limitation, there was a specific maximum height (2047) that levels could be due to how level layouts worked. Sega took advantage of that by setting the maximum Y size of the level to 2048, and the minimum to -256. This meant the level could seamlessly repeat with no noticeable oddities. Unfortunately, this limitation is not one Godot has, levels can be arbitrarily sized, and the level will not automatically wrap around, it will just end. You can make players and objects adjust their positions with a wrap funciton in their script, but it will look terrible without some way to make the level duplicate itself and prevent the parallax background from just snapping back to where it "should" be. |
Beta Was this translation helpful? Give feedback.
-
|
It's perfectly doable, you are just going to need to roll your own camera code and maybe parallax for it depending on how hard it is to synchronize your teleport with it without creating an obvious seam. Basic idea would be to make your wrapping area have duplicate tiles near the top and bottom of the level (maybe 128-256 pixels worth of duplicate tiles) and move the player to the opposite end of the playfield if they pass a certain coordinate. If you don't do something with the camera at this point it's going to try to catch up and ruin the illusion that it's one continuous position. You might be able to fix that just by moving the camera at the same time as you move the player (in fact it might make more sense to track the camera to initiate the flip than to track the player). Parallax is where it gets tricky though because unless you have some way of changing your parallax offset at the same time as you move your camera you are going to get a very obvious shift there. Taking care of hiding these problems is really all there is to it though. |
Beta Was this translation helpful? Give feedback.
Depends on what you want. If you want the wrapping, you could try my other suggestion, but I can't promise how well it'll work.
If that doesn't work, I encourage you to see if google can be any more help.