Day 11, 12, 13, 14 - 2020-05-03 / 2020-05-04 / 2020-05-05 / 2020-05-06
Ooopsie, I forgot to post here, so I’m going to make a summary of those 4 days!
- Collisions are now handled using the new InteractionSpace.
- They act as layers specialized into collisions detections.
- Each frame, every objects inside a InteractionSpace are checked for collision.
- When a collision is detected, the two objects’ handler are checked and the one with the higher priority will be called to handle it.
- Currently they’re used to make the Shell explode on contact of Barrels (it’s a temporary use, projectiles don’t have to be checked against other projectiles).
- Later, they’ll be used to handle physical collisions and separations.
- Also, to check if the player is going on a trigger zone.
- It’s probably overengineering but it’s fun nonetheless.
- Implementation of a double Tilemap.
- I struggled with a choice - should I go for a 4:3:4 (x:y:z) ratio or another one?
- Initially I wanted to use a 4:3:4 (x:y:z) ratio, but it was going to be more annoying to render with a tilemap.
- I made a few mockups and asked some people for advice from the chat and my friends as well.
- I ended up with a 4:4:4 ratio, which will give a more top-down view.
- It also avoid some gameplay issues related to the fact that the Y axis would be rendered with less pixels than the X axis.
- I chose to ditch TAS tilemap in favor of a twin Tilemap system.
- I needed a way to render an additional tilemap above the sprites, to be able to partially hide game objects.
- I relied on TAS UI’s TileMap, which is a different kind of tilemap, with different features and restrictions than the regular Tilemap used by TAS.
- Basically, I’m using TAS like a sandwich with the following layers:
- Background Tilemap
- TAS Sprites
- Foreground Tilemap
- TAS UI
- To render a bigger map, I’m using the same pattern than TAS’ Tilemap.
- The rendering tilemaps only cover the screen.
- Full tilemaps are represented by constant/flash instances of a Place class.
- The Rendering Engine is checking which tiles are being shown, and asks the current Place to update both the background and foreground tilemap appropriately.
- I struggled with a choice - should I go for a 4:3:4 (x:y:z) ratio or another one?
- I worked a bit on the story.
- It’s probably going to be a very short game, story-wise.
- As an extra, out of curiosity while discussing with @FManga, I demoed a use of TAS to have 16-bits colors (see below).
- It’s a rather simple trick: use a single line-filler which initialize the buffer to values from 0 to 219, then operate on the palette instead of the line-buffer.
- In such a configuration, changing the palette entry#0 would change the 16-bit color of the first pixel.
- It works because the palette is applied before each line is sent to the LCD.
- So the real trick is to change the palette for each line of course.
- While it’s very slow, being able to is still a clear demonstration of how powerful TAS is.
- Palette changes can be applied in TAS’ Sprites & Tilemap and also UI, for interesting effects!
- It’s a rather simple trick: use a single line-filler which initialize the buffer to values from 0 to 219, then operate on the palette instead of the line-buffer.
Mockups about using 1:1:1 ratio vs 2:1:2 ratio. The first one has a shoot’em up mood, while the second one is more reminiscent of SimCity (especially SC 2000).
The TAS sandwich, flavor ARIAT in action. Note how the target also gets under the white part of the map.
OK, the GIF is showing only 256 colors so it sucks a bit to demonstrate 16bit colors. Everytime I have fun with LineFillers, it looks like I’m working with Pixel Shaders. You can try this unoptimized bin I made up quickly: ariat-pokitto-16bittest.bin (108.4 KB)
Upcoming things
- More physical map - aka the Tank cannot roll inside the walls or outside the map.
- Measurements - Getting a rough idea of where the CPU is spent.
- Barrel-Tank collisions - Pushing the Barrels with the Tank.
- Exiting the tank - Getting intimate with the Protagonist!