Peter Eldredge PPJ #2
Team Meetings - 3 Hours
New UI Implementation - 3 Hours
Unlocked Framerate - .5 Hours
New Enemy Follow Behavior - 4 Hours
Miscellaneous Help - 2 Hours
New UI Implementation
Thank God I refactored the UI last week because this would have been an absolute nightmare. This new UI ended up being very challenging to implement, and requires quite a few moving parts. In the future, I am planning on adding even more animations and movement to the UI, but the overall layout seems pretty good so far. Here is a screenshot of the end result.
The HP and Heat bars will adjust accordingly to their current value. Additionally, the heat bar has a knob which lies at the end of the current length of the bar. When the score is updated, an animation is played that shoots the scale of the combo text, score text, and current score up, then returns it to its initial scale. This helps add impact when you ram into an enemy, and I plan on doing more with the other UI elements.
The biggest problem that I ran into was the HP and Heat bars. Before, we simply had a slider that would stretch a bar to fill the Health/Heat accordingly. However, now that we aren't working with rectangles, that is no longer an option. My solution to this problem, was to make a rectangular mask that I would scale up accordingly to expose more and more of the UI bar. The problem with this approach was that in order for the mask to work, everything that needs to be masked must be a child of the Mask. So, when I increase the width of the mask, the UI I am trying to reveal will also increase in size. My solution to the problem within a problem was the jank but functional approach of reparenting the UI bar before updating the scale of the mask, then reparenting the mask. There are a few more minor implementation details I will leave out, but that in general is the concept. Here is the code for the Heat UI.
Unlocked Framerate
Something that had bothered me for a while was the fact that we needed to lock the framerate to 60fps in order to have a smooth experience, we would get some odd jitter if the framerate when above that. My best guess as to why this was happening was that certain things that were moving as a result of the fixed framerate calculations would be moving out of step with the camera. To fix this, my idea was to just make sure the visible update rate of the camera could not be faster than the fixed timestep. I tried this with 2 very simple lines of code, which essentially set the fixed timestep to be in lock with your monitor's refresh rate, and then enable single buffered vsync for increased smoothness and to lock the framerate to your monitors (which I don't believe is necessary).
The benefits of this approach were immediate. Jake M. who had a 144 hz monitor said the game felt much smoother, and even Jake D. saw some benefit now that I could enable vsync instead of needing to disable it and lock the framerate to 60. Overall, a small change but I think one that will greatly improve the user's experience. The only real problem I can foresee with this change is if someone is rocking something like a 240 hz monitor without capable hardware.
New Enemy Follow Behavior
This took me an actual eternity, and not because it was especially difficult. I was struggling to make some key decisions about how the system would work. I ended up just making a new Attack Behavior that handles this "AI" in the Track function. Currently, it is very simple, and not very intelligent.
First, we lerp the rotation of the enemy towards the player. Then we set the moveVector to be the enemy's forward vector. A sphere cast is used to check the area in front of the enemy. If an obstacle is found, then we need to divert the movement solely to the Y direction. Another sphere cast is fired in the appropriate Y direction. If an obstacle is found then the enemy will not move that frame.
This works pretty well, although I'm not sure how fun it is. We will need to test it out and fine tune it more, but this is a decent start.
Miscellaneous Help
I helped with several other systems that were being implemented. Most notably the dialog UI concept and the Welded Weapons, as well as some minor bug fixes.
Team
This week we made some bid improvements to the UI design and implementation wise. Jake M did a good job with level designs and Jake D got a good start on the welded weapons. On the art end I am happy with the UI but I honestly would have liked a bit more. The same goes for some of the programming tasks that didn't get finished and weren't run by me, so I have no idea the progress on them. We are also still in the habit of people submitting work the night before, which I am not a big fan of.
Upcoming
More UI stuff like animations and other effects. More enemy behaviors and implementation if I get models and designs.
Unlocked Framerate - .5 Hours
New Enemy Follow Behavior - 4 Hours
Miscellaneous Help - 2 Hours
New UI Implementation
Thank God I refactored the UI last week because this would have been an absolute nightmare. This new UI ended up being very challenging to implement, and requires quite a few moving parts. In the future, I am planning on adding even more animations and movement to the UI, but the overall layout seems pretty good so far. Here is a screenshot of the end result.
The HP and Heat bars will adjust accordingly to their current value. Additionally, the heat bar has a knob which lies at the end of the current length of the bar. When the score is updated, an animation is played that shoots the scale of the combo text, score text, and current score up, then returns it to its initial scale. This helps add impact when you ram into an enemy, and I plan on doing more with the other UI elements.
The biggest problem that I ran into was the HP and Heat bars. Before, we simply had a slider that would stretch a bar to fill the Health/Heat accordingly. However, now that we aren't working with rectangles, that is no longer an option. My solution to this problem, was to make a rectangular mask that I would scale up accordingly to expose more and more of the UI bar. The problem with this approach was that in order for the mask to work, everything that needs to be masked must be a child of the Mask. So, when I increase the width of the mask, the UI I am trying to reveal will also increase in size. My solution to the problem within a problem was the jank but functional approach of reparenting the UI bar before updating the scale of the mask, then reparenting the mask. There are a few more minor implementation details I will leave out, but that in general is the concept. Here is the code for the Heat UI.
Unlocked Framerate
Something that had bothered me for a while was the fact that we needed to lock the framerate to 60fps in order to have a smooth experience, we would get some odd jitter if the framerate when above that. My best guess as to why this was happening was that certain things that were moving as a result of the fixed framerate calculations would be moving out of step with the camera. To fix this, my idea was to just make sure the visible update rate of the camera could not be faster than the fixed timestep. I tried this with 2 very simple lines of code, which essentially set the fixed timestep to be in lock with your monitor's refresh rate, and then enable single buffered vsync for increased smoothness and to lock the framerate to your monitors (which I don't believe is necessary).
The benefits of this approach were immediate. Jake M. who had a 144 hz monitor said the game felt much smoother, and even Jake D. saw some benefit now that I could enable vsync instead of needing to disable it and lock the framerate to 60. Overall, a small change but I think one that will greatly improve the user's experience. The only real problem I can foresee with this change is if someone is rocking something like a 240 hz monitor without capable hardware.
New Enemy Follow Behavior
This took me an actual eternity, and not because it was especially difficult. I was struggling to make some key decisions about how the system would work. I ended up just making a new Attack Behavior that handles this "AI" in the Track function. Currently, it is very simple, and not very intelligent.
This works pretty well, although I'm not sure how fun it is. We will need to test it out and fine tune it more, but this is a decent start.
Miscellaneous Help
I helped with several other systems that were being implemented. Most notably the dialog UI concept and the Welded Weapons, as well as some minor bug fixes.
Team
This week we made some bid improvements to the UI design and implementation wise. Jake M did a good job with level designs and Jake D got a good start on the welded weapons. On the art end I am happy with the UI but I honestly would have liked a bit more. The same goes for some of the programming tasks that didn't get finished and weren't run by me, so I have no idea the progress on them. We are also still in the habit of people submitting work the night before, which I am not a big fan of.
Upcoming
More UI stuff like animations and other effects. More enemy behaviors and implementation if I get models and designs.
Comments
Post a Comment