Arrays and Loops ! – Day 2 out of 100

I am so happy !

Today, for my deep dive in C# game programming, I decided to get a more solid understanding of arrays and the random functionality !

So I wrote on Evernote four different mini exercices… and guess what ? I completed every single one ! Now for master coders out there these exercices will seem like pure child’s play but I can tell you, I feel so proud to have figured them out.

First exercice : Make a simple player controller, when the player gets near a chest (simple cube) the console will randomly log a word (representing what you have found in the chest), in this case an arrow, a sword or a shield.

Second Exercice : Again, character goes near chest, when he triggers with it this time the chest will randomly spawn a cube, a sphere or a cylinder.

Third Exercice : place three cubes in a row, one with a tag “Funny”, one with a tag “Happy” and one with no tag, when I play the cube with the tag funny should go up a little and the one with the “Happy” tag should scale itself to double it’s original size.

And final exercice : make 6 random spawn points on a plane. When I hit play each one of these spawn points will either instantiate a cube, a sphere or a cylinder (more random stuff).

To complete these mini challenges I had to use Loops (which I checked out yesterday), arrays and Random.Range (I looked at the tutorials on the official Unity web)! It is the first time since I have started game dev that I have used any of these three things and actually understood what they do. I have the feeling that dedicating an hour to pure coding has sort of shifted my mindset and I see things a little differently, or it least I understand much better. Anyway very happy with day 2, by day 100 I will seriously be good if I continue like this !

See you tomorow for day 3 where I will try and use the Vector3.MoveTowards function (or something like that) to make a basic patrol script !


  1. Excellent workflow !! Theory / Application. Keep it up… you should have a log on EverNote of the topics you have covered (like datagroup, function, method, Artificial intelligence…) and build roadmap that you adjust as you progress.


    1. Thanks ! Yes I am working on my plan to becoming the ultimate game developer, I have already a nice list of topics I wish to understand further !


  2. Way to go, you sound like you are really on top of things my boy! Yeah keep up the crazy motivation!


Leave a Reply

Your email address will not be published. Required fields are marked *