[Game Maker] Open-Source Gradius-esque Shmup Clone Engine

A place for people with an interest in developing new shmups.
Post Reply
User avatar
mysterypaint
Posts: 5
Joined: Tue Jan 24, 2017 11:43 am

[Game Maker] Open-Source Gradius-esque Shmup Clone Engine

Post by mysterypaint »

Hello everyone! I just wanted to let you all know that I've just released my Open-Source Gradius-esque Shmup Clone Engine.

Source and readme: https://github.com/mysterypaint/Game-Ma ... mup-Engine

(Most of this post below is already written on the Github, and potentially outdated too)
---
[...] This engine is heavily reliant on knowledge of GML. As long as all assets are replaced with your own, you may use this source code royalty-free. (Credit isn't required, but appreciated)

See it in action here: https://github.com/mysterypaint/Game-Ma ... e/releases

This engine features:

Dynamic game state system (Opening credits, titlescreen, game mode, pausing, cutscene mode, game over mode, "START" mode [The START window before the player gains control])
Window resizing hotkeys (1, 2, 3, Alt+Enter, Holding Esc closes game)
Tilemap loading (.oel OGMO Tilemap format: http://www.ogmoeditor.com/)
Real-time tilemap modification and export
The standard Gradius arsenal and HUD
Commented code (At least, I tried!)
Title Screen menu, including customizing controls (Default controls use keyboard Z/X/C, UDLR, and Enter)
Cheat codes on the pause screen

The engine also has many debug features (Press Q to toggle debug mode):

E: Toggle cutscene game state
R: Set X camera scroll to 0.3
T: Increase the player's speed
U: Trigger Kon.Code (Unlimited uses)
I: Give the player a Speedup
Numpad +/-: Increment/decrement player lives
Right/Left-click: Change tile value the mouse is currently hovered over
P: Export the current level to a new .eol in the game's "working_directory"
B: Kill the player (Suicide button)
User avatar
mysterypaint
Posts: 5
Joined: Tue Jan 24, 2017 11:43 am

Re: [Game Maker] Open-Source Gradius-esque Shmup Clone Engin

Post by mysterypaint »

v1.1 is out, and now there's a fully-playable level, too! You can find it on the Releases page of the github.

Implemented a fully playable level, which demonstrates most, if not all, features below
Added a Gradius-like game loop system. Careful: The difficulty can get up to bullet hell/danmaku difficulty!
Implemented a couple of extra enemies, including a fully-functional boss
Implemented map switching
Hi-Score now functional: Shoot them all!
Moved some scripts around to separate the more general-purpose parts for re-use (e.g. map switching, BGM changing)
User avatar
mysterypaint
Posts: 5
Joined: Tue Jan 24, 2017 11:43 am

Re: [Game Maker] Open-Source Gradius-esque Shmup Clone Engin

Post by mysterypaint »

v1.4 is now out!

I've added gamepad support, a brand new Co-Op mode, and a couple of cosmetic touches... Hopefully no crazy bugs! As always, you can find it on the Releases page on GitHub.
User avatar
BPzeBanshee
Posts: 4859
Joined: Sun Feb 08, 2009 3:59 am

Re: [Game Maker] Open-Source Gradius-esque Shmup Clone Engin

Post by BPzeBanshee »

Hi mysterypaint, and welcome to the forums!

This project has me intrigued - having built GMOSSE myself initially for a similar purpose in the vert world it's interesting to see someone do the same thing with a horizontal shooter, and with 2P support as well. I've given this a spin and have put some comments and questions below.

I notice you've gone with the route of externalising your room creation to Ogmo Editor which from the little spin I've given using your project and example files is also an interesting utility, and making GMS be able to load and operate said files is not a matter to scoff at. What does Ogmo Editor provide that GM's own room editor doesn't though?

I'm also curious about is why you felt the need to draw everything from a single controller object. If it's depth control you want that could've been achieved simply by setting appropriate depth values to objects and background tile layers and from there letting GM's internal system handle things itself, so I'm guessing this is some kind of over-optimisation for the sake of control? I feel like this kind of approach, while it works for large multi-object enemies to sync said objects draw events together or actual arcade systems with limited CPU cycles (like trap15's Fire Lancer), this probably isn't appropriate for drawing *everything* in a GM game when it has a system in place for this already but I'm open to ideas on being proven wrong here.

Few bugs I found:
- On first run the game will spit an error due to not having default variables for what I assume is the mapped key/controller buttons and generate "sav" in its working_directory and then work properly afterwards. Error window copypaste here. This should be properly captured so on first run it'll at least let you know you're lacking a config file and run off defaults or otherwise just make the file and move on.

- I've also noticed when pausing the player ship sometimes doesn't immediately stop on its spot and is offset by one, I gather due to a timing/order of events issue with the state management you've done for "pausing" the game (which I'm not sure I agree is best design due to its coupling with other areas but it's certainly less controversial than instance_activate_etc).

- I can't seem to pick any of the other weapon options, it just locks an option in and then gives me the shield choices. Intentional?

All the best, and looking forward to seeing you on the forums a bit more (although I admit I've been rather inactive lately myself so I'm one to talk)! :P
User avatar
mysterypaint
Posts: 5
Joined: Tue Jan 24, 2017 11:43 am

Re: [Game Maker] Open-Source Gradius-esque Shmup Clone Engin

Post by mysterypaint »

Thank you for the warm welcome to the forums. I also appreciate and value your feedback!

I've attempted to fix the bugs you mentioned and have pushed the changes to the source code git so I hope they won't cause any more issues! As the code currently is, the pausing state toggles a variable in objMain called "deltaTime" between 0 and 1, and I multiply everything by that value to determine if it should be moving/animating or not. I'm open to any suggestions for improvement, though!

Regarding objCamera drawing all of the invisible objects, I used it as a way to keep track of depth control in a single script so there'd be one dedicated place to look for them... Though I wouldn't mind switching to a different system if the current system has significant drawbacks!

About the level parsing script, I wanted to store my levels in a 2D array (or ds_grid, in this case), where I could easily manipulate the tile data. I did this because I wanted to have control to make endless, region-specific level screen wrapping and animated tiles, and I suspect that I'd be using similar techniques if I were to work on any other 2D tilemap-based games in the future... Admittedly, I haven't used Game Maker's tile system lately, and my tile-parsing script is a bit old. I heard it can do this in GMS:2, so I'm definitely planning to look into alternative methods/parsing algorithms someday.

Thanks again for the input, and I hope the modifications I made will suffice!
Scarlet Phoenix
Posts: 3
Joined: Fri Feb 17, 2017 10:23 am

Re: [Game Maker] Open-Source Gradius-esque Shmup Clone Engin

Post by Scarlet Phoenix »

This is pretty awesome. I am still deciding on what engine to make my game on. Is this a 3D engine also or is it an engine made for 2D. Also how easy is it to port to other platforms (Xbox One, Switch, etc)?
User avatar
mysterypaint
Posts: 5
Joined: Tue Jan 24, 2017 11:43 am

Re: [Game Maker] Open-Source Gradius-esque Shmup Clone Engin

Post by mysterypaint »

Scarlet Phoenix wrote:This is pretty awesome. I am still deciding on what engine to make my game on. Is this a 3D engine also or is it an engine made for 2D. Also how easy is it to port to other platforms (Xbox One, Switch, etc)?
Thank you, I'm glad you like it! I don't think Game Maker/GM Studio is ideal for 3D game development, although that might not be the case for the very recent GM Studio 2, which I haven't looked into yet. It wouldn't be too extraordinary to reference this source code if you were to use various parts of this engine toward a game making software like Unity.

I'd say the same for porting to other platforms too: If you aren't planning to write an engine in a lower level programming language like C#/C++/ASM/etc, want 3D, and plan to port to actual game consoles, then perhaps consider looking into Unity.

I hope this helps somehow, and I wish you the best of luck regardless whichever route you go for!
Post Reply