## How To Cheat At Game Dev

April 20th, 2016 1:51 pm

I am from the learn as you go school of game design. Unity Tutorials, Forums and Stack Exchange make up a significant chunk of my base knowledge about code but I don’t like to copy and paste, I make sure that anything I put into my game I know how it works. What I love about LD is that it forces me to try new things and in the process learn new things. Unfortunately the time restraint means the understanding new things becomes more optional especially when a lot of the new things you learn come with some complicated maths. Game Jams are not a good time to come to terms with new maths, but it brings me to another thing I love about LD, having to think your way around a problem. In a lot of ways Game design is the best and most abstract puzzle game I have ever played.

In LD35 I ended up in this spot a number of times and enjoyed my solutions to my problems. Sometimes it effected games mechanics. As an example when I was programming my Ship’s shooting mechanic. Because my ship had a variable speed the trouble I kept facing was the ship could out run the shot. It looked terrible, made the cannon look weak and also was problematic when it came to being chased by enemies. So I came up with an elegant solution

The cannon fires backwards. 3 Birds with 1 stone.

Another problem my shooting mechanic faced was aim. The ship in my game can rotate 360 degrees try as I might I couldn’t get the projectile to leave the ship in a line that looked correct. It would go in a straight line or come of at the wrong angle and it looked and played awfully. It was a maths problem and there was probably an elegant solution I was missing but I was already behind and I didn’t have the time to experiment until I found it. So here is how i solved my aim problem.I cheated!

A. I created am invisible game object that was the child of my Ships core and placed it about 20(unity distance) behind it. we shall call this game object Margret.

B. As a result it would follow the same rotation as my ship like it was on a spoke

C. at the point of firing 2 things happened

1. a projectile was fired from the ship
2. a new game object was spawned at the exact spot Margret was

D. The script on the projectile that made it move would take the game object dropped by Margret as a target and move in a straight line towards it while at the same time rotating itself to face it. It also meant I could have them destroy each other if  they hit Meaning the game didn’t become littered with bullets.

There might be hundreds of simpler solutions to this, some using more obvious code I didn’t think of or elegant solutions I don’t know how to do. I have described the way I code to people as hanging up pictures by nailing string to the ceiling and right now it works for me.

But this LD I found a creative way to cheat my way around something I couldn’t work out how to do the right way and if i hadn’t been doing LD probably wouldn’t of needed to but that time constraint really makes you think.

So if you read this thank you for indulging me and please play my game

Shift Commander

And if you have already played it please check out the Post Jam Version on Itch.Io as I have taken on a lot of the feedback in the comments on board.

https://cynicalmonkey.itch.io/shift-commander

[cache: storing page]