The Purpose:
In order to help and alleviate the many problems that playtesters had when trying to throw people accurately, this feature was developed to give players a clear and accurate direction as to how ragdolls would be thrown.
The Developers:
The Background:
Even before refactoring, many people who experienced Ragball felt that the hardest part of the game was scoring. Not being able to understand where people would go when they would be thrown impacted caused many to try and "dunk" opposing players into the pipes. While this was a fun option, this limited scoring greatly, so our goal was to help remedy this problem after finishing the refactoring process.
The Preparation:
- Looked up a multitude of tutorials that handled creating the same or similar concepts
- Implemented many of these tutorials to partial or full completion before choosing which one to follow
The Implementation:
- After choosing the tutorial to work off of, the first step was recreating the tutorial in a separate scene using primitives. This was able to be done, but didn't use controllers. Instead, it used a mouse and clicking on different parts of the floor. (Image 1)
- This logic looked acceptable for using on the rag-doll characters, so that work was taken and ported to the Player script, and tuned to work on the medium character first. While the math section of the code to calculate and draw the line with the proper curvature needed no change, what did need work was calculating the new endpoint, which needed more physics.
- After much deliberation, we decided to get rid of the idea of the landing cursor spot that was visible in Image 1, and hard code the endpoint to a smaller distance .001f away from the thrown rag-doll. This seems small in retrospect, but worked very well with the size of the scene.
- Once it was working with the medium character (Image 2), it was also implemented for the large and small characters, where some bugs were found. Due to the physics system, and how forces were working with the small and large characters, the accuracy of the throwing arc was not where we wanted it. This was found to be the case by both developers and play-testers alike, so changes needed to be made. However, due to the way our code interacted with Unity's physics system making the line more accurate would not have been easy.
- The overall solution was to shorten the line even further, and not worry about the overall arc, but rather the direction in which the rag-dolls were thrown. Making the line renderer's texture a short arrow This seemed to be more appealing to everyone, as it lessened confusion and frustration. This can be seen in Image 3.
The Benefits:
- This addition greatly improved our game. With play-testers being less cautious of throwing, teams were able to come up with on the fly strategies for both scoring and staggering.
- Testing was made so much easier when it came to win states and scoring, as we could easily designate places to stand from and score confidently.
- It made the game feel more professional, and added to the immersion.