Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/OpenGMK/OpenGMK
A rewrite of the GameMaker Classic engine runners with additional tooling
https://github.com/OpenGMK/OpenGMK
emulator game-engine gamemaker gamemaker8 gm81 gmk tas
Last synced: about 1 month ago
JSON representation
A rewrite of the GameMaker Classic engine runners with additional tooling
- Host: GitHub
- URL: https://github.com/OpenGMK/OpenGMK
- Owner: OpenGMK
- License: gpl-2.0
- Created: 2019-02-24T21:56:46.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-05-09T23:56:59.000Z (7 months ago)
- Last Synced: 2024-08-01T20:48:43.386Z (4 months ago)
- Topics: emulator, game-engine, gamemaker, gamemaker8, gm81, gmk, tas
- Language: Rust
- Homepage:
- Size: 10.7 MB
- Stars: 265
- Watchers: 20
- Forks: 24
- Open Issues: 32
-
Metadata Files:
- Readme: README.org
Awesome Lists containing this project
- awesome-rust - OpenGMK
- awesome-rust-cn - OpenGMK
- awesome-rust - OpenGMK - OpenGMK is a modern rewrite of the proprietary GameMaker Classic engines, providing a full sourceport of the runner, a decompiler, a TASing framework, and libraries for working with gamedata yourself. (Applications / Emulators)
- fucking-awesome-rust - OpenGMK - OpenGMK is a modern rewrite of the proprietary GameMaker Classic engines, providing a full sourceport of the runner, a decompiler, a TASing framework, and libraries for working with gamedata yourself. (Applications / Emulators)
- fucking-awesome-rust - OpenGMK - OpenGMK is a modern rewrite of the proprietary GameMaker Classic engines, providing a full sourceport of the runner, a decompiler, a TASing framework, and libraries for working with gamedata yourself. (Applications / Emulators)
README
#+title: OpenGMK
*OpenGMK* is a modern rewrite of the proprietary GameMaker Classic engines, providing a full sourceport of the runner, a decompiler, a TASing framework, and libraries for working with gamedata yourself. It's being worked on almost every day! We’re constantly adding new features and updating the code. Please remember that /this project is a work in progress/ and is unreleased. Until there's an official stable release, please note that your savestates may break in future releases.
* Building GM8Emulator / GM8Decompiler
Start by cloning the repository. We use some git submodules at the moment (unfortunately), so make sure to clone with submodules.
#+begin_src sh
git clone --recurse-submodules https://github.com/OpenGMK/OpenGMK.git
#+end_srcYou can also recursively initialise the submodules after you've already cloned.
#+begin_src sh
git submodule update --init --recursive
#+end_srcThis project is written in the [[https://www.rust-lang.org][Rust]] programming language. You can download the toolchain manager directly from [[https://rustup.rs]] or a package manager of your choice. Our current minimum supported rust version (MSRV) policy is version *1.59*, if you're downloading it at the time of writing then you almost definitely are up to date but you can check with =rustc -V= to be sure. Please note that currently building for glibc on Windows (=...-pc-windows-gnu=) does not work. Once that's set up, building everything in release mode is pretty simple (but might take a while the first time).
#+begin_src sh
cd path/to/repo-folder
cargo build --release
#+end_srcThe build artifacts will be located in =/target/release= including libraries and binaries.
** Native DLLs for 64-bit Windows
If you're on Windows 64-bit and would like to play games with GM8Emulator that require 32-bit DLLs to function such as /GMFMODSimple/ or /supersound/ you'll also need to build the WoW64 server, preferably in the release profile. It requires the additional installation of the =i686-pc-windows-msvc= toolchain with rustup and you will need to build it separately.
#+begin_src sh
rustup target add i686-pc-windows-msvc
cd path/to/repo-folder/gm8emulator-wow64
cargo build --target=i686-pc-windows-msvc --release
#+end_srcThe build artifacts for the WoW64 server will be located in =/gm8emulator-wow64/target/i686-pc-windows-msvc/release=. The binary should either be manually copied to the same folder as =gm8emulator.exe= to work, or the =OPENGMK_WOW64_BINARY= environment variable should be set with the path to the binary.
A much easier alternative to this is building the project as 32-bit on Windows, where the WoW64 server is not required and the DLL loading logic is bundled inside GM8Emulator. It should be noted that cross-platform extension emulation is planned for the long-term future.
* Recording & Replaying TASes
To play a game normally, simply pass the only argument to =gm8emulator=:
#+begin_src sh
gm8emulator path/to/game.exe
#+end_srcTo start record mode, or continue a previous recording, also pass a project name with =-n=.
A folder for the project will be created in:- Windows :: =/projects/=
- Linux (Near Future) :: =$XDG_DATA_HOME/opengmk/projects/= or =~/.local/share/opengmk/projects/=#+begin_src sh
gm8emulator path/to/game.exe -n project-name
#+end_srcWhile in record mode, a =save#.bin= is generated for each savestate. You can export a =save#.gmtas= file, which is for sharing, and has input data only.
If you've lost your =save#.bin=, or need to migrate OpenGMK versions, you can recreate it by simply replaying your =save#.gmtas=:#+begin_src sh
gm8emulator path/to/game.exe -l -f path/to/save#.gmtas -o path/to/save#.bin
#+end_srcNote that =-l= here means disabling the framelimiter so it goes by faster.
/All command-line steps will be streamlined in a future release./
* Load / Runtime Errors
/Loading a game gives "failed to load 'filename' - unknown format, could not identify file" or similar/
#+begin_quote
OpenGMK is made to support /GameMaker Classic/ games. It’s possible the game you are trying to load was actually made with /GameMaker: Studio/, which it does not have support for at the moment. Whether it will in the future is unclear right now.
#+end_quote/Loading a game or while playing a game, "unimplemented kernel function" or "not yet implemented" or similar/
#+begin_quote
Your game tried to access functionality that's yet to be implemented. The full GameMaker Classic standard library is absolutely massive, and there's a good bit left to cover.
#+end_quote/Entering record mode gives "invalid u8 while decoding bool" or "expected variant" or similar/
#+begin_quote
This means that the =save#.bin= file in your project directory is out of date with OpenGMK.
This is a byproduct of it being actively developed, and is bound to happen.To fix it, open it in the build of OpenGMK it was created with, export a =save#.gmtas= from it,
and recreate the =save#.bin= in the new build with that as described in the recording section.
#+end_quote* About GameMaker Classic & OpenGMK
*GameMaker* (formerly /Game Maker/) is an engine for creating Windows games, originally created by [[https://en.wikipedia.org/wiki/Mark_Overmars][Mark Overmars]] in 1999 and [[https://www.yoyogames.com/][YoYo Games]] since 2007. *GameMaker 8* ("GM8") was the last of the /numbered releases/ of GameMaker,
released on December 22nd 2009 (surpassing /GameMaker 7/) and succeeded by the vastly more popular /GameMaker: Studio/ in 2011.
The pre-Studio versions are often referred to as /GameMaker Classic/. Due to the huge behavioral differences, as well as /Studio/'s lack of backward-compatibility, the classic engines are still very widely used, with thousands of games to their name.One of GameMaker's original strengths as a game engine was its ability to compile an entire project into a single executable. No external dependencies or installers, just compile, send the =.exe= file to your friend and they will be able to play your game. This is achieved by having the target executable act as a phase file for the entire collection of assets required to run the game. In other words, the executable contains not only the game engine code, but all of the objects, scripts, sprites, room layouts, everything required for the game logic. This behaviour was made optional in /Studio/, giving the creator a choice between a standalone executable or =.msi= installer, however the standalone builds just extract the contents of the installer to a temporary folder when they're launched, so sending the extracted contents as a =.zip= became much more preferable.
This project was originally started as [[https://github.com/Adamcake/Legacy-GM8Emulator][GM8Emulator]], a program that can load /GameMaker Classic/ games, and accurately play the game within. The goal was to have it mimic the original engine as closely as possible, down to the sub-frame and implementation detail (if observable). Strictly speaking, /emulator/ was not the correct term. In computing, an emulator is a piece of software on a computer system which emulates the behaviour of a different computer system. We aren't emulating any computer system, just the engine, unless you consider /Game Maker Language/ its own architecture. A more accurate term would be a /sourceport/, but it didn't sound as cool at the time. The project required us to write a decompiler as a starting point to extract the assets, and since we were already maintaining the most up-to-date fork of [[https://github.com/DatZach][Zach Reedy]]'s [[https://github.com/WastedMeerkat/gm81decompiler][gm81decompiler]] from 2013, we used that as a starting point to develop a much faster version from scratch out of the new codebase, released as [[https://github.com/OpenGMK/GM8Decompiler][GM8Decompiler]], which was originally a separate repository, but the code is now merged into the unified repository we named the *OpenGMK Project*.
* Contributing
This project has only been worked on by a few people so far in their little free time. Contributions are always welcome, although we'd prefer if you got in contact beforehand to discuss details (opening an issue, for example). All contributions are licensed under the same licence as the project.
* Additional Credits
- [[https://github.com/DatZach][DatZach]] for creating the original free and open source decompiler.
- [[https://github.com/Jabberwock-RU][Jabberwock-RU]] for creating the project icon and logos.* Licence
OpenGMK is free and open source software, provided under the [[./LICENCE.md][GNU GPL v2]], and is in no way affiliated with /GameMaker™/ or /YoYo Games Ltd./