This project is created with the main purpose of learning (and perhaps teaching) a little bit of game development, the tools used and the methods applied. This crate is a living document and a platform for experimentation, see sections Background and Progress for the journey. The Tricks and Tips section elaborates on related tools and libraries used. Everything is WIP, expect no release until 2077.
This project is created with the main purpose of learning (and perhaps teaching) a little bit of game development, the tools used and the methods applied. This crate is a living document and a platform for experimentation, see sections Background and Progress for the journey. The Tricks and Tips section elaborates on related tools and libraries used, I wrote it mainly as a note to self, but others might find the information useful too. I'm open to all kinds of discussions and suggestions. Everything is WIP, expect no release until 2077.
## Prerequisites
## Prerequisites
...
@@ -26,6 +26,7 @@ Tested mainly under win10.
...
@@ -26,6 +26,7 @@ Tested mainly under win10.
-[Tiled](https://www.mapeditor.org/)
-[Tiled](https://www.mapeditor.org/)
-[Piskel](https://www.piskelapp.com)
-[Piskel](https://www.piskelapp.com)
-[DS4Windows](https://github.com/Ryochan7/DS4Windows), optional if you want to use a PS4 or PS5 controller with your game under windows. See e.g., [How to Connect PS5 Dualsense Controller to PC with DS4 Windows Driver] (https://www.youtube.com/watch?v=C_gFAe7cbNo) for setting up your PS5 controller.
## Related Documentation
## Related Documentation
...
@@ -40,9 +41,9 @@ Tested mainly under win10.
...
@@ -40,9 +41,9 @@ Tested mainly under win10.
Typical workflow:
Typical workflow:
- Tile sheets:
- Tile sheets:
- Decide on the size of each tile, e.g. 16 * 16 pixels, 32 * 32, 64 * 64 (I believe this is the current maximum for use in `bevy_ecs_tiledmap`).
- Decide on the size of each tile, e.g. 16 * 16 pixels, 32 * 32, 64 * 64 (I believe this is the current maximum for use in `bevy_ecs_tiledmap`).
- Select "Resize" to set the size of the canvas, e.g. 10 * 10 tiles (in the case each tile size is 16, this means 160 * 160). There are some options here to resize, re-position the current canvas if you already started out painting. You may store the default canvas size as well, so a new instance will automatically inherit the setting (new Canvas "+" upper right corner).
- Select "Resize" to set the size of the canvas, e.g. 10 * 10 tiles (in the case each tile size is 16, this means 160 * 160). There are some options here to resize, re-position the current canvas if you already started out painting. You may store the default canvas size as well, so a new instance will automatically inherit the setting (new Canvas "+" upper right corner to create a new Piskel instance).
- Select "Setting/Grid" grid size "1", and grid setting "16" (matching the size you chose for your tiles). (Grid size is currently limited to 2^n, e.g., 8, 16, 32, 64).
- Select "Setting/Grid" grid size "1", and grid setting "16" (matching the size you chose for your tiles). (Grid size is currently limited to 2^n, e.g., 8, 16, 32, 64).
- When working with your tile tile sheet you may want to preview how a tile would look when "tiled"
- When working with your tile sheet you may want to preview how a tile would look when "tiled" together. Under "Setting/Tile Mode" you can enable tiled mode, however the complete canvas will be tiled (which might not be what you want). You can work around this problem by creating a new instance with a canvas size set to match your tile size, select "Tiled mode" for that canvas and use this Piskel instance to preview the tiled appearance. From your original tile sheet, copy ("Rectangle Selection" and Ctrl-C) the area of the tile. Paste the tile to the top left corner (if not already working on the top left tile that is). Now the top left corner area and paste it in the tiled mode preview instance (tick the "Settings/Tiled Mode" for the preview instance). The reason for this somewhat cumbersome workflow is that copy/paste in Piskel operates relative to the top left corner of both instances (as the target instance is only one tile, it corresponds to the top left corner of the source instance). If you find a better way to do this please make an "Issue" on this repo (or even a PR).
---
---
...
@@ -76,13 +77,27 @@ When playing with Tiled, we encountered some shortcomings of the crates at hand.
...
@@ -76,13 +77,27 @@ When playing with Tiled, we encountered some shortcomings of the crates at hand.
StarAwan date 2021-08-10 (approximately).
StarAwan date 2021-08-10 (approximately).
### Tiled animation mini-boss.
### Tiled animation
### Tiled rotation and flipping
### Tiled parallax
### Controller input
## Some platform specific tips
### Win10
When developing under Win10, you need git [https://git-scm.com/downloads](https://git-scm.com/downloads). Gitbash comes with a shell/terminal. Alacritty is a another (fast) terminal, that uses the GPU for rendering. Under the hood it defaults to powershell.
In powershell you set environment variables through `$Env:<NAME> = "<VALUE>"`. To get a full call stack trace on panic: