4th week
This has been the hardest week to date...
The reason for this is it being the first time I have worked with collision detection. I am doing so using a 'distance between' formula: ( x 1 , y 1 ) and B ( x 2 , y 2 ) except I will be working with x and z values not y. On the upside, the collision is being detected however the player seems to collide with the tree no matter what size I make the radius of each hitbox. After making the health bar functional, I made it start on 10 health so I could test the collision as well as console logging certain values to see what is actually happening.
An early simple switch case statement has been employed to switch gamestates based on what has happened meaning you get a game over screen when you crash now (shown in video). I have 5 states as of now (Initialise, GameStart, GamePlay, Tally and UNKNOWN) however not all of them are functional as of yet.
As for the aesthetics of this weeks progress, I removed colour from most meshes just because it was easier to work with and caused less distractions to me, don't worry there will be colour! I have also made the player a snowball as the potential aim of the game will be to prevent the snowball from being destroyed by the trees.
I have made the trees more challenging obstacles by stretching them upwards. I did not need to change any of the geometries for this but instead just use 'meshgroup.scale.set()' and I have not had issues with this method as of yet. I also changed the way the trees are constructed, instead of just grouping the meshes, I have merged the geometries of each section by using 'geometry.merge()' to make the code a little less bulky.
Snow Game
More posts
- Final StretchDec 06, 2018
- 3rd WeekDec 06, 2018
- 2nd WeekDec 06, 2018
- 1st weekDec 06, 2018