Mega Engine - Open-source Classic Megaman engine for Game Maker 8.1 and Studio 1&2!
It's been a long time, but version 1.6 is released! I've decided to address some bugs, add a couple commonly-requested features and port the game to Game Maker Studio 2.

Download:
Game Maker Studio 2
Game Maker Studio 1.4
Game Maker 8.1

The downloads in the main post have also been updated.

Changelog:
-Added a Game Maker Studio 2 version. This also comes with a custom view system that allows you to use the view almost exactly like in Game Maker 8.1 and Studio 1
-Added a separate slide button (default: C)
-Added support for stretched collision; while probably not useful in Game Maker 8.1, this makes level creation in Game Maker Studio 1 and 2 faster, as well as increasing performance
-When checking for collision with gimmicks, you no longer have to check for their dead variable, making especially moving platform collision less complicated. NOTE: this method changes the object's mask to nothing when despawned, keep this in mind in case you want to change masks at unusual times
-Made spike collision more fair; if you collide with a solid and spike at the same time, the solid takes priority, preventing you from dying. This is more accurate to the original games
-Fixed a bug where jumping on the frame you land would prevent you from doing a short jump
-Fixed the disclaimer text's vertical spacing in the Game Maker Studio 1 and 2 versions
-Fixed a bug where throwing a weapon, then switching weapons and shooting a weapon, caused your controls to become locked
Reply
Hey, my apologies if this inconveniences you, but can I ask you for advice regarding how to program a certain feature in the engine?

I'm pretty sure I'm using the Mega Engine 1.5 right now, and am probably going to stick with that for my test project.

So I've been watching your tutorials in an attempt to work out the basic features of the engine for a project(still deciding on whether I'll just make it 8 established Robot Masters or an original 8), but I've run into a few problems.

The first: I tried implementing Quick Boomerang, copying over the movement code for Silver Tomahawk, but I can't get it to rotate and then return; all I've been able to get it to do is move up or downward in an arc.

My code is as follows:

"if global.frozen == false
{
if y > -5
{
yspeed -= 0.25;
x += xspeed;
y += yspeed;
image_speed = 0.1;
}
if y <= 5
{
yspeed += 0.25;
x -= xspeed;
y += yspeed;
image_speed = 0.1
}
if image_angle < 360 //sets rotation for Quick Boomerang.
{
alarm[0] = 2;
}
if image_angle == 360
{
image_angle = 0;
}
}
else
{
image_speed = 0;
}"

The second: I then tried implementing Flash Stopper, but I can't figure out how to get the whole "Freeze some enemies" thing down. I thought making the game frozen and making a special exception for Mega Man would work, but no such luck.

The third: I've got a decent Sniper Joe enemy set up, with alternating states for shielding and shooting and which rotates to face the player, but I can't seem to make it go into the series of shooting sprites set up. It just moves to the second sprite in the shielding case(where its eye flashes to signal it's about to shoot)and sits there.

I can't help but feel like the solution to these problems is really obvious, but I haven't been able to figure it out, so any assistance you could offer as the engine's creator would be most appreciated.

Also, just a suggestion, but perhaps adding a screen nuke weapon(say, the Centaur Flash)might be a good idea if you ever decide to make another version of this engine.

Anyway, thank you for taking the time to read this. Have a fantastic day.
Reply
For the Quick Boomerang arc, I recommend simply creating a path. Game Maker's path system is quite powerful, and this is a good example where it can be really handy. Make sure the Quick Boomerang follows your path relative to its X/Y position and destroys itself once the path is finished. You'll probably have to create separate paths for firing it left and right.
For Flash Stopper, it's more complicated, but I recommend creating a variable global.flashStopper that's true when Flash Stopper is activated and false otherwise. Then, go to all enemies and change "global.frozen == true" to "global.frozen == true || global.flashStopper == true". Since enemy freezing is already in the game (when the game is paused, when you're getting healed, etc...) you might as well make use of it this way.
The Sniper Joe problem sounds very specific and I can't tell you much without seeing the code first. Perhaps you set image_speed to 0 too soon, or perhaps the check for making it move to the shooting state is incorrect (e.g. don't check for image_index, but check for floor(image_index) instead). Again, this is just a guess.

If you have any further questions, feel free to let me know, but please send me a PM so we don't fill up this thread.
Reply
I'm happy to share my Quick Boomerang code. Feel free to tweak it as needed, but this feels pretty good. I've never used paths so I suspect this is the inferior method for doing it Smile


CREATE
image_speed = .125;

directionx = 1;
originY = y;
radiusy = 15;
radiusx = 45;
angle = 270;
deathTimer = 50;

xspeed = 5; //only used for projectile reflection


STEP
if !global.frozen
{
image_speed = .125;
x = originX + cos(angle)*-radiusx;
y = originY + sin(angle)*-radiusy;

deathTimer--;
if deathTimer <= 0
instance_destroy();

if directionx == 1
{
angle += .12;
}
else
{
angle -= .12;
}
}
else
image_speed = 0;

Oh, this is important. Under the "shoot" script:

attackID = instance_create(box+image_xscale*4, yy, objQuickBoomerang);
attackID.directionx = image_xscale;
Reply
Thanks! This could not have come at a better time, actually; the project I'm working on right now includes Quick Man, so having this will be really helpful. Thank you so much.
Reply
Hey, so I've run into a problem that perhaps somebody here could help me with.

I've coded a couple separate bosses which work fine when placed in the Beta room that comes with the engine program, but don't initialize properly when put into the levels I've designed for them. They don't spawn immediately, and they freeze the game after showing up, never initializing their health bar or starting the fight. I know the problem lies in the BossControl object, but I can't figure out what about it doesn't make it work properly.

If anyone here is able to provide assistance, it would be most appreciated.
Reply
If you check the provided bosses there should be some variables like "isFight" and "isIntro" etc. which need to get set in the step event correctly. See how they do it.
Reply
Been a while, but version 1.7 is released! I got multiple requests to add Mega Man Maker's more stable moving platform code to the engine, and I finally got around to it. It also includes a minor clipping fix related to sliding.

Download:
Game Maker Studio 2
Game Maker Studio 1.4
Game Maker 8.1

The downloads in the main post have also been updated.

Changelog:
-Implemented moving platform code from Mega Man Maker, which means they should be much more stable.
-Fixed a bug where sliding on the frame you land could cause clipping.


For those who want to implement these stable moving platforms into their project made in an earlier version, here's the code to look out for:
-prtMovingPlatformSolid, step event (replace entirely)
-prtMovingPlatformJumpthrough, step event (replace entirely)
-objMegaman, create event (some added variables)
-objMegaman, end step event (currently has nothing; add it)
-script playerStep (ground checks at the start)
-script playerMovingPlatform (replace entirely)
Reply
Too lazy to look up the code atm, but I made a quite simple way to end a slide in a 1-tile gap. IIRC I swapped out the "place_meeting(...y-1...)" (which transposes the more-than-one-tile-wide hitbox up for detection) for a collision_circle() check with a 6.5 radius (which makes a diameter of 13, less than the 16-pixel tiles). Allows for a comfortable position when standing too. May require some tweaking at this point for accuracy to the classic games, but it is definitely functional.
Reply
While i was working on my fangame, i noticed a bug where E-Tanks would respawn post-death after you got a Game Over. It's some unnoticed stuff that nobody saw it coming, and it's very concerning.
Reply
(06-04-2018, 01:33 PM)JohnLeagsdurg Wrote: While i was working on my fangame, i noticed a bug where E-Tanks would respawn post-death after you got a Game Over.

Items respawning after a game over happen in the official games, so I don't believe that's a bug.
*chew*
Reply
(06-04-2018, 10:35 PM)Yozzaxia1311 Wrote:
(06-04-2018, 01:33 PM)JohnLeagsdurg Wrote: While i was working on my fangame, i noticed a bug where E-Tanks would respawn post-death after you got a Game Over.

Items respawning after a game over happen in the official games, so I don't believe that's a bug.

Been a lot confused by the way because it's like a year since i've been playing fangames until i noticed this gimmick. Maybe it could be something that would help the player in difficulty?
Reply
(06-04-2018, 10:35 PM)Yozzaxia1311 Wrote:
(06-04-2018, 01:33 PM)JohnLeagsdurg Wrote: While i was working on my fangame, i noticed a bug where E-Tanks would respawn post-death after you got a Game Over.

Items respawning after a game over happen in the official games, so I don't believe that's a bug.

Pickups respawning after a gameover is not the bug, the bug is that if you've gotten at least 1 game over they respawn whenever you die, so if you have 9 lives you could farm 9(or 8 idk) etanks before the next gameover
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)