don't click here

Freedom Engine (2D Sonic Engine on Unity)

Discussion in 'Fangaming Discussion' started by MarmitoTH, Apr 6, 2020.

  1. MarmitoTH

    MarmitoTH

    Member
    21
    28
    13
    Update 3:


    Old post:
    Update 2:

    Update 1:

    Hi! I'm working in Sonic Freedom so to be able to move the character around I needed to code some physics and stuff, emulating the classic sonic mechanics. I'm planning to release it, so if there's anyone interested in using it, please show yourself. It doesn't have any of the Tripplejaz assets, so I replaced everything with generations stuff.

    For now I want people to test the build and report any bug or leave any feedback.

    Ok, it's finally here! Didn't want to spend so much time on it, I'll probably update it later.

    Features: Classic Sonic Physics, moving platforms, rings, checkpoints, springs(and hidden springs), a basic enemy, monitors, basic shield, basic UI(time, ring and life counter) and spikes.

    Source: GitHub
    Build: MediaFire
     
    Last edited: Apr 25, 2020
    • Like Like x 5
    • Useful Useful x 1
    • List
  2. Lilly

    Lilly

    Member
    2,418
    233
    43
    United States
    Shang Mu Architect
    I've seen a lot of (2D) Sonic engines for Unity before, but honestly, this looks like the best one by far! Your video showcased every feature of Sonic's collision system that I'm aware of, besides a loop-de-loop system and clipping onto sloped ceilings. (Which is why I assume you feel it's not ready for release yet?) Everything else was there, and functioning nicely. This is impressive.

    So, as a longtime Game Maker user just starting to use Unity, to increase my options, consider me very interested in this thing. While I know there's more than one way to model Sonic's collisions, I'm very curious how you made 2D Sonic work in Unity.
     
  3. Lapper

    Lapper

    Lappering Tech Member
    1,763
    950
    93
    England
    Sonic Studio, Sonic Physics Guide, Kyle & Lucy, Freedom Planet 2
    That slope jump at 1:59 looks really satisfying to pull off just like it should.
    So far responsive & fun. One small thing to mention is because the camera is always locked on Sonic, certain things will feel different, like spindashing and jumping. I can tell aside from the visual difference everything seems really well done.

    So good overall! I'm gonna mess around with this a lot.
     
  4. sketche99

    sketche99

    Member
    You can put me down as interested in using it, and showing myself!
    Would love to see this available for public use for fan games!
    Great Job MarmitaTH!
     
  5. MarmitoTH

    MarmitoTH

    Member
    21
    28
    13
    Thanks for the feedback! Loops and ceiling clipping(I think it was turned off in this particular demo) do work in the engine, Sonic Freedom have those already, I'm just trying to figure out a good way to handle loops in this perspective, the layer switching(the one I'm using for actual 2D) may look kinda off, I'll probably need to code some kind of path system to move sonic along the Z axis.

    Thanks! Camera is kinda boring to code, but I'll definitely add some of its classics behaviors.

    Good to know, and thanks for the feedback!
     
  6. Foxeh

    Foxeh

    Animator Member
    43
    17
    8
    In the Walls
    Sonic AGES and Writing a documentation for Realms
    feels nice, my curiosity might end up having me mess with this if it was available. but i've been preoccupied with sonic realms
     
  7. MarmitoTH

    MarmitoTH

    Member
    21
    28
    13
    New update, now with loops, ring loss, ceiling reacquisition, spikes, moving platforms, shields, a very basic enemy, checkpoints and an actual level showing all the features so far. Even with all this stuff, there's still a lot of things to do! Man, sonic engines are massive!!! I replaced some assets with Forces ones, they are technically better, the shaders I coded are more useful(and easier to code) since it's just the metallic pipeline.

     
  8. Maybe it's because I'm not used to running on circles like you can in the engine, or maybe the rolling speed is a lot higher than I thought it was, but it seems like Sonic's rolling doesn't have any speedcap or it's really really high. Not sure if that was intentional but I thought I might point that out, because when you roll around the circles you just keep gaining speed until you eventually clip through the circle itself and run into a wall.

    All in all this is great stuff though. Keep up the good work.
     
  9. Lilly

    Lilly

    Member
    2,418
    233
    43
    United States
    Shang Mu Architect
    This is a nice update! The last preview build was already impressive, and this new one also great. I like how you handled 2.5 loop-de-loops, floating platforms feel good, and the engine's performance doesn't feel bloated after all of the extra stuff you've added, either!

    How much longer before you feel safe in releasing the template? It looks like you're nearly finished, and I imagine there are some features you might choose to leave out, so people have an easier time plugging their own code in. (Like pausing, title screen, special stage plugs, alternate characters, etc.) Sometimes it's possible to add too much stuff to a base engine; it can be tough to gut those things from template engines when you're messing with it for the first time, and need to remove them to plug in your own stuff.

    So you already had those in the engine, but had to turn those off while you sorted them out? I totally understand that, and it looks like you've done well with the ceiling reacquisition in this update! The more I see of this engine, the more I want to play with it when you release the source. You can count me in, at least.
     
  10. Vangar

    Vangar

    Member
    3,654
    62
    28
    Honestly, this looks fantastic! Can't wait for a source / framework release honestly. Would love to make some levels in unity.
     
  11. MarmitoTH

    MarmitoTH

    Member
    21
    28
    13
    There's no speedcap, gonna add in the next update. Thanks for the feedback!

    Thanks, I think that the next update will be the release one, I don't want to spend too much time on it.
     
  12. MarmitoTH

    MarmitoTH

    Member
    21
    28
    13
  13. Foxeh

    Foxeh

    Animator Member
    43
    17
    8
    In the Walls
    Sonic AGES and Writing a documentation for Realms
    looking forward to see what people will do with it :o
     
  14. sketche99

    sketche99

    Member
    Thanks for releasing this to the public, I can't wait to see what myself and others make with this framework! Again great job and thanks again!
     
  15. BlueFrenzy

    BlueFrenzy

    Member
    30
    19
    8
    Awesome. I assume you are using mesh colliders, right? Are you using the built in physics engine or you build up your own? I really would like to try.
     
  16. Aerosol

    Aerosol

    Not here. Moderator
    11,162
    572
    93
    Not where I want to be.
    Sonic (?): Coming summer of 2055...?
    I would like to see how you treat the "falling out of a loop" behaviour. Besides that, very well done!
     
  17. RDNexus

    RDNexus

    Member
    Excuse me for the off-topic...
    @MarmitoTH, I just saw your "JAM's Sonic World [Unity 3D]" video.
    Did you advance in that project or has it been canned?
    It sure looked great, being in Saturn-style and with the Saturn models.
     
    Last edited: Jun 2, 2020
  18. MarmitoTH

    MarmitoTH

    Member
    21
    28
    13
    Yes, mesh colliders, but you can use any other primitive colliders too. The character controller is built using raycasts, it is unity physics engine, but with kinematic rigidbodies, coding collision by myself.

    The loop is fake, you are not moving along the z axis, it's a 2D movement with 3D graphics, you fall just like a regular ceiling and collision is sorted like in Sonic Worlds, layer switches.

    The source is gone, I could easily recreate everything thought, but I really don't want to, sorry. :p
     
  19. Candescence

    Candescence

    Member
    2,023
    21
    18
    Sydney, Australia
    3D Indie Stuff
    So I discovered this thing while looking for Unity-based 2D Sonic engines (after trying to roll my own and failing), and this is almost what I was looking for. The main problem that makes it completely unusable for what I want to do with Sonic physics, however, is that it doesn't work with Unity's 2D collisions, which is a big problem if you want to use tilemaps, which basically require the use of composite colliders, which don't have a 3D equivalent.

    Been trying to fix this myself by setting up a 2D mode on the motor that constructs a 2D rigidbody and a 2D collider instead of the regular one and with dedicated functions for handling collisions with 2D physics, but the resulting physics just send Sonic flying into the stratosphere for no discernible reason.

    But despite my issue, this engine is pretty goddamn sweet, I just wish it could work with 2D 2D. Also, some of the assets in the engine need updating for newer versions of Unity.
     
  20. MarmitoTH

    MarmitoTH

    Member
    21
    28
    13
    Translating the engine to Unity 2D physics will not be very straight forward. Despite it might look like, 2D and 3D Unity's physics API behaves in a different way and my experience with the 2D one was not very good. In fact, I won't even recommend using it if you ask me. I committed a big mistake using Blender assets directly in Unity, maybe in the near future I release an update for it. Thanks for the feedback!