Year: 2019

C++ Learning Agents – PART 5 of 6

So far we’ve implemented our UFOs, provided them with neural networks, and started our genetic algorithm. Which means we’re almost finished the series. This week we’ll look at these topics:
We need a way of defining if a UFO is ‘fitter’ than another one.
We need a method of selecting the UFOs from the pool based on their fitness.
Once two UFOs are selected from the pool we need a method of combining their neural networks to create a new network.

Projectiles are now removed on contact.

C++ Game Dev 39: Removing Projectile on Collision

17 Comments

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 Dev 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.