Tuesday, October 17, 2017

Coding in the Mediterranean

The weather in Finland at this time of year is not so nice. I wish we could transport Finland to the Mediterranean for the months of September to November. Until then, I'll have to tranport just my family there every now and then...



This is how we learn coding in the optimum learning environment, using my pretty new book Koodauspuuhat which comes with an erasable marker! Only in Finnish though, at the moment.

Sunday, September 24, 2017

Unity 4: BoardManager, Childhood, Mushrooms

Today we started on the Writing the Board Manager part of the Unity 2D tutorial. This is the first part of the video tutorial that involves actual coding. And some code there is! Defining inner classes, methods, tons of variables, nested for loops etc.

I no longer wonder why this tutorial is not Beginner but Intermediate level :) We wrote quite a bunch of code of which I understood 100% and she maybe 20% or so. But no worries, we'll keep on coding and make something fun. Understanding how it actually works comes second, hopefully.



This reminds me of my own learning days when I was about her age and learnt coding from the Commodore Vic 20 Manual. Like this:



There were tons of simple and progressively less simple computer programs that I just typed like they were written on the book. I had no idea what the program code meant but I just typed it anyway. And it was so exciting to finally type

    run

.. and see what happened! Then I started slightly modifiying the ready made programs and finally started to understand the code by the effect that my little changes had on the outcome.

So, I hope she can also learn that way. And I'm actually 100% sure it's all about motivation and repetion. If she has the motivaion, she'll learn.

Oh, and we found this mushroom on our backyard:



Should we eat it, yes? While driving to her football match she asked me what these mushrooms actually do to people. I told her that it does something to your brain and you'll see funny things. And if you eat too much you'll die. Immediately regretted mentioning the hallucinations. Had to make extra sure that experimentation is out of the question in case more information of the effects is needed.

Tuesday, September 19, 2017

Unity Sessions 2 & 3 - Prefabs

Our second session was successful, yet super short. We finished the animations tutorial video and managed to create something called an Animation Override Controller. It's used when you create multiple enemies which share the same state machine but have different animation frames. Cool, huh? At that point the urge to start creating cupcakes instead was unstoppable and cupcake time it was.



Today she wanted to continue the tutorials so we sped through the next tutorial video on making prefabs for game tiles like floor, walls and food. These "prefabs" are saved object that define how a tile (a static piece in the game) look and how it interacts with its environment. Like, can you walk on it or not.

The stuff we've done so far has contained lots of repetitive works (like making 8 different floor tiles in the exact same way) which is kinda tiresome for people like me, but has proven rewarding for my 8-year old who has learnt to take these steps like a pro, just by repeating them over and over again. She can now make a lot of prefabs in the blink of an eye!

At this point I guess we have now set up all the assets so that we can start programming. Can't wait! On the other hand I'm a bit concerned how she'll handle C#, which is the first object-oriented programming language she's ever touched. There's bound to be a lot of weird boilerplate around, but I hope it won't matter too much. It's all about motivation.

Friday, September 15, 2017

Unity Session I - Animation

I realised that we've started quite a few game projects before, which have all been abandoned at a very early stage. But this time we're gonna make it. I just know it :)

Ok, so we've started working on a Unity 2D Tutorial where we follow video instructions and try to do the same thing as the guy on the video. The idea is to create a simple 2-dimensional game with the Unity game engine. I hope that after we're done with the tutorial videos, we'll be well equipped to start writing games of our own. So far, I have very limited Unity experience and I need the video tutorial as much as my daughter, so this'll be a great learning experience for both of us. My advantage over her is that I'm a professional coder at Reaktor (yes, we're hiring in Amsterdam, Dubai, Helsinki, New York, Tokyo and Turku!). Her advantage is that she's young, smart and has an almost unlimited supply of free time to throw at the project.

We had our first session the day before yesterday and we had a good time. We managed to create some basic animations for the player character and a couple of enemies.



After creating a couple of animations from the sprite sheet (basically a set of images) included in the tutorial, she was able to complete the rest by herself. After the one-hour session, she seemed quite enthusiastic about going on but it was bed time. I'm pretty sure we'll continue this soon. Stay tuned :)

Wednesday, September 13, 2017

Unity

A couple of days ago my daughter announced that she wants to create games that run on her phone. REAL games. I tried to steer her back towards Scratch and the like but she was adamant that those won't do, as she's about to start making real games. 

DAD: It's going to be really really hard and you'll be banging your head against walls for hours trying to make something work"
GIRL: That's exactly what I want!

She described a pretty complex game to me, containing several minigames and a main story. Then she showed me some graphics that she's drawn on paper. Fortunately I got her to understand that she needs to start with something smaller first, before creating her masterpiece.

When she went to sleep, I started digging, knowing fully well that I'm not a game programmer and need to do some catching-up before I can help her in her endeavours. I downloaded Unity and made a good start of a Pong-like ball game. It was surprisingly fun and easy, so I guess we're gonna go on with Unity.

Today we did the first few clicks of the 2D Roguelike tutorial before it was bedtime. Fun times ahead!

Monday, March 13, 2017

Script Academy

In a comment to a post on Reaktor Blog, a guy called Evgeni pointed me to a site called Script Academy. It's a site for kids to learn coding. And it looks promising! It has a treasure map too!



And it promises "After completing this course, your child will be able to create simple games and share them online." 

Well, we tried it with my 8-year old veteran coder girl who's used Vim at the age of 4 but since then gravitated towards other interests like 3D printing and playing the violin. Anyways, Script Academy starts in an easy way: Just click on buttons to generate Javascript that guides the (cute!) Owl to her baby. You can see the generated Javascript code and then run it. This was easy. Except the "run" button was a bit hard to find at first. For me. For the kid, it was peanuts.

Then came the part where you have to actually write the Javascript yourself. That didn't appear to be very hard, because example code was given. But here lied a surprising catch! Here's the result.



I guess there was a bit too much freedom this time. Give a kid a text area and she'll fill it with - well - anything on her mind at the time. I love her too!

Let's see if we return to Script Academy later!

Sunday, February 26, 2017

Black Hawk Down!

Btw, did you know I'm a helicopter pilot?

I have this 30€ helicopter from Clas Ohlson and I can totally land it on a dime. I mean, a two-euro coin. On a good day. But usually at least on the living room floor given enough room for maneuvering. My daughters, of course, share my passion for aviation.




I also have a spare chopper that has one of its main engines busted (not at all caused by a crash landing on my part). Or at least, had until today when my daughter wanted to build her own boat with a motor. So we had a long discussion about boat design, like, how should the weight be distributed (down), where the water line goes when it floats (dunna), where should the motor and the propeller be placed (down), how to make sure the axle hole won't leak water (grease?) and so on. Then she draw her boat with Tinkercad, with the intention to print it with our 3D printer. Here's how the design looks as of now. The design contains fittings for a little motor I had earlierly salvaged, that's something like 30*20*15 millimeters big.



You might notice that the motor compartment looks big for the tiny boat and the propeller placement isn't perfect: it'll be hard to get the whole propeller underwater. We are not boat engineers are we?

Then I remembered the spare chopper. It still had two (working) ultra-tiny motors, a control board and a Lithium Polymer battery onboard so it might be the perfect technical platform for the new little boat. So, we stripped all the unnecessary parts from the chopper and here's what we have now.





A nice radio-controlled motor-controller-battery package salvaged from a broken chopper! Let's see what comes out when we print the hull and combine it with the motor package. Do you think it'll float or sink?