Optimizing a Function-Heavy Sonic Platform Engine

Get help using Construct 2

Post » Mon Dec 09, 2013 1:56 pm

@Candescence It's easier than you'd think to make multiplayer. You could have as many different players as you desire using only one set of sensors (each player would have their own "Player" sensor, but all the slopes, walls, ceiling censors). In the most simplist way, it would literally require a "ForEach" loop that sends a function that does all the movement events, with a function parameter of the Player's UID. Sure there might be a hickup or two, but trust me, it's very straight forwards (a lot more straightforward than optimisation stuff!).

Listen to tulamide! Don't abandon this, you've managed to get very far already, it's further than I ever got in my few attempts of making a "Sonic" engine in C2 (I have tried a few times and only end up making a ball that can walk up slopes and stick to them using trig, then I gave up lol). If you're stuck, just keep asking questions on here, people here love to help others :P
B
51
S
20
G
10
Posts: 571
Reputation: 9,819

Post » Mon Dec 09, 2013 3:07 pm

To be perfectly frank, it's not really 'my baby', it's a port of StreakThunderstorm's Classic engine.

But I'm really not convinced that this engine can actually even be salvaged. I've figured out that the slope detection events are the ones that cause the crash when you remove the reposition functions from them, and removing all the other function calls of Collision and Reposition do little to optimize it and start causing issues anyway.

At this point, you might as well just scrap the whole thing and start over, because trying to optimize it will inevitably just break the whole thing in half. The engine is too complicated for its own good, collapsing under its own weight and unable to make it lighter without removing any vital parts.

Back in the day, I was convinced that a direct port from MMF2 was a terrible idea due to the differences in the ways the event systems worked, among other things, and now I'm once again convinced that this route was a futile, pointless effort.Candescence2013-12-09 15:09:05
B
94
S
37
G
11
Posts: 404
Reputation: 11,275

Post » Mon Dec 09, 2013 3:22 pm

Sure, you didn't develop the MMF2 Sonic Worlds, but "Porting Sonic Worlds to Construct 2" is what is yours. Your baby, if you will.
Also, you HAVE directly ported it, and it works almost perfectly; just a few bugs here and there and this performance issue. But other than that, you've ported it very well. It's impressive, and it's unfortunate that think it's a futile effort.
I think the one inevitable problem is "curved platforms", as C2 handles collisions via polygon, and not per-pixel; but it's still totally feasible.
I hope you continue to work on it! I'll see if I can apply what I know to optimise it in my free time. Kudos on what you've managed to do so far!
B
51
S
20
G
10
Posts: 571
Reputation: 9,819

Post » Thu Jan 29, 2015 2:17 am

Hi all,

Sorry to revive an old thread, but what ended up happening with this?

-Someone on the last page suggested getting someone to make a custom behavior for Sonic the Hedgehog-esque movement. Has that been done? If not, for someone with the relevant coding skillset, what would be the time required to program one? Could other open-source reimplementations of Sonic the Hedgehog physics save time for making that happen?

-Running the demo on a 5-year-old desktop computer today, it appears to have no slowdown at all. When people talk about it being poorly optimized, was that prior to the changes in how C2 handles collision? Or were the concerns more about performance on mobile devices? With the exception of a couple of bugs (in a lot of cases it seems like Sonic has troubles starting a roll down a curved slope) this seems like something you could reasonably build a Sonic fangame off of. MMF2's might be easier to work with, but MMF2 doesn't have multiplayer support...
B
6
S
1
G
1
Posts: 97
Reputation: 914

Previous

Return to How do I....?

Who is online

Users browsing this forum: adelwich, kizlengames, WesleyDeveloper9 and 8 guests