31 October 2016
In Unity’s lesson today I was introduced to 2D coding and vectors. Now, I’ll be the first to admit that I can’t do maths to save my life and its been 20 years since I did any kind in school so my hopes for this is shocking at best. That being said my maths brain was brought out of the old folks home and didn’t do all that bad considering we were given sums to do. Like school, didn’t get everyone right but I got enough to fluke my way through so I’ll take it!
After trying to learn how to program and code in 3D, the next task it to code in Unity a 2D game and we’re beginning and learning with what seems to be a take on Asteroids. This is actually what I’m like of looking forward to in a sick, twisted way as for all the worrying I’m doing over the coding in Unity the kind of game I want to make most of all is a 2D side scroller like the Double Dragon games of old., or Turtles, or The Simpsons.
I know my coding skills to make something like this is waaaaaay off but I live in hope. Its that thought I had when Ant first said the words “coding, 2D”. Can I pull it off? Maybe. Hopefully.
Anyway, we’ve downloaded a small pack containing graphics for a spaceship, asteroids and a starry background.
Firstly all we’ve been able to do is to place the spaceship and some asteroids. In the same way as the 3D coding, we’ve applied a script to the asteroids to make them move and rotate but because we’ve just started, the asteroids spin right off the screen. I’m hoping we’ll learn how to alter the code to allow them to bounce back and to be able to fire the guns and navigate the ship to make an Asteroids clone.
What surprised me though is how its made. I though 2D programming was different to 3D but instead, they’re near identical – or at least to me so early on they are. Although the Z-axis isn’t used, it still need to be thought about when coding, I thought it just wasn’t there. Scripts still work in the same way, have to be written in the same way and assigned in the same way so to make this work I’m really going to have to knuckle down and hope that many hours of stress and coffee trying to figure it out will pay off and I’ll understand it. That’s my hope.