Home ⁄ Strategy Games ⁄ Empire Deluxe CE ⁄ Progress with Unit Tiles

Progress with Unit Tiles

After some tinkering I was finally able to get unit tiles to work.  I learned a couple of important lessons along the way.  But the good news is the new tiles are working, so now it is just a matter of time before I am able to draw them and get them uploaded.

More is coming on this soon.  One thing I’m tinkering with is if I want to add state icons to each sprite.  This would make identification a bit easier, but it also means more work before I can release it.  I’ll need to sleep on this before I make a decision.

To anyone else who is working on their own unit tiles:

High Resolution Doesn’t Scale Well

It seems that the game likes to do some funky stuff with the auto scaling.  The blockiness of the original icons largely prevent this from being a problem, but with my tendancy towards thinner borders and curvy angles, you can get some strange artifacts on some of the zoom settings.  That means you will have to be very careful with your silhouette designs so they don’t look too similar to other units.  This is easy to avoid with ground units, but I suspect an upcoming problem with ships that I will have to think through

Be Careful With Naming

The source files I used to figure out the naming conventions ended up giving me this error on everything I created:

ArgumentException: An element with the same key already exists in the dictionary

I now know that you cannot have duplicate names of any images.  The issue was being caused because of two mistakes I made which slowed down my progress.

  1. The source files use images that had “u_” on the front of the image (i.e. “u_in00.png” for infantry).  However, these are hard coded and cannot be overriden!  Attempting to upload a file that has the “u_” definition on the front of it will cause the error mentioned above.   You files should instead use the syntax [unit_identifier][state_id].png (i.e. IN01.png for default infantry).
  2. You cannot have the same file listed twice in any unitimage folder.  This error also occurred because I had the image file in the udb/unitimages folder.  This seems like a silly oversight in my opinion, as it should be possible to override graphics for individual unit databases.  Nonetheless, you will need to make sure you don’t have duplicate file names.

Know Where to Place Unit Images

Unlike most of the art I’ve posted to-date, you need to place the unit images in the EmpireDeluxe\unitimages directory as opposed to EmpireDeluxe\otherimages.  ‘Nuff said here, it was just not obvious to me the first time I did it.

No Transparency Allowed, Don’t Bother Trying

My last post already covered this, so I won’t to it again.  I attempted a few tricks to get around the transparency issue and nothing worked.  It looks like square unit sprites is one of the things the game developer decided needs to remain a staple of this series.

Leave a Reply

Your email address will not be published. Required fields are marked *