Devlog week 02 - Wind condition and Visual Representations


Week 02 - Wind condition and Visual Representations


This week update is about the wind condition and visual representations in game environment of Roo vs Pooch.

The game will only have one non-changing level where both player will not move from their position. Therefore, to add more fun and challenge in the game, I added wind condition to it.

Since it's a 2D game, the wind direction will be to the right (towards Pooch) or to the left (towards Roo), or no wind at all. And of course, I need to make the wind speed and direction to be in a random condition for every turn (that's the fun of it, right). So there will be a time when the wind is the same after one turn, but most of the time it will be changing, even slightly (hence the random wind).

However, without visual representation, it will be very hard for player to know which direction the wind blows and how strong the wind is. And those conditions will affect on how the players adjusting their throwing strength, to aim headshot the opponent? Because of that, visual representation of the wind strength and direction plays a very important role here.

I made a simple wind bar, where the colour will "fill up" according to the strength of the wind (different colour between right and left direction, and white colour background for no wind condition), as well as directional arrow as an additional feature and simplifying the user interface for player to be able to see easily which direction the wind blows (pointing up arrow for no wind condition). 

Here is a gif image of wind bar I explained above in real time game play:


Image above explains the right direction is shown by purple colour, while on the other hand left direction is shown by yellow colour. Furthermore, plain white background shows no wind condition. The stronger wind condition is shown with the bar filled with colour. Wind icons at the end of bar to (hopefully) help player to understand that it is a wind bar without explicitly need to wrote down "wind".


Alright, wind and its visual representation are done. But, the wind itself will mean nothing if it won't affect the accuracy of the throw based on how much power the player put, when they are aiming to throw the weapon. Therefore I made adjustment in the code to add wind force to the calculation of throw direction.

To be honest it wasn't a smooth ride, as I had to find the sweet spot between the maximum strength of the wind and min-max strength of the power of throw. I wish I recorded my screen monitor when i was doing trial and error (which of course I didn't, I was too focused to fix it and get it right). There was a time when the character threw its weapon, it flew almost 90 degree up to the sky instead of opponent's direction. In between fixing the code and checking if it worked, I also somehow made the weapon thrown to the back (opposite direction of what I want) then disappeared from the screen.


Below is  a gif image of overall updated game to this point:

updated game progress: wind condition, wind bar indicator, turn indicator, and power bar for the strength of throwing weapon.


As shown on image above, in addition to wind force and wind bar, I also added turn indicator (orange triangle) to show whose turn it is now. As well as power bar for visual representation of throw power depending on how long the left-click mouse being held. I need to ensure both indicator and power bar work only during certain character's turn (pooch or roo).

Along the way of making the power bar, I encountered roadblock where the power indicator bar didn't fill up and suddenly full straight away regardless how long I pressed down the left-click mouse (again, I didn't think to screen recording at that time :'( ). I thought it will be the same with how the wind bar being made. Well, sort of, but it's not exactly the same, and involving changing sprite with clear background instead of white, and at the end I managed to make it works :).


Feedback:

  • When for example it is pooch turn, if anywhere else is chosen with left-click mouse and hold down (except inside pooch's body) , the power bar of pooch will filled up even though it won't trigger the weapon to be thrown. The same happened when it's roo's turn. 

I will look into this feedback and try to fix it. And for next week, my plan for the progress are:

  • Damage application to opponent when the weapon hit.
  • Health bar to show the effect of the damage.
  • Animation for each of characters.

See ya!

Leave a comment

Log in with itch.io to leave a comment.