Pages

Saturday, January 18, 2025

Attack Animations, Race Conditions

Doing a lot of testing to ensure that all of the basic functions work before progressing and I've been running into a strange problem for awhile that I was calling a race condition. Essentially, what was happening was that instead of waiting for animations to finish in certain cases, the main thread kept going and causing chaos all over the place- like units taking turns when they shouldn't be and disrespecting the turn counter. What it turned out the issue was was my misunderstanding of how coroutines and awaits work in the engine, but now that that's solved things are running much more smoothly. Signals and a sturdy event bus are the way to go.

I did a little bit of testing of themes to see how to implement color swaps and was pretty satisfied with the results. After doing some investigating further, it looks like using a shader to swap colors, as seen above, is probably the best way to implement this. Going forward I also want players to be able to customize colors on their units but that will require a redraw to ensure there's a good breakout of which colors are where on all the sprites. 


While I was thinking about how to fix that race condition above, I did a bit of work on spiffing up and diversifying animations and figuring out a better way to implement them in the attack handling code. The results are a much better packaging of data and some nifty new animations. Next up is handling events, dialogue injects, and pilot chatter. To fully implement the theme swapping mechanic I'll also need to do some readability tests with text coloration and see what works- so themes might go on the backburner as I'm really trying to get the tutorial minimums done. Once events and dialogues are settled the next big hurdles will be the mech builder/equipping screen and getting sound effects and music setup.

Other Small Updates:

  • Fixed sidebar text not updating after a one-per turn weapon was used
  • Fixed sprites not facing each other when attacking
  • Made pop up text and numbers more readable
  • Fixed camera inconsistencies and implemented better zoom
  • Fixed pop up text over units to display and scale correctly
  • Slight tile changes to make things marginally less ugly 

No comments:

Post a Comment

Some Music and Many Fixes

As the tactical screen continues to get refined I've been crushing a bunch of fun bugs that were really giving the UI a run for its numb...