Game development diary: Day 2
Day 2On day 2, I managed to finish creating the control panel in Inkscape. There will still some fields for text missing. As soon as that was complete, I began working on the class for "Sample". In a level, samples from the moon have to be collected.
I then started working on the class "Level", through which a map, that is saved as a text-file, can be loaded. Through this map, I can now design some levels with obstacles, samples and scenery.
I made a simple "Sample" image in Inkscape to test a level. Worked. I added a collision helper function that tracks collisions between the lunar rover and all the objects of a level.
If the lunar rover now went over a sample, the sample would disappear.
Afterwards, I began working on the class "Text", with which I can display text on the window and change it throughout the game.
I first implemented the class "Text" in "Lunar_Rover_Health", that shows the health of the lunar rover.
I implemented the same class in a new class "Lunar_Rover_Sample_Meter". This class is used for tracking the samples that have to be collected in a level and have been collected.
As soon as all samples in a level are collected, the level ends. Since there is only 1 level now, the game ends.
And that was it for the 2nd day of the challenge :).