Game dev Collision and power ups !

Collision

Early in the week I started to work with the collision function which means the objects (vegetables) should disappear when you hit them. I worked with this function quite a lot, mainly by myself at home. I tested a lot of alternatives and searched for different solutions in literature, at websites etc. I learned a lot and increased my understanding and knowledge but unfortunately I didn´t managed to solve the function. I had a feeling I was very close to the solution but most likely there were one or two small errors I couldn´t see. Too late I understood I haven’t noticed the error box or deactivated it in Visual Studio, meaning when an error occurred the program went back to the earlier version that worked and my latest changes were never tested due to this error.

In the middle of the week we talked about this in the group and some other group members had new ideas for the collision function they wanted to test and develop. To avoid we worked double with the same task I put this work on hold waiting for the result from the others in the group.

Power-Ups

Instead I started to work with the Power-Ups which I expected should be more ”easy” to handle. In this case the powe-up function should be an increase in the speed of movement for the character when you hit a key for a certain period of time, for example five seconds. There will also be a cool-down function related to this Power-Up function where you can´t use this function again within a certain period of time, for example 30 seconds. It showed the function to increase the speed was quite simple but to time-limit was trickier due to the fact that the game didn´t had an internal watch. This time I got a lot of help from the group mentor about how to define time in the program. I learned how to handle delta time so the computer could follow and relate to a watch. After that it made the life much easier and the power-up function could finally be solved. I think this parts was very good where I learned a lot of how to handle and define time which often is an important factor in computer games.

Spel

 

General problems

During this week we had some problems in the group to handle and share the program code and the different versions. We used the website Bitbucket and the program Sourcetree but we found it quite complicated as we had no good knowledge or experience for these. This resulted in that we worked and programmed in different versions. I experienced this problem quite frustrating because when I programmed directly in the main CPP which showed to be an old version and afterwards had the latest which was much more structured into classes I found out it was complicated and hard to transfer my code due to the new structure. So I had to reprogram everything again to fit the new version which I´m working with right now.

My reflections during this week are that programming is harder and takes more time than I first thought. The positive thing is of course that you learn from all mistakes but it´s also very good to get accurate help when you feel you have reached a dead end and is out of ideas. Therefore I have revised my strategy to just keep on working until you find a solution and is more open-minded for external and internal help outside and inside the Group.

 

 

 

 

About Daniel Granqvist

2014  Programming