The Quest to Interact();

My life-long love of video games has led me into trouble more times than I can count, and this is definitely one of those times. I recently switched over to Linux as my daily driver on my personal machine and got neovim setup just the way I wanted it. This was my first mistake.

After spending an amount of time I won’t disclose here customizing neovim I decided I needed a project to work on to really test out my freshly installed IDE. This was my second mistake. Enter Unigine, a game engine I found while looking for game engines with native Linux support. While you can install Unreal Engine or Unity on Linux nowadays, I just wanted something different. I am not a fan of Unity after the whole fiasco with them, and while Unreal is powerful I wanted something slimmed down where I didn’t have to worry about visual scripting (blueprints) and could just start coding. With Unigine, I found exactly what I was looking for!

Getting setup for this project was extremely easy, I just downloaded the engine and setup a project using the GUI. Then, in neovim (which I installed lazyVim over after hearing so much about it) I simply opened Mason and installed a LSP for C#. Bam, working Intellisense and support for Codeium done and ready to go. It really is lazy. This is the point where easy ended.

I don’t make it a secret that I have a deep love for Myst and its sequels (except for you Myst 4, though I love your visuals). It’s something about a classic adventure game where I don’t have to worry about health or enemies or anything like that, it’s just me in a strange place, left to myself to discover the story of this place and why I am here. I love everything about it. Which leads to my third mistake: Why not make a game like Myst? How hard could it be?

Turns out, it isn’t simple at all. My first task was to create an interaction system where I could click on an object in the world, and have that object perform an action (logic, animation, play a sound, etc). In game engines, the usual way to do this is to perform an intersection. I chose to cast a ray from the players position out towards the current camera direction for an arbitrary distance, then store whatever that ray hits as a variable to be interacted with. I make only certain objects interact-able by manipulating a bit mask for the intersection. Great! Interaction system done right?

Wrong. My weekend was spent in a downward spiral of deceptive free-time units (the time when you should go to bed and when you actually go to bed) culminating in a fully fleshed out interaction system with a base Interact-able component that other components inherit from, like doors or buttons. Doors can now open when you click them, and even have a lock mechanism to disable this. Buttons clicked in the world can trigger set objects to do things, like open doors or play sounds. Or both, if you’re feeling greedy. Complex puzzle objects can be focused on, switching the camera to a predetermined view and disabling movement. Basically, things can make other things do things if certain things are set correctly. Isn’t development fun?

While I described this process relatively simply, in actuality I spent both Sunday and Monday pouring over documentation, testing and implementing and iterating and refactoring (lions and tigers and bears, oh my). I created, textured, and animated both models you see in the picture above. I found and modified the sounds needed to make them sound real.

Was it painful? Yes.
Did I almost bash my head in trying to figure out the math behind playing animations? You bet.
Was it worth it? Absolutely.

There is something to be said about creating something from nothing. Whether you play music, paint on an empty canvas, or go insane making a interaction system, the final result provides a feeling I can’t really describe.


Comments

2 responses to “The Quest to Interact();”

  1. Cool stuff!

    Have you ever checked out the Game Maker’s Toolkit Youtube channel? Its a ton of cool game design related stuff, but they also have been doing a devlog style thing for a bit on how they are making their first game in Unity:

    https://www.youtube.com/playlist?list=PLc38fcMFcV_uH3OK4sTa4bf-UXGk2NW2n

    Its kind of got me wanting to find time to mess around in Godot, just because that engine is open source.

    1. I have not, will have to look at that! Godot is a really cool engine, and the syntax is very similar to Python. I actually messed our around recently with a really basic Python game engine, Ursina, just to see how it worked. It was pretty cool!

      I would also recommend this channel as well:
      https://www.youtube.com/@DesignDoc/videos

Leave a Reply

Your email address will not be published. Required fields are marked *

css.php