Monthly Archives: November 2014

Game Programming III Week Two: Network programming

I haven’t really done anything on my personal projects (or assignments) this week, therefore I feel that the only thing  I can write about is what we did on the lectures: an introduction to network programming using sockets.
For the uninitiated, sockets can be somewhat likened to electrical plugs. You decide on a port where you send or receive data, similar to choosing one specific outlet to plug in whatever electrical appliance you might have. You then create a socket and […]

/ Comments Off on Game Programming III Week Two: Network programming
Program: Programming

Game Programming III Week Two: Network programming

I haven’t really done anything on my personal projects (or assignments) this week, therefore I feel that the only thing  I can write about is what we did on the lectures: an introduction to network programming using sockets.
For the uninitiated, sockets can be somewhat likened to electrical plugs. You decide on a port where you send or receive data, similar to choosing one specific outlet to plug in whatever electrical appliance you might have. You then create a socket and […]

/ Comments Off on Game Programming III Week Two: Network programming
Program: Programming

Programming Blog – Week 2

This week I created my linked list for the first assignment of this course.
A linked list is essentialy a number of nodes containing its data as well as having a pointer to the next node in the list.
The first idea I had for this was a struct Node shown below.
struct Node {
int data;
Node *next;
}
Then I had to tackle the problem of having several Nodes and where to store them, and while thinking of using actual std::lists or vectors a friend told me that I […]

/ Comments Off on Programming Blog – Week 2
Program: Programming

Programming Blog – Week 2

This week I created my linked list for the first assignment of this course.
A linked list is essentialy a number of nodes containing its data as well as having a pointer to the next node in the list.
The first idea I had for this was a struct Node shown below.
struct Node {
int data;
Node *next;
}
Then I had to tackle the problem of having several Nodes and where to store them, and while thinking of using actual std::lists or vectors a friend told me that I […]

/ Comments Off on Programming Blog – Week 2
Program: Programming

Programming Blog – Week 2

This week I created my linked list for the first assignment of this course.
The first idea I had for this was a struct Node shown below.
struct Node {
int data;
Node *next;
}
Then I had to tackle the problem of having several Nodes and where to store them, and while thinking of using actual std::lists or vectors a friend told me that I only needed to define the root-node and the rest would just be layered through the Node *next without needing a way […]

/ Comments Off on Programming Blog – Week 2
Program: Programming

Programming Blog – Week 2

This week I created my linked list for the first assignment of this course.
The first idea I had for this was a struct Node shown below.
struct Node {
int data;
Node *next;
}
Then I had to tackle the problem of having several Nodes and where to store them, and while thinking of using actual std::lists or vectors a friend told me that I only needed to define the root-node and the rest would just be layered through the Node *next without needing a way […]

/ Comments Off on Programming Blog – Week 2
Program: Programming

Second week and Pointers!

This week we have gone through some new things that I have never actually done before. The main thing being pointers and memory allocation. Arrays and functions were also brought up, but I already knew the basics around these. Another thing that we learnt was type casting. I have always used the C way of casting, for example (float)variable, but the right way to do it in C++ is to type static_cast(variable); to cast the variable to a float value.
Memory allocation is something […]

/ Comments Off on Second week and Pointers!
Program: Programming

Second week and Pointers!

This week we have gone through some new things that I have never actually done before. The main thing being pointers and memory allocation. Arrays and functions were also brought up, but I already knew the basics around these. Another thing that we learnt was type casting. I have always used the C way of casting, for example (float)variable, but the right way to do it in C++ is to type static_cast(variable); to cast the variable to a float value.
Memory allocation is something […]

/ Comments Off on Second week and Pointers!
Program: Programming

Second week and Pointers!

This week we have gone through some new things that I have never actually done before. The main thing being pointers and memory allocation. Arrays and functions were also brought up, but I already knew the basics around these. Another thing that we learnt was type casting. I have always used the C way of casting, for example (float)variable, but the right way to do it in C++ is to type static_cast(variable); to cast the variable to a float value.
Memory allocation is something […]

/ Comments Off on Second week and Pointers!
Program: Programming

Second week and Pointers!

This week we have gone through some new things that I have never actually done before. The main thing being pointers and memory allocation. Arrays and functions were also brought up, but I already knew the basics around these. Another thing that we learnt was type casting. I have always used the C way of casting, for example (float)variable, but the right way to do it in C++ is to type static_cast(variable); to cast the variable to a float value.
Memory allocation is something […]

/ Comments Off on Second week and Pointers!
Program: Programming

The second week of programming, also known as hell.

So going on into the second week I felt very confident, I had picked up all of the required material and I had a good grasp of everything we had gone through during the lectures. I felt like that week was maybe a 5/10 on a difficulty scale, doable but hard.
Now that the second week is done I can confrim that we have now started going with a speed very close to the one of light. This week we went […]

/ Comments Off on The second week of programming, also known as hell.
Program: Programming

The second week of programming, also known as hell.

So going on into the second week I felt very confident, I had picked up all of the required material and I had a good grasp of everything we had gone through during the lectures. I felt like that week was maybe a 5/10 on a difficulty scale, doable but hard.
Now that the second week is done I can confrim that we have now started going with a speed very close to the one of light. This week we went […]

/ Comments Off on The second week of programming, also known as hell.
Program: Programming

Game Programming III – Second Week

This week I finished my linked list. I used templates for the data given to the nodes, and so all functions for the list are written in the header file. All methods have been completed and tested, now all that’s left for the linked list to be fully completed is some kind of unit testing.

In class we have been creating a UDP Chat, which also helped us to get ready for our second assignment, which is about writing a web […]

/ Comments Off on Game Programming III – Second Week
Program: Programming

Game Programming III – Second Week

This week I finished my linked list. I used templates for the data given to the nodes, and so all functions for the list are written in the header file. All methods have been completed and tested, now all that’s left for the linked list to be fully completed is some kind of unit testing.

In class we have been creating a UDP Chat, which also helped us to get ready for our second assignment, which is about writing a web […]

/ Comments Off on Game Programming III – Second Week
Program: Programming

Pong!

Second week into the course and the focus has turned to games! For the last couple of days we have been working with building a working version of the classic game Pong, using the library SDL to create a visual window.
Pong is a very old game (Original arcade version released 1972) and also one of the most famous retro games. The game is a simple abstraction of tennis, split with two paddles, controlled by players, on each end of the screen […]

/ Comments Off on Pong!
Program: Programming

Pong!

Second week into the course and the focus has turned to games! For the last couple of days we have been working with building a working version of the classic game Pong, using the library SDL to create a visual window.
Pong is a very old game (Original arcade version released 1972) and also one of the most famous retro games. The game is a simple abstraction of tennis, split with two paddles, controlled by players, on each end of the screen […]

/ Comments Off on Pong!
Program: Programming

Pong!

Second week into the course and the focus has turned to games! For the last couple of days we have been working with building a working version of the classic game Pong, using the library SDL to create a visual window.
Pong is a very old game (Original arcade version released 1972) and also one of the most famous retro games. The game is a simple abstraction of tennis, split with two paddles, controlled by players, on each end of the screen […]

/ Comments Off on Pong!
Program: Programming

Pong!

Second week into the course and the focus has turned to games! For the last couple of days we have been working with building a working version of the classic game Pong, using the library SDL to create a visual window.
Pong is a very old game (Original arcade version released 1972) and also one of the most famous retro games. The game is a simple abstraction of tennis, split with two paddles, controlled by players, on each end of the screen […]

/ Comments Off on Pong!
Program: Programming

Game programming I – Week 2

This week we have started to learn about and work with Arrays, Functions, Strings, Pointers and we’ve also discussed Memory and the two types of memory – stack and heap.
Stack memory is the general type of memory which is allocated automatically, heap memory is allocated and deallocated by the programmer. Memory leakage is when the stack memory is not correctly deallocated and is the biggest reason for games and other programs crashing as they are hard to remember and easy to […]

/ Comments Off on Game programming I – Week 2
Program: Programming

Game programming I – Week 2

This week we have started to learn about and work with Arrays, Functions, Strings, Pointers and we’ve also discussed Memory and the two types of memory – stack and heap.
Stack memory is the general type of memory which is allocated automatically, heap memory is allocated and deallocated by the programmer. Memory leakage is when the stack memory is not correctly deallocated and is the biggest reason for games and other programs crashing as they are hard to remember and easy to […]

/ Comments Off on Game programming I – Week 2
Program: Programming

Game programming I – Week 2

This week we have started to learn about and work with Arrays, Functions, Strings, Pointers and we’ve also discussed Memory and the two types of memory – stack and heap.
Stack memory is the general type of memory which is allocated automatically, heap memory is allocated and deallocated by the programmer. Memory leakage is when the stack memory is not correctly deallocated and is the biggest reason for games and other programs crashing as they are hard to remember and easy to […]

/ Comments Off on Game programming I – Week 2
Program: Programming

Game programming I – Week 2

This week we have started to learn about and work with Arrays, Functions, Strings, Pointers and we’ve also discussed Memory and the two types of memory – stack and heap.
Stack memory is the general type of memory which is allocated automatically, heap memory is allocated and deallocated by the programmer. Memory leakage is when the stack memory is not correctly deallocated and is the biggest reason for games and other programs crashing as they are hard to remember and easy to […]

/ Comments Off on Game programming I – Week 2
Program: Programming

Game programming wk.2

I thought that week one was intensive until we started week two. In five days we managed to learn functions, pointers and then jump straight in SDL() and make Pong.
While doing that we got to learn a new data structure called struct, struct is a group of data elements, these elements called members. Using struct increased efficiency when creating similar instances of a class or a struct.

struct Paddle

{

float x,y; //The X and Y coordinates of the paddle

//An array that has […]

/ Comments Off on Game programming wk.2
Program: Programming

Game programming wk.2

I thought that week one was intensive until we started week two. In five days we managed to learn functions, pointers and then jump straight in SDL() and make Pong.
While doing that we got to learn a new data structure called struct, struct is a group of data elements, these elements called members. Using struct increased efficiency when creating similar instances of a class or a struct.

struct Paddle

{

float x,y; //The X and Y coordinates of the paddle

//An array that has […]

/ Comments Off on Game programming wk.2
Program: Programming