Browsing '2014 ': Students starting in 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, […]

/ Comments Off on Third Week of Programming: Back from vacation and Tic Tac Toe
Program: Programming

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, […]

/ Comments Off on Third Week of Programming: Back from vacation and Tic Tac Toe
Program: Programming

Game programming: Week two & three

Week two started off with an introduction to ArraysMemory 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 […]

/ Comments Off on Game programming: Week two & three
Program: Programming

Game programming: Week two & three

Week two started off with an introduction to ArraysMemory 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 […]

/ Comments Off on Game programming: Week two & three
Program: Programming

Game programming: Week two & three

Week two started off with an introduction to ArraysMemory 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 […]

/ Comments Off on Game programming: Week two & three
Program: Programming

Game programming: Week two & three

Week two started off with an introduction to ArraysMemory 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 […]

/ Comments Off on Game programming: Week two & three
Program: Programming

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 […]

/ Comments Off on Programming – Week 3
Program: Programming

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 […]

/ Comments Off on Programming – Week 3
Program: Programming

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 […]

/ Comments Off on Programming – Week 3
Program: Programming

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 […]

/ Comments Off on Programming – Week 3
Program: Programming

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] = […]

/ Comments Off on Programmering V.2
Program: Programming

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] = […]

/ Comments Off on Programmering V.2
Program: Programming

Week 3 of Game Programming 1 – Classes

In this week of game programming, we have worked with classes. A class holds values, the amount and type of values is decided by the programmer. To learn how classes work, we had a bunch of different assignments. The assignment I chose to focus on was to make a deck of cards. I chose to focus on this because it demonstrate really well how classes work together. I made a class called Card, this class held the types Integer and String. […]

/ Comments Off on Week 3 of Game Programming 1 – Classes
Program: Programming

Week 3 of Game Programming 1 – Classes

In this week of game programming, we have worked with classes. A class holds values, the amount and type of values is decided by the programmer. To learn how classes work, we had a bunch of different assignments. The assignment I chose to focus on was to make a deck of cards. I chose to focus on this because it demonstrate really well how classes work together. I made a class called Card, this class held the types Integer and String. […]

/ Comments Off on Week 3 of Game Programming 1 – Classes
Program: Programming

Week two and three

Hello world!
The first week was easy enough, but the second week was rough, really rough. In the classes I barely understood  anything the teacher went through and it took quite a while to learn and understand it. The 20 exercises that we had for the second week were difficult and took me until the middle of the third week to complete, so that put me back quite a bit. I started studying after the classes with some of the other […]

/ Comments Off on Week two and three
Program: Programming

Week two and three

Hello world!
The first week was easy enough, but the second week was rough, really rough. In the classes I barely understood  anything the teacher went through and it took quite a while to learn and understand it. The 20 exercises that we had for the second week were difficult and took me until the middle of the third week to complete, so that put me back quite a bit. I started studying after the classes with some of the other […]

/ Comments Off on Week two and three
Program: Programming

Week two and three

Hello world!
The first week was easy enough, but the second week was rough, really rough. In the classes I barely understood  anything the teacher went through and it took quite a while to learn and understand it. The 20 exercises that we had for the second week were difficult and took me until the middle of the third week to complete, so that put me back quite a bit. I started studying after the classes with some of the other […]

/ Comments Off on Week two and three
Program: Programming

Week two and three

Hello world!
The first week was easy enough, but the second week was rough, really rough. In the classes I barely understood  anything the teacher went through and it took quite a while to learn and understand it. The 20 exercises that we had for the second week were difficult and took me until the middle of the third week to complete, so that put me back quite a bit. I started studying after the classes with some of the other […]

/ Comments Off on Week two and three
Program: Programming

Further Character Design

This week we did turnaround and character drawings, based on our thumbnails two weeks ago.
I decided to pick the third thumbnail, with elements of one and fourteen, because I felt like the assymetric design and the unusually large shoulder guards blended well with the concept, and would be the most interesting character to design for. With some advice from a friend.
In the end, this character came out…

As for drawing of her in a relaxed stance…

November 30, 2014 / Comments Off on Further Character Design
Program: Graphics

Further Character Design

This week we did turnaround and character drawings, based on our thumbnails two weeks ago.
I decided to pick the third thumbnail, with elements of one and fourteen, because I felt like the assymetric design and the unusually large shoulder guards blended well with the concept, and would be the most interesting character to design for. With some advice from a friend.
In the end, this character came out…

As for drawing of her in a relaxed stance…

November 30, 2014 / Comments Off on Further Character Design
Program: Graphics

Further Character Design

This week we did turnaround and character drawings, based on our thumbnails two weeks ago.
I decided to pick the third thumbnail, with elements of one and fourteen, because I felt like the assymetric design and the unusually large shoulder guards blended well with the concept, and would be the most interesting character to design for. With some advice from a friend.
In the end, this character came out…

As for drawing of her in a relaxed stance…

November 30, 2014 / Comments Off on Further Character Design
Program: Graphics

Further Character Design

This week we did turnaround and character drawings, based on our thumbnails two weeks ago.
I decided to pick the third thumbnail, with elements of one and fourteen, because I felt like the assymetric design and the unusually large shoulder guards blended well with the concept, and would be the most interesting character to design for. With some advice from a friend.
In the end, this character came out…

As for drawing of her in a relaxed stance…

November 30, 2014 / Comments Off on Further Character Design
Program: Graphics

Well, oops

I forgot to update last week. As an apology, you’ll get a double update now.

This is what I made the week I forgot to update, as we learned about two-point perspective at the time.
I had already heard of the tools and practiced with them when I heard of them here, so it was more of a jog of the memory, but it did help in allowing me to see more uses of it, and gave me some much-needed practice […]

/ Comments Off on Well, oops
Program: Graphics

Well, oops

I forgot to update last week. As an apology, you’ll get a double update now.

This is what I made the week I forgot to update, as we learned about two-point perspective at the time.
I had already heard of the tools and practiced with them when I heard of them here, so it was more of a jog of the memory, but it did help in allowing me to see more uses of it, and gave me some much-needed practice […]

/ Comments Off on Well, oops
Program: Graphics