Browsing 'Programming': Posts from Game Design and Programming

Programming week 5 – Final build of Arkanoid
We have completed building the game Arkanoid and I’ve had loads of fun doing it, it’s also been quite hard understanding each line of code, but I think it’s gone quite well.
So we are soon done with the course, what remains is next week with some lectures on collision and how it works. Then we’re supposed to build our very own game, either as one or in groups of two. Me and my classmate has decided to build the […]

Programming week 5 – Final build of Arkanoid
We have completed building the game Arkanoid and I’ve had loads of fun doing it, it’s also been quite hard understanding each line of code, but I think it’s gone quite well.
So we are soon done with the course, what remains is next week with some lectures on collision and how it works. Then we’re supposed to build our very own game, either as one or in groups of two. Me and my classmate has decided to build the […]
Staring and listening
Today was a worse day progress-wise.
I spent the entire morning staring at the server code trying to figure out what to do with the data i received from the recv function. I need to get the data from the char array i receive and somehow interpret it to send a html page back to the client. I’m not sure how i will do this yet, i will either create a html from a string or save a html page as […]
Staring and listening
Today was a worse day progress-wise.
I spent the entire morning staring at the server code trying to figure out what to do with the data i received from the recv function. I need to get the data from the char array i receive and somehow interpret it to send a html page back to the client. I’m not sure how i will do this yet, i will either create a html from a string or save a html page as […]

Programming: Week 3 (cont. 2)
Ex. 6
Define a class that is able to describe any of the 52 cards in a pack of cards. Include a Print method that outputs the suit and the rank of a card.
Class Design Considerations
The class Card
should contain the info required to uniquely identify a card, i.e., describe its suit (Hearts, Diamonds, Spades, Clubs) and rank (A, 1, 2, … 10, J, Q, K).
The class needs at least two member variables, one for suit and one for rank. You […]

Programming: Week 3 (cont. 2)
Ex. 6
Define a class that is able to describe any of the 52 cards in a pack of cards. Include a Print method that outputs the suit and the rank of a card.
Class Design Considerations
The class Card
should contain the info required to uniquely identify a card, i.e., describe its suit (Hearts, Diamonds, Spades, Clubs) and rank (A, 1, 2, … 10, J, Q, K).
The class needs at least two member variables, one for suit and one for rank. You […]
Late learning
Today was a good, if not very productive day.
Since last post I’ve learned three valuable things. First of all the location of the human spleen; right next to the stomach. But what does that have to do with programming? Nothing at all but I feel like i should have known this earlier.
The second thing i learned by studying the code i wrote from the microsoft tutorial i mentioned two blog posts ago. By pretty much staring at the code […]
Late learning
Today was a good, if not very productive day.
Since last post I’ve learned three valuable things. First of all the location of the human spleen; right next to the stomach. But what does that have to do with programming? Nothing at all but I feel like i should have known this earlier.
The second thing i learned by studying the code i wrote from the microsoft tutorial i mentioned two blog posts ago. By pretty much staring at the code […]
Two days worth of blogging
Yesterday we met with the Assignment 3 group during the morning and made ourselfs a task list for the holiday project. I won’t talk too much about it on here until i’m done with the other parts.
During the lecture we were taslked to figure out one segment ourselves and while i was close to solving it, i couldn’t quite figure it out. With my mood ruined i went home and started reworking my erase function on y binary search tree […]
Two days worth of blogging
Yesterday we met with the Assignment 3 group during the morning and made ourselfs a task list for the holiday project. I won’t talk too much about it on here until i’m done with the other parts.
During the lecture we were taslked to figure out one segment ourselves and while i was close to solving it, i couldn’t quite figure it out. With my mood ruined i went home and started reworking my erase function on y binary search tree […]

Smart pointers vs Raw pointers
In c++ you use pointers very often, and they are the main reason for memory leaks and other problems. They allocate memory and if they are not deleted that is a memory leak. To avoid this problem the Smart pointers are to prefer.
A Smart pointer contains a Raw pointer – pointing to it, and it has the same size -, only the Smart pointer deletes the Raw pointer when it is no longer used. This means that you don’t have […]

Smart pointers vs Raw pointers
In c++ you use pointers very often, and they are the main reason for memory leaks and other problems. They allocate memory and if they are not deleted that is a memory leak. To avoid this problem the Smart pointers are to prefer.
A Smart pointer contains a Raw pointer – pointing to it, and it has the same size -, only the Smart pointer deletes the Raw pointer when it is no longer used. This means that you don’t have […]

Smart pointers vs Raw pointers
In c++ you use pointers very often, and they are the main reason for memory leaks and other problems. They allocate memory and if they are not deleted that is a memory leak. To avoid this problem the Smart pointers are to prefer.
A Smart pointer contains a Raw pointer – pointing to it, and it has the same size -, only the Smart pointer deletes the Raw pointer when it is no longer used. This means that you don’t have […]

Smart pointers vs Raw pointers
In c++ you use pointers very often, and they are the main reason for memory leaks and other problems. They allocate memory and if they are not deleted that is a memory leak. To avoid this problem the Smart pointers are to prefer.
A Smart pointer contains a Raw pointer – pointing to it, and it has the same size -, only the Smart pointer deletes the Raw pointer when it is no longer used. This means that you don’t have […]
Classes, inheritance and the pureness of a virtual class
Hello, I’m back.
So over the last two weeks we’ve finished the introduction part of the course, and I am now in uncharted territory. I’ve learned more about classes, which I knew a little bit about before but not too much, and I am now a master of class inheritance and pure virtual classes! No, just kidding, it still is a bit confusing from time to time, especially when dealing with pointers and arrays that are filled with pointers that point […]
Classes, inheritance and the pureness of a virtual class
Hello, I’m back.
So over the last two weeks we’ve finished the introduction part of the course, and I am now in uncharted territory. I’ve learned more about classes, which I knew a little bit about before but not too much, and I am now a master of class inheritance and pure virtual classes! No, just kidding, it still is a bit confusing from time to time, especially when dealing with pointers and arrays that are filled with pointers that point […]
Incoming dump of posts for babel
Because of a tagging fluke on my behalf most of my blog posts from earlier weeks should be appearing on babel tonight. If babel doesn’t work like that i will just have to make a post linking to all those posts.
Today was a good start to what will hopefully be a productive week. I was in school before 9AM unlike most days last week and i was shown a tutorial on how to set up a basic application using winsock.
The […]
Incoming dump of posts for babel
Because of a tagging fluke on my behalf most of my blog posts from earlier weeks should be appearing on babel tonight. If babel doesn’t work like that i will just have to make a post linking to all those posts.
Today was a good start to what will hopefully be a productive week. I was in school before 9AM unlike most days last week and i was shown a tutorial on how to set up a basic application using winsock.
The […]

GameProgramming – week4
We have already gotten to week four as we go forth with more SDL.
Starting the week with explaining recursion.
Recursion is when a function calls it self so it will continue until it says stop or infinite. We used it to calculate a factorial value. Also explained how you can sort arrays ans about std::fstream with differs a bit from what we have used up until now to print text to a console window, used std::cout until now.
The rest of the […]

GameProgramming – week4
We have already gotten to week four as we go forth with more SDL.
Starting the week with explaining recursion.
Recursion is when a function calls it self so it will continue until it says stop or infinite. We used it to calculate a factorial value. Also explained how you can sort arrays ans about std::fstream with differs a bit from what we have used up until now to print text to a console window, used std::cout until now.
The rest of the […]
Week 4 of Game Programming 1 – Project preparation
In this week of Game Programming 1, we have been doing a lot of live coding. The code we have been writing is a blueprint for the upcomming project. The project is to create a game in the Simple DirectMedia Library. The game I and my partner (unoakerlund.wordpress.com) have decided to create is Bomberman, so a lot of time this week has gone to study the mechanics and objects that Bomberman contains.
The coding we have been doing is a blueprint that we […]
Week 4 of Game Programming 1 – Project preparation
In this week of Game Programming 1, we have been doing a lot of live coding. The code we have been writing is a blueprint for the upcomming project. The project is to create a game in the Simple DirectMedia Library. The game I and my partner (unoakerlund.wordpress.com) have decided to create is Bomberman, so a lot of time this week has gone to study the mechanics and objects that Bomberman contains.
The coding we have been doing is a blueprint that we […]
Web Servers!
This blog post and probably the next one will be about winsock servers.
Winsock like many other ways to code servers is a hassle and are not worth the trouble unless you are seriously considering creating one.
This post will only outline my idea of how the server is going to be designed in a simple way to interact with a user trying to connect to the server.
I will show some code but as I am only at the accept phase I […]
Web Servers!
This blog post and probably the next one will be about winsock servers.
Winsock like many other ways to code servers is a hassle and are not worth the trouble unless you are seriously considering creating one.
This post will only outline my idea of how the server is going to be designed in a simple way to interact with a user trying to connect to the server.
I will show some code but as I am only at the accept phase I […]