• Do not use Works in Progress as a way of avoiding the releases system! Works in Progress can be used for sharing early betas and for getting suggestions for improvement. Releases of finished content are not allowed in this forum! If you would like to submit a finished addon, click here for instructions on how to do so.

Recreating the Mania Special Stage, but very stuck becuz I'm an amatuer.

Status
Not open for further replies.

EeveeEuphoria

a pikachu irl
Heyo! As the title suggests, I'm recreating the special stages from Sonic Mania?
Why? Because I said so.

I've gotten a lot of help from the SRB2 discord, but I feel like I have too many questions to ask for the discord to handle in order to continue progress on this script.

Here's a breakdown of what I've done so far:
  • Made UFO object
  • Given the UFO a track object to follow, in which each track object has an assigned angle (0, 1, 2...), and is the order the UFO must follow. When it has reached the last one, it automatically resets the value to 0, and goes to the 0th track position.
  • Implemented very basic "Mach Speed" system, where the player's max speed is cut down until reaching mach 2, and mach 3.
  • Removed the HUD, to later implement a new HUD.
  • Semi-implemented the ring-based timer system, doesn't kill the player atm since I don't know how to actually do that I guess.
  • Made it so the player is always running no matter what (thanks PreThinkFrame!)
  • Partially implemented the floating ring box, via a very hacky method (involves assigning the player a variable so the playerthink takes care of the adding rings portion, it adds 1 ring every few tics like in Mania), but hey it works.
  • Partially implemented a system to determine if the player is facing forwards or backwards in the track...it's currently broken, and I don't know why since the code was given to me by someone else.

So as you can see, a lot has been done. However, there is a lot more to go before this is even something you could even call a special stage.

So, my current goals are:
  • The direction of the player needs to be able to be determined, so that the UFO can go in reverse. The current system in place errors out, and I don't know why.
  • The blue spheres should bob up and down, like in Mania. Not sure how it's done, since they're all out of sync, I think it's cuz Mania loads them in like in a low draw distance kind of way, ergo they start bobbing the moment they're able to load in, and that's how they're out of sync.
  • Limit the player's ability to change angles, from what I remember the special stages gave the players tank controls, until the player is airborne, in which they are given more control of their movement.
  • Put the player in an exit state when near the UFO, in which they play out the animation in Mania (they curl up, smash right into the ufo?, and zoom up as they leave the stage)
  • Give the UFO sprites, in which it can utilize skincolors to color the chaos emerald it carries around. Not a sprite artist, so I'll have to rely on someone else to do this. Would say I'd pay, but can't do it here, that'd break the rules, understandably so.
  • Maybe try to aim for how the falling off stage mechanic works, as it stands it's not entirely necessary because falling into a death plane does work, but would add to the Niceness of this mod.

I'll admit, some of this stuff is gonna go way over my head, but I've laid down a nice groundwork, and although I want to continue on this, I would not object to handing this over to someone else who is vastly more competent at lua than I am. I only really just got started with lua at the very end of last year, with the release of MMT. I don't really count my past ventures in Roblox/G-Mod since the scripts I made didn't really do much.

The PK3 with everything I've made so far is in the attachments, and a very basic test map is provided, which is what I've been using for these tests. It has a UFO, a floating ring box, blue spheres (enough to get to mach 3, the script is currently very low on the requirements), and the track objects to make the UFO work. Also, the UFO has a very bad placeholder sprite, but hey you can just about make out what it's supposed to look like. Oh, and the broken code for handling the player's direction relative to the track is present, so you'll get an error. Just comment it out using --[[ fancy stuff.
 

Attachments

  • Mania Special Stage.7z
    42 KB · Views: 359
Last edited:
This is really cool. Do you plan on having custom special stage map support? I can see a lot of interesting maps being made with this.
 
About the timer, there's an easy way to script it.
Code:
local ringtime = 35 // Initialize the timer, it's gonna be used often.
addHook("MapLoad", do // Initialize the script
     for player in players.iterate do
        if mapheader.lvltitl == "Special_Stage" then // Does the map say it is a special stage?
             ringtime = 35 // Sets the countdown to 35, since this will go down by 1 every tic.
        end

     end
end)


addHook("ThinkFrame", do
    for player in players.iterate do
        if ringtime == 0 and player.bot == 0 then // Bots don't have rings, so we try to avoid running the function for them.
            player.rings = $ - 1
            ringtime = 35 
         end


        ringtime = $ - 1 // Remove one from ringtime every tic.


         if player.rings == 0 and ringtime == 0 and player.bot == 0 then // This part bugs out if we omit "and player.bot == 0". This simple part detects when the player has 0 rings and the countdown is depleted. The player then dies out of lack of rings.
            player.playerstate = PST_DEAD
        end
    end
end)
 
I actually already have this system implemented, I just didn't know how to actually set the player to be deadenend. Thanks for this tho, I'll try out just setting the player to PST_DEAD.
About the timer, there's an easy way to script it.
Code:
local ringtime = 35 // Initialize the timer, it's gonna be used often.
addHook("MapLoad", do // Initialize the script
     for player in players.iterate do
        if mapheader.lvltitl == "Special_Stage" then // Does the map say it is a special stage?
             ringtime = 35 // Sets the countdown to 35, since this will go down by 1 every tic.
        end

     end
end)


addHook("ThinkFrame", do
    for player in players.iterate do
        if ringtime == 0 and player.bot == 0 then // Bots don't have rings, so we try to avoid running the function for them.
            player.rings = $ - 1
            ringtime = 35 
         end


        ringtime = $ - 1 // Remove one from ringtime every tic.


         if player.rings == 0 and ringtime == 0 and player.bot == 0 then // This part bugs out if we omit "and player.bot == 0". This simple part detects when the player has 0 rings and the countdown is depleted. The player then dies out of lack of rings.
            player.playerstate = PST_DEAD
        end
    end
end)

Hm, if this works via using objects as checkpoints, then this is exactly what I'll need. I'm friends of friends, so I don't suppose it'd be asking too much to borrow it.
EDIT: Contacted fickle, they said the code is able to be re-used anywho, so I'll see what they did to achieve this. Luckily they said the checkpoint-system is object based!
For detecting if the player is backtracking, you could probably base it off fickle's circuit redux script: https://mb.srb2.org/showthread.php?t=46545. You might have to ask her if you can borrow some of the code, though.
 
Last edited:
So are all characters going to have the same jump height when in the special stage?
Or maybe be able to use *much nerfed* versions of their ability or something? (Like Tails could press Jump in midair to do a fast flight, sorta like a double jump but the animation is Tails rising very fast with his flight, and then maybe slowly descend.) (Knuckles maybe could have the multiglide, so there'd be no landing lag, and you could glide into monitors n stuff...) (Amy... keep her jump height and hammer ability? Maybe place some springs in the special stage that allows her to get to a small area with more spheres and rings, heck if you can or want to, only make the springs appear in her special stage.) (Sonic uh... maybe he'd reach mach faster by 5 orbs? Or be slightly faster compared to the rest? Or maybe a nerfed thok?)

(I say give knux multiglide during the special stage, because it'd make more sense to hit a ring monitor by going into spin mode, rather than into glide_cancel.lmp or something. That and he already cant gain vertical height so it balances out? It looks cool and would just fit in I think. Only during the special stage though maybe.)
 
Last edited:
Status
Not open for further replies.

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top