Giter Site home page Giter Site logo

gm2godot's Introduction

GM2Godot

gm2godot

GM2Godot is a tool which converts GameMaker (2024.6.2) projects to Godot (4.2) projects. This repository is work in progress but feel free to help!

What it is and what it isn't

When presenting this tool, I've gotten a couple of questions what the tool really is and what it is supposed to be, so I'll break it down.

GM2Godot is:

  • A tool that ports assets from GameMaker to Godot
  • Is for people who don't want to port the GameMaker project to Godot from scratch
  • Not perfect. It will make mistakes.

GM2Godot isn't:

  • For people who expect everything will work perfectly.
  • A compiler that can seamlessly transpile GML to GDScript (yet)
  • This isn't a tool which converts exported GML projects to Godot, use UndertaleToolMod instead

Contribution

Contribution is found in CONTRIBUTING.md. But pretty much fork the repo, do pull requests and I'll try to code review them.

Installation

Clone this repository

git clone https://github.com/Infiland/GM2Godot

Open VSC and install Python 3.9.0 or later (I haven't tested older python versions)

py --version

You can download python here.

If you are Linux, you are required to have Tkinter module, do the following: (tested this on Ubuntu, so it probably works on debian based systems)

sudo apt-get install python3-tk python3-pil python3-pil.imagetk

The program requires the following libraries to use

pip install Pillow markdown2 tkhtmlview

(If you have Pillow installed, version 8.0.0 or newer is required)

Once installed, you can run the program:

python main.py

How to use

The tool will open a GUI menu upon running main.py.

At the top, place the GameMaker directory and the Godot directory in each textbox. NOTE: Godot directory needs to be completely empty to avoid data loss, GameMaker should stay as is.

Once you put both directories in the tool, you can choose in settings what you want to port and press the "Convert" button.

It will then start taking assets from GameMaker and port them into your empty Godot project. The tool will be done when it says so in the console and when the progress bar is at 100%.

gm2godot's People

Contributors

infiland avatar

Stargazers

Neyo avatar serverok avatar Majora8120 avatar Dejan Žegarac avatar QueeChang avatar  avatar

Watchers

 avatar

Forkers

eitanbariboa

gm2godot's Issues

Create empty script in objects

Each object would have a script, which has populated event scripts

So the create event from gamemaker would be _ready():

And step event would be _process():

Input events would be under _input(): and inside would be if statements depending on what was pressed, released, held etc etc.

Other events would serve as custom functions

Tool needs to properly copy the order of gamemaker's sprite frames to godot.

Gamemaker sprites can have multiple frames, when they do, they have a specific order of frames on how they are shown in GameMaker.

Currently the tool does take all sprites, but they are taken from a random (or at least wrong) order, which is bad for making animations using sprites.

To fix this, inside gamemaker sprite folders there is a .yy file that shows the order of each sprite how they should be represented inside the GameMaker engine.

I think a good idea would be to read that .yy file and then based on the information it takes the images that are referenced in that file

Port notes from Gamemaker to Godot

Notes in Gamemaker are just .txt files, very easy to port.

image

Make a folder in godot called notes and put all of the notes in there.
Also add setting to port notes

Add settings in the tool

Add settings in the tool like what assets you want to import in the project.

So it would have a list of checkboxes where you can select for eg, just to port sprites over

Add program icon for GM2Godot

Add a program icon for GM2Godot instead of using the default tkinter icon
Haven't decided on how it will look like but we'll see

Port sound info from GM to Godot

Sound information is found in .yy files which contain in what bitrate sounds are in GameMaker and other various information like if the sounds are mono/stereo, whenever they are compressed etc.

Port empty objects that have sprites

Objects in GameMaker are bundled with events, and each event acts like a script. So the "Create Event" in GameMaker is like the _ready(): in Godot, and _process(): is the "Step Event"

Make the tool create the "objects" folder which contains scenes with the gamemaker's object name. In each scene, there is a node2D with the imported sprite that is taken from the gamemaker object

Port fonts from Gamemaker to Godot

Make a new folder in godot called "fonts" and in gamemaker inside of folder fonts, in .yy files search for "fontName" in the files, which is the exact name of the font and let the tool assign the name to a font in godot

Proper README.md

Make a proper README.md with full instructions and intentions on how to use this tool.

Simplify main.py

Simplify main.py and make classes for the following:

GUI folder which has styles, progress bar, buttons and console
Converters folder which has all of the conversion scripts
Utils folder for other functions

Have each sound tied to an AudioBus in Godot

Have every single sound tied to an AudioBus that gets imported from AudioGroups in Godot

EDIT: This is currently impossible as in Godot you can assign audio buses only in AudioStreamPlayer or similar but not in audio files themselves. I am thinking that at least the tool to make folders based on gamemaker audio groups and assign various sounds there

Port game icon to godot

Take the image from options\windows\icons\icon.ico and put it in the root folder of godot as 'icon.ico'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.