Closed Felsir closed 8 years ago
Thanks @Felsir. Cool looking game too.
@Felsir you beat me to the anwer :P
First of all, nice answer. It would have beaten mine in the amount of detail. I basically said "you need to import this Nuget package. See Dylan's website". Second of all, nice game and nice Pipeline extension. I like it.
@Felsir you beat me to the freaking answer you scrub :P
Funny story about that. When I first looked at the question on stack it didn't have any answers. I must've been writing my answer at the same time as @Felsir. He submitted his answer just a few minutes before mine and it got upvoted (I assume by @WardBenjamin). Small world :)
Ouch. I come across as a total jerk... not quite what I meant.
Anyway, quite a small world, definitely. I was also writing my own answer with very similar content, but ended up deleting it when Felsir's popped up. Huh.
@WardBenjamin nah, it is all a funny coincidence and weird timing :-)
The racegame is currently "on hold" I learned a few new techniques so it's up for a rewrite. In it's current state it works but it's not very modular. Happy you like it :-)
Back to the topic of Atlasses: another importer I'm looking to build is one for this (free) editor: http://darkfunction.com/editor/ it is really simple for sprite animations. I did some test animations with it and it works quite well. It moves the atlas creation to the tool; but it provides a complete sprite animation solution. It is less complex than Spriter Pro (or Spine) so may provide a solution for many entry level game developers. What do you think?
What do you think?
I think that's a great idea. Having support for a few different free and commercial tools is a really great thing. The only downside is that we have to maintain the importers if the file format changes.
When I have time to take a closer look at the tool I'll add it to my list of content creation tools.
@Felsir can you raise a new issue for this? Something like "Support for darkFunction Editor" with relevant links and description. When we are done we should also remember to contact the developer and ask him for a link on his import libraries page
As briefly discussed here: http://gamedev.stackexchange.com/questions/108613/monogame-3-4-content-pipeline-extension-missing-reference/108616?noredirect=1#comment189059_108616
Basically a content importer that reads png files, places them into an atlas and makes the assets easy retrievable in the game code. The process works like this:
The code contains a dictionary <string,spriteinfo> spriteinfo contains a struct like this:
In the code you could now draw sprites like this:
The content processor uses
Texture2D.FromFile
to read the png files. TheSetData<Color>
method is used to pack sprites in their bins according to the packing algorithm (as I expected the draw methods not to be available during the content building process- I may be wrong though). the writer writes the textures and the dictionary to the XNB file.This decouples the creation of the images from the atlas creation. I used this in my game "80s Racer"
https://www.youtube.com/watch?v=46-Mb2CMopw
The level editor references the same .png images for roadside objects. The content is then created and the game reads the level files and is able to pick the images from the atlas content without having to worry where the images were located.