Week 2 – Game Engine
In the second week of the Game Engine Tutorial, we learnt how
to properly code the asteroids in our game, objects which we will need in the
later stage of our game. In the tutorial is presented how to properly develop
them with the help of classes, a more advantageous way rather than putting all
the code in one CPP file, or one cluster of code into a single file. The
tutorial walked me through the exact process of creating the asteroids in order
to have the best result. If the tutorial is followed perfectly step by step it
should output 2 spheres, which are representing the asteroids and the cone
which was implemented in the last week, representing our ship. Another aspect
which we have covered in this weeks tutorial was the inheritance part which
comes when we are working with classes. Inheritance can represent such an
important aspect of programming because in this way we can, basically, reuse
parts of code without having to rewrite the code every time when we need it,
more specifically inheritance is a really important aspect in the code usage
area. Following the creation of the asteroid class, I have tried to colour them
differently by creating a colour property which can be seen in the following
images:
The output after the colour structure got introduced, two different spheres with two different colours:
No comments:
Post a Comment