Tuesday, October 27, 2015

Day 65: Connect The Dots

Good news! Our presentation for our project went over very well, without a complaint in sight.

Bad news: Due to a miscommunication regarding the programming project, I had to redo a small bit of the project. Thankfully it was only a small bit; the average calculation ran untouched. The main change was how the data was stored; the actual binary data had to be stored in one single file, reading guide included. By using the numbers of values as a header for each section, I managed to read those values first, then skip and check averages. So far, I'm all prepared once more.

What to do next? I'm still experimenting with various prototypes involving touch controls in Unity - so far, I relearned the particularly tricky parts of how touch structures are stored.

Touches in Unity are stored as structs; not only that, but the actual touches are retaken every frame. This means that Touch.GetIndex(0) will not always yield the same touch each frame. Luckily, there's a fingerID, which means that by iterating through the various touches and checking for that, one can spot the same touch between frames. Combine that with the previous touch collision I implemented yesterday and line tracing, I can connect the dots below:


What next? When tracing something in a game, one can use these "Trace Points" as a means of recognizing a shape. However, I'll have to come up with something a bit more free form than line renderers. That, and line renderers fail to produce the same width for multi-line segments, so I had to attach a line renderer for each trace point. I'll definitely get to work on the free-form drawing from the success of this one.

No comments:

Post a Comment