Skip to content

dougwhite/example_pipeline

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example asset pipeline automation

#GitHubGameOff

tldr; Example pipeline for proprietary assets

A discussion about proprietary or non-redistributable assets took place on the GitHub Game Off 2025. A few people (myself included) advocated for excluding such assets from the repo, and instead having careful instructions for acquiring the textures in the repo.

This question was then asked:

If the asset is a PNG that requires sprite slicing and putting those slices into tilemaps etc
would everyone need to repeat that work locally or is it possible to set up the slices and
tilemaps, then replace the PNG with a placeholder of the same size and ask people to get the
png from the source themselves?

So this repo is an example of how to do exactly that, using a python automation script "build_assets.py"

Getting AI to build your pipeline

Additionally, I didn't write this myself (though it wouldn't be difficult if you wanted to do so), but instead prompted ChatGPT to create the script: https://chatgpt.com/share/690c962a-e5c8-800b-a263-167db220a372

You can easily fork this chat and customize the behaviour to your exact specifications. I included an example customization request for this exact purpose.

The point I guess was to show the gist of how this is done in professional software development world, and also to show how in a hobby/gamejam context you could get 80% of the mileage this technique gives with only 1% of the effort.

Tips:

  • Trust ai code like you would trust a drunken intern's code... i.e don't
  • Always review AI code and test carefully
  • Don't use it for important stuff, only menial legwork
  • Check you are allowed generative AI code in your submission

Enjoy.

How it works

1. The asset pipeline is defined in assets.json

(see the example file for full details)

  • The important part is that you specify source assets, destination assets and a backup placeholder.
  • I've used a standard copy/resize rect style transform, but get creative and the skys the limit.
  • For the example I used texture1.png (32x32) and texture2.png (128x128) being transferred to tilemap.png (64x64)

2. .gitignore prevents the assets from being commited to the repo

  • IRL you would share the source assets via dropbox, or include instructions on applying for a license / downloading from itch.io yourself.
  • For this example I've simulated the missing assets by naming them e.g texture1.missing.png

3. Running build_assets.py will generate the game ready asset... regardless

  • The backup field specified in assets.json provides a placeholder texture tilemap.placeholder.png to be used in the event the required assets are not present
  • If the assets are missing a warning is emitted to encourage the user to read the documentation / acquire the correct assets
  • But regardless, a placeholder texture is submitted instead.

4. Team members download the real assets

  • Simulated in this example by copying texture1.missing.png to texture1.png, and texture2.missing.png to texture2.png etc.
  • IRL you would share via dropbox, or encourage purchasing the paid asset etc. etc.
  • Also IRL you wouldn't just put the texture in your repo and label it ".missing.png".. if that's not obvious...

5. Add build_assets.py as a build step

  • If you have an existing build pipeline, add build_assets.py as a prerequesite
  • Otherwise just put it in your instructions.

6. Game engine / code refers to completed assets

  • Utilize tilemap.png inside your game
  • never commit tilemap.png or the source textures to git

Hopefully that is clear as mud.

Customizing / Considerations

- If you don't need programatic alterations, copy or symbolic link textures from a folder outside the repo instead (can be synced via dropbox)
    - For example you could do alterations via photoshop, save to dropbox, have the script just copy from "/home/doug/dropbox/assets/*" into the art folder
- If your build pipeline is formalized in code, it is production code now, test / maintain accordingly
- You could even script an "acquiring_assets.py" to fetch the assets from a dist server somewhere using an api key / password for automated builds
- Most game engines will just put placeholder blank graphics when an asset is missing, so if you don't need placeholders you can skip the backup step
- Seriously, you've seen AI art, do you think AI code is less monstorous?

License

This repo is dedicated to the public domain as instructional / example only. I would be very weary of using this in production without a serious programmer looking through it first. Having said that, do as you wish with anything in this repo, I hope you find it helpful.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages