The Middle Ground

Typically, when I've completed a portrait, I upload it to our shared workfolder (we use Dropbox, by the way - which I totally recommend for anyone trying make a game with multiple people working on it simultaneously) and ask Teddy to add it to the game.

Now, one thing that happens a lot of the time is that when I start the game to check that everything looks OK we end up with something like this:


Uh-oh. The shoulders are too big!

Previously we've solved this by taking screenshots of the shoulders in the game and cropping them afterwards, but today we decided to try something different. I asked Teddy which pixel the portraits use as a central point on the dialogue box, and he let me know that it's 55px to the right.

I created a new PSD document in Photoshop and marked the 55th pixel with a red line:


I also added the white line in order to mark where the actual dialogue appears: no portrait is allowed to go past this line. Now, when I add the portrait of the Blacksmith I can easily calculate where he will appear in the dialogue box by matching his center to the red line:


I'll now be able to correctly crop bigger portraits before they're added to the game!

This little trick can also be used to modify where I want the portrait to appear. For instance, if I wanted to have a portrait appear further to the left, I could simply move the portrait to where I want it to appear and add the difference between where its center is now and the original center (55) times two to the finished sprite's right side as white space. This will automatically make the portrait appear in the same place as the PSD once Teddy adds it to the game, and the whole business of screenshotting will finally be out of the way!



There's probably better ways of solving this problem, but at least this works out for now..!
Next PostNewer Post Previous PostOlder Post Home

2 comments:

  1. I'm sure a simple script can automatically trim your portraits and make them ready to be directly added. If you wish I could write a small software that does it.

    ReplyDelete
    Replies
    1. One thing that's nice with doing it manually is that we're able to control exactly where the portrait ends up in the dialogue box, I assume writing a software where that is possible would be kind of difficult and perhaps not worth the time compared to moving it around in the Photoshop document? I really appreciate the offer, though <3

      Delete