GM Link - For Aseprite
A downloadable extension for Aseprite
Send your sprites directly to GameMaker with a single click!
Using GM Link - a completely free extension for Aseprite. By using Aseprite's 'slices', you can select which sprites goes to GameMaker and keep everything in one document. This is a Windows-only extension at the moment.
Features
- Create and update sprites in your GameMaker project from Aseprite with one click
- Have all your sprites in a single Aseprite file (or multiple. Up to you!)
- You can have animated sprites as well -
just put "_strip<frame count>" at the end of the slice namefrom v1.6 , use Aseprite tags! - Put your sprites in subfolders in GameMaker via Aseprite
- Adjust bounding box and origin within Aseprite
- Super easy setup
- NEW! (v1.6 ) - Now featuring a simple Toolbar to make things even easier
How to setup
- Download the GM Link extension below
- Open Aseprite and go to Edit -> Preferences -> Extensions, and click 'Add extension' and open the GM Link aseprite-extension file
- Click 'Ok' and go to File -> GM Link -> Configure, and browse to your GameMaker project file (.yyp)
- READ AND ACCEPT THE WARNING TELLING YOU THAT YOU'RE RESPONSIBLE FOR KEEPING ADEQUATE BACKUPS/VERSION CONTROL IN CASE SOMETHING GOES WRONG
- Lastly, open up GameMaker and load your project. Add a new, empty sprite named "spr_gmlink_base"
(These steps will appear within Aseprite as well and you'll get a heads-up if you missed something)
PLEASE NOTE: Because GM Link reads and writes files, you'll be asked to give permission by Aseprite. For the most seemless experience, give full permission to the script. If it worries you, feel free to take a look at the source code or just give individual permission when prompted.
Also, GM Link uses Powershell to carry out file and folder related tasks within your GameMaker project, because the scripting support in Aseprite is limited. You will therefore see a command prompt window open up as the extension is loaded. Please keep this window open at all times. If you try to add sprites to GameMaker without this window opened, Aseprite will crash. You can always reopen Powershell by going to File -> GM Link -> Reopen Powershell.
How to use
- Use the Slice tool, hidden behind the Move tool (SHIFT C per default) to create rectangular slices around your sprite
- From v1.6 , a lot of the actions below can be done even easier through the new Toolbar (SHIFT T or access via FILE -> GM Link -> Open Toolbar)
- Double click a slice to edit its properties. Click the little button on the right to reveal the User Data field
- To put your sprites into subfolders within GameMaker, type the desired path in the User Data field. For example, typing folder1/folder2/folder3 would put this sprite in Sprites/folder1/folder2/folder3/spr_my_sprite in GameMaker
- Edit the bounding box of your sprite using the 9-Slices control. You can edit this visually on your slice if you enable it and click 'Ok'
- Choose the origin point of your sprite by setting the Pivot point
- If you have a sprite that uses multiple frames, ie. an animation, simply suffix the name of the slice with "_strip<frame count>". For example: spr_player_idle_strip4
- Whenever you wanna create or update a sprite in GameMaker, just press SHIFT F5 or go to File -> GM Link -> Update
- Keep in mind that:
- Deleting a sprite or changing it in GameMaker will not be reflected in Aseprite. It is a one-way communication from Aseprite to GameMaker
- If you name a slice the same name as a sprite in GameMaker, that sprite will be changed by Aseprite when you update
Important!
You are fully responsible for keeping adequate backups/version control of your project in case something breaks. This extension has not been tested on all versions of GameMaker and has had limited testing in general, so use with caution and please let me know if you discover any bugs. GameMaker has a history of updating their file structures a lot so this extension may break at any moment. Please reach out if that happens and I'll try my best to find the time to fix it.
I hope this is of help to you and you enjoy using the extension! Don't hesitate to reach out in the comments or on Bluesky @torelehmann.bsky.social. Thanks! :)
Download
Click download now to get access to the following files:
Development log
- 1.6 Beta!!! - New features and bug fixes15 days ago
- 1.5 Beta - Big new addition and update!32 days ago
- 1.4! - Aseprite doc connected to GM project automatically36 days ago
- 1.3 is out! Bug fix and better yy formatting37 days ago
Comments
Log in with itch.io to leave a comment.
This tool is fantastic its really saved my lot time in importing sprite in gm
Well, there few more things need in for animation
Due to huge amount of frames, its its getting hard to get hard to track them all
If there any way if you implement render just tag frames so it would be more efficient
Hey! Love to hear that it saved you some time. Nice! Yes, so I'm actually quite new to Aseprite. I moved over from years with Pyxel Edit just because I had the idea for GM Link and wanted to change my workflow up. So I want to learn how people like to use it and accommodate that in GM Link. With my limited understanding of tags, I see them as global groupings of cels, right? So they're not tied to a slice in any way for example? How would you like them to work with GM Link? I'm interested in your suggestion as tags were mentioned before as well. Thanks for using the extension :)
OP is right, and that would be great! Usually people have two types of aseprite files: Some with slices, but single or very few frames. These are mostly for static sprites. And for animations, people use a smaller canvas, but use tags to separate animations. I'd be happy to send over some Aseprite files for you to study, too, together with the .yy's you need for the bug hunting. ^w^
That would be lovely and would really help me out! Could you also confirm that the texture group gets reset even after having updated that sprite with the newest version of GM Link once?
Btw, little sneak-peek: the next version includes a new toolbar that allows you to bulk edit origin, bbox and subfolders on slices! I've also added the slice name prefix option in the sprite settings.
This tool is amazing! Great job, it is exactly what's been missing in the GameMaker space!
I would start using it immediately, but there are a few things stopping me from adopting it:
I prefer setting the origin inside GameMaker using "Middle Center" for most of my sprites, because the size might change later and I don't want to calculate it for every sprite. My game has hundreds of little decorative sprites and managing the meta data inside Aseprite slices for them would be quite tedious. Inside GameMaker I can select multiple sprites at once and set Texture Atlas, Origin, Frame Rate etc. via the Inspector.
Unfortunately GM Link overwrites these settings with each update of the art, even if I choose not to use any of the Aseprite metadata.
It would be great if the tool could detect if the sprite already exists inside of GameMaker and update only the graphics and dimensions, keeping the rest of the settings in tact (unless the user chooses to overwrite it with Aseprite metadata).
The same goes for folders: Once the the sprites were created, I moved them deep into my folder hierarchy which is organized by biomes and further sub-groups like foliage, props, negative space, etc. Replicating that structure for every slice would be very tedious.
If a sprite already exists and has been moved to a folder, it would be awesome if it would stay put if no path has been specified otherwise in the Aseprite slice.
For small projects or if you use this from the beginning, it would be amazing!
If it was a little more flexible for different workflows like mine, I would use and buy/support this in a heartbeat! It's exactly what GameMaker needs because updating existing assets is a big headache!
Cheers!
Wow, thank you so much for the detailed feedback! I've honestly been waiting for this because I knew there would be some obvious things that I hadn't thought about. When reading your suggestions, I'm like of course GM Link should be able to handle things like this. Especially the ability to default the origin to center, and also, for GM Link to let already set meta data stay as is and only overwrite if the user overwrites something through Aseprite.
Great suggestions and explanations. I'll get this implemented ASAP and post some update info on SoMe channels as well as here on itch.
Thanks,
- Tore
I'm glad it was helpful! A friend pinged me about it on Bluesky and I got so excited I started shaking lmao. I'm seriously looking forward to the next version! Cheers! :D
I've put up a new version (1.5 beta) that should, hopefully address the issues you had. Please check it out and let me know what you think. :)
Hi! Wow that was quick! :D
I wanted to jump right in but I only had time for a quick test yesterday. I will poke it some more during this week, but here's my findings so far:
My sprites now stay in the folder, which is great! The origin also seems to stay where I put it! :D
Some other settings still get overridden.
- Texture Atlas was back to default
- FPS for all sprites were set back to 30
Maybe this could work: If settings are set to "grab defaults from gmlink_base", only use them for initial creation of the sprite and then leave them as-is, as to not overwrite modified values. If the user wants to reset them to default, all they'd have to do is delete the sprite and re-export it, and it will get recreated using the gmlink_base defaults.
What I haven't tested yet, but what I use a lot in my game is actual 9 slices.
There also seems to be a small issue with the collision mask: The mode is set to Automatic and Rectangle, but the mask covers only the pixel in the upper left corner. When I switch the mode to manual and back to automatic GM will update it properly. This also seems to be overridden with each update to the sprite. My guess is, because gm_base is empty, the bounding box is calculated based on that and then applied after the art is added.
If I set the bounding box to manual, the values will not be overridden, which is great!
And a tiny improvement idea I had for lazy people like me: It would be really cool if we could define a standard file name prefix in the settings window, such as "spr_"! :D
Thank you for your hard work, and I am very flattered you're addressing my feedback!
Have a great start into the week!
Ah okay, seems like I missed a couple of things. Once again, thank you so much for the feedback. It helps a lot and I really appreciate it. I'll get those things sorted as soon as time allows! Great suggestion with the prefix. I assume you mean so a slice could simply be named "player" but in GM that would become "spr_player" if your prefix was "spr_"?
You have a great week too! :)
- Tore