[BEHAVIOR] Sonic Physics

1 favourites
From the Asset Store
Hybrid Sonic Branding Kit is a business identity & motion graphics sound effects library.
  • Sorry for bugging, but it seems the 90 degrees interval is causing display issues in the UI sprite that's attached to it, when the Behavior sprite is on a slope, and the UI sprite is a circle (like a soccer ball). For obvious reasons, it looks like it's in standing in mid air until it reaches a plain again.

    Is it possible to change the intervals to 1 degree so it's more accurate?

    Thanks again

  • trueicecold

    Right, ok. I'm assuming what you're referring to is also visible in Rilem's example, where Sonic goes from being slightly embedded in the ground to being slightly above the ground at the corners of the inverted loop?

    That's something that's part of the whole rotation thing on the todo list, so eventually the behaviour should provide a simple expression to retrieve X/Y values to offset the display sprite by, but for the time being, try using something along the lines of this:

    Also of note is that when doing the above, if your main Sprite is a square you shouldn't need to rotate it at all, as in the example capx.

    Still a bit messier than just an expression (and could be refined further) but it addresses the main problem, I believe?

    EDIT:

    Oh, and the base offset value there assumes you're using a 32x32 sprite. If you're not, the value should just be the difference between the width (or height) and the diagonal of your sprite.

  • Can you provide the latest version you have?

  • patchester:

    The latest version that's in a releasable state is in the opening post. I notice that the example html isn't working now that Dropbox has changed the way they do things, so I'll need to get that sorted out at some point, probably switch to itch.io. I have been working on an update, but there's still some more changes that need to be made before it's actually usable.

  • PixelMonkey try bitballoon.com, it's free and simple!

  • PixelMonkey

    Hi,

    Might have found a bug although I think it has more to do with the way the environment was put together.

    Basically the box slides down the left purple angled platform and falls on the ground instead of sliding down onto the straight purple line.

    The way to make it happen is that when you stand on the flat purple part, then jump onto the angled part but stop touching any controls. If done correctly you'll slide down through and drop to the bottom. Again im not sure if it has anything to do with your behavior or just the platforms themselves the way they are set up.

  • lavareef

    Hm, yeah, jumpthrus have a few issues. I'd noticed similar issues before, and it seems to boil down to the behaviour not being able to pick which jumpthru to stay on when sticking to a slope. Another related issue is when moving in the other direction and the behaviour decides to not notice the upwards slope and treat it as a background object. From playing around with the standard Platform behaviour, it seems like this is an inherited issue that mostly occurs at low speeds (such as in your example when letting the behaviour move down the slope on its own).

    In all honesty I don't see myself having time to fix this particular issue quite yet. I've still been chipping away at things in my spare time, but this is a fairly fundamental issue based around how jumpthrus are handled. When some of the more essential features are done (like tilemaps, which I'll still get to soon, I hope) I might well see if I can find a solution that works better for this behaviour, but for the time being, I'd recommend making jumpthru slopes all based on one object (like the chunky purple slope blocks), or simply cutting down on jumpthru slopes (which isn't ideal, I'm aware).

  • PixelMonkey

    Hey just had a question regarding the plugin in general and its future.

    Do you plan on moving development of the plugin over to construct 3 in the future or plan to keep it a construct 2 thing? Or maybe even both?

    I know its not a very easy question to be answering at this point in time but I guess I was just wondering what your thoughts were on the matter at the present moment.

  • lavareef

    Good question, though not one I have an answer to yet. I don't know if anything much has been said about Construct 3's addon support yet, so I don't actually know what the process will be like. I don't assume it'll be unreasonable, though, so I don't see that as an obstacle. That said, time always has been and probably will always be an issue on my end, and on top of that I'm still undecided whether or not I'll be upgrading to C3 myself. The subscription model doesn't particularly appeal to me, and while I'm interested in seeing new features to come, none yet seem to justify the cost, personally.

    So short version: May or may not upgrade to C3, may or may not then have time to convert.

    If it did happen, though, I'd probably try to keep both 2 and 3 supported, unless 2's userbase drastically lowers (which I don't expect would happen overnight).

  • PixelMonkey Don't know why I only realized this now but was there a reason you decided to completely remove the double jump as an option for the behavior?

  • lavareef

    If I recall, it was just to try and simplify the behaviour a little, as well as to possibly simplify the min/max jumping that I replaced jump sustain with. The idea was to eventually replace it (either via events or the behaviour itself) with all the various air actions (flying/gliding, S3K elemental shields, maybe the drop dash). As is, the various actions can be replicated via events fairly easily, I think.

  • PixelMonkey

    Hmm Totally slipped my mind that it might be tricky to have kept it given the way you change the min max jumping and yeah I guess your right about it not being all that difficult to implement one via events anyways.

    How has your progress been coming along by the way since your last update? I know your supposed to be quite busy with other things like life and stuff.

  • lavareef

    Basically no progress lately. I have the time to keep mostly up-to-date on the thread and answer questions, but the first half of 2017 has been the busiest semester at university I've had yet, so I more or less decided to put the behaviour aside entirely for the last few months. Might pick it up again soon, have a bit of a poke at putting another update together, but we'll see.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So, a double-post, but I think it's about time I gave a clear verdict one way or another regarding this behaviour:

    In its current state (and considering my current circumstances) it's safe to say that I'm unable to continue developing this.

    I haven't wanted to outright say "no I'm not working on this anymore" because the longer I went without updating this the worse it would look and I'd hoped to make at least SOME progress, but it's been so long that I think the lack of progress has given enough of an indication of disinterest, so I might as well make sure it's clear rather than just implied.

    To lay out a few of the issues and give a general indication of why:

    In terms of code, the plugin is a mess. This was my first time touching javascript (and before starting this I hadn't done anything more complicated than event-based programming, hence why I was using C2 in the first place) and it clearly shows. It was a learning experience, sure, and I've learned enough that I know WHY it's messy and WHAT I did wrong, but taking that knowledge and fixing what are very fundamental issues isn't something I have time for anymore.

    Between the messy code and my inability to commit time to this, it became difficult to make any proper headway at all, since most development was in very isolated chunks. As time has passed it's only made it harder to look at the code and not simply see a demotivating brick wall.

    I've made a couple attempts here and there to sit down and finish a couple of the bigger bits on the todo list (tilemaps, basically) and between either a lack of skill/understanding on my part or me simply trying to twist bits of C2 that weren't quite intended to be used for this particular thing (or at least not in the way I'm trying to do it) it just keeps falling apart. So I'm afraid I don't have a nice final clean "no-longer-blatantly-unfinished" update.

    So yeah, it was still a fun little project, and I've been pleasantly surprised to see how much use people have squeezed out of it. Maybe I'll have a go at a more reasonably-scoped project in the future, see if I can make something a little more complete.

    Thanks again for the feedback/interaction.

  • hey man I'm using this behaviour aswell for my little sonic fan game, does this have a feature for making spring physics like the yellow and red springs from the game, I am needing springs to allow sonic to reach higher areas

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