don't click here

Question about Game Maker Sonic engines accuracy

Discussion in 'Fangaming Discussion' started by Chaos Rush, Oct 14, 2015.

  1. Chaos Rush

    Chaos Rush

    AKA J.Matz Member
    597
    70
    28
    So there's several different Sonic templates for Game Maker out there made by various people, and I would like to hear you Mega Drive experts opinions on their accuracy.

    The ones that I know of are (not counting the numerous forks of Damizean's movement engine people have made):

    * Damizean's very old GM6 "green" engine with those green cyberspace test tiles - as far as I know, this was the first fully functional 360 degree movement engine for Game Maker, and while amazing for its time, it was made years before Mercury published the Sonic Physics Guide and it definitely does feel a little off. But could it be modified for accuracy without giving it a major overhaul?

    * Damizean's examples pack - this was a slightly newer one that had plain black test tiles. From what I could tell it felt pretty accurate and a lot of people used it

    * Damizean's Xmas Engine/Sonic Dash/Sonic Dash+ - some time in 2007 or 2008, Damizean's released what was commonly referred to as the "Xmas Engine" and movement-wise it felt great. If I recall correctly, the Sonic Dash engines are forks of the Xmas Engine, though I don't recall if they made any changes to the physics. I do know that the original release was still years before the Sonic Physics guide was published. The organization of code in this engine is a mess, however.

    * AeroGP's unamed Game Maker Studio engine - this is a very recent engine and from what I remember testing it, it felt great, and was definitely made after the Sonic Physics guide was published. I do recall some comments in the thread about some very minor differences in slope physics, but are they really a huge deal?

    * Sonic MAX Engine - as far as I know this is 100% accurate, but the documentation is poor and its on GM:Studio so you have to deal with slow compile times.

    How important is it to have 100% accuracy to the Genesis/Mega Drive titles in a Sonic game? Because even as far back as Damizean's examples pack, while not 100% accurate, is still miles ahead of Dimps's Sonic 4 engine. Another issue I have with these newer engines is that there's too much implemented (I know that sounds ridiculous), I would really just like plain-movement versions (I like to implement things my own way). Of course, then you could say why don't use you use the one from Damizean's examples pack, but I recall that one did things differently than what the Sonic Physics Guide says. I've started my own movement engine using the guide as a reference (which is a lot easier for me to understand now rather than in 2010 now that I understand trigonometry and calculus), but I'm wondering is it worth doing so with all these other engines out there?
     
  2. 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
    It's not too terribly important to me to have 100% accuracy. In fact I would consider such a level of accuracy more of a curse. Let me see if I can explain.
    For one thing, to have true 100% accuracy, you would have to create a system that mirrors how the original games were built; that is, forgoing real angle detection for heightmaps where every teensy tile has an angle value assigned, then constructing the level pieces out of these tiles, and making the mechanics based on this system. Trying to build levels this way, as opposed to using a modern 2d level editor, is a lot more tricky and tedious. There's a variety of quirky details, like how to store Sonic's angle in a single value, they stretched out 256 to represent a full 360 degrees, which means the full range of angles is less accurate. For practical purposes, copying these things nowadays would be silly, unless your goal is a technical project in an effort to recreate the Genesis engine 1:1.
    Even with a close recreation by other means, various things in the mechanics I prefer to omit or adjust. As great as the original games are, they do have mechanical flaws. Some definitely ride the fine line of subjective preference. Some extra polish and tweaks can make for much cleaner gameplay, and more logical responses to slopes and things, even if Sonic would technically behave differently in those situations in the original games. I prefer the cleaner more logical route, than trying to perfect a recreation; the latter of which I consider extra effort for less return, a waste. I'd say the only reason to do so is in the interest of trying to create an authentic as possible Genesis clone, which I'm not interested in. To me, if it works well, the gameplay overall feels like Sonic, the basic movement values are right, etc, that's the most important foundation. I consider it better to enhance it by doing things like using more robust angle detection, tweaking things to make it play more smoothly, what have you. If 2d Sonic is ever going to actually progress and not be stuck in a static snapshot of itself, a snapshot that also captures all of its faults, it's important to analyze how it works and figure out how its elements can logically be improved upon. + - You know, exactly the opposite of what Sonic Team did.  
     
  3. Chaos Rush

    Chaos Rush

    AKA J.Matz Member
    597
    70
    28
    Thanks for your input. Tt does put things into perspective when you explain that there's no point in trying to copy it 1:1 when some of the things you're copying are a result of the Genesis/Mega Drive's hardware limitations. I haven't taken a look at the physics guide in a while and forgot that the original games don't use 360 individual angle values but rather, 256, but like you said that's definitely a redundant thing to do, especially when you consider that you could actually make an engine that feels smoother than the original games (though I'm pretty sure all of the engines I mentioned use a full 360 degree angles, I'm looking at the Sonic MAX engine right now and the author implemented an option to use the original 256 method). Say had Sonic 4 used "Damizean physics" I don't think anyone would have complained about the physics at all.

    (Also with Super Mario Maker, Nintendo more or less proved that they still had the original source code/physics documents to accurately recreate the SMB, SMB3, and SMW physics on Wii U, but I'm 100% sure that Sonic Team no longer has the source code NOR the physics notes to their classic games)
     
  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
    I plan on covering this in a video some day. Part of the reason why Mario still plays so closely to the originals is that it's a very basic platformer. So simple that Mario gameplay is usually a beginner tutorial for game making. Nintendo has been able to iterate on these relatively simple mechanics many times and work out many subtle improvements. Sonic however is a far more complex platformer. It's much more of an intermediate to advanced 2d game to make, to the point that only a handful of people have ever successfully made a 2d Sonic engine. Combined with Sega's atrocious decision making and Sonic passing through many fresh hands, Sonic was never able to properly evolve in 2d and instead was slowly butchered by lack of understanding the gameplay and random sloppy design choices to the point of... well Sonic 4. However, with a few fans making functional Sonic engines individually on their own in their spare time vs a huge game development company with a legion of professional programmers, millions of dollars, over a decade of time, being the very company that produced and owns Sonic itself, "no excuse" and "embarrassment" doesn't even begin to describe Sega, Sonic Team and Dimps.
     
  5. winterhell

    winterhell

    Member
    1,165
    7
    18
    1/360 of a circle is just an arbitrary precision value. While the classics store the angle in 1 byte, its actually just 128 + 1 values. All the angles are even, and there is also the magic 0xFF value.
    This makes the precision on average 2.8125 degrees.

    Visual angle of 27 degrees however internally is 22.5. 45 is 45, 90 is 90. They are not mapped even and this throws off most of the fan engines.

    From what I've tested increasing the accuracy of the angles doesn't make much of a difference.

    There are other areas in the accuracy that can vastly be improved upon with a new engine. For example in the classics and from what I can tell every 2D fangame as well, the graphics AND the collision mesh are quantified. All objects move in 1 pixel steps.
     
  6. 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
    That's a very subjective matter of "improving". It can be aesthetically displeasing to see sprites of a certain resolution moving in a space of higher resolution. This is why sub pixel values are internal calculation only and graphics are visually quantized to a certain resolution. However, if you're talking about "smooth" graphics, like paintings or vector drawings, ie Rayman Origins, that's a different matter.
     
  7. winterhell

    winterhell

    Member
    1,165
    7
    18
    Maybe it depends on the situation. I for one don't like when the character, camera and objects are visually snapped to 5x5 pixels blocks on a high resolution monitor.
    Same thing for realtime sprite rotation(not found in classic Sonic games) that is then upscaled 500%.

    And this - rendering the game directly at a higher resolution as opposite to a small 224p buffer that is then upscaled, doesnt affect performance.

    I agree different people have different tastes. Some prefer playing the classics on an emulator with no filter, others with bilinear, 2xSAI etc, with/without scanlines, or heck even on a CRT display..
     
  8. DigitalDuck

    DigitalDuck

    Arriving four years late. Member
    5,338
    412
    63
    Lincs, UK
    TurBoa, S1RL
    If the graphics use 5x5 pixel blocks such that it looks as though the resolution is much lower, then not snapping things to these blocks creates misaligned "pixels" and that's the biggest sin possible.
     
  9. Covarr

    Covarr

    Sentient Cash Register Member
    4,233
    3
    18
    Trapped in my own thoughts.
    Two stageplays, a screenplay, and an album
    Except they didn't accurately recreate the physics of any of those games. Acceleration, jump height, braking... they're all 1:1 identical to NSMBU across all styles. I will grant NSMBU didn't have the raccoon tail or the cape, so it's possible these have been faithfully recreated, but for basic physics they didn't even attempt accurate recreation. This is particularly obvious with SMB1, which offers significantly more air control than the original did.

    But this does bring up an interesting point. A lot of people thought the physics in Super Mario Maker were accurate. This game has shown very clearly that you don't need physics 1:1 identical to the source material to produce a result people will be happy with. So I don't think we need to focus on a perfectly accurate engine so much as a perfectly good one.

    The biggest thing, to me, that sticks out like a sore thumb to me in many fangames is HD sprite rotation with low-resolution art. This leads to a really bizarre, awful looking effect wherein pixels are diagonal. It ends up looking like a crappy Flash cartoon:
    [​IMG]

    Now imagine this in Sonic, which uses rotation constantly for things like loops so as not to have eight obvious angles. Occasionally a game like Freedom Planet does it right and aligns even realtime rotated sprites to the internal pixel grid (and I'm curious how this was achieved), but the crappy "diagonal pixel" way seems a lot more common, and I hate it.
     
  10. 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
    The term "rixels" can be used to describe rotated pixels. Similarly, "mixels" describes mixed resolutions of sprites on the same screen. Rixels don't bother me nearly as bad as mixels do.

    That's just how MMF2 works, along with anything else using a true pixel renderer. If the internal resolution is constant, then any scaling or rotations will be within that resolution, regardless of the screen being resized. Amateurs tend to overlook things like this, or don't know how to control it, or are just not bothered by it or can't tell the difference. I've been surprised by people who can't even tell when these things are happening, no matter how obvious.
     
  11. winterhell

    winterhell

    Member
    1,165
    7
    18
    No magic in there. It simply renders the game at 426x240 and then upscales that like a normal emulator.
    This is in fact how Stealth's games do it as well. Its the reason the special stages in S1 and S2 mobile are pixelated even though the terrain is animated at 60fps.

    Edit: ninja'd.
     
  12. Covarr

    Covarr

    Sentient Cash Register Member
    4,233
    3
    18
    Trapped in my own thoughts.
    Two stageplays, a screenplay, and an album
    Y'know, I should've figured it was something simple like this; now I know it it seems bleedin' obvious. I don't really have any game dev experience myself, and definitely haven't used MMF2, so as often as I've seen this done stupid or wrong, especially in Flash, I kinda assumed it was harder than this.
     
  13. Chaos Rush

    Chaos Rush

    AKA J.Matz Member
    597
    70
    28
    So the physics are identical between SMM styles? I guess sprites and abilities alone fooled me. But it's not like NSMB physics are the Mario equivalent of Sonic 4 E1 physics. As you said, NSMB offers more air control while DimpsPhysicsTM offers worse control all around.

    As for the sprite rotation stuff you've mentioned, while I've seen that problem in other games, I've never actually had that problem with Game Maker - if you render the game at internally 1:1 pixel resolution and simply upscale it (as opposed to rendering at 480p/720p/1080p), then sprite rotation is only limited to its internal resolution.
     
  14. Mors

    Mors

    Fangame Creator Member
    121
    0
    16
    Turkey
    Super Mario Flashback
    Sonic MAX' physics are not not 100% accurate, but it's really close. I used a few Sonic engines and Sonic MAX it's undoubtedly the best one so far. I actually would like to see an engine with just physics, without anything else. It would be really useful.
     
  15. winterhell

    winterhell

    Member
    1,165
    7
    18
    They were clearly going for Spinball's air control. And Spinball has also the laziest horizontal flip for an idle/walking character.
     
  16. flamewing

    flamewing

    Emerald Hunter Tech Member
    1,161
    65
    28
    France
    Sonic Classic Heroes; Sonic 2 Special Stage Editor; Sonic 3&K Heroes (on hold)
    Ah, no; you were right in the strike-through part: x-flip and y-flip have nothing to do with angles, and the 128 values do represent the thole circle.
     
  17. winterhell

    winterhell

    Member
    1,165
    7
    18
    Alright :)/> It's been a while since I worked with that so I'm misremembering things.

    Still, the precision in the classic games is impressive given the hardware capabilities.
     
  18. DigitalDuck

    DigitalDuck

    Arriving four years late. Member
    5,338
    412
    63
    Lincs, UK
    TurBoa, S1RL
    You'd probably get away with only 32 values for the whole circle anyway. The loss in precision isn't going to be noticeable unless you're trying to play through the original levels on muscle memory.
     
  19. AeroGP

    AeroGP

    Member
    130
    1
    18
    Los Angeles, CA
    Sonic for GameMaker: Studio
    I can arrange that. Give me about a week to finish the collision scripts I've been working on, and I'll post the results here.
     
  20. Chaos Rush

    Chaos Rush

    AKA J.Matz Member
    597
    70
    28
    Sweet, sounds awesome. I've already started my own engine following the physics guide but I haven't worked on it much due to other projects I'm also working on, so that'll come in handy. I do someday want to just make a classic-styled fangame that acts as a "real" Sonic 4, or at least help contribute to one of sorts.