don't click here

Sonic Construct Worlds

Discussion in 'Fangaming Discussion' started by StreakThunderstorm, Jan 8, 2012.

  1. StreakThunderstorm

    StreakThunderstorm

    Member
    216
    0
    0
    Mecha Madness
    I've been working on this for a little while. I decided to mess around in construct and realized that it was tons better than MMF2 in terms of what it can do. Candescence was working on a construct port but I don't like the direction he took it in. With this, I've decided to try and keep it true to being a Worlds port. Its obviously not finished and if I add any more to this current build, I wont be able to continue to release it publicly.

    http://dl.dropbox.com/u/54897686/SonicConstruct.rar
    If anyone is interested in continuing the work in it, by all means have a go at it.

    Right now it contains all of Sonic's basic movements. Rolling, spindashing, jumping, crouching and looking up. Everything works as it should. I've also implemented little things like a camera that zooms in and out dynamically based on your speed. There's also footstep modifiers for every piece of land you step on so that your character will create the appropriate footstep and landing sounds.

    The missing Plugins:

    http://www.scirra.com/forum/re-magicam-plugin-v143-betaupdated-12-10_topic41026.html

    http://www.scirra.com/forum/plugin-input-system-v096b-21-03-2011-keyb-mouse-joy_topic40990.html
     
  2. Is this for the free version of Construct, or Construct 2? I'll give this a try, as long as I don't have to spend money on the program. I'm broke, and would rather spend the money I don't have on important things like my college stuff.
     
  3. Azu

    Azu

    I must be stupid. Member
    It's for the Classic version of Construct. If you're familiar with MMF2, it shouldn't take too long to get use to it, although, you still would want to use the wiki. For instance the expression for global vales are different. In Construct, you can define your global variable as a integer or string.

    Global Variable 1 = 2
    Global Variable 2 = Catnip

    In the Construct's expression editor, you'd right "global("Global Variable"). If the variable doesn't exist, it will highlight yellow, meaning that you can define a new value right there.

    Where as MMF2, you'd have this.

    Global Values
    ----------------
    Global Value A = 2

    Global Strings
    ----------------
    Global String = Catnip

    In the Construct's expression editor, you'd simply write "Global Value A".
     
  4. Mr Lange

    Mr Lange

    A wise guy eh. I know how to DEAL with wise guys. Member
    1,286
    11
    18
    The Land of Waldos
    Sonic Utopia, Sonic Overture
    Bless Candescence for his effort, but his Sonic Worlds port was too broken to be usable. I will try this later, and if this is really a proper working port, I will have to give infinite thanks for saving me a bazillion hours of work that I was going to do in porting it myself.
     
  5. Azu

    Azu

    I must be stupid. Member
    Yeah, I like his effort, but I tired to do too much, a Castlevania engine and a Sonic Engine? I don't think that would work.
     
  6. StreakThunderstorm

    StreakThunderstorm

    Member
    216
    0
    0
    Mecha Madness
    It is proper indeed. I spent a few years working on the MMF2 worlds engine so I know its ins and outs. The port is not much different.

    Just a little example of what I was able to accomplish in the MMF2 version of Sonic Worlds:
    Here

    So far all it has is all of Sonic's basic movements. The rolling, spindashing, jumping, looking up and crouching down. This could be a really good start for anyone who was working with the MMF2 engine but found it limited. Construct is capable of so much more than MMF2 is even in its current, unfinished state. I also included variables to the player input object that would allow you to map an entire Xbox 360 control to do whatever you please. I'm sure it will work with other controllers. I also included a custom camera which zooms in on Sonic when he's moving slow and zooms out when he speeds up. It also extends ahead of him if he's moving fast.
     
  7. Azu

    Azu

    I must be stupid. Member
    I don't know much about the engine, but I can try to make some gimmicks.
     
  8. Candescence

    Candescence

    Member
    2,023
    21
    18
    Sydney, Australia
    3D Indie Stuff
    To be frank, my original efforts were more along these lines, but my lack of inexperience with static engines and the fact that I find MMF2's event system virtually incomprehensible compared to Construct's much more sensible event system meant that I eventually found it too difficult to re-build the whole static engine in Construct, so instead, I utilized the Custom Movement Behaviour. But I wasn't entirely successful with that, either, and that one not only still has some problems, it also can't be ported to Construct 2 due to how that version of the behaviour works. This, however, can, once families are implemented. Streak and I have some disagreements on HTML5, but, if peeps end up working on an open-source continuation of this engine, stuff that isn't dependant on Construct Classic-exclusive plugins can easily be done in Construct 2.

    On another note, I've tried making a rudamentary multiplayer implementation, but with limited results. Streak tells me I'm doing it all wrong and I should take a good look at the original events, but... Well, I've looked over the events, and I'm pretty sure I understand them, but perhaps I'm just not looking at them in a certain way. Hmm. Maybe I should go over them with someone who actually knows their stuff with these things.
    Actually, it wasn't, really. That SAGE showing was simply an inclusion of a Castlevania-themed level, using Sonic-style level design.
     
  9. Azu

    Azu

    I must be stupid. Member
    The custom movement doesn't use Pixels Per Frames like static engines does. It uses Pixel Per second. A Speed of 100 in custom movement is the same as
    Always
    ---Player.x+1
     
  10. Candescence

    Candescence

    Member
    2,023
    21
    18
    Sydney, Australia
    3D Indie Stuff
    I wasn't aware of that difference, but then again, the custom movement implementation wasn't a 'true' port anyway - it was an attempt at using a different method of achieving a similar end.

    Completely moot now, anyway, because it's clear now that Streak's implementation can be much more easily ported to C2, because the C2 version of the Custom Movement works in a way that makes my Classic implementation infeasible.
     
  11. StreakThunderstorm

    StreakThunderstorm

    Member
    216
    0
    0
    Mecha Madness
    I won't be touching Construct 2. As I continue to work on this, I'm keeping it in Construct classic.
     
  12. Candescence

    Candescence

    Member
    2,023
    21
    18
    Sydney, Australia
    3D Indie Stuff
    I know. Not much difference either way, because you said you're doing this for Mecha Madness, not an open-source engine.

    I'm just saying that if anyone is going to expand on the engine in an open-source manner like Worlds, I'll be the one to port it over to Construct 2.
     
  13. Mr Lange

    Mr Lange

    A wise guy eh. I know how to DEAL with wise guys. Member
    1,286
    11
    18
    The Land of Waldos
    Sonic Utopia, Sonic Overture
    Alright I just spent a day working with this engine. I love it, a lot. In fact, I went a step further than testing it. Since I had once ripped and organized all the BG tiles from Hydrocity Zone and had them lying around, I made a short test stage.
    Added:
    Changed Right Shift to Z, X, and C keys for jump.
    Collectible rings (the program doesn't count them)
    Crappy Sonic Generations style depth blur (based on movement speed)
    Added BG music and modified sounds and made the spindash sound more proper (increases pitch with charging)
    Short stage with improved BG (based on Hydrocity Zone's graphics)
    Sonic Construct Hydrocity Test
    So its mostly cosmetic stuff, I made no changes to the movement engine itself.
    This test stage also easily reveals a lot of common issues, some of which I've noticed I'll mention here:

    -Sonic gets stuck in the falling animation most or every time he lands on the ground that way.
    -Short jump, that is, variable jump height, is permanently disabled after you do a ground roll.
    -While skidding, if you hold the forward direction again, it sustains your speed, and completely disregards friction and gravity from slopes, breaking the gameplay entirely.
    -You cannot turn around in midair until you are actually moving in that direction. This is not good, especially if one intends to implement a jump dash or homing attack.
    -The engine seems to improperly detect some sharp angles as slopes. In this test stage, you can see this every time Sonic runs down the ramp that cuts off in midair, in which he just runs right under it in a circular sweep. Also, the first quarter pipe ramp, I once saw Sonic run straight down it when running left off of it, even though its a 90 degree angle.

    I did not use collision masks for anything, just set the sprite objects themselves to solid. That's one thing I love about Construct, I can give any sprites pixel collision detection, which even ignores transparent pixels. For a Sonic game, this kind of advantage is ideal, but in the case of this engine, it might possibly be more proper to create collision masks for some things, which might defeat some of those bugs/oversights. Best case scenario is that they are fixed in the code.

    Now that I've covered some of the obvious bugs, I'd like to suggest a couple things.
    -I would have preferred that this engine behave in Genesis style, as Damizean's or MMF2's Worlds engine does. By that I mean, you made this a lot closer to the 2006 Game Maker engine than Sonic Worlds (classic style) in terms of Sonic's visual behaviors. I don't like the spinless hop, or the improper switches between rolling and unrolling when in midair. I could change all this without too much effort, but it still bothers the crap out of me. Although I can't say I disagree with the footsteps sounds system, that's pretty badass.
    -None of the movement math in this engine is tied to deltaTime, and is therefore immune to timeScale. Some, including myself, like to make use of this feature. I would love it if you could add this in, or at least provide instructions so I or others can do so. I tried tweaking it to work, but I just made a total mess of the movement.
     
  14. Azu

    Azu

    I must be stupid. Member
    DeltaTime also uses Pixel Per Second.
     
  15. StreakThunderstorm

    StreakThunderstorm

    Member
    216
    0
    0
    Mecha Madness
    I have since fixed the short hop, the skid bug, the falling animation and a few other tweaks. If you're interested in porting what changes you made to it[I love 'em] I'll upload the cap. As far as delta time, I wouldn't know how to implement it because the engine works on substepping. No matter how fast Sonic goes, his collisions will never be incorrect. Dami's work was pretty impressive in that regard. I wouldn't know how to implement time delta into that because it may in fact destroy the movement engine itself.

    Here it is. Version 0.2
    http://dl.dropbox.com/u/54897686/SonicConstruct.rar
     
  16. Mr Lange

    Mr Lange

    A wise guy eh. I know how to DEAL with wise guys. Member
    1,286
    11
    18
    The Land of Waldos
    Sonic Utopia, Sonic Overture
    You are the best person ever. I can now begin a fangame project. Thank you, I will give huge credit.
    Well lack of deltatime sucks, but I may be able to live without it. I really wanted to do some slowmo this and thats for certain effects.
     
  17. StreakThunderstorm

    StreakThunderstorm

    Member
    216
    0
    0
    Mecha Madness
    It would be pretty cool if we somehow got slowmo stuff working. I kinda wanted that to be in the engine as well.
     
  18. Mr Lange

    Mr Lange

    A wise guy eh. I know how to DEAL with wise guys. Member
    1,286
    11
    18
    The Land of Waldos
    Sonic Utopia, Sonic Overture
    Well you know, when I write X = X + 5 in an Always event, the object will move at such a rate. Yet I can write X = X + (timedelta*3000/3)*5, and get the same rate, yet it now reacts to timeScale. I don't know what you are doing different, but I guess it is to be considered.
     
  19. StreakThunderstorm

    StreakThunderstorm

    Member
    216
    0
    0
    Mecha Madness
    See if you can take a look in the movement events. Maybe you can get delta time to work.

    nevermind. I implemented Time Delta completely. Every action you create having to do with X or Y speeds or variables must be multiplied by timedelta now.

    Sonic Construct Worlds with Time Delta
     
  20. Candescence

    Candescence

    Member
    2,023
    21
    18
    Sydney, Australia
    3D Indie Stuff
    My friends, what you guys are doing is fucking boss. :thumbsup: Integrating the engine with timedelta can certainly allow for some awesome stuff. And when I'm able to port things over to C2, that program can set time scale for individual objects, meaning Chaos Control/ZA WARUDO-style time stopping is very much possible.