The path to (junior) programming! Part 3
- ronchisa
- Jan 14
- 2 min read
Oh my, only part 3? So much has happened since part 2, I must have omitted posting about it!
Alas, that is untrue: between the vagaries of life and the drain of complacency, progress has not been relentless.
It has not been inexistent either: I'm now on lesson two, that durn car of lesson one but a distant memory, wrestled with that lesson's exam-style challenge, and now I'm on this lesson's challenge.
The challenges are definitely interesting, a good way to recap what you've learned so far and put those grey cells to work, although there is still a lot of handholding taking place with generous hints. So, it feels less exam, more revision with a helpful tutor -there is a quiz at the end-end of the lesson which you must pass to move forward, but so far, it is risibly mild.
The first challenge consisted of a 3D plane traversing past a couple of simple 2D obstacles, and you needing to fix the issues with the build, which is definitely duable if you haven't been sleeping during class (or taking x weeks/months between lessons...), although what was shocking is the optional bonus features, where you're asked to re-visit the main lesson and apply some easy to hard changes, the latter being to create a local multiplayer mode! That felt perhaps a step too far into wild, wild west territory, so I wisely and meekly stayed in my shabby saloon and let the outlaws pass me by.
Second lesson is still very bite-sized, but also very interesting, getting to grips with collisions and instantiations in a top-down environment where animals come rushing down the screen towards you as you desperately try to stave off their ravenous charge with pizza bullets (points for originality), and I am appalled at how inefficient my previous scripting with Unity was: I'd created the following, convoluted code in my little game to move the Player:

And here, it showed me that I can just use the awesome in-built features of Unity, such as:

Same with instantiation.
Same with deleting instantiated Game Objects -just use the Delete() method. I will spare you the pain, and I the embarrassment, of seeing what my code for a simple deletion is.
And, that is exactly why I admire Unity so: a lot of the legwork has been done for you, and you can get on with making a game.
So, what is lesson numero two's challenge? A build where I can spawn dogs to make them run away from me in a 2D view, to catch a ball dropping from the heavens. At least, that is what is meant to occur, but plenty of intentionally fed errors need to be fixed beforehand.
Best get to it, then!
Your handy fixer,
Stefano Ronchi
Comments