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 […]
Game Programming III – Blog Post 3
Gah! I just remembered that I forgot to write this. Oh well, I’ll just get right to it, I suppose.
The main thing that was accomplished this week was the completeness of the binary search tree. While the linked list wasn’t too difficult and the logic wasn’t too strange, the binary search tree was something different. The creation of the tree was probably the easiest as it simply followed a somewhat basic logic and most of the work was to […]
Game Programming III – Blog Post 3
Gah! I just remembered that I forgot to write this. Oh well, I’ll just get right to it, I suppose.
The main thing that was accomplished this week was the completeness of the binary search tree. While the linked list wasn’t too difficult and the logic wasn’t too strange, the binary search tree was something different. The creation of the tree was probably the easiest as it simply followed a somewhat basic logic and most of the work was to […]
Done with the Web Server! (Week 48)
So I managed to finish my web server.
When I started coding I managed to get something up and working in a few hours and I blogged about it last week, but then I realized that there was much more to assignment 2 so I got down to business.
First of all I had to figure out how a web browser operates. Something I knew nothing about. My classmate Jonas explained how the browser sends a “GET” request (e.g. GET […]
Done with the Web Server! (Week 48)
So I managed to finish my web server.
When I started coding I managed to get something up and working in a few hours and I blogged about it last week, but then I realized that there was much more to assignment 2 so I got down to business.
First of all I had to figure out how a web browser operates. Something I knew nothing about. My classmate Jonas explained how the browser sends a “GET” request (e.g. GET […]
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. […]
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. […]
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 […]
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 […]
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 […]
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 […]
Further Character Design
This week we did turnaround and character drawings, based on our thumbnails two weeks ago. 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…
Further Character Design
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…
Further Character Design
This week we did turnaround and character drawings, based on our thumbnails two weeks ago. 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…
Further Character Design
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…
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 […]
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 […]
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 […]
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 […]