Sonic and Sega Retro Message Board: [1.0 Final] Hedge Physics - 3D Sonic Engine on Unity. - Sonic and Sega Retro Message Board

Jump to content

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

[1.0 Final] Hedge Physics - 3D Sonic Engine on Unity. Also, it's Open source.

#16 User is offline High Fidelity 

Posted 13 November 2016 - 05:20 PM

  • Posts: 884
  • Joined: 01-January 15
  • Gender:Male
  • Location:England
Sweet man, awesome job. Great to see you coming back to Sonic games

#17 User is offline LakeFeperd 

Posted 18 November 2016 - 12:01 AM

  • Posts: 291
  • Joined: 16-January 11
  • Gender:Male
  • Project:Spark the electric jester
https://www.youtube....h?v=jIEixV1q5-M

Links for the 0.7 build are in the first post.

New version is up, this is the final update before the final version (hopefully).
I've added:
- Ring Monitors
- Shield Monitors.
- Dash rings.
- Enemy Spawners
- A new enemy type
- Moving platforms
- And general physics touchups and bugfixes.

#18 User is offline Ritz 

Posted 18 November 2016 - 12:39 AM

  • Subhedgehog
  • Posts: 3885
  • Joined: 01-January 06
  • Gender:Not Telling
  • Location:Glimmering Cornhole Zone
  • Wiki edits:2
You've got moving platforms, but can they rotate? Along any axis? Can moving geometry be concave? Just what are the physical limits of the engine right now?

That lofty platforming segment got me excited, but seeing that verticality made me realize this should've had springs long before dash rings. SRB2-style springs that retain your horizontal velocity when you run over them. (EDIT: Wait, where there springs before? I think I remember one spring)
This post has been edited by Ritz: 18 November 2016 - 12:41 AM

#19 User is offline LakeFeperd 

Posted 18 November 2016 - 01:05 AM

  • Posts: 291
  • Joined: 16-January 11
  • Gender:Male
  • Project:Spark the electric jester

View PostRitz, on 18 November 2016 - 12:39 AM, said:

You've got moving platforms, but can they rotate? Along any axis? Can moving geometry be concave? Just what are the physical limits of the engine right now?

That lofty platforming segment got me excited, but seeing that verticality made me realize this should've had springs long before dash rings. SRB2-style springs that retain your horizontal velocity when you run over them. (EDIT: Wait, where there springs before? I think I remember one spring)


Yes, there are springs and there is both springs that keep your speed and those that don't. It's been there since 0.5.
But no, moving platforms can't rotate, they just translate the player's position based on how fast they're moving and that is probably as far as I will go with them.

Alternatively, If you use rigidbody.moveposition instead of a translate, they will probably work flawlessly, but I decided not to cause it does create some issues with other systems.
This post has been edited by LakeFeperd: 18 November 2016 - 01:07 AM

#20 User is offline LakeFeperd 

Posted 19 November 2016 - 10:22 PM

  • Posts: 291
  • Joined: 16-January 11
  • Gender:Male
  • Project:Spark the electric jester
https://www.youtube....h?v=3ADRngXCMBI

Started to implement the stage. So far, things are pretty rough but I'll try to make it look better in the future.
All assets are original, with the exception of the skybox which is a collage of google image pictures made into a skybox in blender.

#21 User is offline LakeFeperd 

Posted 26 November 2016 - 02:09 AM

  • Posts: 291
  • Joined: 16-January 11
  • Gender:Male
  • Project:Spark the electric jester


New video of the stage.
Camera system is still pretty glitchy and there is a lot of stuff to iron out, but it's something I guess.

#22 User is offline Chimera 

Posted 26 November 2016 - 12:24 PM

  • I'm not a furry.
  • Posts: 1205
  • Joined: 04-October 10
  • Gender:Male
  • Project:TOO MANY. BUT ONE LESS.
  • Wiki edits:5
Looking good so far man. Physics seem to work like a charm, though I'd rather judge when I get the chance to test myself (travelling right now). Some noticable kinks at the moment though I'm sure you're aware of most of them already and are planning on ironing them out. Nice prototype level design too. I take it you're a fan of machines-in-the-sky like myself :v: not enough love for Egg Fleet like levels.

One thing I might say would benefit you is putting in actual walls, i.e. a mode of wall-running in select areas so moments like 0:34 don't happen unintentionally as that can disorient the player if impropperly done. The level design itself wasn't an issue as much as not knowing where the hell down is.

Looking forward to how far this develops. Definitely a polished basegame as it is for sure.

#23 User is offline Strife 

Posted 01 December 2016 - 11:58 PM

  • Posts: 1757
  • Joined: 19-October 11
  • Gender:Male
  • Location:United States
  • Project:Freedom Planet 2
I've been playing around with the engine over the past few days and I can't really figure out how the animation system works - specifically, how to add new animations into the system and play them via script. It looks like CharacterAnimator.SetInteger("Action", X) is the way to do it, where X is some number between 0 and 5, but this only covers the base animations. How would I assign new animations to Action 6, 7, 8, etc?

#24 User is offline Atendega 

Posted 02 December 2016 - 08:12 AM

  • Lesser Sea Sponge
  • Posts: 576
  • Joined: 16-August 14
  • Gender:Female
  • Location:Comfy couch
  • Project:Collecting insults
I'll probably be crucified for asking this, but... how about some scripted loops? :specialed:
We're going full-on Adventure, aren't we

#25 User is offline Ritz 

Posted 02 December 2016 - 10:12 PM

  • Subhedgehog
  • Posts: 3885
  • Joined: 01-January 06
  • Gender:Not Telling
  • Location:Glimmering Cornhole Zone
  • Wiki edits:2
I think some scripting would be a nice feature to have, actually- not full-on automation, but maybe a flag you can set so Sonic's forward vector conforms to a spline. That way you could just hold forward to clear a loop successfully without awkward steering compensation, but you still have the freedom to move left and right relative to that path. The challenge there would be keeping it subtle enough that players don't necessarily realize they're being guided, which they will if they deliberately do a hard turn to break away- maybe there could be some falloff where the strength of the snap tapers off depending on how close the player's directional input matches the direction of the spline?
This post has been edited by Ritz: 02 December 2016 - 10:18 PM

#26 User is offline LakeFeperd 

Posted 03 December 2016 - 08:07 AM

  • Posts: 291
  • Joined: 16-January 11
  • Gender:Male
  • Project:Spark the electric jester
I won't be making any sort of scripted path simply because I don't know how, I've been trying to do that for a while but it's a lot more complicated once you actually dive into it.
If I figure this out I'll be finally be able to add rails and my inability to do so has now since become a meme in sfghq's discord channel.
Still, you can always just switch to the auto camera in order to do loops.

I'll probably have to address some of the issues with this engine soon. Although most of them are with the camera system, to avoid any major issues, just disable any sort of thing that makes your camera look at a direction, for dash pads and dash rings, I believe I've added a variable to stop this, so, just uncheck it.

I'll be fixing most issues as I'm developing the stage and as they come up over time.

@strife

Just add a transition from "any state" to whatever state that you want with a new action value, then, click on the transition itself and uncheck the "can't transition to self" box.

Also, if you're adding a new action in itself, then just add a new script and add it to the action maneger(look at how the others are added, and just do the same for yours). Then, in whatever action the player will be before switching to it, add a reference to the Action maneger script and do a "ActionScript.ChangeAction(youraction);"
This post has been edited by LakeFeperd: 03 December 2016 - 08:10 AM

#27 User is offline Strife 

Posted 03 December 2016 - 01:24 PM

  • Posts: 1757
  • Joined: 19-October 11
  • Gender:Male
  • Location:United States
  • Project:Freedom Planet 2
Ah, thanks! I got it working.

I actually see where my problem was - I completely missed the Conditions list when clicking on a transition, so I filled that out and it's good to go.


As far as rails go, what I would suggest is that if your current physics engine isn't playing nice with what you want to do, disable the physics entirely when Sonic jumps on a rail and switch to a new physics script that's specifically built around rails. When you think about it, if you disregard all the twists and turns, a rail is basically a straight line on a 2D plane. The trick is to first figure out how to move Sonic along the rail at a set speed, and then adjust his velocity based on the curvature. Lastly, disable the rail script and re-enable regular physics when he jumps or falls off.

It sounds like a similar technique to camera rails / splines could be used for Sonic? Google "unity camera rail" and you'll see what I mean.
This post has been edited by Strife: 03 December 2016 - 01:28 PM

#28 User is offline LakeFeperd 

Posted 03 December 2016 - 02:48 PM

  • Posts: 291
  • Joined: 16-January 11
  • Gender:Male
  • Project:Spark the electric jester
Yeah, but there's also a problem on getting the closest point to the player and the spline, which I still need to figure out.
Also, If this system is to go public, then it also has to be easy to use for new users, which poses a new challenge.

I'll figure this out eventually.

For those who don't know, you have to code a spline from scratch for this and it's not easy.

Anyways, considering my goals with this engine, I feel like I'm going to be working on it for a long time now.

#29 User is offline Trunks 

Posted 11 December 2016 - 09:33 AM

  • AGAIN TRY
  • Posts: 1407
  • Joined: 20-February 08
  • Gender:Male
  • Location:San Antonio, TX
  • Project:The Bancast, Lone Stars, LOVE
  • Wiki edits:30
I like this a whole lot, and I think you've made some phenomenal progress. I had two things that I'd love to see changed, but they're both a matter of preference.

First, like Atendaga said and you responded to, the homing attack feels way too guided. It seems like if it had a shorter automatic lock-on and a narrower direction cone, that'd make it feel like more of a challenge to chain several enemies rather than a "Mash A to Get Through" section.

Second, the Sonic model you've made is SO GOOD. I love its design and the animations, particularly the running. One nitpick though, the muzzle isn't rounded enough, so it makes him look a little top heavy, or like he's got an underbite. But again, preference.
Posted Image
Left is Original, Right is Changed.

#30 User is offline LakeFeperd 

Posted 16 January 2017 - 10:01 PM

  • Posts: 291
  • Joined: 16-January 11
  • Gender:Male
  • Project:Spark the electric jester
So, guys, I'm sorry to say that I haven't been working on this engine for a while now, last month has been pretty bad for me as I've been dealing with a couple issues and doing my best to finish spark in time.

Anyways, If anyone needs any help, you can join my discord server: https://discord.gg/fR2mmSn
Feel free to join, anyone is welcome at this point.

  • 3 Pages +
  • 1
  • 2
  • 3
    Locked
    Locked Forum

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