C++ Game Engine Development – Part 40 – First Friend

This week we are going to add a friend for the player. We’ll refractor the player creation code to reuse as much of it as possible and we’ll also create a new collision layer for the character and setup collisions between the player and his new friend.

C++ Game Engine Development – Part 39 – Removing Projectile on Collision

Last week we wrote the code that will enable communication between objects when they collide. This communication can happen at three stages of a collision: when the collision occurs, every frame the collision is maintained, and when the collision ends. This week we are going to write a new component for our projectile that will remove it from the game when it collides with another object (so when collision first happens). It will be a simple component but will hopefully show you how to respond to collision events.

C++ Game Engine Development – Part 38 – Collision Communication

This week we are continuing where we left off by editing the collision system to call the OnCollisionEnter, OnCollisionStay, and OnCollisionExit functions that we wrote last week. This will lay the groundwork for many future features that require interaction between colliding objects.

C++ Game Engine Development – Part 37 – Collidable Component

This week we will start work on a collision communication system. Currently, when two objects collide the only action they can take is to prevent the collision by moving apart, however what if we want more complicated behaviour? Such as causing damage to an enemy when the projectile collides with them or making the arrows disappear when they collide with a tile.

C++ Game Engine Development – Part 36 – Spawning Projectiles as Animation Action

This is part of an ongoing series where we write a complete 2D game engine in C++ and SFML. A new tutorial is released every Monday. You can find the complete list of tutorials here and download the source code from the projects GitHub page. We recently wrote a feature that enables us to call a function on […]

C++ Game Engine Development – Part 35 – Projectile Velocity and Collisions

This is part of an ongoing series where we write a complete 2D game engine in C++ and SFML. A new tutorial is released every Monday. You can find the complete list of tutorials here and download the source code from the projects GitHub page. This week we’ll continue working on our projectile system. By the end of […]

C++ Game Engine Development – Part 34 – Direction Component

This is part of an ongoing series where we write a complete 2D game engine in C++ and SFML. A new tutorial is released every Monday. You can find the complete list of tutorials here and download the source code from the projects GitHub page.A couple of weeks ago we started work on spawning projectile and ended up […]

C++ Game Engine Development – Part 33 – Shared Context

This is part of an ongoing series where we write a complete 2D game engine in C++ and SFML. A new tutorial is released every Monday. You can find the complete list of tutorials here and download the source code from the projects GitHub page.At the moment the classes we want to include in the context are: Input: […]

C++ Game Engine Development – Part 32 – Spawning Projectiles

This is part of an ongoing series where we write a complete 2D game engine in C++ and SFML. A new tutorial is released every Monday. You can find the complete list of tutorials here and download the source code from the projects GitHub page.Last week we added the final touches to our projectile animation however there is […]

C++ Game Engine Development – Part 31 – Finishing Projectile Animation

This is part of an ongoing series where we write a complete 2D game engine in C++ and SFML. A new tutorial is released every Monday. You can find the complete list of tutorials here and download the source code from the projects GitHub page.Last week I said that we would spend this week adding a method of […]