Daily Archives: December 1, 2014
Third Week of Programming: Back from vacation and Tic Tac Toe
Since I last week wrote about most of the assignments for this week, I’ll talk about one assignment which took more time than the others. Making a game of Tic Tac Toe.
Tic Tac Toe is played on a 3×3 grid in which one player is represented by across and the other player is represented by a circle. The players take turns putting their symbol into the grid and if three of the same symbol align vertically, […]
Third Week of Programming: Back from vacation and Tic Tac Toe
Since I last week wrote about most of the assignments for this week, I’ll talk about one assignment which took more time than the others. Making a game of Tic Tac Toe.
Tic Tac Toe is played on a 3×3 grid in which one player is represented by across and the other player is represented by a circle. The players take turns putting their symbol into the grid and if three of the same symbol align vertically, […]
Game programming: Week two & three
Week two started off with an introduction to Arrays, Memory and Functions.
At the end of the second week our lecturer guided the class in building a basic version of the game Pong during Thursday and Friday using SDL (Simple Direct-Media Layer). There were a lot of flaws in the game that could be improved for example the movement of the ball and the collision with the paddles, although all the basic elements of the game were there.
On our third week of programming we have started […]
Game programming: Week two & three
Week two started off with an introduction to Arrays, Memory and Functions.
At the end of the second week our lecturer guided the class in building a basic version of the game Pong during Thursday and Friday using SDL (Simple Direct-Media Layer). There were a lot of flaws in the game that could be improved for example the movement of the ball and the collision with the paddles, although all the basic elements of the game were there.
On our third week of programming we have started […]
Game programming: Week two & three
Week two started off with an introduction to Arrays, Memory and Functions.
At the end of the second week our lecturer guided the class in building a basic version of the game Pong during Thursday and Friday using SDL (Simple Direct-Media Layer). There were a lot of flaws in the game that could be improved for example the movement of the ball and the collision with the paddles, although all the basic elements of the game were there.
On our third week of programming we have started […]
Game programming: Week two & three
Week two started off with an introduction to Arrays, Memory and Functions.
At the end of the second week our lecturer guided the class in building a basic version of the game Pong during Thursday and Friday using SDL (Simple Direct-Media Layer). There were a lot of flaws in the game that could be improved for example the movement of the ball and the collision with the paddles, although all the basic elements of the game were there.
On our third week of programming we have started […]
Playing with ostracism
I’m taking a course in advanced game design right now in which we’re doing a lot of rapid prototyping. Our first assignment was to create a prototype around the theme “Every finger in the room is pointing at me”. Together with two of my classmates, we tried to make a system that would convey a feeling of ostracism through movement. This is what we ended up with:
We then spruced it up and changed the visuals to show a bunch of […]
Playing with ostracism
I’m taking a course in advanced game design right now in which we’re doing a lot of rapid prototyping. Our first assignment was to create a prototype around the theme “Every finger in the room is pointing at me”. Together with two of my classmates, we tried to make a system that would convey a feeling of ostracism through movement. This is what we ended up with:
We then spruced it up and changed the visuals to show a bunch of […]
Have to catch up
Bad weekend. Due to the unexpected death of a family member i was unable to get any work done as opposed to the things i had planned. Monday was better however as i was able to both get good work done during the morning, managed to follow the lecture on the afternoon and crunch numbers during the evening. This is required as i am still not done with the first part of the assignment, although i’m getting closer by the […]
Have to catch up
Bad weekend. Due to the unexpected death of a family member i was unable to get any work done as opposed to the things i had planned. Monday was better however as i was able to both get good work done during the morning, managed to follow the lecture on the afternoon and crunch numbers during the evening. This is required as i am still not done with the first part of the assignment, although i’m getting closer by the […]
Unit Testing
So this time I’ll be blogging about what Unit testing is and how I applied it to both my projects(BST and L.List).
Generally unit testing follows your functions you’ve created and makes sure they return the correct values or just does what they are suppose to do.
The way you configure them is dependent on what your functions does.
I will state here what kind of testing my class does and how it does so.
As a whole this is my unit testing:
bool are_equal(T […]
Unit Testing
So this time I’ll be blogging about what Unit testing is and how I applied it to both my projects(BST and L.List).
Generally unit testing follows your functions you’ve created and makes sure they return the correct values or just does what they are suppose to do.
The way you configure them is dependent on what your functions does.
I will state here what kind of testing my class does and how it does so.
As a whole this is my unit testing:
bool are_equal(T […]
Unit Testing
So this time I’ll be blogging about what Unit testing is and how I applied it to both my projects(BST and L.List).
Generally unit testing follows your functions you’ve created and makes sure they return the correct values or just does what they are suppose to do.
The way you configure them is dependent on what your functions does.
I will state here what kind of testing my class does and how it does so.
As a whole this is my unit testing:
bool are_equal(T […]
Unit Testing
So this time I’ll be blogging about what Unit testing is and how I applied it to both my projects(BST and L.List).
Generally unit testing follows your functions you’ve created and makes sure they return the correct values or just does what they are suppose to do.
The way you configure them is dependent on what your functions does.
I will state here what kind of testing my class does and how it does so.
As a whole this is my unit testing:
bool are_equal(T […]
Programming – Week 3
This week I’ve learned how to create classes using header and cpp files.
This is an example of a header named Student
class Student
{
public:
Student(std::string name, int age);
int GetAge();
void SetAge(int newAge);
std::string GetName();
void SetName(std::string newName);
private:
int age;
std::string name;
};
The keyword ”public” describes what functions and variables are accesable from outside the class. All ”private” variables and functions are only accesable inside the class.
Student(std::string name, int age) is the constructor of the class. The constructor works like a […]
Programming – Week 3
This week I’ve learned how to create classes using header and cpp files.
This is an example of a header named Student
class Student
{
public:
Student(std::string name, int age);
int GetAge();
void SetAge(int newAge);
std::string GetName();
void SetName(std::string newName);
private:
int age;
std::string name;
};
The keyword ”public” describes what functions and variables are accesable from outside the class. All ”private” variables and functions are only accesable inside the class.
Student(std::string name, int age) is the constructor of the class. The constructor works like a […]
Programming – Week 3
This week I’ve learned how to create classes using header and cpp files.
This is an example of a header named Student
class Student
{
public:
Student(std::string name, int age);
int GetAge();
void SetAge(int newAge);
std::string GetName();
void SetName(std::string newName);
private:
int age;
std::string name;
};
The keyword ”public” describes what functions and variables are accesable from outside the class. All ”private” variables and functions are only accesable inside the class.
Student(std::string name, int age) is the constructor of the class. The constructor works like a […]
Programming – Week 3
This week I’ve learned how to create classes using header and cpp files.
This is an example of a header named Student
class Student
{
public:
Student(std::string name, int age);
int GetAge();
void SetAge(int newAge);
std::string GetName();
void SetName(std::string newName);
private:
int age;
std::string name;
};
The keyword ”public” describes what functions and variables are accesable from outside the class. All ”private” variables and functions are only accesable inside the class.
Student(std::string name, int age) is the constructor of the class. The constructor works like a […]
Programmering V.2
PONG!!
// main.cpp
// includes
#include
#include
#include
// Pro+: disable warning(s) that are annoying
#pragma warning(disable:4098)
// pragma directives (can also be linked through project settings)
#pragma comment(lib, ”SDL2.lib”)
#pragma comment(lib, ”SDL2main.lib”)
// structs
struct Paddle
{
float x, y;
bool input[2];
};
struct Ball
{
float x, y, xA,yA;
};
enum EGameState
{
GAME_STATE_PAUSE,
GAME_STATE_PLAY,
};
struct Game
{
SDL_Window* window;
SDL_Renderer* renderer;
int width, height;
unsigned int tick;
EGameState state;
Ball boll;
unsigned int score0, score1;
Paddle left;
Paddle right;
bool start;
};
void initialize_boll(Ball* boll, float x, float y)
{
boll->x = x;// = 502;
boll->y = y;// = 310;
boll->xA = 0.0f; //= 50;
boll->yA = 0.0f; //= -50;
}
void initialize_paddle(Paddle* paddle, float x, float y)
{
paddle->input[0] = […]
Programmering V.2
PONG!!
// main.cpp
// includes
#include
#include
#include
// Pro+: disable warning(s) that are annoying
#pragma warning(disable:4098)
// pragma directives (can also be linked through project settings)
#pragma comment(lib, ”SDL2.lib”)
#pragma comment(lib, ”SDL2main.lib”)
// structs
struct Paddle
{
float x, y;
bool input[2];
};
struct Ball
{
float x, y, xA,yA;
};
enum EGameState
{
GAME_STATE_PAUSE,
GAME_STATE_PLAY,
};
struct Game
{
SDL_Window* window;
SDL_Renderer* renderer;
int width, height;
unsigned int tick;
EGameState state;
Ball boll;
unsigned int score0, score1;
Paddle left;
Paddle right;
bool start;
};
void initialize_boll(Ball* boll, float x, float y)
{
boll->x = x;// = 502;
boll->y = y;// = 310;
boll->xA = 0.0f; //= 50;
boll->yA = 0.0f; //= -50;
}
void initialize_paddle(Paddle* paddle, float x, float y)
{
paddle->input[0] = […]
Two weeks of programming
Well, it’s been two weeks since my last post, so I’ll go through what I’ve done the past weeks.
Last week we were introduced to network programming, which I’m very interested in and have been ever since I played Diablo II with my best friend, wanting to learn how it ticked.
It isn’t my first contact with networking in practice or theory, back in high-school I went to a networking course where we learned the OSI-model among others. even if it was […]
Two weeks of programming
Well, it’s been two weeks since my last post, so I’ll go through what I’ve done the past weeks.
Last week we were introduced to network programming, which I’m very interested in and have been ever since I played Diablo II with my best friend, wanting to learn how it ticked.
It isn’t my first contact with networking in practice or theory, back in high-school I went to a networking course where we learned the OSI-model among others. even if it was […]
Two weeks of programming
Well, it’s been two weeks since my last post, so I’ll go through what I’ve done the past weeks.
Last week we were introduced to network programming, which I’m very interested in and have been ever since I played Diablo II with my best friend, wanting to learn how it ticked.
It isn’t my first contact with networking in practice or theory, back in high-school I went to a networking course where we learned the OSI-model among others. even if it was […]
Two weeks of programming
Well, it’s been two weeks since my last post, so I’ll go through what I’ve done the past weeks.
Last week we were introduced to network programming, which I’m very interested in and have been ever since I played Diablo II with my best friend, wanting to learn how it ticked.
It isn’t my first contact with networking in practice or theory, back in high-school I went to a networking course where we learned the OSI-model among others. even if it was […]