[BEHAVIOR] Sonic Physics

1 favourites
From the Asset Store
Hybrid Sonic Branding Kit is a business identity & motion graphics sound effects library.
  • To help: http://info.sonicretro.org/Sonic_Physics_Guide <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

  • I swear it was reported in here before, but attempting to change the soft max speed via events seems to cause an error.

  • Poxnixles

    Looks like it has been reported before, way back in March, actually, and I've just been slow about getting to a bugfix release. Has been fixed, thank you.

    MatheusCastellar

    Thanks, though it's worth noting that I've been using the SPG since the beginning of this. Awesome resource, essentially fundamental for this kind of thing. Now that I think of it, though, I ought to have that linked in the main post.

    And so now that I'm sitting down and responding, I can see that it's been more than a year since I first released this, and getting close to a year since any kind of actual update. I apologise, I've been more caught up than I realised with work and uni. I genuinely appreciate the patience, especially as I seem to be still getting bug reports every now and then despite my lack of progress here.

    While I still haven't had time to fix some of the more fundamental issues that have been bogging things down, I've made a long-overdue bugfix build, and updated the opening post.

    Changelog:

    -Set Soft Max Speed now works

    -Vector Y is no longer capped to Min Jump Strength if jump button isn't held (will allow springs and bumpers to work)

    -Rolling Jump Control Lock now functions if enabled

    -Removed Is Double Jump Enabled condition

    Feedback is still appreciated. If there's anything clearly broken I'll try to get to it ASAP, though I unfortunately still can't give an ETA on much-needed core improvements (such as tilemaps).

  • nice! a bugfix

    when you get around tackling the tilemap issues, I noticed that solid tiled backgrounds freak out objects with the sonic physics behavior, namely they warp the object into a NaN XY position and there is no coming back after that, because if XY coords are not a number, gravity and other forces fail to kick in.

  • Seems to have the info.xml is missing from root issue.

  • Poxnixles:

    Thanks for pointing that out, I'll get it right the first time one day. Fixed, I think.

  • Hi,

    Just had a question about this behavior addon. (really awesome work btw)

    I know the main purpose is for it to be used to make Sonic FanGames, but if one were to create an original game using this addon and sell it commercially; is that allowed? and under what conditions?

    Also, are you planning to create any other type of plug ins to compliment this one?

    Maybe my first question would make more sense in the context of that I think you could probably sell this add on (once it's fully finished) on the scirra construct 2 store.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • lavareef

    As long as the work is your own IP (basically what Freedom Planet did) then I don't think there would be any issues. Regarding selling the behaviour, the way I see it is that I've built this behaviour off of the Platform behaviour and the freely available Sonic Physics Guide, so I wouldn't feel comfortable selling it. Besides which, the Sonic fangame community has a pretty long history of engines and templates provided for free, and I don't really think they'd care to purchase it with so many free alternatives out there. Having the behaviour (and the template that I eventually plan to make to go with it) free means it's more accessible for people to just pick it up and play around with it, which is the end goal here.

    As far as other plugins go, nothing to specifically go with this, I don't think. I'd like to have a go at a grapple hook/swinging behaviour to go with the Platform behaviour (and by extension, this too) at some point, but that's a fair way off I think.

  • I can respect that decision. Hadn't really considered those facts. I just know you're probably working hard on this and it's at the very least time consuming. Well if I ever make any kind of game with this behavior I'll be sure to include you in the credits :p Again thanks a lot for your hard work.

    I was originally gonna go with the sonic worlds engine to play around with but once I tried C2 and Fusion2.5 it was clear which is easier to use and read. Once I discovered your behavior there was no turning back.

    Guess the only con for C2 is no native exporters I guess? I've read mixed things about tje C2 wrapper exporter thing for turning your game into an exe file.

    I'll be sure to report any bugs if I find any.

    Thanks again

  • lavareef

    No worries, the support is appreciated.

    As far as the exe wrappers go, I'm not really in the loop. My understanding is that there were some issues on Chromium's end for a while that have since been resolved (though that may have been another matter entirely?), so things should currently be in working order, I believe.

  • Amazing job!!! works pretty well!

    Few things though:

    1. Could we have an option to rotate the sprite in accordance to the slope?

    2. Could we have circular collision polygons? right now I need to define about 25 polygons for a circle, and it's still not good enough, if I rotate if depending on speed (the collision start to act up).

    Thanks and well done!

  • trueicecold

    Thanks, appreciate the feedback!

    Rotation is indeed on the todo list in some form. After trying a couple of things it seems like the most straightforward way is to keep automatic rotation to 90-degree intervals (which, as I understand it, is how the classic Sonic games handled it anyway). This will still probably require the user to define the left and right corner points that they wish to rotate around (though it'll probably default to the bottom left/right corners of the bounding box for simplicity's sake).

    Regarding your second question, I'm not entirely sure I understand. Collision polygons are limited by Construct 2 itself to be made up of segments, rather than being truly circular. That said, I don't think the limitation is too much of an issue. The example capx has curved surfaces made up of only a few segments, but even that is enough to give the illusion of a curve.

    If, however, you're rotating the sprite with the behaviour itself, then I can see where you'd be having issues. In the current version of the behaviour, the base sprite should be kept unrotated (or rotated manually only at 90 degree intervals). I'd recommend making the base sprite invisible, and overlaying another sprite used purely for display purposes. Rilem had a brief example that seems to work reasonably well:

    >

    > > Good luck, can't wait to see this finished.

    > >

    > >

    > How'd you get the surface rotation to work here exactly?

    >

  • Thanks for the prompt answer

    Actually I tried to rotate the sprite with the behavior itself, didn't think of having another UI sprite to pin to it, that could solve the rotation problems.

    And the SurfaceAngle expression should help solve the second request

    Thanks a lot!!

    Another question if I may: I want to define that when it reaches the peak of a mountain, let it jump in the air instead of sticking to it. Is that possible?

  • trueicecold

    The behaviour is meant to automatically jump off the end of the ramp, assuming the angle is sufficiently different (since you don't want the behaviour losing its grip on an ordinary downhill slope). The bug that's causing it to not do that, however, is that when the sprite is sitting on a solid's corner it still thinks it has the uphill angle, rather than either swapping to the downhill one or 0. It's an unintended consequence of the fact that Construct 2 uses collision polygons for collisions, while the original games had a single sensor in the middle used to retrieve angles.

    After I fix the issue I'm planning on adding a property that allows the stickiness threshold to be specified, but for the short-term I'm afraid I don't have any suggested workarounds. You could potentially try and force the VectorX/VectorY, but that would probably get very messy very quickly.

  • Ahh ok, so in the meantime I can live with a "jump" button

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)