Programming Blog – Week 1

A new course has started, game programming III. This course contains three assignments, and I will be updating this blog on my progress on them once per week.

This week started off with a small contest to see who could compress an image the most, smallest filesize won. The hard part was that we got no lecture or any general information about how to compress images or even how to read the data of an image, so we had to figure out on our own how to do this, and then compress it in an efficient way while still being able to rebuild the image from the compressed data. This was done in teams of no more than four people.

Our teams plan for compression was first to figure out how to read data from a .bmp image (which was the image provided). Then, when we somehow managed to read and store all this data somewhere we could access we needed a way to compress the data. The data was stored in an array of bitmaps, 24 binary values per pixel. Our first idea for compressing was to look for pixelpatterns, for instance: if more than two of the same pixel repeated we switch out the data from 72 binary digits (3 pixels) to 24 digits and then a number for how many times it repeats, in this case, 3.

We didn’t have the time to even attempt a way of decompression as we only had that day to finish the contest, when the groups presented their work it turned out that noone had had the time to make decompression work.

 

After this we got the first of the three assignments explained, we are to create a linked list and a binary search tree from scratch, which I will be writing about when I finish the assignment.

Leave a comment