Article Update: Jittering
《Drifting : Weight of Feathers》
Steam - Steam Page
Itch.IO - Jittering
IndieDB - Jittering
UE4 Forum - Jittering
Jittering
Konpeko~
Character jittering is a common issue I've been dealing with since the beginning of my game development journey. If the jittering occurs persistently, it is usually easy to pinpoint the cause of the jitter and resolves it, however, there are times when the jittering occurs randomly and there is no stable way to reproduce it. The only way I can think of to deal with the latter issue is to place logs in every line of suspicious code that may cause the problem and hope the log will show up and give me further insight into the issue the next time it happens.
Besides the aforementioned brute force approach, as I encounter (and solved) lots of jittering issues in the past 2 years, over time, I noticed there are only 2 types of jittering in my game: tick sensitive and logic sensitive. Although knowing this could not help me solve the issue, or reproduce the issue, it often hinted at the right direction for me to continue the search, narrowing my bug targeting list to a manageable scale.
(on the left side, the log on the top left corner literally prints out character entering and leaving wall sliding in a few frames - a symptom of tick sensitive jittering)
Tick sensitive jittering is a common issue in my project. The game provides an additional dimension for players to traverse (in multiple ways), meaning additional movement states and its transition in and out of other states need to be handled properly - jittering will likely occur if any 2 transition conditions happen to be true at the same time. From my past experience, if the 2 conditions are established due to geometry layout and not faulty game logic ex: jumping off a ledge could be rightfully interpreted as either falling down or wall sliding down, the jittering could be solved by delaying the check of one of the conditions - ie: delay the wall sliding condition check and let the player fall down for a short period then try to wall slide down.
(jittering only happens when the camera has a near-perfect alignment with wall-normal - I could reproduce the issue maybe 1 out of 30 trials, however, it is not an efficient way of solving the issue)
Although I use the word "faulty" in my previous statement, to be more specific, game-logic-induced jitterings are introduced by codes that do not respond very well with edge cases - it could produce the correct result 99% of the time and failed to do so in the 1% extreme case (that 1% usually occurs when you let other people try out your game for the first time).
I wrote a wall running logic where the yaw rotation of the player is determined by the dot product of the camera forward vector and the wall actor's right vector - the algorithm performs as expected until a test-player found out my character is jittering while wall running vertically. I cannot find a stable way to reproduce the issue no matter how hard I tried, then it occurred to me - what if the player's camera is looking directly at the wall with near-perfect alignment? A near-zero number might fluctuate between positive and negative signs which might be the cause of the jittering. I proceed to add a buffer in the logic before determining the yaw rotation of the character - the jittering never happen again since then.
Character jittering like many other bugs is an issue that developers need to deal with continuously, there are no (as far as I know) general programming guidelines for us to prevent that from occurring, however, by solving each jittering issue, hopefully, we gain more knowledge on how logic work in our game and honed our skills for solving these type of issues in the future.
I hope you enjoy this short article, feel free to share your thoughts or story on this matter, have a superb weekend! (゚∀゚〃)
Get 《Drifting : Weight of Feathers》
《Drifting : Weight of Feathers》
3rd-person action, fluid animation, versatile movement
Status | In development |
Author | rit2040 |
Genre | Action, Shooter |
Tags | 3D, Fast-Paced, Female Protagonist, Parkour, Singleplayer, Third-Person Shooter, ue4, Unreal Engine |
Languages | English |
More posts
- 《Drifting : Weight of Feathers》 Demo Ver 2.9 Now Available!Oct 09, 2021
- New Game Trailer and Dev Live Streaming Coming Soon!Sep 25, 2021
- 《Drifting : Weight of Feathers》 Demo 2.8 Update - New Hairstyle 'Youthful' a...Sep 04, 2021
- 《Drifting : Weight of Feathers》 Demo 2.7 Update - Gamepad Support and Online...Aug 02, 2021
- 《Drifting : Weight of Feathers》 Major Tutorial Overhaul in Ver2.6 UpdateJul 04, 2021
- 《Drifting : Weight of Feathers》 Opening Cinematic - Target EliminatedMay 22, 2021
- 《Drifting : Weight of Feathers》 Demo Ver. 2.1 Major Update!Mar 20, 2021
- 《Drifting : Weight of Feathers》 Played by ArrowSan1999 - A soothing voice an...Feb 07, 2021
- 《飄移 : 羽毛的重量》 2021 台北國際電玩展 新聞資料袋Jan 12, 2021
- 《Drifting : Weight of Feathers》 TpGS 2021 Press KitJan 12, 2021
Leave a comment
Log in with itch.io to leave a comment.