Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

Firework Factory - Junctions, Crates and Exits all playing nicely together

Sign in to follow this  


Hi everyone,

Another day, another journal entry!

Today I have integrated a bunch of disparate parts of the game together, and we are finally reaching the point where all the unconnected parts start to join together to form a playable, complete whole.

The junctions, demonstrated in my second journal entry before Christmas, are now correctly tied into the simulation, as are the machines, demonstrated in my previous blog post, and the level exit, which takes crates away from the playing area. These are all tied together by the Animation class, which can interpolate any object over time, adding rotations, position transformations, and scaling on all three axes.

For now, I spawn new crates for testing purposes by pressing the space bar - this will eventually be read from the level definition. Crates are stored to a std::vector, which is updated every time through the game loop: for (CrateListIter crate = activecrates.begin(); crate != activecrates.end();) { Crate* c = *crate; if (c->Exploded || c->CorrectlyExited) { crate = activecrates.erase(crate); } else { (*crate)->OnUpdate(); ++crate; } }
Whenever a crate explodes (they don't actually do this yet) or correctly exits via the exit, it is removed from play. For now, falling off the edge is treated the same as exploding.

As you can see later in the video, there is no collision detection as of yet - this is possibly next on my to-do list, and along with it comes connecting the particle emitter to the collision, which brings with it effects and other related goodness smile.png

Stay tuned for further updates, and as always, comments are welcome!

Sign in to follow this  


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!