Facing the Camera: “Physics.Raycast” vs “Vector3.Dot” in Unity3D

I had a great time this week, having been given the opportunity to present a talk at IGDA – Ann Arbor in Ypsilanti, Michigan this month. I’ve been attending their meetups for over a year, and they consistently get a great turnout and great discussions. This time, group was a good size, the audience seemed interested, and I didn’t mumble as much as I tend to. Of course, the talk was about “3D Cel Animation.”

But with many developers and programmers in the room, they brought up some suggestions to optimize how I check which ‘perspective’ of a character should be shown at a given frame. A common suggestion was to use “dot product” at a low-level instead of relying on “Physics.Raycast.” Even years ago, this had been suggested to me. I had fears about its’ efficiency, but after a few one-on-one discussions, I agreed it might turn out to be more efficient, and it wouldn’t be hard to implement.

I felt like such a fool. For 5 years, I’ve preached the brilliance and simplicity of my design! Was an alternate solution so obvious, and really better?

So I gave it a try. And the results surprised me.

A visual comparing “RaycastAll,” “Raycast” and “Dot Product” as they relate to knowing what orientation a character is in.

Continue reading

Are Video Games Really Art?

It’s silly that I felt the compulsion to write my own opinion on whether or not video games can qualify as forms of art. Even after almost two decades of convincing arguments in favor of it, one can still find new articles written by seemingly everyone online bringing up the argument; few people are still against classifying games as art, so these arguments are likely brought on by people wanting to make a point, even if it means making the point to an inanimate brick wall. The reason I bring up the subject now (in 2018) is because, by chance, I was able to attend a local academic symposium dedicated to whether or not games are art, and examples of their role in society. While I thoroughly enjoyed the event and learned a lot from viewpoints I typically don’t get a chance to converse with, the conference actually took me a step backwards in my thinking rather than forwards towards their thesis.

Should games be shown alongside paintings?

Continue reading

An Alternate Method To Recognize When Objects Are Between Your Player and Game Camera

It’s almost 2018, I plan to write a status report of my game development status soon. In short, I think I spent most of my dev time in 2017 on trees, and am still doing so even today. At least I learned a lot… still feels frustrating though.

For some time, I’ve ignored an issue where objects are in between my game camera and the focus object (in my case, the player). My past games had sparse environments, so this was never really a problem. But my current game will be a bit more diverse than that. When thinking about how to resolve this, I realized there is a simple solution that, while not perfect, gives acceptable results.

There’s more than one way to skin a tree…

Continue reading

Augmented Reality is Becoming Slowly Relevant

AR (Augmented Reality) has been experimented with for almost a decade. I recall in 2013 working over the summer at a app-development company that was playing with the idea of using smartphone cameras to overlay an animated character overtop a QR-code trading card. We’ve seen games like “Pokémon Go” in 2016 giving us cute little monsters seemingly in the same space as us. The applications have been simple so far, relying on simple overlay of CGI, but I suspect we will see greater innovation and growth in this field in the next 3-5 years. This is because both Apple and Google are starting to heavily promote the applications.

Apple and Google used AR to excite audiences for their new devices in Fall 2017

Apple and Google used AR to excite audiences for their new devices in Fall 2017

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