🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

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

Published January 22, 2015
Advertisement
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!
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement