Thursday, December 26, 2024

It's alive! Well, sort of...

After a couple of days reacquainting myself with Unity, I decided it was time to start creating. I laid out my notes and began by setting up a basic sandbox environment where I could create prefabs and hook up scripts to implement some of the game’s core mechanics.

I started with a simple scene featuring basic obstacles—nothing too fancy. Then, I decided to import Unity's standard third-person controller. I know there are plenty of controllers out there, and I could have opted to create one from scratch, but I actually like Unity's default controller. Plus, it works seamlessly with my USB PlayStation 4 controller, which I planned to use for this game. So, the standard option it is!

After writing some janky scripts (did I mention that C# isn’t my preferred language? I mean, “methods” instead of “functions”? What’s up with that?), I had a character who could walk, run, jump, and was fully animated.

A couple more scripts and a quick trip to the Unity Asset Store later, I had a generic monster chasing my player around. I have to say, the AI script for my monster is probably my proudest Unity moment so far. I managed to make the monster patrol randomly within a set perimeter and then chase the player as soon as it acquired line of sight. I even got the monster animated—huge for me, considering Unity's Animator has always been one of the most perplexing parts of the engine.

My son suggested that the game should feel like a nightmare, where the monsters gradually drive the player mad just by being near them. Think of a nightmare where you feel an evil presence close by—maybe right behind you—and you know that turning to look at it would be your doom. That’s the vibe we were going for.

To keep it simple (at least for now), I decided that if a monster got close enough to touch (collide with) the player, the player would accumulate “Madness Points.” Get enough Madness Points, and strange things would start to happen in the game. Too many, and the player would die. It seemed like a cool and doable mechanic. After a couple of attempts, I had a script that registered Madness Points and displayed them on screen using TextMeshPro.

While working with colliders and triggers, I decided to implement a system where the player has to find and activate a series of floating orbs. Activating these orbs would eventually open a portal to the next level.

Pretty soon, we had a playable prototype where you could run past monsters, activate hidden portals, and progress to the next level. The two levels we have so far are pretty basic but completely scalable. We even added music to each scene for that extra post-apocalyptic meets Stranger Things vibe.

Next on our to-do list:

  • A custom model for the player.
  • A few different types of monsters.
  • A combat system, so the game isn’t just “catch me if you can” parkour.
  • Sweet fade transitions between scenes.






No comments:

Post a Comment

"Hello Dr. Faulken. Would you like to play a game?"

I recently re-watched the classic proto-hacker 80's film "WarGames" starring Mathew Broderick and Ally Sheedy. The famous fina...