Unity Game Dev Update

I have been trying to teach myself game development using Unity for a few weeks now. I’ve put together a project that I’m calling “Robot Slayer”: a FPS that I created to be test environment for my script writing. Then Unity decided to pull the rug out from under all developers this week with their predatory pricing changes, and I expect a lot of studios will abandon the platform moving forward. I think I am going to switch to learning Unreal and C++, and keep an eye on how Godot develops now that Unity is imploding. So instead of further developing my Unity game, I am putting what I’ve made so far on my site here: RobotSlayer. It’s just one small level and a bit janky, but it’s playable and you can run it in your browser. I’ve also put the code for it up on GitHub.

Game Dev in Unity

I have begun teaching myself C# game dev within Unity. After watching several tutorials and reading “Unity in Action” by Joseph Hocking, I started by creating an arena where I could test attaching scripts to game objects. I experimented with textures and skyboxes a bit. A script for player movement was easy enough to get working. Then I wrote a basic script (based on an example in the book) to have objects move through the environment while avoiding obstacles via Raycasting. That looked like this:

Next, I created a proper enemy, with a bit of basic AI. Using the code for avoiding obstacles, I added a function to cause the enemy to stalk the player through the environment and to attack when the player is spotted. Then I created a simple weapons system and armed the enemy and the player. (This also gave me a chance to play with Bloom post-processing to get the projectiles “glowy”.) This is where I’m at now:

Next on the agenda:

  • create a damage system so the enemy and player will take damage when hit
  • create an effect to communicate the destruction of an enemy
  • create an effect that will communicate when the player takes damage
  • write an enemy spawn script that will generate new enemies whenever an enemy is destroyed
  • build a weapon change system
  • design a new type enemy (flying?)