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

Implementing Time Travel into the engine


Recommended Posts

I'm having a real hard time with this. First off, I'm completely new to MMF so I can't really say I expected it to be any easier than this. What I basically have done is take this engine here...

http://www.sonicfangameshq.com/forum/showthread.php?t=4291&highlight=time+travel

..and just copy-paste it into sonic worlds. I then replaced the "sensor" object with that for the player in Sonic worlds, and then imported all counters that tutorial had. So far, I can pass a sign and it will spin. That's the furthest I got, as it's a simple process that doesn't rely on a bunch of other values and stuff that are already in the engine. Obviously I'm way over my head here as it's proving too much for me to get how to find what objects and values need to be changed to use what the Worlds engine has already, not new things that mean nothing that I just pasted from that time travel tutorial.

I've probably chosen a naive way of approaching the implementation of this gimmick, but it's something I'd really like to have for this engine. Basically what this post is trying to say is, does anyone know how to port that engine properly into Worlds, or has anyone already made their own system for the Worlds engine?

Link to comment
Share on other sites

Just copy all the variables related to the player, such as FloatX, FloatY, Speed, etc, as well as stuff like the Timer values, Rings, etc, and restore said variables in the frame for the other time zone.

Vague, I know, but I'm just typing this up with a vague memory of the engine, so yeah. Also, this is just a general idea of time travel, so it should work in any engine.

Link to comment
Share on other sites

You lost me already :P See, I've been looking at the sonic cd engine and it has these objects such as "absolute value" and "speed", and I'm lost how to put those over to the World's engine as it uses it's own objects to determine that, if I understand it correctly. Plus speed seems to be handled by several things or something. You might guess I'm lost what's what in either engine here so...ya. No idea what float x or y are either =p

Link to comment
Share on other sites

If you want my advice, you should just lie down in front of a rocket.

Actually, the idea of time travel in Worlds is little different than it is there. The only difference is that you need to preserve your positions and values within the objects going between the frames which contain the different versions of the same level. In fact, it should be fairly easy. Just make sure your master variable object is set to carry everything between frames.

Link to comment
Share on other sites

Ok, I'm stuck here. This other engine uses too many counters. Can anyone tell me where the speed values are for when you're running? As it is, the cd engine checks a speed counter. I assume that what I want for the Worlds engine is the Player_MovementValues object, correct? Exactly what do I do with it to determine if you're running a fast enough speed so the sparkles start appearing behind sonic?

Link to comment
Share on other sites

If Player_MovementValues.speed >=6

enable sparkles

if Player_MovementValues.speed < =-6

enable sparkles

remember that it is stored on the Player_MovementValues alterable values. Read the name of the alterable value, it is descriptive enough to understand what does it do.

Link to comment
Share on other sites

Save processor power by using this instead...

If Player_MovementValues.Speed * Player_MovementValues.Speed >= 36

That way you only use one comparison operation and a quick mathematical operation rather than two comparison operations.

Alternatively, you could use the abs() function, but I'm not sure which is faster.

Link to comment
Share on other sites

Well, I've been trying what you've said, since I guess I see where the speed values are. I'm kinda lost why you guys are saying Player_MovementValues.Spe ed when I don't see that(if I missed something here I must look really dumb). I see XSpeed though, so I tried that alterable value, but the sparkles still don't appear when I run fast. I'm at a loss as I can't seem to see what would go wrong. Is there like an irc channel for this place where I can get live help from someone? Otherwise the help you've given, especially with how obviously green i am with MMF, is greatly appreciated :)

Link to comment
Share on other sites

So is there anyone I can talk to live on irc that can help me at all? Ive now figured out that the sparkles do appear if I make a new condition for if the X speed is fast enough. What makes no sense is that if I add "if TimeToGo_Counter <> 0"(which is the value changed to the timezone of the post you pass), it suddenly doesn't work at all. And I clearly have it set to change that counter to another value if I pass a sign. I can't figure out what the problem could be, and I've been reviewing it for over a half hour now.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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