“Vanman” dev log #1: Using Photoshop’s Generative Fill for a Hidden Object Game

I recently published a demo for “Vanman” (working title), a Hidden Object Game which you can play online at itch.io for free. The code uses Wasabi Applications’ “Hidden Object Game Maker” ($15 on the Unity Asset Store), and right now the game is a proof-of-concept for how you can use AI art to create graphics for an entire Hidden Object Game.

How it was made

First, I polished a large panoramic photograph I had taken of a parking garage:

I removed some of the yellow traffic barriers from the right side of the photo, and also removed my smiling partner who was in front of the center door.

Then, I used Photoshop’s AI-powered Generative Fill tool to create 23 new objects scattered around the level:

I also copied the wet floor sign onto a new layer, then used Generative Fill to smoothly remove it from the background layer, so that it can be used in the game the same way as any AI-generated object.

Next, I had to import the image into Unity and actually use it as a game. I did this with the help of Unity’s “2D PSD Importer” (a free asset).

The 2D PSD Importer was immensely helpful for importing every object as a separate layer into Unity, just like they were in Photoshop. It’s important to export the image in Photoshop as PSB (not PSD) and select “Maximize Compatibility” in order to get the desired result:

Not exactly sure why the images are doubled in Unity’s Project view, but they are fine once dragged into the scene.

Finally, there would be no game without the “Hidden Object Game Maker” asset. Dragging scripts around and repeatedly typing the names for each object was a pain, and I dread the process of updating an existing level with new objects.

Would a different Hidden Object Game asset from the Unity Asset Store be easier for this specific workflow? Who knows, because I’m not going to buy and try all of them. But in the future I plan to write scripts that automate 90% of the dragging and typing I have to do.

Why Photoshop?

I originally wanted to use GIMP and Stable Diffusion for this project, but I ran into 2 main issues:

  1. There wasn’t a perfect tool for inpainting a massive number of different objects into such a massive image. There were some tools for Stable Diffusion like openOutpaint or Invoke AI that came close to what I wanted, but I found them much more awkward than using Photoshop’s amazing UI for Generative Fill. (In the future, I will need to test the Stable Diffusion plug-ins for GIMP and Photoshop, or I may need to make my own extension for automatic1111 that makes inpainting easier for massive images like this.)
  2. Stable Diffusion takes many more tries than Generative Fill to create simple yet photorealistic objects. Normally I don’t mind the extra time because Stable Diffusion allows for so much more control and precision over how the final image looks, but for a hidden object game I definitely value quantity over precision for placing as many simple-looking objects as possible.

So I made a deal with the devil and subscribed to Photoshop for the sake of this project.

To-do List

Aside from the tasks I already mentioned, I have many other plans for the future of Vanman. I’ve been brainstorming an overarching story and other locations where I can take panoramic photos to use as different levels. But for now, I’ll be treating this project as more of a tech demo than a story-driven game, and these are the areas I want to focus on:

  • Find a more interesting mechanic for the wide panoramic photos. For example, there could be a seamless “wraparound” effect when you scroll to the edges of the level. Or maybe the level could be cut up into shorter stages: after finding a handful of items in one stage, the background scrolls to the side and reveals a new section of the level along with the new items to find, and the level timer increases.
  • Take full advantage of the features in Wasabi Applications’ “Hidden Object Game Maker”. There are several other level modes and unused features like Hints that would add a lot of value to the game, but they take more time to implement.
  • Add more objects and make variants of existing objects in different locations. This would dramatically increase replay value if there are different objects in different positions every time you load the same level.
  • Experiment with ways to automatically place AI-generated objects into new levels. Generative Fill is great for manually adding AI-generated objects in a proof-of-concept demo like this, but fully-automated level generation would require something more customizable like Stable Diffusion.

Leave a Reply