Graph


Analysis & Problem definition

Design Challenge

This devlog contributes to the design challenge: "Improve the sustainability and expandability of an existing game so future developers can add and edit the game more easily in the future."


Context


With upgrading the Unity version, a few problems arose. Most of them were simple fixes and could be resolved in less than a minute. However, the graph with the end result was looking terrible because of the way the line renderer was changed between versions. This resulted in some weird behaviour I needed to research and fix.

What is causing the line renderer of the graph to lose its desired shape and how to fix it?

Methods

Library - Literature Study

First, I started to look into the line renderer and if other people experienced the same problem online. The problem was that the line thickness which wasn't consistent along the graph. Online, I found very few people actually had the same problem. On one forum, someone had the same problem, but this particular case had to do with sharp turns (which my graph doesn't seem to have that much). One of the replies was some illustration of how the line renderer actually works, which explained the problem to me (image down below).

Field - Problem Analysis

Based on my earlier literature study, I found out the problem should be how close actual points on the graph are to each other which influenced their behaviour. Two points very close to each other, make for sharp turns which in this case lead to an inconsistent line thickness. Looking at Unity, the graph created close to 750 individual points, which made up the graph itself. 

Workshop - Prototyping

Because the problem actually was the fact there are too many points on the graph, I should reduce the number of points. Earlier developers created the graph in a weird way. They instantiated the lines, technically made a screenshot and rendered that screenshot onto a graph. After doing this, they removed all of it, which made it hard to debug. Eventually, I fixed the problem by dividing the number of points by a set amount in the inspector. This way the "resolution" of the graph can be adjusted.


Result & Validation

The line renderer fluctuated thickness because there were too many points on it. I fixed this by reducing the number of points used and made it variable to be able to balance the "resolution" of the graph.

Before

After


Next step

Now this graph is fixed, I can further fix bugs and work towards a new app store release.


Sources

How to make Line Renderer lines stay flat? (2015, February 10). Game Development Stack Exchange. Retrieved 1 March 2022, from https://gamedev.stackexchange.com/questions/93823/how-to-make-line-renderer-lines-stay-flat 

Spring 2022
Fontys University of Applied Science
Jasper Cueleanere 
Mogelijk gemaakt door Webnode Cookies
Maak een gratis website. Deze website werd gemaakt met Webnode. Maak jouw eigen website vandaag nog gratis! Begin