Jump to content
A 2021 backup has been restored. Forums are closed and work in progress. Join our Discord server for more updates! ×
SoaH City Message Board

The Sonic Revival Engine (GM6.1+)


Chaos Rush

Recommended Posts

ALRIGHTY LOLZ. Time to edit this topic.

First of all, before I get to the main point, I'll explain something: Yes, this is the same thread as when I released the, "NEW Genesis Engine", but rather than making a new thread every time I release an engine, I'm simply going to put it in here. And another thing, I'm renaming all of my Sonic engines simply, "The Sonic Revival Engine". That way I don't have to make up stupid names such as, "THE NEW NEXT SUPER GENESIS ENGINE", or something like that.

Now to explain: The original Sonic Revival Engine was a Sonic engine I made back in late 2007. At around that time, I was re-starting my fangame, Sonic Revival. The Sonic Revival Engine was only designed for the actual fangame, and as I look back on it now, it was rather poorly made, pretty much made simply by Copy + Pasting things from Sonic Dash. As time went on, I released another Sonic engine, which was simply the Sonic Revival engine changed to Genesis-style sprites (and Tails & Knuckles added). And in November 2008, I released a completely new Sonic engine, and I called it, "The NEW Genesis Sonic Engine". Yes, this is the exact same thread that I released it in, which is why the first two pages reflect on that specific engine.

What is the Sonic Revival engine now?: It's an engine that will keep on getting updated from time to time, hopefully each one being better.

Releases:

The Sonic Revival Engine 2.0 (Corkscrew update on Page 2)

The Sonic Revival Engine 1.5

The Sonic Revival Engine

Description on each engine released so far:

The Sonic Revival Engine 2.0 -Some of you may know this as the Sonic engine I just released. Anyways, this is the best one so far, USE THIS!!! Includes Sonic, Tails, and Knuckles.

The Sonic Revival Engine 1.5 -This is the engine I released in around April of 2008, it's inferior to the one after this, I don't recommend using this. Includes Sonic, Tails, and Knuckles (kinda).

The Sonic Revival Engine -This is the original engine I released in November 2007. I think it's rather old and cluttered, so it's pretty useless. However it is the only Sonic engine I've released in Advance-style graphics, so it may be useful as a sprite resource. Includes Sonic.

Currently working on:

1. The Sonic Revival Engine 3.0 (Yes, I'm working on another one)

Anyways, for now, USE THE LATEST SONIC REVIVAL ENGINE!!!

Link to comment
Share on other sites

This will act as a good starting point for anyone wanting to make a Sonic 3-styled engine. Personally, I don't really know if it was good thing that you took the time to do a part of the work for potential fangamers, as I feel part of the experience is learning to script these things for yourself.

If you need help explaining how to do things, though, I'll be glad to help.

Link to comment
Share on other sites

This will act as a good starting point for anyone wanting to make a Sonic 3-styled engine. Personally, I don't really know if it was good thing that you took the time to do a part of the work for potential fangamers, as I feel part of the experience is learning to script these things for yourself.

If you need help explaining how to do things, though, I'll be glad to help.

Well...part of the point of making this was to simply recreate Kain's S3K Sonic Engine with Damizean's movement engine. And of course, a good alternative to Sonic Worlds, even if Worlds has extra features. Really, most of the stuff on here is from Sonic Dash. Anyways, I said in the first post that I'll gradually make more posts on how to add some stuff (such as corkscrews, which I already know how to do thanks to Sonic Dash), I wouldn't mind if anybody (such as you) posted on how to add some stuff.

One thing that I would like to ask: When Knuckles turns while gliding, how would you make that more smooth? If you noticed, internally, Knuckles was coded rather cluttered, poorly, and unorganized, could you think of anything better?

It says "Problem Loading Page" when I click the link.

Here, I'll upload it on this post without another host.

Genesis Engine.zip

Link to comment
Share on other sites

Personally, I don't really know if it was good thing that you took the time to do a part of the work for potential fangamers, as I feel part of the experience is learning to script these things for yourself.

There're always gonna be the asshats that just take multiple tutorials and art assets and slap them together without changing a single thing, anyway. If anything, at least this is cool for people who are busy but want to put something decent out.

Link to comment
Share on other sites

I don't see it as a problem, but if you want it smoother make the deceleration while gliding heavier - thus, he'll turn faster and frames will run quicker.

Actually, I meant to have the frames run slower, since that how it was in the actual Sonic games in comparison to this.

Why don't you bump your old thread in the submissions zone with this? I still haven't uploaded it yet (I can't because the engines and templates section of the site is still unfinished...)

...actually I think I'll delete the thread of the original Sonic Revival engine submission, and then bump the old Genesis engine.

Link to comment
Share on other sites

Well, I plan on frequently updating the engine (though I won't post actual examples, I'll just explain how).

The first thing I'll add: Corkscrews. The reason why they aren't in the engine is because I'm too lazy to assemble the character sprites. And yes, I kinda got the idea of updating this from the Sonic Firestorm blog thingy. The method for this is taken directly from Sonic Dash, therefore I credit Damizean & RogueYoshi for this. Anyways, follow these steps:

1. First, we'll add 2 new sprites. They are:

imagedl4.png(The sprite origin should be 0,0)

imagefa0.png(The sprite origin should be -192,0)

2. Next add the actual corkscrew animation for Sonic, Tails, and Knuckles. Again, I'm too lazy to assemble these myself, so I'll just post sprite sheets containing them:

Sonic

Tails

Knuckles

I am assuming you know how the animation system works in this engine, so I'm not going to go into detail on defining the animation frames and such.

3. Now create an object called, "objCorkscrewUpper". Make it's depth -100. What this does is that when your character runs through the actual corkscrew, you should only be able to see him half the time.

4. Now create another object called, "objCorkscrew". Add this in the create event:

instance_create(x, y, objCorkscrewUpper);[/CODE]

5. Now for the real stuff. Add this in the create event of objSonic, objTails, and objKnuckles (Objects-->Global-->Player):

[CODE]action_corkscrew = <insert number here>;
action_corkscrew_roll = <insert number here>;[/CODE]

6. I'm assuming that you defined your corkscrew animation simply, "corkscrew". Go to Objects-->Global-->Player-->objSonic/Tails/Knuckles-->End Step event. Click on the code under "Animation Set". Add the following piece of code right after the line, "animation = "spring_jump";"

[CODE]if (action == action_corkscrew && animation != "corkscrew")
animation = "corkscrew";
if (action == action_corkscrew_roll && animation != "rolling")
animation = "rolling";[/CODE]

7. Now go to objSonic/Tails/Knuckles-->Step Event. Click on the code under, "Object Interaction". Add this at the end:

[CODE] if ( action == action_corkscrew || action == action_corkscrew_roll )
{
var corkscrewObject; corkscrewObject = player_collision_main_object(x, y, objCorkscrew);

if ( abs(x_speed) < 5 ) action = action_normal;
if (corkscrewObject == noone) action = action_normal;
else
{
var relativePosition, angleInCorkscrew;
relativePosition = x - corkscrewObject.x;
angleInCorkscrew = degtorad((relativePosition/384)*360);

// Set position acording to relative position to corkscrew
y = corkscrewObject.y + 26 + (1+cos(angleInCorkscrew))*(75*0.5);

// Change animation frame depending on angle
if ( action == action_corkscrew ) animation_frame = animation_corkscrew_start+abs((radtodeg(angleInCorkscrew)/360*11) mod 12);
}
}
else if ( abs(x_speed) >= 5 && ground == true && player_collision_main_object(x, y, objCorkscrew) != noone )
{
// Set different actions based on current
if ( action == action_rolling ) action = action_corkscrew_roll;
else action = action_corkscrew;

// Common stuff
ground = false;
}[/CODE]

And now have fun with your corkscrews! This works just fine, I've tested it (my fangame at SCD, Sonic Renegade, has corkscrews, and the last demo of Sonic Revival also had corkscrews).

Anyways, thank Damizean and RogueYoshi, since this was taken from the older version of the Sonic Dash engine. To tell you the truth, I want people to view this engine as a much simplified form of Sonic Dash.

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...

I'm also working on a new GML physics engine so I have to give you props for this lol.

You've done a very good job, engine seems solid and well organized. Its also really well commented out. I'm just wondering why it calls for 3 different player objects for Sonic, Tails & Knux. This may just be a matter of taste but it seems a little redundant when you can do all of this in one object(since a lot of the code for slopes and whatnot is repeated). Also, this may help with organizing Knuckle's actions that you asked about, but personally I would just have one "action" string variable, and change that according to the movement type(eg. default, spindash, rolling, skidding), rather than all of the action_action stuff going on). It allows you to test only one variable to give it a behavior vs many. Extra variables can go in their own and then they wouldn't need to be tested during every game loop but rather only during their action... dunno if you get what I mean.

Again the 2 things I mentioned are just personal opinions. Also Dami told me he seems to have a good system for disabling/enabling objects that are out of the screen in GML which you might want to consider.

Good job over all : ) Nice to have alternatives out there.

Link to comment
Share on other sites

I'm also working on a new GML physics engine so I have to give you props for this lol.

You've done a very good job, engine seems solid and well organized. Its also really well commented out. I'm just wondering why it calls for 3 different player objects for Sonic, Tails & Knux. This may just be a matter of taste but it seems a little redundant when you can do all of this in one object(since a lot of the code for slopes and whatnot is repeated). Also, this may help with organizing Knuckle's actions that you asked about, but personally I would just have one "action" string variable, and change that according to the movement type(eg. default, spindash, rolling, skidding), rather than all of the action_action stuff going on). It allows you to test only one variable to give it a behavior vs many. Extra variables can go in their own and then they wouldn't need to be tested during every game loop but rather only during their action... dunno if you get what I mean.

Again the 2 things I mentioned are just personal opinions. Also Dami told me he seems to have a good system for disabling/enabling objects that are out of the screen in GML which you might want to consider.

Good job over all : ) Nice to have alternatives out there.

I use three different objects because to me, it's easier to organize. Also there is only 1 Action variable. The reason why you see all that other stuff is just "placeholder" stuff so you don't have to remember what number equals what. For instance, let's say if Action = 8, you're jumping. But not everybody can remember that, so we define a placeholder variable (action_jumping = 8), so then rather than having to keep track at which variable does what, you could simply do something like Action = Action_Jumping, which would equal to 8. So to put it simple, there is only 1 action variable, but instead of typing in a number you type in a name that matches the visual action.

Link to comment
Share on other sites

The reason why you see all that other stuff is just "placeholder" stuff so you don't have to remember what number equals what.

Just to clarify terminology, that's called a constant :3 Anyway, RC already knows about them, so need to worry.

Anyway, as for using different objects for the chacters, I really feel like that's an overkill. The characters difference (just a few actions) are way to small to even bother making them separate objects and copy all the code over again. Just my opinion, though.

Link to comment
Share on other sites

Heh I completely understand where you're coming from, but you don't need to use numbers is what I'm saying. If you simply had a string called "action" to separate certain movements, it also works. (and it's purely a matter of opinion which to use)

^_^

example:

//---------------------------------------------------------------------------------------/
//                                       Getting Hurt                                           
//---------------------------------------------------------------------------------------/

if(action == "hurt")
{ 
    v = directionFacing * - 2
    if(downCol)
    action = "walk"
    }

if(keyboard_check_pressed(ord('H')) &amp;&amp; action &lt;&gt; "hurt")
{
    action = "hurt"
    g = -6
    }
//---------------------------------------------------------------------------------------/
//                                       Animation                                           
//---------------------------------------------------------------------------------------/
//set the player's animations as necessary
p_set_anim()


//---------------------------------------------------------------------------------------/
//                                     Player Input                                          
//---------------------------------------------------------------------------------------/

switch(action)
{
    case "hurt":     ignoreControls = 1; break;
    case "die":      ignoreControls = 1; break;
    default:         ignoreControls = 0;
    }

Link to comment
Share on other sites

Just to clarify terminology, that's called a constant :3 Anyway, RC already knows about them, so need to worry.

Actually, it's not a constant in this particular engine. You forgot that your new engine uses constants, but your old engine uses variables, and this particular edit (what I call the Genesis/Revival engine, whatever) uses your old engine, not your new one.

Link to comment
Share on other sites

  • 2 weeks later...
I like most of the older version (What I'm using), this current have more bugs than the old, and Sonic always slide. I make Corkcrew, and work perfectly, thanks.:aparty:

The current one has no bugs that I can find...

but now I'm working on something completely new, no bugs, no useless variables and such.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...