Author Archives: Niklas Svantesson

Game Programming I – Assignment day 16

Cleaned up some of the code today.
Made a collision manager and started working on collision.
Unfortunately  there was little progress.
I think I successfully made a method to create colliders for objects and I will put these into a vector for the manager.
The collider manager will then check collisions, after which it will need to tell another part of the program that a collision(or rather an overlap) has happened and between which colliders it did happen.

/ Comments Off on Game Programming I – Assignment day 16
Program: Programming

Game Programming I – Assignment day 16

Cleaned up some of the code today.
Made a collision manager and started working on collision.
Unfortunately  there was little progress.
I think I successfully made a method to create colliders for objects and I will put these into a vector for the manager.
The collider manager will then check collisions, after which it will need to tell another part of the program that a collision(or rather an overlap) has happened and between which colliders it did happen.

/ Comments Off on Game Programming I – Assignment day 16
Program: Programming

Game Programming – Assignment day 15

Fixed Gamestate now, when the game starts you go into the gamestate by writing ”new” into the console and press enter, you exit by pressing escape.
Upon exiting the gamestate you are taken back to the console and can write ”new” again to start a new gamestate.
You can also write ”quit” in the console to exit the program altogether.
When pressing space a bullet objects gets positioned right above the player object.
Received some help to get the ”isDOWNonce” function to work properly, […]

/ Comments Off on Game Programming – Assignment day 15
Program: Programming

Game Programming – Assignment day 15

Fixed Gamestate now, when the game starts you go into the gamestate by writing ”new” into the console and press enter, you exit by pressing escape.
Upon exiting the gamestate you are taken back to the console and can write ”new” again to start a new gamestate.
You can also write ”quit” in the console to exit the program altogether.
When pressing space a bullet objects gets positioned right above the player object.
Received some help to get the ”isDOWNonce” function to work properly, […]

/ Comments Off on Game Programming – Assignment day 15
Program: Programming

Game Programming – Assignment day 14

Created the State manager class and several state classes.
Need to move the code in engine to the game state class.
Tried improving the way the player start position was loaded from a file, will need to get back on that.
Managed to make a bullet object spawn at the player ship cannon. Now I need a way to make it move as well as a way to make it possible for several bullets to exist at the same time, states will no […]

/ Comments Off on Game Programming – Assignment day 14
Program: Programming

Game Programming – Assignment day 14

Created the State manager class and several state classes.
Need to move the code in engine to the game state class.
Tried improving the way the player start position was loaded from a file, will need to get back on that.
Managed to make a bullet object spawn at the player ship cannon. Now I need a way to make it move as well as a way to make it possible for several bullets to exist at the same time, states will no […]

/ Comments Off on Game Programming – Assignment day 14
Program: Programming

Game Programming – Assignment day 13

Started on the bullet class today.
Made a bullet that spawns on the screen at coordinates x100 y100, will change this later to be dependent on the player’s position.
The bullet moves upwards slightly faster than the player, may change this later to be much faster than the player speed.
Created a bool method called ”Fire” in the player class that returns true when space is pressed.
The intention is to make bullet objects spawn at the players cannon when pressing space using the […]

/ Comments Off on Game Programming – Assignment day 13
Program: Programming

Game Programming – Assignment day 13

Started on the bullet class today.
Made a bullet that spawns on the screen at coordinates x100 y100, will change this later to be dependent on the player’s position.
The bullet moves upwards slightly faster than the player, may change this later to be much faster than the player speed.
Created a bool method called ”Fire” in the player class that returns true when space is pressed.
The intention is to make bullet objects spawn at the players cannon when pressing space using the […]

/ Comments Off on Game Programming – Assignment day 13
Program: Programming

Game Programming I – day 12

Added a function to read the player start position from a txt-file.
I will attempt to move this to a separate class, right now it is written into the engine´s initialize.
Hopefully we will soon be able to load level objects and enemies onto the screen from a separate file as well.
We are also supposed to make a function that saves data from a game session to be used again later, in other words a function that writes to files.
Maybe we can […]

/ Comments Off on Game Programming I – day 12
Program: Programming

Game Programming I – day 12

Added a function to read the player start position from a txt-file.
I will attempt to move this to a separate class, right now it is written into the engine´s initialize.
Hopefully we will soon be able to load level objects and enemies onto the screen from a separate file as well.
We are also supposed to make a function that saves data from a game session to be used again later, in other words a function that writes to files.
Maybe we can […]

/ Comments Off on Game Programming I – day 12
Program: Programming

Game Programming I – Assignment day 11

Added the soundclasses I’ve made to the main game project.
Overall they work, but some things will probably need to be fixed. For example, while there is no problem with the music, the sound to be played when pressing space get’s played several times simultaneously.
Probably the key input is being read several times so I tried adding the isDOWNonce function to the input, however that only helped slightly, perhaps I need to add a delay to the play function in soundclip…
 
 
 
 
 
 
 
[…]

/ Comments Off on Game Programming I – Assignment day 11
Program: Programming

Game Programming I – Assignment day 11

Added the soundclasses I’ve made to the main game project.
Overall they work, but some things will probably need to be fixed. For example, while there is no problem with the music, the sound to be played when pressing space get’s played several times simultaneously.
Probably the key input is being read several times so I tried adding the isDOWNonce function to the input, however that only helped slightly, perhaps I need to add a delay to the play function in soundclip…
 
 
 
 
 
 
 
[…]

/ Comments Off on Game Programming I – Assignment day 11
Program: Programming

Game Programming I – Assignment day 10

Fixed the problem with the sound classes.
Turns out I forgot to – #pragma comment – the SDL and SDL_mixer libraries so it could not find the Mix-functions my classes called upon.
The sound works now with the exception of the stop function.
Very frustrating looking all over the place for a solution only to discover that you only forgot that one little thing….

/ Comments Off on Game Programming I – Assignment day 10
Program: Programming

Game Programming I – Assignment day 10

Fixed the problem with the sound classes.
Turns out I forgot to – #pragma comment – the SDL and SDL_mixer libraries so it could not find the Mix-functions my classes called upon.
The sound works now with the exception of the stop function.
Very frustrating looking all over the place for a solution only to discover that you only forgot that one little thing….

/ Comments Off on Game Programming I – Assignment day 10
Program: Programming

Game Programming – Assignment day 9

Continued working on the soundclip, musicclip and soundmanager classes today, encountered some problems while trying to test them.
I got a build error saying I had 15 unresolved externals, not sure what it’s supposed to mean.
As I understand it ”unresolved external” means I have made something in a header file that has not been defined in a source file, but I can find no such thing, certainly not 15.
 
I also helped my co-worker find and correct an error with the collision […]

/ Comments Off on Game Programming – Assignment day 9
Program: Programming

Game Programming – Assignment day 9

Continued working on the soundclip, musicclip and soundmanager classes today, encountered some problems while trying to test them.
I got a build error saying I had 15 unresolved externals, not sure what it’s supposed to mean.
As I understand it ”unresolved external” means I have made something in a header file that has not been defined in a source file, but I can find no such thing, certainly not 15.
 
I also helped my co-worker find and correct an error with the collision […]

/ Comments Off on Game Programming – Assignment day 9
Program: Programming

Game Programming I – Assignment day 8

Started working on sounds for our game. Found some music and sound clips to start out with and put them in a sound folder.
Started making the SoundClip, MusicClip and SoundManager classes.

/ Comments Off on Game Programming I – Assignment day 8
Program: Programming

Game Programming I – Assignment day 8

Started working on sounds for our game. Found some music and sound clips to start out with and put them in a sound folder.
Started making the SoundClip, MusicClip and SoundManager classes.

/ Comments Off on Game Programming I – Assignment day 8
Program: Programming

Game Programming I – Assignment day 7

Working on an input function so we can move the player around on the screen with either WASD or the arrows on the keyboard.

/ Comments Off on Game Programming I – Assignment day 7
Program: Programming

Game Programming I – Assignment day 7

Working on an input function so we can move the player around on the screen with either WASD or the arrows on the keyboard.

/ Comments Off on Game Programming I – Assignment day 7
Program: Programming

Testing

Having problems enabling comments, posting this to see if it only applies to old posts.

/ Comments Off on Testing
Program: Programming

Testing

Having problems enabling comments, posting this to see if it only applies to old posts.

/ Comments Off on Testing
Program: Programming

Game programming I – assignment day 6

Fixed the sprite issue today.
Stated working on making the player move. Made a vector2 class.
Updated Schedule:
week 50: window/player
week 51: sprite/map
week 52 Enemies/ Collision
Week 1: music/ states
Week 2: polish / particle effect / buffer time
week 3: report

/ Comments Off on Game programming I – assignment day 6
Program: Programming

Game programming I – assignment day 6

Fixed the sprite issue today.
Stated working on making the player move. Made a vector2 class.
Updated Schedule:
week 50: window/player
week 51: sprite/map
week 52 Enemies/ Collision
Week 1: music/ states
Week 2: polish / particle effect / buffer time
week 3: report

/ Comments Off on Game programming I – assignment day 6
Program: Programming