Saturday, February 8, 2020

Lab 4 Update

Not much progress on the lab, we got the screen to change when up and down is pressed but it isn't exactly what the lab specified.

Monday, February 3, 2020

Lab 4 progress

Today we started lab 4. We started on the form entry selection, but later determined that the colour selection option was actually easier, and someone in our group started on that instead.

It was also sort of nice to see ROM routines, which meant that there was less work in a way.

Saturday, February 1, 2020

Lab 3 Completed

1. Introduction
This lab is more complex compared to lab 2. We had 5 different choices, and our group choose option 3 which was pong. We only completed the first part, which was just pong, but we didn't complete the breakout game portion of the code.

2. Writing Code Results
You can check out the completed code here. This code basically has the same logic a cpp version of this program, keeping track of x and y axis, and randomly generating the angles and speed. An additional feature is a score counter which displays at game over.

One particular problem I found interesting was the logic to keep track of the score. The problem was that to keep track of the score, which was the number of times that the paddle hit the ball, you would think to just have a something to keep track of the paddle as it contacted the ball. The problem is, you can record it, but at something like 60 frames per second, which would mean that the score would be around 60 extra points each time the ball contacted the paddle.

Basically the solution to that was to keep track of 2 flags, one keeping track of the the time the ball was in contact with the paddle, and another flag keeping track of when it wasn't in contact with the paddle. When the variable touching the ball and the paddle was not 1, and the flag that kept track of the variable indicated that the paddle and ball were not together, that would mean you can add 1 to the score.

3. My Experiences
Getting the logic to make the pong even in a game like cpp was a bit of a chore for me. When I got the basic logic for a cpp program, the next step was to convert that logic into assembly. After referencing some code snippets, after a lot of work, our group made a working copy of pong. The main reference to make our code was the etch a sketch code (Check it out here!.) A big thing I noticed was that although we used that code as reference, our group didn't use much of it.