Browsing '5SD022': Game Programming I

BAH!

First of all i got nothing done during the weekend.
Secondly, i ran into some issue with the animation for the turtle object. My idea was to give the object two AnimatedSprites and switch between them as the turtle went under water. For some reason the code straight out didn’t work. so i ended up trying to find the issue all day. I could have thought of another way to make the animations but i felt like i had most of […]

/ Comments Off on BAH!
Program: Programming

BAH!

First of all i got nothing done during the weekend.
Secondly, i ran into some issue with the animation for the turtle object. My idea was to give the object two AnimatedSprites and switch between them as the turtle went under water. For some reason the code straight out didn’t work. so i ended up trying to find the issue all day. I could have thought of another way to make the animations but i felt like i had most of […]

/ Comments Off on BAH!
Program: Programming

Epic winning! Post #5

Productive day!
Today we made the win condition, defeat condition and set up a life counter so it’s not game over instantly. The win condition was rather simple to implement as Fabian already made a counter for the bricks. So we simply set the global speed to zero and popped a “Victory” banner when the bricks reaches zero. As for the defeat condition it was a bit more complex than that, but it still went past somewhat fast. Instead of checking […]

/ Comments Off on Epic winning! Post #5
Program: Programming

Epic winning! Post #5

Productive day!
Today we made the win condition, defeat condition and set up a life counter so it’s not game over instantly. The win condition was rather simple to implement as Fabian already made a counter for the bricks. So we simply set the global speed to zero and popped a “Victory” banner when the bricks reaches zero. As for the defeat condition it was a bit more complex than that, but it still went past somewhat fast. Instead of checking […]

/ Comments Off on Epic winning! Post #5
Program: Programming

Game over state, new graphics and multiple levels

Today me and Laban got a lot working.
We created a game over state which does nothing expect getting us back to the menu state.We have new graphics for the borders and the drops.
A level indicator was added on top of game area that shows you which level you are currently on.And when you finish a level, a small “award” kind of sound will play and change level.

/ Comments Off on Game over state, new graphics and multiple levels
Program: Programming

Game over state, new graphics and multiple levels

Today me and Laban got a lot working.
We created a game over state which does nothing expect getting us back to the menu state.We have new graphics for the borders and the drops.
A level indicator was added on top of game area that shows you which level you are currently on.And when you finish a level, a small “award” kind of sound will play and change level.

/ Comments Off on Game over state, new graphics and multiple levels
Program: Programming

KreakOut #7 – To rage, or not to rage. That is the gameplay.

So, I guess we can actually call it a game now (and it’s pretty fun actually). Right now you got three lives until you get defeated, unless you destroy all the blocks (or close the game).
Code-wise, not much to mention. We had some problems with showing just normal sprites (since everything has been objects so far), but it worked with the older version of the function.
Next on our to-do list:

Soundmanager
User Interface
A nicer way of respawning the ball (you can die […]

/ Comments Off on KreakOut #7 – To rage, or not to rage. That is the gameplay.
Program: Programming

KreakOut #7 – To rage, or not to rage. That is the gameplay.

So, I guess we can actually call it a game now (and it’s pretty fun actually). Right now you got three lives until you get defeated, unless you destroy all the blocks (or close the game).
Code-wise, not much to mention. We had some problems with showing just normal sprites (since everything has been objects so far), but it worked with the older version of the function.
Next on our to-do list:

Soundmanager
User Interface
A nicer way of respawning the ball (you can die […]

/ Comments Off on KreakOut #7 – To rage, or not to rage. That is the gameplay.
Program: Programming

Spelprogrammering – Assignment – 10, 11, 12 & 13

Finally getting a hang of it. Spent the entire weekend working on Sprites, Collision (there’s two separate colliders now, one hard-coded for the paddle and the ball and one that functions between the ball and the bricks) and figuring out a way to remove bricks when collided with, which actually works now.
Day 10: The Collision is put in place. There’s two separate ones, one of them, the hard-coded one (yes, it’s not the best way of doing it, but the […]

/ Comments Off on Spelprogrammering – Assignment – 10, 11, 12 & 13
Program: Programming

Spelprogrammering – Assignment – 10, 11, 12 & 13

Finally getting a hang of it. Spent the entire weekend working on Sprites, Collision (there’s two separate colliders now, one hard-coded for the paddle and the ball and one that functions between the ball and the bricks) and figuring out a way to remove bricks when collided with, which actually works now.
Day 10: The Collision is put in place. There’s two separate ones, one of them, the hard-coded one (yes, it’s not the best way of doing it, but the […]

/ Comments Off on Spelprogrammering – Assignment – 10, 11, 12 & 13
Program: Programming

Game Programming I – Assignment day 19

Today I corrected the collision manager.
I removed the vector colliderID because it was unnecessary and unreliable.
I have made a foe class to keep track on enemy objects by giving them their own extension values rather than 0.0 which they would have as entities.
I started working on a checkcollision method for the collsion manager.
It now goes through the collider vector and checks if any overlap.
I need to know which colliders overlap however so I might have to redo it as I […]

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

Game Programming I – Assignment day 19

Today I corrected the collision manager.
I removed the vector colliderID because it was unnecessary and unreliable.
I have made a foe class to keep track on enemy objects by giving them their own extension values rather than 0.0 which they would have as entities.
I started working on a checkcollision method for the collsion manager.
It now goes through the collider vector and checks if any overlap.
I need to know which colliders overlap however so I might have to redo it as I […]

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

Sound


We managed to get the sound working today. Not the best sound effects but it’s far better than nothing!
When we tested the sound we found a bug.
The pad jumped in the x-axis if it was moving in to a wall when the ball hit a brick.

/ Comments Off on Sound
Program: Programming

Sound


We managed to get the sound working today. Not the best sound effects but it’s far better than nothing!
When we tested the sound we found a bug.
The pad jumped in the x-axis if it was moving in to a wall when the ball hit a brick.

/ Comments Off on Sound
Program: Programming

Game Programming I – Assingment day 18

Bullets now have a life of 100 frames.
After that they get removed from the bullet vector.
Also added a limit on how many bullet objects can exist at the same time.
Also made a second vector for the Collision Manager that stores the id of the collider.
Needed to add a string option for Entity class which is the name of the object.

/ Comments Off on Game Programming I – Assingment day 18
Program: Programming

Game Programming I – Assingment day 18

Bullets now have a life of 100 frames.
After that they get removed from the bullet vector.
Also added a limit on how many bullet objects can exist at the same time.
Also made a second vector for the Collision Manager that stores the id of the collider.
Needed to add a string option for Entity class which is the name of the object.

/ Comments Off on Game Programming I – Assingment day 18
Program: Programming

KreakOut #6 – Bricks shall be animated

Do I need to mention more? We actually had support for animated sprites from the very beginning, but none of us got it to work. Apparently, I forgot a certain small detail in the GameObjects that made them change the animation-frame.
if (m_current_animation != nullptr)
{
m_current_animation->Update(deltatime);
}

Other than that, we spent even more time on that StateManager, felt sorry about ourselves and some graphics (because we obviously know how that works). And we also worked on getting some win-conditions, because that’s apparently needed.
Next […]

/ Comments Off on KreakOut #6 – Bricks shall be animated
Program: Programming

KreakOut #6 – Bricks shall be animated

Do I need to mention more? We actually had support for animated sprites from the very beginning, but none of us got it to work. Apparently, I forgot a certain small detail in the GameObjects that made them change the animation-frame.
if (m_current_animation != nullptr)
{
m_current_animation->Update(deltatime);
}

Other than that, we spent even more time on that StateManager, felt sorry about ourselves and some graphics (because we obviously know how that works). And we also worked on getting some win-conditions, because that’s apparently needed.
Next […]

/ Comments Off on KreakOut #6 – Bricks shall be animated
Program: Programming

Man(ager) over board! Post #4

Sunday afternoon, and I haven’t blogged since thursday I think. That’s rather bad.
I’ve spent the weekend working on our statemanager, or rather our so called LoadingState, which is pretty much just a splash screen to show a picture before heading into a menu and then the game. Making that happen, the whole showing a picture->switch to the menu is simple, although we don’t actuallly have a menu right now. So it just heads into the game which is fine.
The more […]

/ Comments Off on Man(ager) over board! Post #4
Program: Programming

Man(ager) over board! Post #4

Sunday afternoon, and I haven’t blogged since thursday I think. That’s rather bad.
I’ve spent the weekend working on our statemanager, or rather our so called LoadingState, which is pretty much just a splash screen to show a picture before heading into a menu and then the game. Making that happen, the whole showing a picture->switch to the menu is simple, although we don’t actuallly have a menu right now. So it just heads into the game which is fine.
The more […]

/ Comments Off on Man(ager) over board! Post #4
Program: Programming

Programming Project, day 23 – Particle Effects!

I didn’t use math vectors, but the same principle. These are my direction and “movement” formulas. The direction variables are set between -1.0 and 1.0 and are then used when calculating “movement” of each particle.
m_fDirX = (rand()%200-100)/100.0f;
m_fDirY = (rand()%200-100)/100.0f;
m_fX += m_fDirX*m_fSpeed*p_fDeltaTime;
m_fY += m_fDirY*m_fSpeed*p_fDeltaTime;
There are other variables to the particles, this is most of them: a resize timer; an angle and an alpha;
This is the result! I’m very happy with it.





January 12, 2014 / Comments Off on Programming Project, day 23 – Particle Effects!
Program: Programming

Programming Project, day 23 – Particle Effects!

I didn’t use math vectors, but the same principle. These are my direction and “movement” formulas. The direction variables are set between -1.0 and 1.0 and are then used when calculating “movement” of each particle.
m_fDirX = (rand()%200-100)/100.0f;
m_fDirY = (rand()%200-100)/100.0f;
m_fX += m_fDirX*m_fSpeed*p_fDeltaTime;
m_fY += m_fDirY*m_fSpeed*p_fDeltaTime;
There are other variables to the particles, this is most of them: a resize timer; an angle and an alpha;
This is the result! I’m very happy with it.





January 12, 2014 / Comments Off on Programming Project, day 23 – Particle Effects!
Program: Programming

Programming Project, day 22 – part 3

I created particle effects but it still needs some work.
I need to make math vectors to do the math for this. I’m not that good with it right now so I guess that’ll take some time for me. On the flip side, I’ll learn a lot too.
I need the math vectors for calculating a random direction of the particles to travel in, a normalized vector. Right now I have a set direction because I waiting until the math vectors are […]

/ Comments Off on Programming Project, day 22 – part 3
Program: Programming

Programming Project, day 22 – part 3

I created particle effects but it still needs some work.
I need to make math vectors to do the math for this. I’m not that good with it right now so I guess that’ll take some time for me. On the flip side, I’ll learn a lot too.
I need the math vectors for calculating a random direction of the particles to travel in, a normalized vector. Right now I have a set direction because I waiting until the math vectors are […]

/ Comments Off on Programming Project, day 22 – part 3
Program: Programming