CROSS ENGINE: Combining Chrono Engine with Altimit Movement

Restart

Veteran
Veteran
Joined
Mar 15, 2019
Messages
551
Reaction score
439
First Language
English
Primarily Uses
RMMV
Latest Version: Cross Engine Alpha 0.20.06.26 Demo Project




What is Cross Engine?

Over the course of the last few months I've been working on my game, and I decided I wanted to combine Altimit Movement and Mog's Chrono Engine. Cross Engine is what I call the big pile of functions that makes both of them work together, giving both pixel movement and ABS mode.

It also includes bugfixes, and QoL features that came up when I was doing things (most of my notes to self thread is included). Basically, this is all stuff I found useful, and hope that other people will find useful as well.

Why's it called Cross Engine? Partially because it's a Cross-Compatible Engine for making games, but mostly because it's a followup to a beloved classic which killed off Chrono.


Compatibility Patches

Cross Engine now works with yanfly's itemcore, altimit movement, yanfly's item spawner, yanfly's doodads, and galv's camera plugin (the last of which is actually essential to avoiding event/doodad jitter).

Also, Ultra Mode 7.

8-directional, 2 directional, and 1-directional Spritesheets:

Sure, a lot of people have 8-directional spritesheets (and I support all the major formats), but how many people have ONE-directional spritesheets?

With Cross Engine, you can take any old image, give it a filename, and put it in.

ameEN5K.png

Save it as $Angel(f1)(d1).png, and BAM, it's usable as an event. No mucking around in photoshop making a spritesheet with four versions of the same sprite.

But that's not all! I also added intelligent sprite flipping, as well. If you named that angel $Angel(f1)(d-1).png instead, it will flip to face left if it moves left, and flip to face right if it moves right.

Split poses and actions
One of the things really dragging down the pace of a chrono engine game is that characters were locked in place while they animated. I have changed the engine so now you have a separate 'pose duration' and 'act duration'. Pose duration means your character is playing an animation, act duration means they can't move or cast anything. I've also added a 'cooldown duration', which lets you move, but doesn't let you cast any abilities.

Intelligent Tag Parsing
1) Tags parse from right-to-left, instead of left-to-right. This seems super minor, but it means that if your base character sprite is $Harold(f4)(d8), and he has a casting pose "_casting(f8)(d1)", then the new spritesheet sizes will take precedence!

2) Filename Completion: Let's say your idle sprite for harold is "$Harold(f4)(d8)_idle(f1)(d1)". In base Chrono engine this would cause rpgmaker to screech to a halt, because it can't find "$Harold(f4)(d8)_idle".

However, upon starting up the game, Cross Engine makes a list of every file in your characters folder. When it checks for poses, it will first check for an exact match. If it doesn't get it, it will check to see if there's any longer versions of that filename. If it checks for "$Harold(f4)(d8)_idle", and can't find it, it will return "$Harold(f4)(d8)_idle(f1)(d1)".

What if there's no match at all? The event keeps its base sprite. In playtesting, it will whine about it in the console. No crashing.

3) Negative values are now allowed for x and y offsets.

Walking actions
You know how in megaman you can shoot your little gun and megaman keeps on walking? Using the tag (walking) will keep your character in the same part of the animation cycle when transitioning into the new pose. Practically speaking, that means you can do the megaman things. If the character isn't moving, it will fall back onto a _static pose, so you don't run in place whenever you shoot.

Standing Pose
One of the big constraints on having fluid animation in rmmv is that your walking frames have to include a static pose used for standing. If you define a 'standing' pose, your character will use that instead when they aren't moving. While you can technically do this with an idle pose, I wanted to have both in my project.

Faint Poses
Mog was going to implement faint/death poses distinct from damage poses, but didn't end up finishing it. I have an implementation of this, so you can have a robot get banged up a bit when it gets hit, then violently explode into a miserable pile of circuits when it dies.

Basic Preloader Function
One thing you'll notice using chrono engine is that whenever creatures change poses for the first time, you'll sometimes see a flicker as the file loads. I have added a function which preloads all poses for a creature. If you enter ImageManager.preloadPoses('Ralph'), it will find 'Ralph_attack', 'Ralph_defense', 'Ralph_is_unstoppable(F4)(d8)(s2)(x4)', et cetera, and preload them. This doesn't happen automatically - you have to invoke it each time you're worried about preloading.

New plugin command: disable_idleposes
Turns off idle poses. Good for cutscenes where characters mugging at the camera is unwanted. Turn them back on with enable_idleposes

Intelligent Rotations

Do you want a magic circle of spinning runes? I've got you covered. In chrono engine, rotations are around the bottom center of the sprite, wherever it is. In Cross Engine, the axis of rotation is the base of the event - the offsets you put into filenames, (y124) or (x12) or whatever, move the sprite without changing where rotations are - so if you have a 128 pixel tall wheel and put (y64) into the filename, rotating it will spin it!

I also have functions that let you tell an event to spin its sprite, and whether or not there's an angle it should stop at. So you can have a compass that always points at the player or at a monster or something.

And if you use the this.rotFaceTarg() function, your bullets will point to face the direction that they're going to move towards. In a move route, put it on the same line, directly after one of the motion-ordering commands (like rLoc, tLoc, shootForward, or shootPastPlayer)

A big pile of helper functions
I've got a bunch of functions with short names for stuff that I ended up doing often, like converting directions to vectors or angles, or making characters move in a specific direction. For instance, being able to type in tLoc(x,y) to get a character to move directly to the location x,y makes writing moveroutes and scripts a lot easier.

Just like the Chrono Engine which preceded it, you're best off starting with the working demo project and building outwards. The cross engine plugin itself should be reasonably drop-in for an existing Chrono Engine project, but I honestly haven't tried it.

1) Will you make a compatibility patch for (this random plugin)?

If I end up using that plugin in my game, yes. Otherwise probably not, there's a lot of plugins out there.

2) I have a compatibility patch for chrono engine and (some plugin) - will you add it?

If it doesn't break anything, sure.

3) I have a bug report!

If it's in ABS mode, upload either a minimal test case or a bugfix.

4) What if I'm reporting a bug that isn't in ABS Mode?

We've moved on past Chrono Engine. This is the sequel, Cross Engine. Chrono died in the timeskip. It's sad but we all have to live with it. You can report Chrono bugs but I probably won't do anything about it.

4) But what if I have a bugfix for a bug in Chrono mode.

Oh well in that case, sure. Just because I don't care about poor dead Chrono doesn't mean other people don't.

5) I'm using yanfly item core with this and I'm just getting a 'cancel' beep when I try to use a sword or my shield isn't working or whatever

Turn on midgame note parsing.

6) What are the future plans?

I'll keep adding features that I personally find useful, and fix bugs I encounter.

7) I want to take cross engine and make my own thing based on it.

Go ahead, just credit with a linkback, and stick a link in this thread to wherever your project is.


PLUGIN ORDER:
This is from the demo project, but I'm putting this here as well
gvOI9Z8.png

LICENSE:
This is a cross compatibility patch, which means that it borrows heavily from the underlying plugins. Do whatever you want with my contributions, but don't take that as permission to violate any terms for the underlying plugins I'm stitching together. Use it commerically, noncommerically, as a basis for your own compatibility engine, whatever. Please credit.

CREDIT INSTRUCTIONS for using Cross Engine:
For Cross Engine specifically, credit 'Restart', and make sure you also credit Moghunter and Altimit Community Contributors for their massive contributions. Neither of those plugins' terms require it but I think they deserve it :).


DEMO CREDITS:
* Moghunter made the original Chrono Engine, as well as the original chrono engine demo which I'm including.

* The Altimit Community Contributors is the official copyright group listed for Altimit Movement, but I think we all know that it wouldn't have happened without Xilefian.

* Galv's Camera Plugin is included (with permission) in the bundle as well, because it's needed to control the unholy jitter this stack of plugins creates.

* Yanfly gave me permission to include some of the original code when making the YEP_EventSpawner compatibility patch.
 
Last edited:

KaYsEr

Koruldia
Veteran
Joined
Mar 14, 2014
Messages
267
Reaction score
485
First Language
French
Primarily Uses
N/A
This is a really good job; I tried your demo for 30 minutes and found some glitches when it comes to collisions though. Mainly when spamming attacks on an enemy near a wall, sometimes the enemy can clip through it and can't come back in the map, and the "final hit" is almost guaranteed to push an enemy into the wall (that one is less "game breaking"), also when charging an attack the enemies are pushed back super-fast, this is actually the game breaking bug I got on my MC when fighting the Behemoth, I don't know what happened but I was probably dashing and got hit, suddenly I became super-fast (never to come back at the regular speed) and was able to go through wall when holding the dash button, and only when holding it. Weird.

The cross engine plugin itself should be reasonably drop-in for an existing Chrono Engine project, but I honestly haven't tried it.

I get an error "this.isPosing is not a function" when trying to do this, I have a lot of plugins that could be problematic though, I'll try to check deeper but right now the motivation isn't that high considering your demo brings new problems with collision so it's kind of a 'pick your poison" situation, too bad because it feels really good to play with an analog controller. Again, it's an impressive work you've done and I'm sure it's possible to iron out some of the remaining glitches. Good luck, you’ve made something really interesting and it feels like it’s almost there.
 
Last edited:

Restart

Veteran
Veteran
Joined
Mar 15, 2019
Messages
551
Reaction score
439
First Language
English
Primarily Uses
RMMV
The problem with knockback collision is inherited from altimit (fast enough characters can go through the thin walls on some tiles, particularly A-tiles). I thought setting a speed of 5.8 was low enough to avoid issues in testing but I can tune that speed down a little bit, it's no biggie. Probably should have it (and the getting stuck in a permanent super fast knockback state) patched by tomorrow.

Knocking back things super far with the charged sword is intentional; Mog actually set the Knockback_Strength parameter for it super high, but it wasn't actually implemented in code for the demo.


EDIT: Okay, think I probably fixed the knockback issues in the -B release. If clipping keeps happening I'll lower speed all the way to 5, and if the player retains speed after knockbacking even after that, there are a few other places I can reset the speed.
 
Last edited:

KaYsEr

Koruldia
Veteran
Joined
Mar 14, 2014
Messages
267
Reaction score
485
First Language
French
Primarily Uses
N/A
It's perfect now I think, after trying my best to push slimes and bats in the walls I coudn't, and the Behemoth fight didn't have any problem too, of course that kind of test needs more than 30 minutes but so far so good.


Now that I've seen how great it is to move with an analog stick it will be hard to go back haha, I wish I could make it work on an existing Chrono project, out of despair I even turned ALL my plugins OFF except for Altimit, Chrono-engine and your Cross-engine (in that order) and I still have an error, a different one though "cannot read property '_actionWalk' of undefined" hmmm, I wonder what's wrong here, maybe I need some rest because I'm out of ideas.

Great job nonetheless! That combination of smooth pixel movement + ABS is pretty much a first in RM history.
 

Restart

Veteran
Veteran
Joined
Mar 15, 2019
Messages
551
Reaction score
439
First Language
English
Primarily Uses
RMMV
It might be a plugin order issue; the stack of plugins is kind of sensitive since I built it around an existing chrono engine setup and never tried moving things around.

Otherwise, if you have a console log for me to check, it sounds most likely that Cross Engine is looking for a mog plugin that it doesn't find, and RPG maker dumps the whole Cross Engine - if so I can see if I can check if that plugin doesn't exist, and disable any features depending on it.
 

KaYsEr

Koruldia
Veteran
Joined
Mar 14, 2014
Messages
267
Reaction score
485
First Language
French
Primarily Uses
N/A
Yes it's possible, it's the first time in 5 years using MV that I can't solve a problem like that by moving plugins around or deactivate some of them, here is a screencap of my console log. :)
 

Attachments

  • crossengine_error.jpg
    crossengine_error.jpg
    166.6 KB · Views: 13

Restart

Veteran
Veteran
Joined
Mar 15, 2019
Messages
551
Reaction score
439
First Language
English
Primarily Uses
RMMV
okay yeah, it's looking for mog's weather plugin. I'll put in an if statement to check if it's imported.
 

KaYsEr

Koruldia
Veteran
Joined
Mar 14, 2014
Messages
267
Reaction score
485
First Language
French
Primarily Uses
N/A
Seems to be the plugin that causes problems indeed, here is what I get when I turn it back on, it's basically the first error it gave me. Maybe that weather plugin needs to be setup in a specific way idk.
 

Attachments

  • screencap_cross.jpg
    screencap_cross.jpg
    221.6 KB · Views: 10

Restart

Veteran
Veteran
Joined
Mar 15, 2019
Messages
551
Reaction score
439
First Language
English
Primarily Uses
RMMV
Now that you've got things working with your plugin stack, would you mind posting whatever tweaks you needed to do in thread?
 

KaYsEr

Koruldia
Veteran
Joined
Mar 14, 2014
Messages
267
Reaction score
485
First Language
French
Primarily Uses
N/A
Sure, what do you need to know? It's quite easy in fact, just get the plugin and put it UNDER everything needed for your cross-engine (included galv camera and anti jitter) then you're good to go.

Here's what I recently achieved with it:
 

Restart

Veteran
Veteran
Joined
Mar 15, 2019
Messages
551
Reaction score
439
First Language
English
Primarily Uses
RMMV
Latest Version should be reasonably compatible with ultra mode seven - at least, it works in my initial tests, I haven't tried anything fancy.

Qw0dxNP.png
 
Last edited:

KaYsEr

Koruldia
Veteran
Joined
Mar 14, 2014
Messages
267
Reaction score
485
First Language
French
Primarily Uses
N/A
Looks promising indeed! Well you can add some random trees (using events or doodadds) to get a quick idea, but I confirm that it works.

(77fps? Unusual number, I assume you have a high refresh-rate monitor? I got a 120hz one, which means MV always tell me I'm at 120/119fps, does it mean you have any kind of performance issue on your side, could be a frame pacing problem, I have to remember to try all of it on a weak laptop in order to see if everything is still running fine.)
 

Restart

Veteran
Veteran
Joined
Mar 15, 2019
Messages
551
Reaction score
439
First Language
English
Primarily Uses
RMMV
Updated version with a little tweak to enemy pathing (randomly moving enemies should bonk into walls less).

Temporary invulnerability has been enhanced a bit. Weapons can have custom temp invulnerability defined (so the first two slashes of the sword combo don't cause it, but the third one does). Also, characters with temporary invulnerability now flash while they have it (technically this invokes an animation on the character every 5 frames, so it's customizable and toggleable).

I'll probably add a configurable temp invulnerability on touch damage, at the moment it's only slightly longer than your knockback duration. The homing slime in the demo gives you a few moments between its constant attacks to respond, but it's probably a little too short (that said, this is the worst case scenario of a super-fast enemy that only knows how to attack, and scripting the AI would avoid this situation as well).
 
Last edited:

TheGameAfter

I'm here to help and to learn!
Veteran
Joined
Apr 20, 2019
Messages
134
Reaction score
74
First Language
Hebrew
Primarily Uses
RMMV
Wow, very nice work, to be honest from starting with MV I been looking at your posts, every time got new knowledge the help me a lot when working on my game, I'm very thankful I can check another one of your great add-ons to mog abs, and this time you did it in big haha.
 
Last edited:

Restart

Veteran
Veteran
Joined
Mar 15, 2019
Messages
551
Reaction score
439
First Language
English
Primarily Uses
RMMV
^Thanks!

New update: this version has some basic enemy scripts.

I have a wall follower, and a wall reflector, both of which are great for replicating classic zelda enemies. I think everyone hates those anti-fairy things which move diagonally around the screen, constantly bouncing, and now you can inflict those on your players too!

I also tossed in a dumb little horizontal charger, which will wander around and charge the player if it sees the player is horizontally aligned - and if it misses the player and hits the wall, it can get stunned for a few free hits.

Since this is all enemy logic unrelated to the core engine, I'm putting them all in their own file - CrossBattleScripts.js
 

Restart

Veteran
Veteran
Joined
Mar 15, 2019
Messages
551
Reaction score
439
First Language
English
Primarily Uses
RMMV
Another update, should have improved ultra mode seven support when dealing with yaw angles other than 0 degrees. At least in my tests, it looks like shooting diagonal weapons when the entire map is tilted works fine.

One thing I did notice is that if you're using altimit + ultra mode seven that the default altimit colliders are located a little low, and you should probably move the y center of the circle to something like 0.25
 

TheGameAfter

I'm here to help and to learn!
Veteran
Joined
Apr 20, 2019
Messages
134
Reaction score
74
First Language
Hebrew
Primarily Uses
RMMV
Another update, should have improved ultra mode seven support when dealing with yaw angles other than 0 degrees. At least in my tests, it looks like shooting diagonal weapons when the entire map is tilted works fine.

One thing I did notice is that if you're using altimit + ultra mode seven that the default altimit colliders are located a little low, and you should probably move the y center of the circle to something like 0.25
Since I'm all about resources, I want to let you know about another 3D mod you can try, is basically adding the 3D mod using common events (he does use a plugin but just for the base, all the functions store in the 'common events'). It is a paid plugin but I fighter if it is something you think you use for your game you might as well have more options. This is the link, I would love to know what you think about it (comper to the 'ultra-mod').
 

Restart

Veteran
Veteran
Joined
Mar 15, 2019
Messages
551
Reaction score
439
First Language
English
Primarily Uses
RMMV
YoraeRasante is actually already working on a chrono engine/mv3d compatibility plugin.

I've tested an early build, and the chrono compatibility plugin seems to not have any major problems with cross engine instead of just chrono, but since Yorae's not done with it yet I'm obviously not going to include what he sent me in the demo.

Basically once it comes out I'll add official support (which'll almost certainly need to include some special case updates in crossgraphicsfix), but until then I'm holding off on it. No point in me working on it when someone else is already doing a great job.
 

TheGameAfter

I'm here to help and to learn!
Veteran
Joined
Apr 20, 2019
Messages
134
Reaction score
74
First Language
Hebrew
Primarily Uses
RMMV
YoraeRasante is actually already working on a chrono engine/mv3d compatibility plugin.

I've tested an early build, and the chrono compatibility plugin seems to not have any major problems with cross engine instead of just chrono, but since Yorae's not done with it yet I'm obviously not going to include what he sent me in the demo.

Basically once it comes out I'll add official support (which'll almost certainly need to include some special case updates in crossgraphicsfix), but until then I'm holding off on it. No point in me working on it when someone else is already doing a great job.
Got it, I will look up on YoraeRasante work then, Thanks
 
Last edited:

KaYsEr

Koruldia
Veteran
Joined
Mar 14, 2014
Messages
267
Reaction score
485
First Language
French
Primarily Uses
N/A
One thing I did notice is that if you're using altimit + ultra mode seven that the default altimit colliders are located a little low, and you should probably move the y center of the circle to something like 0.25
Indeed. :LZSlol:
Adjusting the Y would be a good enough solution but, what if your project uses both 2D and Mode7 maps.
Hopefully this is only a problem for the MC and no other collisions.

(EDIT: worst case scenario it's possible to adjust on the fly)
 
Last edited:

Latest Threads

Latest Profile Posts

I'm sure the latest post/thread in the sidebar used to have 5 posts. Was it always been like this?

Made it to the 10th video doing this! :kaocry:

renderTimingPixel.png
Made the "My Beating Mystery" board today:
3ENFLSC.png

in Grim Trigger episodes 3 & 4, the main characters play a Clue rip-off board game called "My Beating Mystery" (haha), so of course I had to draw the board for it. Can't decide if I wanna add blood or not
Jeez...
I finally decide, after several ppl asking me to, to create a gamethread about project M... And my internet craps out on me halfway through the process :(
making my first game is like trying to stuff all my experience with old games into one
so its slow and painful when i dont get it right... i bet the next game is gonna be finished earlier!

Forum statistics

Threads
110,402
Messages
1,053,014
Members
143,461
Latest member
VarEesha
Top