I spent some time evaluating using Lua in one of our games. I hadn’t spent a large amount of time with the language, so I wanted to implement some rudimentary collision detection code to see how it worked. This might be helpful to you, but it was mostly just for me to get a feel for working in the language in a game development context. This is how I went about it in Lua.
TLDR; I liked it! It can offer a lot of power to the end user if integrated well.
If you’ve ever followed random NPCs around as they walk their paths, you’ve probably seen how quickly the illusion falls apart. Most NPCs walk looping paths, rarely doing anything more than creating the illusion of a busy and bustling street. But what if you wanted the NPCs to have more character? What if you wanted to give them a sense of purpose? That’s what I set out to do after some interesting feedback from our playtest community.
Our game needed an audio system that allowed us to take music loops and samples and weave them in and out as the action and intensity increased during game play. The actual need itself wasn’t huge. We had a series of “acidized” drum loops and we just wanted to be able to make them respond to player movement and activity. When the player was idle, we wanted to pull back to the mellow loops and when the action increases, well, so should the intensity of the audio.
We wanted to take advantage of Unity3d’s built in audio system. It’s fairly robust and simple, and provides a scheduler we can easily access in code. Perfect. Here’s how I did it.
My game Vegas Prime Retrograde is built on the idea that we reward the player for exploration with lore and other discoverable things strewn throughout the world. It’s a fairly simple task to implement in the game, but managing the ever-growing database of lore was a bit of a chore. I needed something that would let me store a small database of information. Nice-to-haves would be the ability to update that database with information about what the player has encountered. As it turns out, Unity3D has a lot of built in tools for loading external data as JSON, so we’ll use those. This is how I did it.
One of the challenges you face as a game developer is creating new and unique ways to expose the narrative to the player. One of the most overlooked ways to do this is through ambient character audio. It’s easy to remember the dialog audio, but we can actually add a lot by letting the player hear how the character experiences the world. What can you reveal about your character’s personality by adding little quips as they try to open locked doors, walking into a smelly ally, or succeed (or fail miserably) at some task?