Browsing 'Programming': Posts from Game Design and Programming

Game programming week 3 – Classes, classes, classes
This week in game programming, we’ve been going through classes a lot. A class is a data structure that apart from variables, also can contain functions. Therefore, a class is often used to store a lot of functions in, so they can be used again within the program without having to rewrite them. A class is created in a header-file, and then called to when it’s used in the ”int main” function call. We also went through class inheritance, which […]

Game programming week 3 – Classes, classes, classes
This week in game programming, we’ve been going through classes a lot. A class is a data structure that apart from variables, also can contain functions. Therefore, a class is often used to store a lot of functions in, so they can be used again within the program without having to rewrite them. A class is created in a header-file, and then called to when it’s used in the ”int main” function call. We also went through class inheritance, which […]

28.11.14
Spelprogrammering I fortsätter på i samma snabba tempo med en massa nya saker varje föreläsning! Förra veckan gick vi igenom functions, arrays och memory.
– Write a program that converts a std::string to The Robber language– Let the user input a string of characters
Vi gick också genom steg för steg hur man gör spelet Pong under två dagars workshop. Där fick vi se alla olika delar vi har gått igenom tidigare och vad de gör i […]

28.11.14
Spelprogrammering I fortsätter på i samma snabba tempo med en massa nya saker varje föreläsning! Förra veckan gick vi igenom functions, arrays och memory.
– Write a program that converts a std::string to The Robber language– Let the user input a string of characters
Vi gick också genom steg för steg hur man gör spelet Pong under två dagars workshop. Där fick vi se alla olika delar vi har gått igenom tidigare och vad de gör i […]
The day i asked for help and made a cube.
Got to school a proper time today as I was hoping to finish the first assignment and also ask for help with some things I was unsure about. Thanks to asking around I was able to fix the issues I was having with my traversal functions. The issue was solved by moving the node struct to the top of the class rather than the end. This was because the function called for a node to be used as an argument […]
The day i asked for help and made a cube.
Got to school a proper time today as I was hoping to finish the first assignment and also ask for help with some things I was unsure about. Thanks to asking around I was able to fix the issues I was having with my traversal functions. The issue was solved by moving the node struct to the top of the class rather than the end. This was because the function called for a node to be used as an argument […]

Game Programming III – the third week, binary search tree part one (1)
Hello!
This week I finally managed to finalize the binary search tree that I’ve been working on. I’ve had a lot of trouble since I did not have the sense to look up tutorials on the subject even though that is usually the first thing I do. I guess I got too cocky and figured I should be able to do it all on my own pretty quick. I was wrong, and I would have saved myself a lot of […]

Game Programming III – the third week, binary search tree part one (1)
Hello!
This week I finally managed to finalize the binary search tree that I’ve been working on. I’ve had a lot of trouble since I did not have the sense to look up tutorials on the subject even though that is usually the first thing I do. I guess I got too cocky and figured I should be able to do it all on my own pretty quick. I was wrong, and I would have saved myself a lot of […]

Game Programming III – the third week, binary search tree part one (1)
Hello!
This week I finally managed to finalize the binary search tree that I’ve been working on. I’ve had a lot of trouble since I did not have the sense to look up tutorials on the subject even though that is usually the first thing I do. I guess I got too cocky and figured I should be able to do it all on my own pretty quick. I was wrong, and I would have saved myself a lot of […]

Game Programming III – the third week, binary search tree part one (1)
Hello!
This week I finally managed to finalize the binary search tree that I’ve been working on. I’ve had a lot of trouble since I did not have the sense to look up tutorials on the subject even though that is usually the first thing I do. I guess I got too cocky and figured I should be able to do it all on my own pretty quick. I was wrong, and I would have saved myself a lot of […]

The third week of game programming
This week we have started studying object oriented programming. We started with classes. Classes are a way to group together different methods to create independent objects that work together to make beautiful things happen.
This week was not quite as hard as the former week. That however doesn’t mean it was even close to easy. I spent a lot of time on the different assignments we were handed and I finally completed most of the second week and I have now […]

The third week of game programming
This week we have started studying object oriented programming. We started with classes. Classes are a way to group together different methods to create independent objects that work together to make beautiful things happen.
This week was not quite as hard as the former week. That however doesn’t mean it was even close to easy. I spent a lot of time on the different assignments we were handed and I finally completed most of the second week and I have now […]
Classes about Classes
This past week the focus has turned to working with classes. The process was a tricky one since this is where my previous coding experience is reaching its limit, and the task required me to do things that have not been necessary for me before. Most of my working time has been spent on the task of creating a class able to simulate a deck of cards.
To do this I created a Card class meant to simulate cards by their […]
Classes about Classes
This past week the focus has turned to working with classes. The process was a tricky one since this is where my previous coding experience is reaching its limit, and the task required me to do things that have not been necessary for me before. Most of my working time has been spent on the task of creating a class able to simulate a deck of cards.
To do this I created a Card class meant to simulate cards by their […]
Classes about Classes
This past week the focus has turned to working with classes. The process was a tricky one since this is where my previous coding experience is reaching its limit, and the task required me to do things that have not been necessary for me before. Most of my working time has been spent on the task of creating a class able to simulate a deck of cards.
To do this I created a Card class meant to simulate cards by their […]
Classes about Classes
This past week the focus has turned to working with classes. The process was a tricky one since this is where my previous coding experience is reaching its limit, and the task required me to do things that have not been necessary for me before. Most of my working time has been spent on the task of creating a class able to simulate a deck of cards.
To do this I created a Card class meant to simulate cards by their […]
Game Programming I Week three.
This week of programming has been a bit more slow paced then the two previous ones. Hence we have been going through classes the whole week. The only new thing this week was class heritage, that a class can contain an other class by, heritage. This is declared by
class Animal
{
private:
int size;
public:
int GetSize(size)
{
return size;
}
};
class Fish: Public Animal //Better to set Animal as protected
{
};
This means that the things inside class fish now contains class animal.
Game Programming I Week three.
This week of programming has been a bit more slow paced then the two previous ones. Hence we have been going through classes the whole week. The only new thing this week was class heritage, that a class can contain an other class by, heritage. This is declared by
class Animal
{
private:
int size;
public:
int GetSize(size)
{
return size;
}
};
class Fish: Public Animal //Better to set Animal as protected
{
};
This means that the things inside class fish now contains class animal.
Game Programming I Week three.
This week of programming has been a bit more slow paced then the two previous ones. Hence we have been going through classes the whole week. The only new thing this week was class heritage, that a class can contain an other class by, heritage. This is declared by
class Animal
{
private:
int size;
public:
int GetSize(size)
{
return size;
}
};
class Fish: Public Animal //Better to set Animal as protected
{
};
This means that the things inside class fish now contains class animal.
Game Programming I Week three.
This week of programming has been a bit more slow paced then the two previous ones. Hence we have been going through classes the whole week. The only new thing this week was class heritage, that a class can contain an other class by, heritage. This is declared by
class Animal
{
private:
int size;
public:
int GetSize(size)
{
return size;
}
};
class Fish: Public Animal //Better to set Animal as protected
{
};
This means that the things inside class fish now contains class animal.
GAME PROGRAMMING WK.3
This week we learned how to use Classes and began programing in an object oriented way, but we only scratched the surface of OOP(object oriented programing). Classes are another type of data structures that group data, classes has variables and functions, they are called member functions or methods and member variables.
That’s all for today, I will try to make Tic Tac Toe in SDL and publish some of the progress here so stay tuned!
-Marwan
GAME PROGRAMMING WK.3
This week we learned how to use Classes and began programing in an object oriented way, but we only scratched the surface of OOP(object oriented programing). Classes are another type of data structures that group data, classes has variables and functions, they are called member functions or methods and member variables.
That’s all for today, I will try to make Tic Tac Toe in SDL and publish some of the progress here so stay tuned!
-Marwan
Spelprogrammering Vecka 3
Den här veckan har vi gått igenom hur klasser och arv fungerar i c++. Jag har förut programmerat i språket Ruby och använde mig av object oriented programing. Så jag vet hur det fungerar med klasser och objekt. c++ har lite saker som är annorlunda, man måste förklara om en metod eller en medlemsvariabel i klassen är antingen public, private eller protected. Som standard så är allt i klassen private vilket betyder att till exempel variabler inte kan ändras utanför […]
Spelprogrammering Vecka 3
Den här veckan har vi gått igenom hur klasser och arv fungerar i c++. Jag har förut programmerat i språket Ruby och använde mig av object oriented programing. Så jag vet hur det fungerar med klasser och objekt. c++ har lite saker som är annorlunda, man måste förklara om en metod eller en medlemsvariabel i klassen är antingen public, private eller protected. Som standard så är allt i klassen private vilket betyder att till exempel variabler inte kan ändras utanför […]