Importing GameMaker rooms and objects to Construct 2 free edition

Construct 2 allows you to import GameMaker rooms and objects from .gmx projects. This tutorial describes how to do it, what's imported, and what's not imported.

Get Construct 2 free edition

First of all, grab the free edition of Construct 2 if you don't have it already. You can download it here. Obviously the free edition doesn't cost anything so you can download right away!

Importing a .gmx project

Note Construct 2 can only import XML-based GameMaker projects. These have a .project.gmx extension. The old .gmk format is not supported, although GameMaker itself can convert .gmk to .project.gmx.

Select File - Open.

In the dropdown for the file type in the bottom right, select GameMaker XML project (*.gmx).

Browse to your project folder and select the .project.gmx file for that project. Construct 2 then imports the project.

What's imported?

Construct 2 will import:

- Rooms

- Backgrounds

- Tiles

- Objects and their associated Sprites

Construct 2 will not import anything else. That means the following are not imported:

- Sprites which are not attached to any Object in the editor

- Sounds

- Paths

- GML scripts

- Fonts

- Time Lines

Some of these you can import yourself which is described later on. However, things like GML scripts are impossible to convert, because scripting is completely different to Construct 2's event system. There's no realistic way GML could ever be converted. The import is designed to give you a starting point to try playing with your project in Construct 2. It's not intended to be a complete conversion! That's why we say Construct 2 just imports rooms and objects.

The nuts and bolts

Rooms

Rooms are called Layouts in Construct 2. Each Room in the project is imported as a Construct 2 Layout.

Backgrounds and tiles

Backgrounds and Tiles are converted to Tiled Background objects in Construct 2. Groups of tiles are converted to a single Tiled Background resized to cover the whole area, which is more efficient than separate tiles. Construct 2 doesn't yet have 'draw it on' tilemap support, but you can achieve the same thing with Tiled Background objects.

Sprites and Objects

Construct 2 doesn't separate 'objects' and 'sprites'. In Construct 2, there is a kind of object called the Sprite object which contains animations and images as part of the object. On the other hand, GameMaker objects don't contain the images, they simply reference a separate sprite. So there isn't a one-to-one way for Construct 2 to import GameMaker objects. Here's what the importer does:

Each GameMaker Object is imported as a Construct 2 Sprite. If the GameMaker Object has no Sprite set in the editor, it is skipped and not imported at all. Otherwise, the associated Sprite is imported as an animation for the Construct 2 sprite.

If the object has a sprite assocated but isn't placed in any room, Construct 2 still imports it but does not create any instances. You'll be able to find the object in the Project Bar. Simply drag and drop the object in to a layout to place a new instance.

Animations

Typically, animations are changed in GML script, which is not imported by Construct 2. Since you can only associate one Sprite with one Object in the GameMaker editor, Construct 2 doesn't know which other sprites are used as different animations for the object. Don't worry, though, it's easy to import them yourself. Suppose your Player object has been imported with only one animation. Double-click it in Construct 2's Layout view and the animation editor opens. You can right-click and add a new animation in the animations panel to the right.

Then, you can right-click the frames pane at the bottom, and select Import Frames.

Select all the PNG images making up the animation from the GameMaker project, and you've successfully imported another animation. You might need to do this a few times to get all the animations.

Other objects

If there are still GameMaker sprites that haven't been imported, you can simply drag and drop the PNG file for it from Windows Explorer in to Construct 2's layout view. A new Sprite is instantly created. If you select multiple PNG files and drag and drop them in, a new Sprite is created with an animation with those frames. (Remember in Construct 2 a Sprite also represents its object - if there are animations to be used by the same object, import them via the animations editor as described previously.)

Sounds

In the Project Bar, right click Sounds and select Import Sounds. Select all the sounds from your GameMaker project, and Construct 2 can import them all at once. Note Construct 2 doesn't support MIDI files.

Don't forget to add the Audio object to play sounds!

All done!

That's about as far as it's possible for Construct 2 to import GameMaker projects. They're two very different bits of software so it's never going to get everything, and will usually need some tweaking. However, it's a great time saver and gives you a useful point to start playing with Construct 2.

Remember a major difference between GameMaker and Construct 2 is Construct 2 has no scripting language. It's all done by events, which are powerful enough to replace scripting completely. Construct 2 was designed solely for the event system. We're not planning on adding scripting support at all! If you'd like to learn more about how Construct 2 works, and how events can completely replace scripting, you might want to try our Beginner's Guide to Construct 2. If you have any questions, feel free to ask on the forum - we're happy to help!

  • 0 Comments

  • Order by
Want to leave a comment? Login or Register an account!