Unity3D Touch-Input Bugs

My indie strategy RPG “True King” is slowly making progress. One of the features I intended for from the start is flexible input modes: I want the game to not only support gamepad, mouse and keyboard (or any combination of the three), but also touchscreens. Not for mobile phones, but for touchscreen Windows tablets (like my beloved Surface Pro).

In the past week, I dedicated some time to properly test and debug the touch input: it was mostly implemented before, but not entirely. Now it works… but a pretty serious bug has put me at a loss. The below debug-mode screenshot is of my game playing in windowed mode, originally with my fingers on the screen: at the time of the screen capture, no fingers were there, but the Unity engine still believes the touches exist.

Unity3D thinks my “ghost touches” are still there…

Continue reading

Editing 3D Meshes in Unity3D

While this isn’t related to my game projects on this site, I’ve had the opportunity for my full-time job to experiment in the Unity3D game engine the possibility of modifying meshes, specifically to skew a series of cubes as if they were swaying in the wind. I found the experience quite fascinating, and in this article I describe what I did, my thoughts on how it relates to Unity3D, and include links to my source code in GitHub and some fun animated GIF’s.

While not a standard feature, it IS possible to modify 3D meshes in Unity.

Continue reading

“True King” Development – Optimizing 3D Cel Animation and Raycasting

The last blog post I made on development of my game “True King” mentioned how the frame rate was unplayable when there was more than one character on the screen. I said that was worth another blog post to explain how I fixed it. That was four months ago. I’m sorry it took so long, but here it the explanation of why my game was so inefficient, and how I got around it.

My new 2D character in 3D... may not represent final gameplay.

60 fps if one character on screen… < 1 fps if 3-4 characters…

Continue reading