No work today as it's a public holiday. Happy Deepavali!
28 October 2008
Back at work from a long weekend. Felt quite sluggish at first. However, I managed to set myself back to my 'working mode' and read up on the notes that Ming Hong passed to us last Friday as soon as I reached the 'working space'.
When Kevin arrived, we presented and shared our ideas which is supposed to integrate with Lightdraw. Kevin also injected new ideas and we settled on doing 4 games - Pong, Scrabble, Memory Game and Sudoku.
However, there is a change of plans after lunch. Instead of doing 4 games, we would be doing just 2 - Pong and a Puzzle game. Ryan and I would be working on the Pong while Leonard and You Hock would be working on the Puzzle game. We were then given time to do some research by ourselves. I manged to find some open source for Pong, but the source is written in Java. So I guess I have to study the codes and convert it into C++.
While searching for the source codes, I've also learnt how to unzip a '.zip' file in Terminal. Ming Hong and Cheng Teng came in the mid-afternoon and taught us OpenCV and how to create a simple Makefile and the concepts behind it. Our brains were then being overloaded after so much information. By the end of the day, we have managed to use OpenCV to create a window and draw a rectangle in it. Here's a picture of my rectangle done in OpenCV.
29 October 2008
As soon as we reached the office, Ryan and I started to work on the UI and tasks for today. Here's a screenshot of our '4 Player Pong' game.As soon as we had finished the design, Kevin stepped in and we showed him our progress before he went for his meeting. I worked on generating the starting positions and size for the paddles and ball while Ryan worked on moving the paddle. We were so engross in our work that we had a late lunch. Before lunch, Ryan was able to make the paddle move up and down by using the 'w' and 's' key on the keyboard.
After lunch, Ryan and I integrated our work. Ming Hong then taught me about the OpenCV Time class and how it can be used in my '4 Player Pong' game and in Lightdraw. By the end of the day, I was able to move the ball in just 1 direction.
30 October 2008
Continued working on the ball as soon as I reached. Researched about the Random class in C++ before adding it to make the ball move in random directions. Around 10am, Kevin came in and checked our progress. Both teams are progressing well.
Soon after we walked over to NUH for lunch. To our surprise, the food there is even cheaper than our school's food! The bottled drinks there only costs $1! Leonard and I had Japanese food while Ryan and You Hock had chicken rice. We then went to the bookshop to stock up on some snacks before walking back to Fusionopolis.
We continued our work till about 3.45pm when Ryan had to leave for school to give a presentation about 'Imagine Cup' to our juniors. I then integrated our parts together before continuing to work on the '4 Player Pong'.
By the end of the day, I managed to check for the collision between the ball and the yellow paddle.
31 October 2008
Did the scoring function and checking of which paddle last collided with the ball before Kevin came in to check on our progress. Learnt about the Sleep function when I asked Ming Hong how do I like paused the application when the ball goes out of bounds. The sleep(int i) would pause the application in seconds while waitkey(int i) would pause the application in malliseconds. Ming Hong also shared that some programmers would use like loops in order to pause an application. However, this is not really safe as the looping depends on each computer. If the computer is very powerful and has high performance speed, the loop would be done in milliseconds while a very slow computer with low performance speed would take like minutes - which is not very ideal.
Around 10am, Kevin came in to check and also recap on what we have learnt so far in IHPC. We continued on our work after the recap session. I continued to check the collisions between teh ball and other paddles and managed to finish it before lunch.
After lunch, Ryan and I intergrated our work. After the integration, I discovered some bugs for the collision and spent the rest of the day trying to fix the bug while Ryan tried to get the paddle to move according to the mouse movements.
Reflection for the week:
This week at IHPC has been a short, but interesting week. I have learnt a lot about C++ and OpenCV and its functions. The working environment at IHPC is pretty similar to school. Perhaps it is just the second week; Kevin and Ming Hong are still 'spoon-feeding' us.
Learning to work with others is another experience I had here at IHPC. In school, I am usually the one who does most of the work and help others. However, here in IHPC, I am the one who is being helped. I am thankful for the help received.
I had also learnt how to trust my team-mates and the people working around me. No matter how different the way how Ryan and I 'coded' our work, at the end of the day, we are still able to understand each other's work through peer teaching(which is taught in school).
Here at IHPC, we interns are on the same page. Regardless of our cGPA in school, we are all learning something new each day.
To end things on a happier note, Happy Halloween!