Controlling Touchscreen Controls
I had two goals this week: 1) Fix some bugs, and 2) Make more art assets. Those are probably going to be my main goals for the project until it’s done. Fix bugs. Make art assets. Fix bugs. Make art assets.
I really need to review my lists of bugs and art assets.
In any case, here’s this week’s update.
I have noticed several bugs in the mobile version of the game. For starters, occasionally the game seems to freeze at the menu screen – or more accurately, sometimes I can’t close the menu. And with the added Help cutscene last week, the game could get into a state where the player starts moving in one direction and never stops.
As it turns out, when I first implemented the touchscreen controls, I hacked together some really stupid code just to get it sort of working, and never really took the time to go over it and do it right. State was handled in the topmost layer in the UI stack, so a push or pop on the top layer at the right time (e.g. think Menus or Help cutscenes) would make the game enter a wonky state and become unplayable.
So the touchscreen state was mostly moved into the engine. My UI layers still capture and handle touch events as needed, but questions like “is the user touching the screen right now” and “where did they start” and “where is their finger currently” are now answered by looking in one place. Easier to use, fewer bugs, and more reusable in future projects.
Here’s my sample this week, of me playing around with the virtual joystick, ensuring it still works correctly:
— 4000 POUNDS (@4000_POUNDS) October 6, 2018
Make Art Assets
I also worked on two new pigeons this week, and one more bonus food. The hard part about making the pigeons is that I start to figure out better ways to paint them, but I want some consistency in the art style. In retrospect, I wish I had spent more time practicing painting pigeons prior to making the actual art assets for the game.
I’m aiming for about 9 bonus foods in the game. With the new one this week, I have 4: bagels, pizza, hotdogs, and pretzels. Not necessarily in that order (although they are currently in that order).
My tasks for this next week are, you probably guessed it:
- Fix bugs
- Make art assets
I think I’m going to try to focus on pigeon AI bugs this next week. As for art assets, I’m aiming for two more pigeons, and two more bonus foods.