Browsing 'Programming': Posts from Game Design and 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

Frogger Dev. Post 19

I haven’t actually posted anything in quite a while so I better get back in business before I make a habit out of forgetting to post. Truth is that I haven’t done that much work these last three days, so instead of posting three small posts I decided to combine them into one big post.
Overall, what I’ve done is that I’ve made is that I’ve made a more flexible menu system. Basically I have a state which has several “substates” […]

/ Comments Off on Frogger Dev. Post 19
Program: Programming

Frogger Dev. Post 19

I haven’t actually posted anything in quite a while so I better get back in business before I make a habit out of forgetting to post. Truth is that I haven’t done that much work these last three days, so instead of posting three small posts I decided to combine them into one big post.
Overall, what I’ve done is that I’ve made is that I’ve made a more flexible menu system. Basically I have a state which has several “substates” […]

/ Comments Off on Frogger Dev. Post 19
Program: Programming

If it’s worth doing, it’s worth overdoing.

Hello again.I know it has been quite for some time now, but in the middle of studies, studies, canceled ferries, more studies, Christmas, working with studies during the Christmas break and even more studies, I haven’t had much chance to write here.
Anyway, lets write a blog post about programming and one of the assignments we have in that course.
Assignment 2 – Develop a game
One assignment was to develop a simple video game and write a report about it. I choose […]

/ Comments Off on If it’s worth doing, it’s worth overdoing.
Program: Programming

If it’s worth doing, it’s worth overdoing.

Hello again.I know it has been quite for some time now, but in the middle of studies, studies, canceled ferries, more studies, Christmas, working with studies during the Christmas break and even more studies, I haven’t had much chance to write here.
Anyway, lets write a blog post about programming and one of the assignments we have in that course.
Assignment 2 – Develop a game
One assignment was to develop a simple video game and write a report about it. I choose […]

/ Comments Off on If it’s worth doing, it’s worth overdoing.
Program: Programming

Audio sliders

Today I made audio slider for our options state.There is one sound slider, one music slider and one master audio slider.
The master audio slider goes from 0.0 to 1.0
The sound and music slider goes from 0 – 128
So for example, when I have the music slider on 64 and the master slider on 0.5, my music will play at volume 64 * 0.5 = 32!

/ Comments Off on Audio sliders
Program: Programming

Audio sliders

Today I made audio slider for our options state.There is one sound slider, one music slider and one master audio slider.
The master audio slider goes from 0.0 to 1.0
The sound and music slider goes from 0 – 128
So for example, when I have the music slider on 64 and the master slider on 0.5, my music will play at volume 64 * 0.5 = 32!

/ Comments Off on Audio sliders
Program: Programming

Day 16, Animation in place!

Thanks to Stefan we got our Animation class. The class files was in our shared Dropbox when i woke up and ready to be implemented. I had to change in some other files to get it to work.I then added a ItemObject class that are the powerups you get. For now there is only one powerup and it gives you an extra ball. Original arkanoid gives you 2 new balls I think but I think we settle for 1 new […]

/ Comments Off on Day 16, Animation in place!
Program: Programming

Day 16, Animation in place!

Thanks to Stefan we got our Animation class. The class files was in our shared Dropbox when i woke up and ready to be implemented. I had to change in some other files to get it to work.I then added a ItemObject class that are the powerups you get. For now there is only one powerup and it gives you an extra ball. Original arkanoid gives you 2 new balls I think but I think we settle for 1 new […]

/ Comments Off on Day 16, Animation in place!
Program: Programming

Programming Project, day 22 – part 2

There where some problems with the AI that I fixed. The GameSetupState now has settings for each player, the settings are “Player controlled”, “AI controlled” and “Inactive”.
You can’t click the “Start game” button unless there are 2 or more players active.

Only the active players are shown on the GameEndState.
 

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

Programming Project, day 22 – part 2

There where some problems with the AI that I fixed. The GameSetupState now has settings for each player, the settings are “Player controlled”, “AI controlled” and “Inactive”.
You can’t click the “Start game” button unless there are 2 or more players active.

Only the active players are shown on the GameEndState.
 

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

Programming assignment 2014-01-11

Today I’ve been reading up on different methods saving collision data while my co-worker worked on the collision manager, there seem to be one million different ways to do it but we have decided to try to make a way to check collision but also check what’s colliding because we want different things to happen to different types of collisions. 
Other than that I started to work on animation, which I have to modify to get it to work, in previous […]

/ Comments Off on Programming assignment 2014-01-11
Program: Programming

Programming assignment 2014-01-11

Today I’ve been reading up on different methods saving collision data while my co-worker worked on the collision manager, there seem to be one million different ways to do it but we have decided to try to make a way to check collision but also check what’s colliding because we want different things to happen to different types of collisions. 
Other than that I started to work on animation, which I have to modify to get it to work, in previous […]

/ Comments Off on Programming assignment 2014-01-11
Program: Programming

Game Programming – Assignment day 17

Continued working on collsion manager today.
I seemed to have managed to make the manager create colliders for game objects and save them in a vector.
I also managed to write out the collider position (x and y coordinates) while the game was running as well as writing out a message when the two positions were identical.
One step closer to proper collision detection.

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

Game Programming – Assignment day 17

Continued working on collsion manager today.
I seemed to have managed to make the manager create colliders for game objects and save them in a vector.
I also managed to write out the collider position (x and y coordinates) while the game was running as well as writing out a message when the two positions were identical.
One step closer to proper collision detection.

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

Programming Assignment – Arkanoid themes

Anton and I worked on our game yesterday, I created some graphics for our game that we needed. We are going to let the players use custom themes by using Boost File-system to find folders and their name. So that the only thing you need to do to create a new theme is to add a folder with your graphics in the themes folder and the game will automatically find them and add them to in the options menu.
Well, that’s […]

/ Comments Off on Programming Assignment – Arkanoid themes
Program: Programming

Programming Assignment – Arkanoid themes

Anton and I worked on our game yesterday, I created some graphics for our game that we needed. We are going to let the players use custom themes by using Boost File-system to find folders and their name. So that the only thing you need to do to create a new theme is to add a folder with your graphics in the themes folder and the game will automatically find them and add them to in the options menu.
Well, that’s […]

/ Comments Off on Programming Assignment – Arkanoid themes
Program: Programming

Moving an object

The player object was needed to be created on the txt file, get a start position and start moving throughout the whole gamespace.
It took me a while but for the most part is was just copying my professors code. After some help knowing why a few things didn’t help

/ Comments Off on Moving an object
Program: Programming

Moving an object

The player object was needed to be created on the txt file, get a start position and start moving throughout the whole gamespace.
It took me a while but for the most part is was just copying my professors code. After some help knowing why a few things didn’t help

/ Comments Off on Moving an object
Program: Programming

Shifiting to maximum overdrive

After counseling with a few students, my partner and both of my teachers I’ve managed to get an input manager done by combining the existing input.h to work as a manager. It wasn’t as hard as I thought but hey, nothing really is I am just really, really stupid I guess.
I finished a water object that spans over the whole top part of the map. A very interesting part is that it’s invisible with a background objects that you cannot […]

/ Comments Off on Shifiting to maximum overdrive
Program: Programming

Shifiting to maximum overdrive

After counseling with a few students, my partner and both of my teachers I’ve managed to get an input manager done by combining the existing input.h to work as a manager. It wasn’t as hard as I thought but hey, nothing really is I am just really, really stupid I guess.
I finished a water object that spans over the whole top part of the map. A very interesting part is that it’s invisible with a background objects that you cannot […]

/ Comments Off on Shifiting to maximum overdrive
Program: Programming