A step-by-step checklist for implementing new textures in the game.
YOU WILL FORGET THIS STEP. Every agent does. It's separate from building.
After editing texture files, you MUST run:
.\gradlew.bat desktop:run --args="textures"See Step 3 below. Don't skip it. The game will crash if you do.
Before you start, ensure you have:
- New texture PNG file(s) ready
- Texture names decided (following naming convention)
- Game code locations identified (ItemType, StructureType, etc.)
- Git branch or working directory ready
- Current code compiles and runs
- You understand texture packing is a SEPARATE step (read TEXTURE_PACKING_GUIDE.md first)
Location: Development/Textures/
-
Create PNG file with correct name format:
item_[name].pngfor itemsstructure_[name].pngfor buildingsicon_[name].pngfor UI iconstile_[name].pngfor ground tilesfluid_[name].pngfor liquids
-
Verify specifications:
- Format: PNG with transparency (RGBA)
- Style: Matches existing textures
- Size: Appropriate for use (typically 64ร64 or 128ร128)
- No errors or corruption in file
Naming Rule: Filename (without .png) = texture name used in code
File: core/src/de/dakror/quarry/game/Item.java
public enum ItemType {
// ... existing items ...
YourItemName(ID, "item_your_item_name", stackSize, ItemCategory.CategoryHere),
// ...
}[ ] Add item to ItemType enum with:
- Unique ID number
- Exact texture name match (must match PNG filename)
- Stack size
- Category
Example:
PetroleumCoke(72, "item_petroleum_coke", 500, ItemCategory.CoalFuel),File: core/src/de/dakror/quarry/structure/base/StructureType.java
public enum StructureType {
// ... existing structures ...
YourStructure(ID, YourStructure.class),
// ...
}[ ] Add structure to StructureType enum with:
- Unique ID number
- Structure class name
File: core/src/de/dakror/quarry/structure/producer/YourStructure.java (or appropriate package)
[ ] Ensure the structure class references the texture in ProducerSchema:
ProducerSchema schema = new ProducerSchema()
.setSize(4, 4)
.setTexture("structure_your_structure") // Must match PNG name
// ... rest of schema ...File: core/src/de/dakror/quarry/game/Science.java
public enum ScienceType {
// ... existing sciences ...
YourScience(ID, "icon_your_science", costs, researchTime, prerequisites...),
// ...
}[ ] Add science to ScienceType enum with:
- Unique ID number
- Icon texture name (must match PNG)
- Items cost (if any)
- Research time
- Prerequisites (if any)
File: core/src/de/dakror/quarry/game/Tile.java
public enum TileType {
// ... existing tiles ...
YourTile(ID, "tile_your_tile", itemDrop, base, metadata),
// ...
}[ ] Add tile to TileType enum with:
- Unique ID
- Texture name prefix (game adds "tile_" automatically)
- Item drop (or null)
- Base tile
- Metadata flags
THIS IS CRITICAL - DO NOT SKIP!
Build-Game.ps1does NOT do thisgradlew desktop:distdoes NOT do this- You MUST run this explicitly after adding/editing textures
cd D:\Projects\DrillDown
.\gradlew.bat desktop:run --args="textures"[ ] Command executed without errors [ ] Waited for TexturePacker to complete [ ] No error messages in console [ ] Console output shows "Packing..." messages from TexturePacker
Why --args and not -Pargs? Because that's how DesktopLauncher.java checks for it (line 114)
java -jar gdx-tools.jar com.badlogic.gdx.tools.texturepacker.TexturePacker \
./Development/Textures/ \
./android/assets/ \
tex.atlas \
./android/assets/atlas-settings.json-
android/assets/tex.pngexists and is updated- Timestamp should be recent
- Size should be reasonable
-
android/assets/tex.atlasexists and is updated- Timestamp should be recent
- Contains your new texture names
-
No extra files created:
-
tex2.pngshould NOT exist -
tex2.atlasshould NOT exist -
tex3.pngshould NOT exist
-
If multiple pages were created:
- Check
android/assets/atlas-settings.json - Increase
maxWidthandmaxHeightto 4096 - Delete extra atlas files
- Re-run TexturePacker
- Open
android/assets/tex.atlasin text editor - Search for your texture names
- Example entry should exist:
item_petroleum_coke rotate: false xy: XXXX, XXXX size: XX, XX orig: XX, XX offset: 0, 0 index: -1
[ ] Run ./gradlew.bat build or rebuild in IDE
[ ] No compilation errors
[ ] No texture-loading errors
[ ] Start the game: ./gradlew.bat desktop:run
[ ] Watch the loading screen
[ ] No "could not find texture" errors
[ ] No crashes on startup
[ ] Navigate to where texture should appear
- Check inventory for new items
- Check build menu for new structures
- Check science tree for new technologies [ ] Texture displays correctly
- Right color and appearance
- No graphics glitches
- Positioned correctly
File: android/assets/i18n/TheQuarry_en.properties
Add descriptions for your new content:
# Items
item.YourItemName = Your Item Name (Description)
# Structures
structure.yourstructure = Structure Name
structure.yourstructure.desc = Description of what it does.
structure.yourstructure.recipe.recipename = What the recipe does.
# Sciences
science.yourscience = Technology Name
science.yourscience.desc = What it unlocks or improves.[ ] Localization strings added [ ] Game displays proper names in menus
Debug Steps:
- PNG filename matches exactly:
item_name.pngvs code"item_name" - PNG exists in
Development/Textures/ - Run TexturePacker again
- Check
tex.atlascontains texture name - Restart game after atlas regeneration
Debug Steps:
- Check for multiple atlas files (tex2.png, tex3.png)
- If yes, increase
maxWidth/maxHeightinatlas-settings.json
- If yes, increase
- Delete extra atlas files
- Remove temporary files from
Development/Textures/ - Re-run TexturePacker
- Restart game
Debug Steps:
- Ensure PNG file was actually modified
- Run TexturePacker again
- Delete old
tex.pngandtex.atlasmanually - Run TexturePacker once more
- Clean build (delete build directory)
- Rebuild and restart game
Debug Steps:
- Check texture file isn't corrupted
- Verify size is appropriate for use
- Check
filterMin/filterMaginatlas-settings.json - Regenerate atlas
Before committing your changes:
- All PNG files created and placed in
Development/Textures/ - All code references added (ItemType, StructureType, etc.)
- TexturePacker run successfully
-
tex.pngandtex.atlasupdated inandroid/assets/ - No multiple atlas pages (tex2.png, etc.)
- Game compiles without errors
- Game runs without "texture not found" errors
- New textures visible and display correctly
- No regression: existing textures still work
- Localization strings added (if applicable)
git add Development/Textures/[your_new_textures]
git add android/assets/tex.png
git add android/assets/tex.atlas
git add core/src/de/dakror/quarry/game/Item.java # if modified
git add core/src/de/dakror/quarry/structure/base/StructureType.java # if modified
git add core/src/de/dakror/quarry/game/Science.java # if modified
git add android/assets/i18n/TheQuarry_en.properties # if modified
git commit -m "feat: add [your feature] with new textures"- Always commit
tex.pngandtex.atlastogether - They are interdependent and must match
- Create PNG โ
Development/Textures/[name].png - Add Code โ ItemType/StructureType/etc enum
- Run TexturePacker โ Regenerates atlas
- Verify Atlas โ Check
tex.atlashas your texture - Test Game โ Launch and verify texture appears
- Commit โ Include both texture files and code changes
That's it! The game will automatically find and use your texture from the regenerated atlas.
For detailed information, see TEXTURE_PACKING_GUIDE.md