Using Shoebox With MonoGame
If you’ve worked with spritesheets at any point you might have worked with tools like TexturePacker or Shoebox, which can make creating and managing spritesheets a lot easier. I’ve actually not used them until now, but since I’m experimenting with a new framework (MonoGame) I thought I might as well give them a try!
However, while TexturePacker has built-in MonoGame support you can only access it in the paid version. Shoebox is completely free, but doesn’t offer support for MonoGame out of the box…but luckily you can modify the output parameters to enable that support! Simply open the Sprite Sheet settings menu and copy in the following two lines:
File Format Loop
\t<Item><Key>@ID</Key><Value>@x @y @w @h</Value></Item>\n
File Format Outer
<XnaContent>\n\t<Asset Type="System.Collections.Generic.Dictionary[System.String, Microsoft.Xna.Framework.Rectangle]">\n@loop\t</Asset>\n</XnaContent>
Now Shoebox will generate MonoGame-compliant .xml whenever you generate a spritesheet! I hope this helps someone out there and if it does, show me what you used it for!
Want To Buy Me a Coffee?
Coffee rules, and it keeps me going! I'll take beer too, though.
Related Posts
Setting Up SGDK in Visual Studio Code (With Auto-Complete)
As I mentioned in part 2 of Adventures in Mega Drive Coding I set up Code::Blocks as my IDE for Mega Drive development. And Code::Blocks is great, but I still had two issues with it. First of all, auto-complete didn’t really work. Considering I’m pretty much poking around the SGDK API blindly, that wasn’t helpful. And secondly…I use VSCode for pretty much anything else coding-related, so it would be nice to also use it for SGDK stuff.
HaxeFlixel Tutorial: Single Separation Collisions
Collision detection (and handling) is one of the most fiddly things when it comes to creating games, at least in my experience. There seems to be no shortage of weird bugs and issues that can pop up throughout the entire dev cycle of a game (the weirdest one I’ve encountered so far is this one right here). It’s a good thing then that HaxeFlixel comes with several functions that can take care of it for you.
Hanging on Balloons
One of the best things you can do for yourself in gamedev is to have good tools and an efficient workflow. I’ve already shown how I handle path movement in [Speer] in another post, now I want to show you another small trick I’m using to make level creation easier and quicker. Note: As always this article will show how I’ve implemented it in HaxeFlixel, as that is the framework I’m using.
Comments
By using the Disqus service you confirm that you have read and agreed to the privacy policy.
comments powered by Disqus