Skip to content

Commit

Permalink
Note about representative tiles
Browse files Browse the repository at this point in the history
  • Loading branch information
grunt-lucas committed Aug 8, 2023
1 parent e3c7c1f commit 6323aed
Show file tree
Hide file tree
Showing 14 changed files with 25 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Todo.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@
+ will also be better because it means all files in a given tileset folder will now be managed by porytiles,
which will prevent possible corruption from porymap

+ see note in `res/tests/anim_metatiles_shared_tiles/note.txt`
+ a better way to do representative tiles
+ may allow to properly decompile vanilla tilesets
+ will also solve problem of some animated tiles sharing content
+ anim_yellow_flower and anim_white_flower share some representative tiles, which means you can't have both in
the same tileset

+ `dump-anim-code` command
+ takes input tiles just like `compile-X` commands
+ instead of outputting all the files, just write C code to the console
Expand Down
16 changes: 16 additions & 0 deletions res/tests/anim_metatiles_shared_tiles/note.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Right now, compiling this tileset yields:

detected duplicate representative anim tile, not allowed

The reason for this is if two different animations in the same tileset share any representative tiles, then we
have to fail because the compiler won't know what to do when it encounters a representative tile in the regular
tileset.

The way to solve this would be to have animations use a separate "frame" file called "representative.png", where
you use this file to specify unique representative tiles for your animation. But those tiles will never actually
appear in-game, instead they are just used in the layer PNGs to indicate that this tile should index into the
animation sequence.

The vanilla games actually do this already. If you look at the water animations, the tiles on the tilesheet that
display in Porymap don't actually correspond to any animation frame, and are never actually visible in-game.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ try {
}
catch (const porytiles::PtException &e) {
// Catch PtException here, these are errors that can reasonably be expected due to bad input, bad files, etc
// TODO : remove this print out once we are fully on the new error system
fmt::println("TODO ERROR MESSAGE: {}", e.what());
return 1;
}
catch (const std::exception &e) {
Expand Down

0 comments on commit 6323aed

Please sign in to comment.