├── Chapter01 ├── code │ └── Timber.cpp ├── fonts │ └── KOMIKAP_.ttf ├── graphics │ ├── axe.png │ ├── background.png │ ├── bee.png │ ├── branch.png │ ├── cloud.png │ ├── log.png │ ├── player.png │ ├── rip.png │ ├── tree.png │ └── tree2.png ├── low res │ └── Timber.cpp └── sound │ ├── chop.wav │ ├── death.wav │ └── out_of_time.wav ├── Chapter02 ├── code │ └── Timber.cpp ├── fonts │ └── KOMIKAP_.ttf ├── graphics │ ├── axe.png │ ├── background.png │ ├── bee.png │ ├── branch.png │ ├── cloud.png │ ├── log.png │ ├── player.png │ ├── rip.png │ ├── tree.png │ └── tree2.png ├── low res │ └── Timber.cpp └── sound │ ├── chop.wav │ ├── death.wav │ └── out_of_time.wav ├── Chapter03 ├── code │ └── Timber.cpp ├── fonts │ └── KOMIKAP_.ttf ├── graphics │ ├── axe.png │ ├── background.png │ ├── bee.png │ ├── branch.png │ ├── cloud.png │ ├── log.png │ ├── player.png │ ├── rip.png │ ├── tree.png │ └── tree2.png ├── low res │ └── Timber.cpp └── sound │ ├── chop.wav │ ├── death.wav │ └── out_of_time.wav ├── Chapter04 ├── code │ └── Timber.cpp ├── fonts │ └── KOMIKAP_.ttf ├── graphics │ ├── axe.png │ ├── background.png │ ├── bee.png │ ├── branch.png │ ├── cloud.png │ ├── log.png │ ├── player.png │ ├── rip.png │ ├── tree.png │ └── tree2.png ├── low res │ └── Timber.cpp └── sound │ ├── chop.wav │ ├── death.wav │ └── out_of_time.wav ├── Chapter05 ├── code │ └── Timber.cpp ├── fonts │ └── KOMIKAP_.ttf ├── graphics │ ├── axe.png │ ├── background.png │ ├── bee.png │ ├── branch.png │ ├── cloud.png │ ├── log.png │ ├── player.png │ ├── rip.png │ ├── tree.png │ └── tree2.png ├── low res │ └── Timber.cpp └── sound │ ├── chop.wav │ ├── death.wav │ └── out_of_time.wav ├── Chapter06 ├── Bat.cpp ├── Bat.h └── Pong.cpp ├── Chapter07 ├── Ball.cpp ├── Ball.h ├── Bat.cpp ├── Bat.h └── Pong.cpp ├── Chapter08 ├── code │ ├── Player.cpp │ ├── Player.h │ └── ZombieArena.cpp ├── graphics │ ├── ammo_icon.png │ ├── ammo_pickup.png │ ├── background.png │ ├── background_sheet.png │ ├── bloater.png │ ├── blood.png │ ├── chaser.png │ ├── crawler.png │ ├── crosshair.png │ ├── health_pickup.png │ ├── player.png │ └── sample.png └── sound │ ├── hit.wav │ ├── pickup.wav │ ├── powerup.wav │ ├── reload.wav │ ├── reload_failed.wav │ ├── shoot.wav │ └── splat.wav ├── Chapter09 ├── code │ ├── CreateBackground.cpp │ ├── Player.cpp │ ├── Player.h │ ├── ZombieArena.cpp │ └── ZombieArena.h ├── graphics │ ├── ammo_icon.png │ ├── ammo_pickup.png │ ├── background.png │ ├── background_originalsize.png │ ├── background_sheet.png │ ├── bloater.png │ ├── blood.png │ ├── chaser.png │ ├── crawler.png │ ├── crosshair.png │ ├── health_pickup.png │ ├── player.png │ └── sample.png └── sound │ ├── hit.wav │ ├── pickup.wav │ ├── powerup.wav │ ├── reload.wav │ ├── reload_failed.wav │ ├── shoot.wav │ └── splat.wav ├── Chapter10 ├── code │ ├── CreateBackground.cpp │ ├── CreateHorde.cpp │ ├── Player.cpp │ ├── Player.h │ ├── TextureHolder.cpp │ ├── TextureHolder.h │ ├── Zombie.cpp │ ├── Zombie.h │ ├── ZombieArena.cpp │ └── ZombieArena.h ├── graphics │ ├── ammo_icon.png │ ├── ammo_pickup.png │ ├── background.png │ ├── background_originalsize.png │ ├── background_sheet.png │ ├── bloater.png │ ├── blood.png │ ├── chaser.png │ ├── crawler.png │ ├── crosshair.png │ ├── health_pickup.png │ ├── player.png │ └── sample.png └── sound │ ├── hit.wav │ ├── pickup.wav │ ├── powerup.wav │ ├── reload.wav │ ├── reload_failed.wav │ ├── shoot.wav │ └── splat.wav ├── Chapter11 ├── code │ ├── Bullet.cpp │ ├── Bullet.h │ ├── CreateBackground.cpp │ ├── CreateHorde.cpp │ ├── Pickup.cpp │ ├── Pickup.h │ ├── Player.cpp │ ├── Player.h │ ├── TextureHolder.cpp │ ├── TextureHolder.h │ ├── Zombie.cpp │ ├── Zombie.h │ ├── ZombieArena.cpp │ └── ZombieArena.h ├── graphics │ ├── ammo_icon.png │ ├── ammo_pickup.png │ ├── background.png │ ├── background_originalsize.png │ ├── background_sheet.png │ ├── bloater.png │ ├── blood.png │ ├── chaser.png │ ├── crawler.png │ ├── crosshair.png │ ├── health_pickup.png │ ├── player.png │ └── sample.png └── sound │ ├── hit.wav │ ├── pickup.wav │ ├── powerup.wav │ ├── reload.wav │ ├── reload_failed.wav │ ├── shoot.wav │ └── splat.wav ├── Chapter12 ├── code │ ├── Bullet.cpp │ ├── Bullet.h │ ├── CreateBackground.cpp │ ├── CreateHorde.cpp │ ├── Pickup.cpp │ ├── Pickup.h │ ├── Player.cpp │ ├── Player.h │ ├── TextureHolder.cpp │ ├── TextureHolder.h │ ├── Zombie.cpp │ ├── Zombie.h │ ├── ZombieArena.cpp │ └── ZombieArena.h ├── graphics │ ├── ammo_icon.png │ ├── ammo_pickup.png │ ├── background.png │ ├── background_originalsize.png │ ├── background_sheet.png │ ├── bloater.png │ ├── blood.png │ ├── chaser.png │ ├── crawler.png │ ├── crosshair.png │ ├── health_pickup.png │ ├── player.png │ └── sample.png └── sound │ ├── hit.wav │ ├── pickup.wav │ ├── powerup.wav │ ├── reload.wav │ ├── reload_failed.wav │ ├── shoot.wav │ └── splat.wav ├── Chapter13 ├── code │ ├── Bullet.cpp │ ├── Bullet.h │ ├── CreateBackground.cpp │ ├── CreateHorde.cpp │ ├── Pickup.cpp │ ├── Pickup.h │ ├── Player.cpp │ ├── Player.h │ ├── TextureHolder.cpp │ ├── TextureHolder.h │ ├── Zombie.cpp │ ├── Zombie.h │ ├── ZombieArena.cpp │ └── ZombieArena.h ├── graphics │ ├── ammo_icon.png │ ├── ammo_pickup.png │ ├── background.png │ ├── background_originalsize.png │ ├── background_sheet.png │ ├── bloater.png │ ├── blood.png │ ├── chaser.png │ ├── crawler.png │ ├── crosshair.png │ ├── health_pickup.png │ ├── player.png │ └── sample.png └── sound │ ├── hit.wav │ ├── pickup.wav │ ├── powerup.wav │ ├── reload.wav │ ├── reload_failed.wav │ ├── shoot.wav │ └── splat.wav ├── Chapter14 ├── code │ ├── Draw.cpp │ ├── Engine.cpp │ ├── Engine.h │ ├── Input.cpp │ ├── Main.cpp │ ├── TextureHolder.cpp │ ├── TextureHolder.h │ └── Update.cpp ├── fonts │ └── README.txt ├── graphics │ ├── background.png │ ├── bob.png │ ├── thomas.png │ └── tiles_sheet.png ├── levels │ ├── level1.txt │ ├── level2.txt │ ├── level3.txt │ └── level4.txt ├── shaders │ ├── rippleShader.frag │ └── vertShader.vert └── sound │ ├── fallinfire.wav │ ├── fallinwater.wav │ ├── fire1.wav │ ├── jump.wav │ └── reachgoal.wav ├── Chapter15 ├── code │ ├── Bob.cpp │ ├── Bob.h │ ├── Draw.cpp │ ├── Engine.cpp │ ├── Engine.h │ ├── Input.cpp │ ├── Main.cpp │ ├── PlayableCharacter.cpp │ ├── PlayableCharacter.h │ ├── TextureHolder.cpp │ ├── TextureHolder.h │ ├── Thomas.cpp │ ├── Thomas.h │ └── Update.cpp ├── fonts │ └── README.txt ├── graphics │ ├── background.png │ ├── bob.png │ ├── thomas.png │ └── tiles_sheet.png ├── levels │ ├── level1.txt │ ├── level2.txt │ ├── level3.txt │ └── level4.txt ├── shaders │ ├── rippleShader.frag │ └── vertShader.vert └── sound │ ├── fallinfire.wav │ ├── fallinwater.wav │ ├── fire1.wav │ ├── jump.wav │ └── reachgoal.wav ├── Chapter16 ├── code │ ├── Bob.cpp │ ├── Bob.h │ ├── DetectCollisions.cpp │ ├── Draw.cpp │ ├── Engine.cpp │ ├── Engine.h │ ├── Input.cpp │ ├── LevelManager.cpp │ ├── LevelManager.h │ ├── LoadLevel.cpp │ ├── Main.cpp │ ├── PlayableCharacter.cpp │ ├── PlayableCharacter.h │ ├── TextureHolder.cpp │ ├── TextureHolder.h │ ├── Thomas.cpp │ ├── Thomas.h │ └── Update.cpp ├── fonts │ └── README.txt ├── graphics │ ├── background.png │ ├── bob.png │ ├── thomas.png │ └── tiles_sheet.png ├── levels │ ├── level1.txt │ ├── level2.txt │ ├── level3.txt │ └── level4.txt ├── shaders │ ├── rippleShader.frag │ └── vertShader.vert └── sound │ ├── fallinfire.wav │ ├── fallinwater.wav │ ├── fire1.wav │ ├── jump.wav │ └── reachgoal.wav ├── Chapter17 ├── code │ ├── Bob.cpp │ ├── Bob.h │ ├── DetectCollisions.cpp │ ├── Draw.cpp │ ├── Engine.cpp │ ├── Engine.h │ ├── HUD.cpp │ ├── HUD.h │ ├── Input.cpp │ ├── LevelManager.cpp │ ├── LevelManager.h │ ├── LoadLevel.cpp │ ├── Main.cpp │ ├── PlayableCharacter.cpp │ ├── PlayableCharacter.h │ ├── PopulateEmitters.cpp │ ├── SoundManager.cpp │ ├── SoundManager.h │ ├── TextureHolder.cpp │ ├── TextureHolder.h │ ├── Thomas.cpp │ ├── Thomas.h │ └── Update.cpp ├── fonts │ └── README.txt ├── graphics │ ├── background.png │ ├── bob.png │ ├── thomas.png │ └── tiles_sheet.png ├── levels │ ├── level1.txt │ ├── level2.txt │ ├── level3.txt │ └── level4.txt ├── shaders │ ├── rippleShader.frag │ └── vertShader.vert └── sound │ ├── fallinfire.wav │ ├── fallinwater.wav │ ├── fire1.wav │ ├── jump.wav │ └── reachgoal.wav ├── Chapter18 ├── code │ ├── Bob.cpp │ ├── Bob.h │ ├── DetectCollisions.cpp │ ├── Draw.cpp │ ├── Engine.cpp │ ├── Engine.h │ ├── HUD.cpp │ ├── HUD.h │ ├── Input.cpp │ ├── LevelManager.cpp │ ├── LevelManager.h │ ├── LoadLevel.cpp │ ├── Main.cpp │ ├── Particle.cpp │ ├── Particle.h │ ├── ParticleSystem.cpp │ ├── ParticleSystem.h │ ├── PlayableCharacter.cpp │ ├── PlayableCharacter.h │ ├── PopulateEmitters.cpp │ ├── SoundManager.cpp │ ├── SoundManager.h │ ├── TextureHolder.cpp │ ├── TextureHolder.h │ ├── Thomas.cpp │ ├── Thomas.h │ └── Update.cpp ├── fonts │ └── README.txt ├── graphics │ ├── background.png │ ├── bob.png │ ├── thomas.png │ └── tiles_sheet.png ├── levels │ ├── level1.txt │ ├── level2.txt │ ├── level3.txt │ └── level4.txt ├── shaders │ ├── rippleShader.frag │ └── vertShader.vert └── sound │ ├── fallinfire.wav │ ├── fallinwater.wav │ ├── fire1.wav │ ├── jump.wav │ └── reachgoal.wav ├── Chapter19 └── Space Invaders ++ │ ├── BitmapStore.cpp │ ├── BitmapStore.h │ ├── Button.cpp │ ├── Button.h │ ├── GameEngine.cpp │ ├── GameEngine.h │ ├── GameInputHandler.cpp │ ├── GameInputHandler.h │ ├── GameOverInputHandler.cpp │ ├── GameOverInputHandler.h │ ├── GameOverUIPanel.cpp │ ├── GameOverUIPanel.h │ ├── GameScreen.cpp │ ├── GameScreen.h │ ├── GameUIPanel.cpp │ ├── GameUIPanel.h │ ├── InputHandler.h │ ├── InputHnadler.cpp │ ├── Screen.cpp │ ├── Screen.h │ ├── ScreenManager.cpp │ ├── ScreenManager.h │ ├── ScreenManagerRemoteControl.cpp │ ├── ScreenManagerRemoteControl.h │ ├── SelectInputHandler.cpp │ ├── SelectInputHandler.h │ ├── SelectScreen.cpp │ ├── SelectScreen.h │ ├── SelectUIPanel.cpp │ ├── SelectUIPanel.h │ ├── SoundEngine.cpp │ ├── SoundEngine.h │ ├── Space Invaders ++.cpp │ ├── UIPanel.cpp │ ├── UIPanel.h │ ├── WorldState.h │ ├── fonts │ └── Roboto-Bold.ttf │ ├── graphics │ ├── bullet.png │ ├── invader1.png │ └── playership.png │ ├── sound │ ├── click.ogg │ ├── invaderexplode.ogg │ ├── playerexplode.ogg │ └── shoot.ogg │ └── world │ └── level1 ├── Chapter20-22 └── Space Invaders ++ 2 │ ├── BitmapStore.cpp │ ├── BitmapStore.h │ ├── BlueprintObjectParser.cpp │ ├── BlueprintObjectParser.h │ ├── BulletSpawner.cpp │ ├── BulletSpawner.h │ ├── BulletUpdateComponent.cpp │ ├── BulletUpdateComponent.h │ ├── Button.cpp │ ├── Button.h │ ├── ColliderComponent.cpp │ ├── ColliderComponent.h │ ├── Component.cpp │ ├── Component.h │ ├── DevelopState.h │ ├── GameEngine.cpp │ ├── GameEngine.h │ ├── GameInputHandler.cpp │ ├── GameInputHandler.h │ ├── GameObject.cpp │ ├── GameObject.h │ ├── GameObjectBlueprint.cpp │ ├── GameObjectBlueprint.h │ ├── GameObjectFactoryPlayMode.cpp │ ├── GameObjectFactoryPlayMode.h │ ├── GameObjectSharer.h │ ├── GameOverInputHandler.cpp │ ├── GameOverInputHandler.h │ ├── GameOverUIPanel.cpp │ ├── GameOverUIPanel.h │ ├── GameScreen.cpp │ ├── GameScreen.h │ ├── GameUIPanel.cpp │ ├── GameUIPanel.h │ ├── GraphicsComponent.cpp │ ├── GraphicsComponent.h │ ├── InputHandler.cpp │ ├── InputHandler.h │ ├── InvaderUpdateComponent.cpp │ ├── InvaderUpdateComponent.h │ ├── LevelManager.cpp │ ├── LevelManager.h │ ├── ObjectTags.cpp │ ├── ObjectTags.h │ ├── PhysicsEnginePlayMode.cpp │ ├── PhysicsEnginePlayMode.h │ ├── PlayModeObjectLoader.cpp │ ├── PlayModeObjectLoader.h │ ├── PlayerUpdateComponent.cpp │ ├── PlayerUpdateComponent.h │ ├── RectColliderComponent.cpp │ ├── RectColliderComponent.h │ ├── Screen.cpp │ ├── Screen.h │ ├── ScreenManager.cpp │ ├── ScreenManager.h │ ├── ScreenManagerRemoteControl.cpp │ ├── ScreenManagerRemoteControl.h │ ├── SelectInputHandler.cpp │ ├── SelectInputHandler.h │ ├── SelectScreen.cpp │ ├── SelectScreen.h │ ├── SelectUIPanel.cpp │ ├── SelectUIPanel.h │ ├── SoundEngine.cpp │ ├── SoundEngine.h │ ├── Space Invaders ++.cpp │ ├── StandardGraphicsComponent.cpp │ ├── StandardGraphicsComponent.h │ ├── TransformComponent.cpp │ ├── TransformComponent.h │ ├── UIPanel.cpp │ ├── UIPanel.h │ ├── UpdateComponent.cpp │ ├── UpdateComponent.h │ ├── WorldState.h │ ├── fonts │ └── Roboto-Bold.ttf │ ├── graphics │ ├── bullet.png │ ├── invader1.png │ └── playership.png │ ├── sound │ ├── click.ogg │ ├── invaderexplode.ogg │ ├── playerexplode.ogg │ └── shoot.ogg │ └── world │ └── level1 ├── LICENSE ├── README.md └── Runnable Games ├── Pong ├── Pong 2.exe ├── Pong 2.ilk ├── Pong 2.pdb ├── fonts │ └── DS-DIGI.TTF ├── openal32.dll ├── sfml-audio-2.dll ├── sfml-audio-d-2.dll ├── sfml-graphics-2.dll ├── sfml-graphics-d-2.dll ├── sfml-network-2.dll ├── sfml-network-d-2.dll ├── sfml-system-2.dll ├── sfml-system-d-2.dll ├── sfml-window-2.dll └── sfml-window-d-2.dll ├── Space Invaders ├── BitmapStore.obj ├── BlueprintObjectParser.obj ├── BulletSpawner.obj ├── BulletUpdateComponent.obj ├── Button.obj ├── ColliderComponent.obj ├── Component.obj ├── GameEngine.obj ├── GameInputHandler.obj ├── GameObject.obj ├── GameObjectBlueprint.obj ├── GameObjectFactoryPlayMode.obj ├── GameOverInputHandler.obj ├── GameOverUIPanel.obj ├── GameScreen.obj ├── GameUIPanel.obj ├── GraphicsComponent.obj ├── InputHandler.obj ├── InputHnadler.obj ├── InvaderUpdateComponent.obj ├── LevelManager.obj ├── ObjectTags.obj ├── PhysicsEnginePlayMode.obj ├── PlayModeObjectLoader.obj ├── PlayerUpdateComponent.obj ├── RectColliderComponent.obj ├── Screen.obj ├── ScreenManager.obj ├── ScreenManagerRemoteControl.obj ├── SelectInputHandler.obj ├── SelectScreen.obj ├── SelectUIPanel.obj ├── SoundEngine.obj ├── Space In.B7372C65.tlog │ ├── CL.command.1.tlog │ ├── CL.read.1.tlog │ ├── CL.write.1.tlog │ ├── Space Invaders ++ 2.lastbuildstate │ ├── link.command.1.tlog │ ├── link.read.1.tlog │ └── link.write.1.tlog ├── Space Invaders ++ 2.exe ├── Space Invaders ++ 2.ilk ├── Space Invaders ++ 2.log ├── Space Invaders ++ 2.pdb ├── Space Invaders ++.obj ├── StandardGraphicsComponent.obj ├── TransformComponent.obj ├── UIPanel.obj ├── UpdateComponent.obj ├── fonts │ └── Roboto-Bold.ttf ├── graphics │ ├── background.png │ ├── bullet.png │ ├── invader1.png │ └── playership.png ├── sfml-audio-2.dll ├── sfml-audio-d-2.dll ├── sfml-graphics-2.dll ├── sfml-graphics-d-2.dll ├── sfml-network-2.dll ├── sfml-network-d-2.dll ├── sfml-system-2.dll ├── sfml-system-d-2.dll ├── sfml-window-2.dll ├── sfml-window-d-2.dll ├── sound │ ├── click.ogg │ ├── invaderexplode.ogg │ ├── playerexplode.ogg │ └── shoot.ogg ├── vc142.idb ├── vc142.pdb └── world │ └── level1 ├── Thomas Was Late ├── Chapter 12 TWL.exe ├── Chapter 13 TWL.exe ├── Chapter 14 TWL.exe ├── Chapter 15 TWL.exe ├── Chapter 16 TWL.exe ├── fonts │ └── Roboto-Light.ttf ├── graphics │ ├── background.png │ ├── bob.png │ ├── thomas.png │ └── tiles_sheet.png ├── levels │ ├── level1.txt │ ├── level2.txt │ ├── level3.txt │ └── level4.txt ├── openal32.dll ├── sfml-audio-2.dll ├── sfml-audio-d-2.dll ├── sfml-graphics-2.dll ├── sfml-graphics-d-2.dll ├── sfml-network-2.dll ├── sfml-network-d-2.dll ├── sfml-system-2.dll ├── sfml-system-d-2.dll ├── sfml-window-2.dll ├── sfml-window-d-2.dll ├── shaders │ ├── rippleShader.frag │ └── vertShader.vert └── sound │ ├── fallinfire.wav │ ├── fallinwater.wav │ ├── fire1.wav │ ├── jump.wav │ └── reachgoal.wav ├── Timber ├── Chapter 1 Timber.exe ├── Chapter 2 Timber.exe ├── Chapter 3 Timber.exe ├── Chapter 4 Timber.exe ├── Chapter 5 Timber.exe ├── READ ME.txt ├── Timber Enhanced Version.exe ├── fonts │ └── KOMIKAP_.ttf ├── graphics │ ├── axe.png │ ├── background.png │ ├── branch.png │ ├── cloud.png │ ├── insect.png │ ├── log.png │ ├── player.png │ ├── rip.png │ ├── tree.png │ └── tree2.png ├── openal32.dll ├── sfml-audio-2.dll ├── sfml-audio-d-2.dll ├── sfml-graphics-2.dll ├── sfml-graphics-d-2.dll ├── sfml-network-2.dll ├── sfml-network-d-2.dll ├── sfml-system-2.dll ├── sfml-system-d-2.dll ├── sfml-window-2.dll ├── sfml-window-d-2.dll └── sound │ ├── chop.wav │ ├── death.wav │ └── out_of_time.wav └── Zombie Arena ├── Chapter 10 Zombie Arena.exe ├── Chapter 11 Zombie Arena.exe ├── Chapter 6 Zombie Arena.exe ├── Chapter 7 Zombie Arena.exe ├── Chapter 8 Zombie Arena.exe ├── Chapter 9 Zombie Arena.exe ├── Zombie Arena Enhanced Version.exe ├── fonts └── zombiecontrol.ttf ├── gamedata └── scores.txt ├── graphics ├── ammo_icon.png ├── ammo_pickup.png ├── background.png ├── background_originalsize.png ├── background_sheet.png ├── bloater.png ├── blood.png ├── chaser.png ├── crawler.png ├── crosshair.png ├── health_pickup.png ├── player.png └── sample.png ├── openal32.dll ├── sfml-audio-2.dll ├── sfml-audio-d-2.dll ├── sfml-graphics-2.dll ├── sfml-graphics-d-2.dll ├── sfml-network-2.dll ├── sfml-network-d-2.dll ├── sfml-system-2.dll ├── sfml-system-d-2.dll ├── sfml-window-2.dll ├── sfml-window-d-2.dll └── sound ├── hit.wav ├── pickup.wav ├── powerup.wav ├── reload.wav ├── reload_failed.wav ├── shoot.wav └── splat.wav /Chapter01/fonts/KOMIKAP_.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter01/fonts/KOMIKAP_.ttf -------------------------------------------------------------------------------- /Chapter01/graphics/axe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter01/graphics/axe.png -------------------------------------------------------------------------------- /Chapter01/graphics/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter01/graphics/background.png -------------------------------------------------------------------------------- /Chapter01/graphics/bee.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter01/graphics/bee.png -------------------------------------------------------------------------------- /Chapter01/graphics/branch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter01/graphics/branch.png -------------------------------------------------------------------------------- /Chapter01/graphics/cloud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter01/graphics/cloud.png -------------------------------------------------------------------------------- /Chapter01/graphics/log.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter01/graphics/log.png -------------------------------------------------------------------------------- /Chapter01/graphics/player.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter01/graphics/player.png -------------------------------------------------------------------------------- /Chapter01/graphics/rip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter01/graphics/rip.png -------------------------------------------------------------------------------- /Chapter01/graphics/tree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter01/graphics/tree.png -------------------------------------------------------------------------------- /Chapter01/graphics/tree2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter01/graphics/tree2.png -------------------------------------------------------------------------------- /Chapter01/sound/chop.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter01/sound/chop.wav -------------------------------------------------------------------------------- /Chapter01/sound/death.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter01/sound/death.wav -------------------------------------------------------------------------------- /Chapter01/sound/out_of_time.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter01/sound/out_of_time.wav -------------------------------------------------------------------------------- /Chapter02/fonts/KOMIKAP_.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter02/fonts/KOMIKAP_.ttf -------------------------------------------------------------------------------- /Chapter02/graphics/axe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter02/graphics/axe.png -------------------------------------------------------------------------------- /Chapter02/graphics/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter02/graphics/background.png -------------------------------------------------------------------------------- /Chapter02/graphics/bee.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter02/graphics/bee.png -------------------------------------------------------------------------------- /Chapter02/graphics/branch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter02/graphics/branch.png -------------------------------------------------------------------------------- /Chapter02/graphics/cloud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter02/graphics/cloud.png -------------------------------------------------------------------------------- /Chapter02/graphics/log.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter02/graphics/log.png -------------------------------------------------------------------------------- /Chapter02/graphics/player.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter02/graphics/player.png -------------------------------------------------------------------------------- /Chapter02/graphics/rip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter02/graphics/rip.png -------------------------------------------------------------------------------- /Chapter02/graphics/tree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter02/graphics/tree.png -------------------------------------------------------------------------------- /Chapter02/graphics/tree2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter02/graphics/tree2.png -------------------------------------------------------------------------------- /Chapter02/sound/chop.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter02/sound/chop.wav -------------------------------------------------------------------------------- /Chapter02/sound/death.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter02/sound/death.wav -------------------------------------------------------------------------------- /Chapter02/sound/out_of_time.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter02/sound/out_of_time.wav -------------------------------------------------------------------------------- /Chapter03/fonts/KOMIKAP_.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter03/fonts/KOMIKAP_.ttf -------------------------------------------------------------------------------- /Chapter03/graphics/axe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter03/graphics/axe.png -------------------------------------------------------------------------------- /Chapter03/graphics/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter03/graphics/background.png -------------------------------------------------------------------------------- /Chapter03/graphics/bee.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter03/graphics/bee.png -------------------------------------------------------------------------------- /Chapter03/graphics/branch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter03/graphics/branch.png -------------------------------------------------------------------------------- /Chapter03/graphics/cloud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter03/graphics/cloud.png -------------------------------------------------------------------------------- /Chapter03/graphics/log.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter03/graphics/log.png -------------------------------------------------------------------------------- /Chapter03/graphics/player.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter03/graphics/player.png -------------------------------------------------------------------------------- /Chapter03/graphics/rip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter03/graphics/rip.png -------------------------------------------------------------------------------- /Chapter03/graphics/tree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter03/graphics/tree.png -------------------------------------------------------------------------------- /Chapter03/graphics/tree2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter03/graphics/tree2.png -------------------------------------------------------------------------------- /Chapter03/sound/chop.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter03/sound/chop.wav -------------------------------------------------------------------------------- /Chapter03/sound/death.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter03/sound/death.wav -------------------------------------------------------------------------------- /Chapter03/sound/out_of_time.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter03/sound/out_of_time.wav -------------------------------------------------------------------------------- /Chapter04/fonts/KOMIKAP_.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter04/fonts/KOMIKAP_.ttf -------------------------------------------------------------------------------- /Chapter04/graphics/axe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter04/graphics/axe.png -------------------------------------------------------------------------------- /Chapter04/graphics/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter04/graphics/background.png -------------------------------------------------------------------------------- /Chapter04/graphics/bee.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter04/graphics/bee.png -------------------------------------------------------------------------------- /Chapter04/graphics/branch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter04/graphics/branch.png -------------------------------------------------------------------------------- /Chapter04/graphics/cloud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter04/graphics/cloud.png -------------------------------------------------------------------------------- /Chapter04/graphics/log.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter04/graphics/log.png -------------------------------------------------------------------------------- /Chapter04/graphics/player.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter04/graphics/player.png -------------------------------------------------------------------------------- /Chapter04/graphics/rip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter04/graphics/rip.png -------------------------------------------------------------------------------- /Chapter04/graphics/tree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter04/graphics/tree.png -------------------------------------------------------------------------------- /Chapter04/graphics/tree2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter04/graphics/tree2.png -------------------------------------------------------------------------------- /Chapter04/sound/chop.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter04/sound/chop.wav -------------------------------------------------------------------------------- /Chapter04/sound/death.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter04/sound/death.wav -------------------------------------------------------------------------------- /Chapter04/sound/out_of_time.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter04/sound/out_of_time.wav -------------------------------------------------------------------------------- /Chapter05/fonts/KOMIKAP_.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter05/fonts/KOMIKAP_.ttf -------------------------------------------------------------------------------- /Chapter05/graphics/axe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter05/graphics/axe.png -------------------------------------------------------------------------------- /Chapter05/graphics/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter05/graphics/background.png -------------------------------------------------------------------------------- /Chapter05/graphics/bee.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter05/graphics/bee.png -------------------------------------------------------------------------------- /Chapter05/graphics/branch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter05/graphics/branch.png -------------------------------------------------------------------------------- /Chapter05/graphics/cloud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter05/graphics/cloud.png -------------------------------------------------------------------------------- /Chapter05/graphics/log.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter05/graphics/log.png -------------------------------------------------------------------------------- /Chapter05/graphics/player.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter05/graphics/player.png -------------------------------------------------------------------------------- /Chapter05/graphics/rip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter05/graphics/rip.png -------------------------------------------------------------------------------- /Chapter05/graphics/tree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter05/graphics/tree.png -------------------------------------------------------------------------------- /Chapter05/graphics/tree2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter05/graphics/tree2.png -------------------------------------------------------------------------------- /Chapter05/sound/chop.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter05/sound/chop.wav -------------------------------------------------------------------------------- /Chapter05/sound/death.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter05/sound/death.wav -------------------------------------------------------------------------------- /Chapter05/sound/out_of_time.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter05/sound/out_of_time.wav -------------------------------------------------------------------------------- /Chapter06/Bat.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | using namespace sf; 5 | 6 | class Bat 7 | { 8 | private: 9 | Vector2f m_Position; 10 | 11 | // A RectangleShape object 12 | RectangleShape m_Shape; 13 | 14 | float m_Speed = 1000.0f; 15 | 16 | bool m_MovingRight = false; 17 | bool m_MovingLeft = false; 18 | 19 | 20 | public: 21 | Bat(float startX, float startY); 22 | 23 | FloatRect getPosition(); 24 | 25 | RectangleShape getShape(); 26 | 27 | void moveLeft(); 28 | 29 | void moveRight(); 30 | 31 | void Bat::stopLeft(); 32 | 33 | void Bat::stopRight(); 34 | 35 | void update(Time dt); 36 | 37 | }; 38 | -------------------------------------------------------------------------------- /Chapter06/Pong.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter06/Pong.cpp -------------------------------------------------------------------------------- /Chapter07/Ball.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | using namespace sf; 5 | 6 | class Ball 7 | { 8 | private: 9 | Vector2f m_Position; 10 | RectangleShape m_Shape; 11 | 12 | float m_Speed = 1000.0f; 13 | float m_DirectionX = .2f; 14 | float m_DirectionY = .2f; 15 | 16 | public: 17 | Ball(float startX, float startY); 18 | 19 | FloatRect getPosition(); 20 | 21 | RectangleShape getShape(); 22 | 23 | float getXVelocity(); 24 | 25 | void reboundSides(); 26 | 27 | void reboundBatOrTop(); 28 | 29 | void reboundBottom(); 30 | 31 | void update(Time dt); 32 | 33 | }; 34 | -------------------------------------------------------------------------------- /Chapter07/Bat.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | using namespace sf; 5 | 6 | class Bat 7 | { 8 | private: 9 | Vector2f m_Position; 10 | 11 | // A RectangleShape object 12 | RectangleShape m_Shape; 13 | 14 | float m_Speed = 1000.0f; 15 | 16 | bool m_MovingRight = false; 17 | bool m_MovingLeft = false; 18 | 19 | 20 | public: 21 | Bat(float startX, float startY); 22 | 23 | FloatRect getPosition(); 24 | 25 | RectangleShape getShape(); 26 | 27 | void moveLeft(); 28 | 29 | void moveRight(); 30 | 31 | void Bat::stopLeft(); 32 | 33 | void Bat::stopRight(); 34 | 35 | void update(Time dt); 36 | 37 | }; 38 | -------------------------------------------------------------------------------- /Chapter07/Pong.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter07/Pong.cpp -------------------------------------------------------------------------------- /Chapter08/graphics/ammo_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter08/graphics/ammo_icon.png -------------------------------------------------------------------------------- /Chapter08/graphics/ammo_pickup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter08/graphics/ammo_pickup.png -------------------------------------------------------------------------------- /Chapter08/graphics/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter08/graphics/background.png -------------------------------------------------------------------------------- /Chapter08/graphics/background_sheet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter08/graphics/background_sheet.png -------------------------------------------------------------------------------- /Chapter08/graphics/bloater.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter08/graphics/bloater.png -------------------------------------------------------------------------------- /Chapter08/graphics/blood.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter08/graphics/blood.png -------------------------------------------------------------------------------- /Chapter08/graphics/chaser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter08/graphics/chaser.png -------------------------------------------------------------------------------- /Chapter08/graphics/crawler.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter08/graphics/crawler.png -------------------------------------------------------------------------------- /Chapter08/graphics/crosshair.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter08/graphics/crosshair.png -------------------------------------------------------------------------------- /Chapter08/graphics/health_pickup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter08/graphics/health_pickup.png -------------------------------------------------------------------------------- /Chapter08/graphics/player.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter08/graphics/player.png -------------------------------------------------------------------------------- /Chapter08/graphics/sample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter08/graphics/sample.png -------------------------------------------------------------------------------- /Chapter08/sound/hit.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter08/sound/hit.wav -------------------------------------------------------------------------------- /Chapter08/sound/pickup.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter08/sound/pickup.wav -------------------------------------------------------------------------------- /Chapter08/sound/powerup.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter08/sound/powerup.wav -------------------------------------------------------------------------------- /Chapter08/sound/reload.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter08/sound/reload.wav -------------------------------------------------------------------------------- /Chapter08/sound/reload_failed.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter08/sound/reload_failed.wav -------------------------------------------------------------------------------- /Chapter08/sound/shoot.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter08/sound/shoot.wav -------------------------------------------------------------------------------- /Chapter08/sound/splat.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter08/sound/splat.wav -------------------------------------------------------------------------------- /Chapter09/code/ZombieArena.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | using namespace sf; 4 | int createBackground(VertexArray& rVA, IntRect arena); 5 | -------------------------------------------------------------------------------- /Chapter09/graphics/ammo_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter09/graphics/ammo_icon.png -------------------------------------------------------------------------------- /Chapter09/graphics/ammo_pickup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter09/graphics/ammo_pickup.png -------------------------------------------------------------------------------- /Chapter09/graphics/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter09/graphics/background.png -------------------------------------------------------------------------------- /Chapter09/graphics/background_originalsize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter09/graphics/background_originalsize.png -------------------------------------------------------------------------------- /Chapter09/graphics/background_sheet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter09/graphics/background_sheet.png -------------------------------------------------------------------------------- /Chapter09/graphics/bloater.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter09/graphics/bloater.png -------------------------------------------------------------------------------- /Chapter09/graphics/blood.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter09/graphics/blood.png -------------------------------------------------------------------------------- /Chapter09/graphics/chaser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter09/graphics/chaser.png -------------------------------------------------------------------------------- /Chapter09/graphics/crawler.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter09/graphics/crawler.png -------------------------------------------------------------------------------- /Chapter09/graphics/crosshair.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter09/graphics/crosshair.png -------------------------------------------------------------------------------- /Chapter09/graphics/health_pickup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter09/graphics/health_pickup.png -------------------------------------------------------------------------------- /Chapter09/graphics/player.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter09/graphics/player.png -------------------------------------------------------------------------------- /Chapter09/graphics/sample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter09/graphics/sample.png -------------------------------------------------------------------------------- /Chapter09/sound/hit.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter09/sound/hit.wav -------------------------------------------------------------------------------- /Chapter09/sound/pickup.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter09/sound/pickup.wav -------------------------------------------------------------------------------- /Chapter09/sound/powerup.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter09/sound/powerup.wav -------------------------------------------------------------------------------- /Chapter09/sound/reload.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter09/sound/reload.wav -------------------------------------------------------------------------------- /Chapter09/sound/reload_failed.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter09/sound/reload_failed.wav -------------------------------------------------------------------------------- /Chapter09/sound/shoot.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter09/sound/shoot.wav -------------------------------------------------------------------------------- /Chapter09/sound/splat.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter09/sound/splat.wav -------------------------------------------------------------------------------- /Chapter10/code/TextureHolder.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #ifndef TEXTURE_HOLDER_H 3 | #define TEXTURE_HOLDER_H 4 | 5 | #include 6 | #include 7 | 8 | using namespace sf; 9 | 10 | class TextureHolder 11 | { 12 | public: 13 | TextureHolder(); 14 | static Texture& GetTexture(std::string const& filename); 15 | 16 | private: 17 | // A map container from the STL, 18 | // that holds related pairs of String and Texture 19 | std::map m_Textures; 20 | 21 | // A pointer of the same type as the class itself 22 | // the one and only instance 23 | static TextureHolder* m_s_Instance; 24 | }; 25 | 26 | #endif -------------------------------------------------------------------------------- /Chapter10/code/ZombieArena.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Zombie.h" 3 | 4 | using namespace sf; 5 | 6 | int createBackground(VertexArray& rVA, IntRect arena); 7 | Zombie* createHorde(int numZombies, IntRect arena); -------------------------------------------------------------------------------- /Chapter10/graphics/ammo_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter10/graphics/ammo_icon.png -------------------------------------------------------------------------------- /Chapter10/graphics/ammo_pickup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter10/graphics/ammo_pickup.png -------------------------------------------------------------------------------- /Chapter10/graphics/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter10/graphics/background.png -------------------------------------------------------------------------------- /Chapter10/graphics/background_originalsize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter10/graphics/background_originalsize.png -------------------------------------------------------------------------------- /Chapter10/graphics/background_sheet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter10/graphics/background_sheet.png -------------------------------------------------------------------------------- /Chapter10/graphics/bloater.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter10/graphics/bloater.png -------------------------------------------------------------------------------- /Chapter10/graphics/blood.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter10/graphics/blood.png -------------------------------------------------------------------------------- /Chapter10/graphics/chaser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter10/graphics/chaser.png -------------------------------------------------------------------------------- /Chapter10/graphics/crawler.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter10/graphics/crawler.png -------------------------------------------------------------------------------- /Chapter10/graphics/crosshair.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter10/graphics/crosshair.png -------------------------------------------------------------------------------- /Chapter10/graphics/health_pickup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter10/graphics/health_pickup.png -------------------------------------------------------------------------------- /Chapter10/graphics/player.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter10/graphics/player.png -------------------------------------------------------------------------------- /Chapter10/graphics/sample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter10/graphics/sample.png -------------------------------------------------------------------------------- /Chapter10/sound/hit.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter10/sound/hit.wav -------------------------------------------------------------------------------- /Chapter10/sound/pickup.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter10/sound/pickup.wav -------------------------------------------------------------------------------- /Chapter10/sound/powerup.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter10/sound/powerup.wav -------------------------------------------------------------------------------- /Chapter10/sound/reload.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter10/sound/reload.wav -------------------------------------------------------------------------------- /Chapter10/sound/reload_failed.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter10/sound/reload_failed.wav -------------------------------------------------------------------------------- /Chapter10/sound/shoot.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter10/sound/shoot.wav -------------------------------------------------------------------------------- /Chapter10/sound/splat.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter10/sound/splat.wav -------------------------------------------------------------------------------- /Chapter11/code/TextureHolder.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter11/code/TextureHolder.h -------------------------------------------------------------------------------- /Chapter11/code/ZombieArena.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Zombie.h" 3 | 4 | using namespace sf; 5 | 6 | int createBackground(VertexArray& rVA, IntRect arena); 7 | Zombie* createHorde(int numZombies, IntRect arena); 8 | -------------------------------------------------------------------------------- /Chapter11/graphics/ammo_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter11/graphics/ammo_icon.png -------------------------------------------------------------------------------- /Chapter11/graphics/ammo_pickup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter11/graphics/ammo_pickup.png -------------------------------------------------------------------------------- /Chapter11/graphics/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter11/graphics/background.png -------------------------------------------------------------------------------- /Chapter11/graphics/background_originalsize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter11/graphics/background_originalsize.png -------------------------------------------------------------------------------- /Chapter11/graphics/background_sheet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter11/graphics/background_sheet.png -------------------------------------------------------------------------------- /Chapter11/graphics/bloater.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter11/graphics/bloater.png -------------------------------------------------------------------------------- /Chapter11/graphics/blood.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter11/graphics/blood.png -------------------------------------------------------------------------------- /Chapter11/graphics/chaser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter11/graphics/chaser.png -------------------------------------------------------------------------------- /Chapter11/graphics/crawler.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter11/graphics/crawler.png -------------------------------------------------------------------------------- /Chapter11/graphics/crosshair.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter11/graphics/crosshair.png -------------------------------------------------------------------------------- /Chapter11/graphics/health_pickup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter11/graphics/health_pickup.png -------------------------------------------------------------------------------- /Chapter11/graphics/player.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter11/graphics/player.png -------------------------------------------------------------------------------- /Chapter11/graphics/sample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter11/graphics/sample.png -------------------------------------------------------------------------------- /Chapter11/sound/hit.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter11/sound/hit.wav -------------------------------------------------------------------------------- /Chapter11/sound/pickup.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter11/sound/pickup.wav -------------------------------------------------------------------------------- /Chapter11/sound/powerup.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter11/sound/powerup.wav -------------------------------------------------------------------------------- /Chapter11/sound/reload.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter11/sound/reload.wav -------------------------------------------------------------------------------- /Chapter11/sound/reload_failed.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter11/sound/reload_failed.wav -------------------------------------------------------------------------------- /Chapter11/sound/shoot.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter11/sound/shoot.wav -------------------------------------------------------------------------------- /Chapter11/sound/splat.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter11/sound/splat.wav -------------------------------------------------------------------------------- /Chapter12/code/TextureHolder.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #ifndef TEXTURE_HOLDER_H 3 | #define TEXTURE_HOLDER_H 4 | 5 | #include 6 | #include 7 | 8 | class TextureHolder 9 | { 10 | public: 11 | TextureHolder(); 12 | static sf::Texture& GetTexture(std::string const& filename); 13 | 14 | private: 15 | // A map container from the STL, 16 | // that holds related pairs of String and Texture 17 | std::map m_Textures; 18 | 19 | // A pointer of the same type as the class itself 20 | // the one and only instance 21 | static TextureHolder* m_s_Instance; 22 | }; 23 | 24 | #endif -------------------------------------------------------------------------------- /Chapter12/code/ZombieArena.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Zombie.h" 3 | 4 | using namespace sf; 5 | 6 | int createBackground(VertexArray& rVA, IntRect arena); 7 | Zombie* createHorde(int numZombies, IntRect arena); 8 | -------------------------------------------------------------------------------- /Chapter12/graphics/ammo_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter12/graphics/ammo_icon.png -------------------------------------------------------------------------------- /Chapter12/graphics/ammo_pickup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter12/graphics/ammo_pickup.png -------------------------------------------------------------------------------- /Chapter12/graphics/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter12/graphics/background.png -------------------------------------------------------------------------------- /Chapter12/graphics/background_originalsize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter12/graphics/background_originalsize.png -------------------------------------------------------------------------------- /Chapter12/graphics/background_sheet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter12/graphics/background_sheet.png -------------------------------------------------------------------------------- /Chapter12/graphics/bloater.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter12/graphics/bloater.png -------------------------------------------------------------------------------- /Chapter12/graphics/blood.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter12/graphics/blood.png -------------------------------------------------------------------------------- /Chapter12/graphics/chaser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter12/graphics/chaser.png -------------------------------------------------------------------------------- /Chapter12/graphics/crawler.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter12/graphics/crawler.png -------------------------------------------------------------------------------- /Chapter12/graphics/crosshair.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter12/graphics/crosshair.png -------------------------------------------------------------------------------- /Chapter12/graphics/health_pickup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter12/graphics/health_pickup.png -------------------------------------------------------------------------------- /Chapter12/graphics/player.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter12/graphics/player.png -------------------------------------------------------------------------------- /Chapter12/graphics/sample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter12/graphics/sample.png -------------------------------------------------------------------------------- /Chapter12/sound/hit.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter12/sound/hit.wav -------------------------------------------------------------------------------- /Chapter12/sound/pickup.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter12/sound/pickup.wav -------------------------------------------------------------------------------- /Chapter12/sound/powerup.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter12/sound/powerup.wav -------------------------------------------------------------------------------- /Chapter12/sound/reload.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter12/sound/reload.wav -------------------------------------------------------------------------------- /Chapter12/sound/reload_failed.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter12/sound/reload_failed.wav -------------------------------------------------------------------------------- /Chapter12/sound/shoot.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter12/sound/shoot.wav -------------------------------------------------------------------------------- /Chapter12/sound/splat.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter12/sound/splat.wav -------------------------------------------------------------------------------- /Chapter13/code/TextureHolder.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #ifndef TEXTURE_HOLDER_H 3 | #define TEXTURE_HOLDER_H 4 | 5 | #include 6 | #include 7 | 8 | class TextureHolder 9 | { 10 | public: 11 | TextureHolder(); 12 | static sf::Texture& GetTexture(std::string const& filename); 13 | 14 | private: 15 | // A map container from the STL, 16 | // that holds related pairs of String and Texture 17 | std::map m_Textures; 18 | 19 | // A pointer of the same type as the class itself 20 | // the one and only instance 21 | static TextureHolder* m_s_Instance; 22 | }; 23 | 24 | #endif -------------------------------------------------------------------------------- /Chapter13/code/ZombieArena.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Zombie.h" 3 | 4 | using namespace sf; 5 | 6 | int createBackground(VertexArray& rVA, IntRect arena); 7 | Zombie* createHorde(int numZombies, IntRect arena); 8 | -------------------------------------------------------------------------------- /Chapter13/graphics/ammo_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter13/graphics/ammo_icon.png -------------------------------------------------------------------------------- /Chapter13/graphics/ammo_pickup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter13/graphics/ammo_pickup.png -------------------------------------------------------------------------------- /Chapter13/graphics/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter13/graphics/background.png -------------------------------------------------------------------------------- /Chapter13/graphics/background_originalsize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter13/graphics/background_originalsize.png -------------------------------------------------------------------------------- /Chapter13/graphics/background_sheet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter13/graphics/background_sheet.png -------------------------------------------------------------------------------- /Chapter13/graphics/bloater.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter13/graphics/bloater.png -------------------------------------------------------------------------------- /Chapter13/graphics/blood.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter13/graphics/blood.png -------------------------------------------------------------------------------- /Chapter13/graphics/chaser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter13/graphics/chaser.png -------------------------------------------------------------------------------- /Chapter13/graphics/crawler.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter13/graphics/crawler.png -------------------------------------------------------------------------------- /Chapter13/graphics/crosshair.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter13/graphics/crosshair.png -------------------------------------------------------------------------------- /Chapter13/graphics/health_pickup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter13/graphics/health_pickup.png -------------------------------------------------------------------------------- /Chapter13/graphics/player.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter13/graphics/player.png -------------------------------------------------------------------------------- /Chapter13/graphics/sample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter13/graphics/sample.png -------------------------------------------------------------------------------- /Chapter13/sound/hit.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter13/sound/hit.wav -------------------------------------------------------------------------------- /Chapter13/sound/pickup.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter13/sound/pickup.wav -------------------------------------------------------------------------------- /Chapter13/sound/powerup.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter13/sound/powerup.wav -------------------------------------------------------------------------------- /Chapter13/sound/reload.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter13/sound/reload.wav -------------------------------------------------------------------------------- /Chapter13/sound/reload_failed.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter13/sound/reload_failed.wav -------------------------------------------------------------------------------- /Chapter13/sound/shoot.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter13/sound/shoot.wav -------------------------------------------------------------------------------- /Chapter13/sound/splat.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter13/sound/splat.wav -------------------------------------------------------------------------------- /Chapter14/code/Input.cpp: -------------------------------------------------------------------------------- 1 | #include "Engine.h" 2 | 3 | void Engine::input() 4 | { 5 | Event event; 6 | while (m_Window.pollEvent(event)) 7 | { 8 | if (event.type == Event::KeyPressed) 9 | { 10 | 11 | 12 | // Handle the player quitting 13 | if (Keyboard::isKeyPressed(Keyboard::Escape)) 14 | { 15 | m_Window.close(); 16 | } 17 | 18 | // Handle the player starting the game 19 | if (Keyboard::isKeyPressed(Keyboard::Return)) 20 | { 21 | m_Playing = true; 22 | } 23 | 24 | // Switch between Thomas and Bob 25 | if (Keyboard::isKeyPressed(Keyboard::Q)) 26 | { 27 | m_Character1 = !m_Character1; 28 | } 29 | 30 | // Switch between full and split-screen 31 | if (Keyboard::isKeyPressed(Keyboard::E)) 32 | { 33 | m_SplitScreen = !m_SplitScreen; 34 | } 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /Chapter14/code/Main.cpp: -------------------------------------------------------------------------------- 1 | #include "Engine.h" 2 | 3 | int main() 4 | { 5 | // Declare an instance of Engine 6 | Engine engine; 7 | 8 | // Start the engine 9 | engine.run(); 10 | 11 | // Quit in the usual way when the engine is stopped 12 | return 0; 13 | } -------------------------------------------------------------------------------- /Chapter14/code/TextureHolder.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #ifndef TEXTURE_HOLDER_H 3 | #define TEXTURE_HOLDER_H 4 | 5 | #include 6 | #include 7 | 8 | class TextureHolder 9 | { 10 | private: 11 | // A map container from the STL, 12 | // that holds related pairs of String and Texture 13 | std::map m_Textures; 14 | 15 | // A pointer of the same type as the class itself 16 | // the one and only instance 17 | static TextureHolder* m_s_Instance; 18 | 19 | public: 20 | TextureHolder(); 21 | static sf::Texture& GetTexture(std::string const& filename); 22 | 23 | }; 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /Chapter14/code/Update.cpp: -------------------------------------------------------------------------------- 1 | #include "Engine.h" 2 | #include 3 | #include 4 | 5 | using namespace sf; 6 | 7 | void Engine::update(float dtAsSeconds) 8 | { 9 | 10 | if (m_Playing) 11 | { 12 | // Count down the time the player has left 13 | m_TimeRemaining -= dtAsSeconds; 14 | 15 | // Have Thomas and Bob run out of time? 16 | if (m_TimeRemaining <= 0) 17 | { 18 | m_NewLevelRequired = true; 19 | } 20 | 21 | }// End if playing 22 | 23 | } -------------------------------------------------------------------------------- /Chapter14/fonts/README.txt: -------------------------------------------------------------------------------- 1 | Dowload a font as per the instructions in chapter 12 -------------------------------------------------------------------------------- /Chapter14/graphics/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter14/graphics/background.png -------------------------------------------------------------------------------- /Chapter14/graphics/bob.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter14/graphics/bob.png -------------------------------------------------------------------------------- /Chapter14/graphics/thomas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter14/graphics/thomas.png -------------------------------------------------------------------------------- /Chapter14/graphics/tiles_sheet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter14/graphics/tiles_sheet.png -------------------------------------------------------------------------------- /Chapter14/levels/level1.txt: -------------------------------------------------------------------------------- 1 | 0000000000000000000000000000000000000000000000 2 | 0000000000000000000000000000000000000000000000 3 | 0000000000000000000000000000000000000000000000 4 | 0000000000000000000000000000000000000000000000 5 | 0000000000000000000000000000000000000000000000 6 | 0000000000000000000000000000000000000000000000 7 | 1111111111000111111222222221111133111111111411 8 | 0000000000000000001222222221000133100000001110 9 | 0000000000000000001222222221000133100000000000 10 | 0000000000000000001222222221000133100000000000 11 | 0000000000000000001111111111000111100000000000 -------------------------------------------------------------------------------- /Chapter14/shaders/rippleShader.frag: -------------------------------------------------------------------------------- 1 | // attributes from vertShader.vert 2 | varying vec4 vColor; 3 | varying vec2 vTexCoord; 4 | 5 | // uniforms 6 | uniform sampler2D uTexture; 7 | uniform float uTime; 8 | 9 | void main() { 10 | float coef = sin(gl_FragCoord.y * 0.1 + 1 * uTime); 11 | vTexCoord.y += coef * 0.03; 12 | gl_FragColor = vColor * texture2D(uTexture, vTexCoord); 13 | } 14 | -------------------------------------------------------------------------------- /Chapter14/shaders/vertShader.vert: -------------------------------------------------------------------------------- 1 | #version 110 2 | 3 | //varying "out" variables to be used in the fragment shader 4 | varying vec4 vColor; 5 | varying vec2 vTexCoord; 6 | 7 | void main() { 8 | vColor = gl_Color; 9 | vTexCoord = (gl_TextureMatrix[0] * gl_MultiTexCoord0).xy; 10 | gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; 11 | } 12 | 13 | -------------------------------------------------------------------------------- /Chapter14/sound/fallinfire.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter14/sound/fallinfire.wav -------------------------------------------------------------------------------- /Chapter14/sound/fallinwater.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter14/sound/fallinwater.wav -------------------------------------------------------------------------------- /Chapter14/sound/fire1.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter14/sound/fire1.wav -------------------------------------------------------------------------------- /Chapter14/sound/jump.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter14/sound/jump.wav -------------------------------------------------------------------------------- /Chapter14/sound/reachgoal.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter14/sound/reachgoal.wav -------------------------------------------------------------------------------- /Chapter15/code/Bob.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "PlayableCharacter.h" 3 | 4 | class Bob : public PlayableCharacter 5 | { 6 | public: 7 | // A constructor specific to Bob 8 | Bob::Bob(); 9 | 10 | // The overriden input handler for Bob 11 | bool virtual handleInput(); 12 | 13 | }; 14 | 15 | -------------------------------------------------------------------------------- /Chapter15/code/Main.cpp: -------------------------------------------------------------------------------- 1 | #include "Engine.h" 2 | 3 | int main() 4 | { 5 | // Declare an instance of Engine 6 | Engine engine; 7 | 8 | // Start the engine 9 | engine.run(); 10 | 11 | // Quit in the usual way when the engine is stopped 12 | return 0; 13 | } -------------------------------------------------------------------------------- /Chapter15/code/TextureHolder.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #ifndef TEXTURE_HOLDER_H 3 | #define TEXTURE_HOLDER_H 4 | 5 | #include 6 | #include 7 | 8 | class TextureHolder 9 | { 10 | private: 11 | // A map container from the STL, 12 | // that holds related pairs of String and Texture 13 | std::map m_Textures; 14 | 15 | // A pointer of the same type as the class itself 16 | // the one and only instance 17 | static TextureHolder* m_s_Instance; 18 | 19 | public: 20 | TextureHolder(); 21 | static sf::Texture& GetTexture(std::string const& filename); 22 | 23 | }; 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /Chapter15/code/Thomas.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "PlayableCharacter.h" 3 | 4 | class Thomas : public PlayableCharacter 5 | { 6 | public: 7 | // A constructor specific to Thomas 8 | Thomas::Thomas(); 9 | 10 | // The overriden input handler for Thomas 11 | bool virtual handleInput(); 12 | 13 | }; 14 | -------------------------------------------------------------------------------- /Chapter15/fonts/README.txt: -------------------------------------------------------------------------------- 1 | Dowload a font as per the instructions in chapter 12 -------------------------------------------------------------------------------- /Chapter15/graphics/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter15/graphics/background.png -------------------------------------------------------------------------------- /Chapter15/graphics/bob.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter15/graphics/bob.png -------------------------------------------------------------------------------- /Chapter15/graphics/thomas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter15/graphics/thomas.png -------------------------------------------------------------------------------- /Chapter15/graphics/tiles_sheet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter15/graphics/tiles_sheet.png -------------------------------------------------------------------------------- /Chapter15/levels/level1.txt: -------------------------------------------------------------------------------- 1 | 0000000000000000000000000000000000000000000000 2 | 0000000000000000000000000000000000000000000000 3 | 0000000000000000000000000000000000000000000000 4 | 0000000000000000000000000000000000000000000000 5 | 0000000000000000000000000000000000000000000000 6 | 0000000000000000000000000000000000000000000000 7 | 1111111111000111111222222221111133111111111411 8 | 0000000000000000001222222221000133100000001110 9 | 0000000000000000001222222221000133100000000000 10 | 0000000000000000001222222221000133100000000000 11 | 0000000000000000001111111111000111100000000000 -------------------------------------------------------------------------------- /Chapter15/shaders/rippleShader.frag: -------------------------------------------------------------------------------- 1 | // attributes from vertShader.vert 2 | varying vec4 vColor; 3 | varying vec2 vTexCoord; 4 | 5 | // uniforms 6 | uniform sampler2D uTexture; 7 | uniform float uTime; 8 | 9 | void main() { 10 | float coef = sin(gl_FragCoord.y * 0.1 + 1 * uTime); 11 | vTexCoord.y += coef * 0.03; 12 | gl_FragColor = vColor * texture2D(uTexture, vTexCoord); 13 | } 14 | -------------------------------------------------------------------------------- /Chapter15/shaders/vertShader.vert: -------------------------------------------------------------------------------- 1 | #version 110 2 | 3 | //varying "out" variables to be used in the fragment shader 4 | varying vec4 vColor; 5 | varying vec2 vTexCoord; 6 | 7 | void main() { 8 | vColor = gl_Color; 9 | vTexCoord = (gl_TextureMatrix[0] * gl_MultiTexCoord0).xy; 10 | gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; 11 | } 12 | 13 | -------------------------------------------------------------------------------- /Chapter15/sound/fallinfire.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter15/sound/fallinfire.wav -------------------------------------------------------------------------------- /Chapter15/sound/fallinwater.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter15/sound/fallinwater.wav -------------------------------------------------------------------------------- /Chapter15/sound/fire1.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter15/sound/fire1.wav -------------------------------------------------------------------------------- /Chapter15/sound/jump.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter15/sound/jump.wav -------------------------------------------------------------------------------- /Chapter15/sound/reachgoal.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter15/sound/reachgoal.wav -------------------------------------------------------------------------------- /Chapter16/code/Bob.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "PlayableCharacter.h" 3 | 4 | class Bob : public PlayableCharacter 5 | { 6 | public: 7 | // A constructor specific to Bob 8 | Bob::Bob(); 9 | 10 | // The overriden input handler for Bob 11 | bool virtual handleInput(); 12 | 13 | }; 14 | 15 | -------------------------------------------------------------------------------- /Chapter16/code/LevelManager.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | using namespace sf; 5 | using namespace std; 6 | 7 | 8 | class LevelManager 9 | { 10 | private: 11 | Vector2i m_LevelSize; 12 | Vector2f m_StartPosition; 13 | float m_TimeModifier = 1; 14 | float m_BaseTimeLimit = 0; 15 | int m_CurrentLevel = 0; 16 | const int NUM_LEVELS = 4; 17 | 18 | public: 19 | 20 | const int TILE_SIZE = 50; 21 | const int VERTS_IN_QUAD = 4; 22 | 23 | float getTimeLimit(); 24 | 25 | Vector2f getStartPosition(); 26 | 27 | int** nextLevel(VertexArray& rVaLevel); 28 | 29 | Vector2i getLevelSize(); 30 | 31 | int getCurrentLevel(); 32 | 33 | }; 34 | -------------------------------------------------------------------------------- /Chapter16/code/LoadLevel.cpp: -------------------------------------------------------------------------------- 1 | #include "Engine.h" 2 | 3 | void Engine::loadLevel() 4 | { 5 | m_Playing = false; 6 | 7 | // Delete the previously allocated memory 8 | for (int i = 0; i < m_LM.getLevelSize().y; ++i) 9 | { 10 | delete[] m_ArrayLevel[i]; 11 | 12 | } 13 | delete[] m_ArrayLevel; 14 | 15 | // Load the next 2d array with the map for the level 16 | // And repopulate the vertex array as well 17 | m_ArrayLevel = m_LM.nextLevel(m_VALevel); 18 | 19 | // How long is this new time limit 20 | m_TimeRemaining = m_LM.getTimeLimit(); 21 | 22 | // Spawn Thomas and Bob 23 | m_Thomas.spawn(m_LM.getStartPosition(), GRAVITY); 24 | m_Bob.spawn(m_LM.getStartPosition(), GRAVITY); 25 | 26 | // Make sure this code isn't run again 27 | m_NewLevelRequired = false; 28 | } -------------------------------------------------------------------------------- /Chapter16/code/Main.cpp: -------------------------------------------------------------------------------- 1 | #include "Engine.h" 2 | 3 | int main() 4 | { 5 | // Declare an instance of Engine 6 | Engine engine; 7 | 8 | // Start the engine 9 | engine.run(); 10 | 11 | // Quit in the usual way when the engine is stopped 12 | return 0; 13 | } -------------------------------------------------------------------------------- /Chapter16/code/TextureHolder.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #ifndef TEXTURE_HOLDER_H 3 | #define TEXTURE_HOLDER_H 4 | 5 | #include 6 | #include 7 | 8 | class TextureHolder 9 | { 10 | private: 11 | // A map container from the STL, 12 | // that holds related pairs of String and Texture 13 | std::map m_Textures; 14 | 15 | // A pointer of the same type as the class itself 16 | // the one and only instance 17 | static TextureHolder* m_s_Instance; 18 | 19 | public: 20 | TextureHolder(); 21 | static sf::Texture& GetTexture(std::string const& filename); 22 | 23 | }; 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /Chapter16/code/Thomas.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "PlayableCharacter.h" 3 | 4 | class Thomas : public PlayableCharacter 5 | { 6 | public: 7 | // A constructor specific to Thomas 8 | Thomas::Thomas(); 9 | 10 | // The overriden input handler for Thomas 11 | bool virtual handleInput(); 12 | 13 | }; 14 | -------------------------------------------------------------------------------- /Chapter16/fonts/README.txt: -------------------------------------------------------------------------------- 1 | Dowload a font as per the instructions in chapter 12 -------------------------------------------------------------------------------- /Chapter16/graphics/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter16/graphics/background.png -------------------------------------------------------------------------------- /Chapter16/graphics/bob.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter16/graphics/bob.png -------------------------------------------------------------------------------- /Chapter16/graphics/thomas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter16/graphics/thomas.png -------------------------------------------------------------------------------- /Chapter16/graphics/tiles_sheet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter16/graphics/tiles_sheet.png -------------------------------------------------------------------------------- /Chapter16/levels/level1.txt: -------------------------------------------------------------------------------- 1 | 0000000000000000000000000000000000000000000000 2 | 0000000000000000000000000000000000000000000000 3 | 0000000000000000000000000000000000000000000000 4 | 0000000000000000000000000000000000000000000000 5 | 0000000000000000000000000000000000000000000000 6 | 0000000000000000000000000000000000000000000000 7 | 1111111111000111111222222221111133111111111411 8 | 0000000000000000001222222221000133100000001110 9 | 0000000000000000001222222221000133100000000000 10 | 0000000000000000001222222221000133100000000000 11 | 0000000000000000001111111111000111100000000000 -------------------------------------------------------------------------------- /Chapter16/shaders/rippleShader.frag: -------------------------------------------------------------------------------- 1 | // attributes from vertShader.vert 2 | varying vec4 vColor; 3 | varying vec2 vTexCoord; 4 | 5 | // uniforms 6 | uniform sampler2D uTexture; 7 | uniform float uTime; 8 | 9 | void main() { 10 | float coef = sin(gl_FragCoord.y * 0.1 + 1 * uTime); 11 | vTexCoord.y += coef * 0.03; 12 | gl_FragColor = vColor * texture2D(uTexture, vTexCoord); 13 | } 14 | -------------------------------------------------------------------------------- /Chapter16/shaders/vertShader.vert: -------------------------------------------------------------------------------- 1 | #version 110 2 | 3 | //varying "out" variables to be used in the fragment shader 4 | varying vec4 vColor; 5 | varying vec2 vTexCoord; 6 | 7 | void main() { 8 | vColor = gl_Color; 9 | vTexCoord = (gl_TextureMatrix[0] * gl_MultiTexCoord0).xy; 10 | gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; 11 | } 12 | 13 | -------------------------------------------------------------------------------- /Chapter16/sound/fallinfire.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter16/sound/fallinfire.wav -------------------------------------------------------------------------------- /Chapter16/sound/fallinwater.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter16/sound/fallinwater.wav -------------------------------------------------------------------------------- /Chapter16/sound/fire1.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter16/sound/fire1.wav -------------------------------------------------------------------------------- /Chapter16/sound/jump.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter16/sound/jump.wav -------------------------------------------------------------------------------- /Chapter16/sound/reachgoal.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter16/sound/reachgoal.wav -------------------------------------------------------------------------------- /Chapter17/code/Bob.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "PlayableCharacter.h" 3 | 4 | class Bob : public PlayableCharacter 5 | { 6 | public: 7 | // A constructor specific to Bob 8 | Bob::Bob(); 9 | 10 | // The overriden input handler for Bob 11 | bool virtual handleInput(); 12 | 13 | }; 14 | 15 | -------------------------------------------------------------------------------- /Chapter17/code/HUD.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | using namespace sf; 5 | 6 | class Hud 7 | { 8 | private: 9 | Font m_Font; 10 | Text m_StartText; 11 | Text m_TimeText; 12 | Text m_LevelText; 13 | 14 | public: 15 | Hud(); 16 | Text getMessage(); 17 | Text getLevel(); 18 | Text getTime(); 19 | 20 | void setLevel(String text); 21 | void setTime(String text); 22 | }; -------------------------------------------------------------------------------- /Chapter17/code/LevelManager.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | using namespace sf; 5 | using namespace std; 6 | 7 | 8 | class LevelManager 9 | { 10 | private: 11 | Vector2i m_LevelSize; 12 | Vector2f m_StartPosition; 13 | float m_TimeModifier = 1; 14 | float m_BaseTimeLimit = 0; 15 | int m_CurrentLevel = 0; 16 | const int NUM_LEVELS = 4; 17 | 18 | public: 19 | 20 | const int TILE_SIZE = 50; 21 | const int VERTS_IN_QUAD = 4; 22 | 23 | float getTimeLimit(); 24 | 25 | Vector2f getStartPosition(); 26 | 27 | int** nextLevel(VertexArray& rVaLevel); 28 | 29 | Vector2i getLevelSize(); 30 | 31 | int getCurrentLevel(); 32 | 33 | }; 34 | -------------------------------------------------------------------------------- /Chapter17/code/LoadLevel.cpp: -------------------------------------------------------------------------------- 1 | #include "Engine.h" 2 | 3 | void Engine::loadLevel() 4 | { 5 | m_Playing = false; 6 | 7 | // Delete the previously allocated memory 8 | for (int i = 0; i < m_LM.getLevelSize().y; ++i) 9 | { 10 | delete[] m_ArrayLevel[i]; 11 | 12 | } 13 | delete[] m_ArrayLevel; 14 | 15 | // Load the next 2d array with the map for the level 16 | // And repopulate the vertex array as well 17 | m_ArrayLevel = m_LM.nextLevel(m_VALevel); 18 | 19 | // Prepare the sound emitters 20 | populateEmitters(m_FireEmitters, m_ArrayLevel); 21 | 22 | // How long is this new time limit 23 | m_TimeRemaining = m_LM.getTimeLimit(); 24 | 25 | // Spawn Thomas and Bob 26 | m_Thomas.spawn(m_LM.getStartPosition(), GRAVITY); 27 | m_Bob.spawn(m_LM.getStartPosition(), GRAVITY); 28 | 29 | // Make sure this code isn't run again 30 | m_NewLevelRequired = false; 31 | } -------------------------------------------------------------------------------- /Chapter17/code/Main.cpp: -------------------------------------------------------------------------------- 1 | #include "Engine.h" 2 | 3 | int main() 4 | { 5 | // Declare an instance of Engine 6 | Engine engine; 7 | 8 | // Start the engine 9 | engine.run(); 10 | 11 | // Quit in the usual way when the engine is stopped 12 | return 0; 13 | } -------------------------------------------------------------------------------- /Chapter17/code/SoundManager.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | using namespace sf; 5 | 6 | class SoundManager 7 | { 8 | private: 9 | // The buffers 10 | SoundBuffer m_FireBuffer; 11 | SoundBuffer m_FallInFireBuffer; 12 | SoundBuffer m_FallInWaterBuffer; 13 | SoundBuffer m_JumpBuffer; 14 | SoundBuffer m_ReachGoalBuffer; 15 | 16 | // The Sounds 17 | Sound m_Fire1Sound; 18 | Sound m_Fire2Sound; 19 | Sound m_Fire3Sound; 20 | Sound m_FallInFireSound; 21 | Sound m_FallInWaterSound; 22 | Sound m_JumpSound; 23 | Sound m_ReachGoalSound; 24 | 25 | // Which sound should we use next, fire 1, 2 or 3 26 | int m_NextSound = 1; 27 | 28 | public: 29 | 30 | SoundManager(); 31 | 32 | void playFire(Vector2f emitterLocation, Vector2f listenerLocation); 33 | void playFallInFire(); 34 | void playFallInWater(); 35 | void playJump(); 36 | void playReachGoal(); 37 | }; 38 | 39 | -------------------------------------------------------------------------------- /Chapter17/code/TextureHolder.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #ifndef TEXTURE_HOLDER_H 3 | #define TEXTURE_HOLDER_H 4 | 5 | #include 6 | #include 7 | 8 | class TextureHolder 9 | { 10 | private: 11 | // A map container from the STL, 12 | // that holds related pairs of String and Texture 13 | std::map m_Textures; 14 | 15 | // A pointer of the same type as the class itself 16 | // the one and only instance 17 | static TextureHolder* m_s_Instance; 18 | 19 | public: 20 | TextureHolder(); 21 | static sf::Texture& GetTexture(std::string const& filename); 22 | 23 | }; 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /Chapter17/code/Thomas.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "PlayableCharacter.h" 3 | 4 | class Thomas : public PlayableCharacter 5 | { 6 | public: 7 | // A constructor specific to Thomas 8 | Thomas::Thomas(); 9 | 10 | // The overriden input handler for Thomas 11 | bool virtual handleInput(); 12 | 13 | }; 14 | -------------------------------------------------------------------------------- /Chapter17/fonts/README.txt: -------------------------------------------------------------------------------- 1 | Dowload a font as per the instructions in chapter 12 -------------------------------------------------------------------------------- /Chapter17/graphics/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter17/graphics/background.png -------------------------------------------------------------------------------- /Chapter17/graphics/bob.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter17/graphics/bob.png -------------------------------------------------------------------------------- /Chapter17/graphics/thomas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter17/graphics/thomas.png -------------------------------------------------------------------------------- /Chapter17/graphics/tiles_sheet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter17/graphics/tiles_sheet.png -------------------------------------------------------------------------------- /Chapter17/levels/level1.txt: -------------------------------------------------------------------------------- 1 | 0000000000000000000000000000000000000000000000 2 | 0000000000000000000000000000000000000000000000 3 | 0000000000000000000000000000000000000000000000 4 | 0000000000000000000000000000000000000000000000 5 | 0000000000000000000000000000000000000000000000 6 | 0000000000000000000000000000000000000000000000 7 | 1111111111000111111222222221111133111111111411 8 | 0000000000000000001222222221000133100000001110 9 | 0000000000000000001222222221000133100000000000 10 | 0000000000000000001222222221000133100000000000 11 | 0000000000000000001111111111000111100000000000 -------------------------------------------------------------------------------- /Chapter17/shaders/rippleShader.frag: -------------------------------------------------------------------------------- 1 | // attributes from vertShader.vert 2 | varying vec4 vColor; 3 | varying vec2 vTexCoord; 4 | 5 | // uniforms 6 | uniform sampler2D uTexture; 7 | uniform float uTime; 8 | 9 | void main() { 10 | float coef = sin(gl_FragCoord.y * 0.1 + 1 * uTime); 11 | vTexCoord.y += coef * 0.03; 12 | gl_FragColor = vColor * texture2D(uTexture, vTexCoord); 13 | } 14 | -------------------------------------------------------------------------------- /Chapter17/shaders/vertShader.vert: -------------------------------------------------------------------------------- 1 | #version 110 2 | 3 | //varying "out" variables to be used in the fragment shader 4 | varying vec4 vColor; 5 | varying vec2 vTexCoord; 6 | 7 | void main() { 8 | vColor = gl_Color; 9 | vTexCoord = (gl_TextureMatrix[0] * gl_MultiTexCoord0).xy; 10 | gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; 11 | } 12 | 13 | -------------------------------------------------------------------------------- /Chapter17/sound/fallinfire.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter17/sound/fallinfire.wav -------------------------------------------------------------------------------- /Chapter17/sound/fallinwater.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter17/sound/fallinwater.wav -------------------------------------------------------------------------------- /Chapter17/sound/fire1.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter17/sound/fire1.wav -------------------------------------------------------------------------------- /Chapter17/sound/jump.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter17/sound/jump.wav -------------------------------------------------------------------------------- /Chapter17/sound/reachgoal.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter17/sound/reachgoal.wav -------------------------------------------------------------------------------- /Chapter18/code/Bob.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "PlayableCharacter.h" 3 | 4 | class Bob : public PlayableCharacter 5 | { 6 | public: 7 | // A constructor specific to Bob 8 | Bob::Bob(); 9 | 10 | // The overriden input handler for Bob 11 | bool virtual handleInput(); 12 | 13 | }; 14 | 15 | -------------------------------------------------------------------------------- /Chapter18/code/HUD.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | using namespace sf; 5 | 6 | class Hud 7 | { 8 | private: 9 | Font m_Font; 10 | Text m_StartText; 11 | Text m_TimeText; 12 | Text m_LevelText; 13 | 14 | public: 15 | Hud(); 16 | Text getMessage(); 17 | Text getLevel(); 18 | Text getTime(); 19 | 20 | void setLevel(String text); 21 | void setTime(String text); 22 | }; -------------------------------------------------------------------------------- /Chapter18/code/LevelManager.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | using namespace sf; 5 | using namespace std; 6 | 7 | 8 | class LevelManager 9 | { 10 | private: 11 | Vector2i m_LevelSize; 12 | Vector2f m_StartPosition; 13 | float m_TimeModifier = 1; 14 | float m_BaseTimeLimit = 0; 15 | int m_CurrentLevel = 0; 16 | const int NUM_LEVELS = 4; 17 | 18 | public: 19 | 20 | const int TILE_SIZE = 50; 21 | const int VERTS_IN_QUAD = 4; 22 | 23 | float getTimeLimit(); 24 | 25 | Vector2f getStartPosition(); 26 | 27 | int** nextLevel(VertexArray& rVaLevel); 28 | 29 | Vector2i getLevelSize(); 30 | 31 | int getCurrentLevel(); 32 | 33 | }; 34 | -------------------------------------------------------------------------------- /Chapter18/code/LoadLevel.cpp: -------------------------------------------------------------------------------- 1 | #include "Engine.h" 2 | 3 | void Engine::loadLevel() 4 | { 5 | m_Playing = false; 6 | 7 | // Delete the previously allocated memory 8 | for (int i = 0; i < m_LM.getLevelSize().y; ++i) 9 | { 10 | delete[] m_ArrayLevel[i]; 11 | 12 | } 13 | delete[] m_ArrayLevel; 14 | 15 | // Load the next 2d array with the map for the level 16 | // And repopulate the vertex array as well 17 | m_ArrayLevel = m_LM.nextLevel(m_VALevel); 18 | 19 | // Prepare the sound emitters 20 | populateEmitters(m_FireEmitters, m_ArrayLevel); 21 | 22 | // How long is this new time limit 23 | m_TimeRemaining = m_LM.getTimeLimit(); 24 | 25 | // Spawn Thomas and Bob 26 | m_Thomas.spawn(m_LM.getStartPosition(), GRAVITY); 27 | m_Bob.spawn(m_LM.getStartPosition(), GRAVITY); 28 | 29 | // Make sure this code isn't run again 30 | m_NewLevelRequired = false; 31 | } -------------------------------------------------------------------------------- /Chapter18/code/Main.cpp: -------------------------------------------------------------------------------- 1 | #include "Engine.h" 2 | 3 | int main() 4 | { 5 | // Declare an instance of Engine 6 | Engine engine; 7 | 8 | // Start the engine 9 | engine.run(); 10 | 11 | // Quit in the usual way when the engine is stopped 12 | return 0; 13 | } -------------------------------------------------------------------------------- /Chapter18/code/Particle.cpp: -------------------------------------------------------------------------------- 1 | #include "Particle.h" 2 | 3 | Particle::Particle(Vector2f direction) 4 | { 5 | 6 | // Determine the direction 7 | //m_Velocity = direction; 8 | m_Velocity.x = direction.x; 9 | m_Velocity.y = direction.y; 10 | } 11 | 12 | void Particle::update(float dtAsSeconds) 13 | { 14 | // Move the particle 15 | m_Position += m_Velocity * dtAsSeconds; 16 | } 17 | 18 | void Particle::setPosition(Vector2f position) 19 | { 20 | m_Position = position; 21 | 22 | } 23 | 24 | Vector2f Particle::getPosition() 25 | { 26 | return m_Position; 27 | } -------------------------------------------------------------------------------- /Chapter18/code/Particle.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | using namespace sf; 5 | 6 | class Particle 7 | { 8 | private: 9 | Vector2f m_Position; 10 | Vector2f m_Velocity; 11 | 12 | public: 13 | Particle(Vector2f direction); 14 | 15 | void update(float dt); 16 | 17 | void setPosition(Vector2f position); 18 | 19 | Vector2f getPosition(); 20 | }; 21 | -------------------------------------------------------------------------------- /Chapter18/code/ParticleSystem.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include "Particle.h" 4 | 5 | using namespace sf; 6 | using namespace std; 7 | 8 | class ParticleSystem : public Drawable 9 | { 10 | private: 11 | vector m_Particles; 12 | VertexArray m_Vertices; 13 | float m_Duration; 14 | bool m_IsRunning = false; 15 | 16 | 17 | public: 18 | 19 | virtual void draw(RenderTarget& target, RenderStates states) const; 20 | 21 | void init(int count); 22 | 23 | void emitParticles(Vector2f position); 24 | 25 | void update(float elapsed); 26 | 27 | bool running(); 28 | 29 | }; 30 | 31 | 32 | -------------------------------------------------------------------------------- /Chapter18/code/SoundManager.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | using namespace sf; 5 | 6 | class SoundManager 7 | { 8 | private: 9 | // The buffers 10 | SoundBuffer m_FireBuffer; 11 | SoundBuffer m_FallInFireBuffer; 12 | SoundBuffer m_FallInWaterBuffer; 13 | SoundBuffer m_JumpBuffer; 14 | SoundBuffer m_ReachGoalBuffer; 15 | 16 | // The Sounds 17 | Sound m_Fire1Sound; 18 | Sound m_Fire2Sound; 19 | Sound m_Fire3Sound; 20 | Sound m_FallInFireSound; 21 | Sound m_FallInWaterSound; 22 | Sound m_JumpSound; 23 | Sound m_ReachGoalSound; 24 | 25 | // Which sound should we use next, fire 1, 2 or 3 26 | int m_NextSound = 1; 27 | 28 | public: 29 | 30 | SoundManager(); 31 | 32 | void playFire(Vector2f emitterLocation, Vector2f listenerLocation); 33 | void playFallInFire(); 34 | void playFallInWater(); 35 | void playJump(); 36 | void playReachGoal(); 37 | }; 38 | 39 | -------------------------------------------------------------------------------- /Chapter18/code/TextureHolder.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #ifndef TEXTURE_HOLDER_H 3 | #define TEXTURE_HOLDER_H 4 | 5 | #include 6 | #include 7 | 8 | class TextureHolder 9 | { 10 | private: 11 | // A map container from the STL, 12 | // that holds related pairs of String and Texture 13 | std::map m_Textures; 14 | 15 | // A pointer of the same type as the class itself 16 | // the one and only instance 17 | static TextureHolder* m_s_Instance; 18 | 19 | public: 20 | TextureHolder(); 21 | static sf::Texture& GetTexture(std::string const& filename); 22 | 23 | }; 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /Chapter18/code/Thomas.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "PlayableCharacter.h" 3 | 4 | class Thomas : public PlayableCharacter 5 | { 6 | public: 7 | // A constructor specific to Thomas 8 | Thomas::Thomas(); 9 | 10 | // The overriden input handler for Thomas 11 | bool virtual handleInput(); 12 | 13 | }; 14 | -------------------------------------------------------------------------------- /Chapter18/fonts/README.txt: -------------------------------------------------------------------------------- 1 | Dowload a font as per the instructions in chapter 12 -------------------------------------------------------------------------------- /Chapter18/graphics/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter18/graphics/background.png -------------------------------------------------------------------------------- /Chapter18/graphics/bob.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter18/graphics/bob.png -------------------------------------------------------------------------------- /Chapter18/graphics/thomas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter18/graphics/thomas.png -------------------------------------------------------------------------------- /Chapter18/graphics/tiles_sheet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter18/graphics/tiles_sheet.png -------------------------------------------------------------------------------- /Chapter18/levels/level1.txt: -------------------------------------------------------------------------------- 1 | 0000000000000000000000000000000000000000000000 2 | 0000000000000000000000000000000000000000000000 3 | 0000000000000000000000000000000000000000000000 4 | 0000000000000000000000000000000000000000000000 5 | 0000000000000000000000000000000000000000000000 6 | 0000000000000000000000000000000000000000000000 7 | 1111111111000111111222222221111133111111111411 8 | 0000000000000000001222222221000133100000001110 9 | 0000000000000000001222222221000133100000000000 10 | 0000000000000000001222222221000133100000000000 11 | 0000000000000000001111111111000111100000000000 -------------------------------------------------------------------------------- /Chapter18/shaders/rippleShader.frag: -------------------------------------------------------------------------------- 1 | // attributes from vertShader.vert 2 | varying vec4 vColor; 3 | varying vec2 vTexCoord; 4 | 5 | // uniforms 6 | uniform sampler2D uTexture; 7 | uniform float uTime; 8 | 9 | void main() { 10 | float coef = sin(gl_FragCoord.y * 0.1 + 1 * uTime); 11 | vTexCoord.y += coef * 0.03; 12 | gl_FragColor = vColor * texture2D(uTexture, vTexCoord); 13 | } 14 | -------------------------------------------------------------------------------- /Chapter18/shaders/vertShader.vert: -------------------------------------------------------------------------------- 1 | #version 110 2 | 3 | //varying "out" variables to be used in the fragment shader 4 | varying vec4 vColor; 5 | varying vec2 vTexCoord; 6 | 7 | void main() { 8 | vColor = gl_Color; 9 | vTexCoord = (gl_TextureMatrix[0] * gl_MultiTexCoord0).xy; 10 | gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; 11 | } 12 | 13 | -------------------------------------------------------------------------------- /Chapter18/sound/fallinfire.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter18/sound/fallinfire.wav -------------------------------------------------------------------------------- /Chapter18/sound/fallinwater.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter18/sound/fallinwater.wav -------------------------------------------------------------------------------- /Chapter18/sound/fire1.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter18/sound/fire1.wav -------------------------------------------------------------------------------- /Chapter18/sound/jump.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter18/sound/jump.wav -------------------------------------------------------------------------------- /Chapter18/sound/reachgoal.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter18/sound/reachgoal.wav -------------------------------------------------------------------------------- /Chapter19/Space Invaders ++/BitmapStore.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #ifndef BITMAP_STORE_H 3 | #define BITMAP_STORE_H 4 | 5 | #include 6 | #include 7 | 8 | class BitmapStore 9 | { 10 | private: 11 | std::map m_BitmapsMap; 12 | static BitmapStore* m_s_Instance; 13 | 14 | public: 15 | BitmapStore(); 16 | static sf::Texture& getBitmap(std::string const& filename); 17 | static void addBitmap(std::string const& filename); 18 | }; 19 | #endif -------------------------------------------------------------------------------- /Chapter19/Space Invaders ++/Button.cpp: -------------------------------------------------------------------------------- 1 | #include "Button.h" 2 | 3 | Button::Button(Vector2f position, 4 | float width, float height, 5 | int red, int green, int blue, 6 | std::string text) 7 | { 8 | m_Button.setPosition(position); 9 | m_Button.setFillColor(sf::Color(red, green, blue)); 10 | m_Button.setSize(Vector2f(width, height)); 11 | 12 | m_Text = "" + text; 13 | 14 | float textPaddingX = width / 10; 15 | float textPaddingY = height / 10; 16 | m_ButtonText.setCharacterSize(height * .7f); 17 | m_ButtonText.setString(text); 18 | m_Font.loadFromFile("fonts/Roboto-Bold.ttf"); 19 | m_ButtonText.setFont(m_Font); 20 | m_ButtonText.setPosition(Vector2f((position.x + textPaddingX), 21 | (position.y + textPaddingY))); 22 | 23 | m_Collider = FloatRect(position, Vector2f(width, height)); 24 | } 25 | 26 | void Button::draw(RenderWindow& window) 27 | { 28 | window.draw(m_Button); 29 | window.draw(m_ButtonText); 30 | } -------------------------------------------------------------------------------- /Chapter19/Space Invaders ++/Button.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | using namespace sf; 5 | 6 | class Button 7 | { 8 | private: 9 | RectangleShape m_Button; 10 | Text m_ButtonText; 11 | Font m_Font; 12 | 13 | public: 14 | std::string m_Text; 15 | FloatRect m_Collider; 16 | 17 | Button(Vector2f position, 18 | float width, float height, 19 | int red, int green, int blue, 20 | std::string text); 21 | 22 | void draw(RenderWindow& window); 23 | }; -------------------------------------------------------------------------------- /Chapter19/Space Invaders ++/GameEngine.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include "ScreenManager.h" 4 | #include "SoundEngine.h" 5 | 6 | using namespace sf; 7 | 8 | class GameEngine { 9 | private: 10 | Clock m_Clock; 11 | Time m_DT; 12 | RenderWindow m_Window; 13 | 14 | unique_ptr m_ScreenManager; 15 | 16 | float m_FPS = 0; 17 | Vector2f m_Resolution; 18 | 19 | void handleInput(); 20 | void update(); 21 | void draw(); 22 | 23 | public: 24 | SoundEngine m_SoundEngine; 25 | 26 | GameEngine(); 27 | void run(); 28 | }; -------------------------------------------------------------------------------- /Chapter19/Space Invaders ++/GameInputHandler.cpp: -------------------------------------------------------------------------------- 1 | #include "GameInputHandler.h" 2 | #include "SoundEngine.h" 3 | #include "GameScreen.h" 4 | 5 | void GameInputHandler::initialize() { 6 | } 7 | 8 | void GameInputHandler::handleGamepad() 9 | { 10 | } 11 | 12 | void GameInputHandler::handleKeyPressed( 13 | Event& event, RenderWindow& window) 14 | { 15 | // Handle key presses 16 | if (event.key.code == Keyboard::Escape) 17 | { 18 | SoundEngine::playClick(); 19 | getPointerToScreenManagerRemoteControl()-> 20 | SwitchScreens("Select"); 21 | } 22 | } 23 | 24 | void GameInputHandler::handleKeyReleased( 25 | Event& event, RenderWindow& window) 26 | { 27 | } -------------------------------------------------------------------------------- /Chapter19/Space Invaders ++/GameInputHandler.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "InputHandler.h" 3 | 4 | class GameScreen; 5 | 6 | class GameInputHandler : public InputHandler 7 | { 8 | public: 9 | 10 | void initialize(); 11 | void handleGamepad() override; 12 | void handleKeyPressed(Event& event, 13 | RenderWindow& window) override; 14 | 15 | void handleKeyReleased(Event& event, 16 | RenderWindow& window) override; 17 | }; 18 | -------------------------------------------------------------------------------- /Chapter19/Space Invaders ++/GameOverInputHandler.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "InputHandler.h" 3 | 4 | class GameOverInputHandler : 5 | public InputHandler 6 | { 7 | public: 8 | void handleKeyPressed(Event& event, 9 | RenderWindow& window) override; 10 | 11 | void handleLeftClick(std::string& 12 | buttonInteractedWith, RenderWindow& window) override; 13 | }; 14 | -------------------------------------------------------------------------------- /Chapter19/Space Invaders ++/GameOverUIPanel.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "UIPanel.h" 3 | class GameOverUIPanel : 4 | public UIPanel 5 | { 6 | private: 7 | void initialiseButtons(); 8 | 9 | public: 10 | GameOverUIPanel(Vector2i res); 11 | void virtual draw(RenderWindow& window); 12 | }; -------------------------------------------------------------------------------- /Chapter19/Space Invaders ++/GameScreen.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Screen.h" 3 | #include "GameInputHandler.h" 4 | #include "GameOverInputHandler.h" 5 | 6 | class GameScreen : public Screen 7 | { 8 | private: 9 | ScreenManagerRemoteControl* m_ScreenManagerRemoteControl; 10 | shared_ptr m_GIH; 11 | 12 | 13 | Texture m_BackgroundTexture; 14 | Sprite m_BackgroundSprite; 15 | public: 16 | static bool m_GameOver; 17 | 18 | GameScreen(ScreenManagerRemoteControl* smrc, Vector2i res); 19 | void initialise() override; 20 | void virtual update(float fps); 21 | void virtual draw(RenderWindow& window); 22 | }; 23 | -------------------------------------------------------------------------------- /Chapter19/Space Invaders ++/GameUIPanel.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "UIPanel.h" 3 | 4 | class GameUIPanel : public UIPanel 5 | { 6 | public: 7 | GameUIPanel(Vector2i res); 8 | void draw(RenderWindow& window) override; 9 | }; -------------------------------------------------------------------------------- /Chapter19/Space Invaders ++/Screen.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include "InputHandler.h" 5 | #include "UIPanel.h" 6 | #include "ScreenManagerRemoteControl.h" 7 | 8 | class InputHandler; 9 | 10 | class Screen { 11 | private: 12 | vector> m_InputHandlers; 13 | vector> m_Panels; 14 | 15 | protected: 16 | void addPanel(unique_ptr p, 17 | ScreenManagerRemoteControl* smrc, 18 | shared_ptr ih); 19 | 20 | public: 21 | virtual void initialise(); 22 | void virtual update(float fps); 23 | void virtual draw(RenderWindow& window); 24 | void handleInput(RenderWindow& window); 25 | 26 | View m_View; 27 | }; -------------------------------------------------------------------------------- /Chapter19/Space Invaders ++/ScreenManager.cpp: -------------------------------------------------------------------------------- 1 | #include "ScreenManager.h" 2 | 3 | ScreenManager::ScreenManager(Vector2i res) 4 | { 5 | m_Screens["Game"] = unique_ptr( 6 | new GameScreen(this, res)); 7 | 8 | m_Screens["Select"] = unique_ptr( 9 | new SelectScreen(this, res)); 10 | } 11 | 12 | void ScreenManager::handleInput(RenderWindow& window) 13 | { 14 | m_Screens[m_CurrentScreen]->handleInput(window); 15 | } 16 | 17 | void ScreenManager::update(float fps) 18 | { 19 | m_Screens[m_CurrentScreen]->update(fps); 20 | } 21 | 22 | void ScreenManager::draw(RenderWindow& window) 23 | { 24 | m_Screens[m_CurrentScreen]->draw(window); 25 | } -------------------------------------------------------------------------------- /Chapter19/Space Invaders ++/ScreenManagerRemoteControl.cpp: -------------------------------------------------------------------------------- 1 | /********************************* 2 | ******THIS IS AN INTERFACE******** 3 | *********************************/ -------------------------------------------------------------------------------- /Chapter19/Space Invaders ++/ScreenManagerRemoteControl.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | //#include "GameObject.h" 5 | //#include "GameObjectSharer.h" 6 | 7 | using namespace std; 8 | 9 | class ScreenManagerRemoteControl 10 | { 11 | public: 12 | virtual void SwitchScreens(string screenToSwitchTo) = 0; 13 | virtual void loadLevelInPlayMode(string screenToLoad) = 0; 14 | //virtual vector& getGameObjects() = 0; 15 | //virtual GameObjectSharer& shareGameObjectSharer() = 0; 16 | }; 17 | 18 | -------------------------------------------------------------------------------- /Chapter19/Space Invaders ++/SelectInputHandler.cpp: -------------------------------------------------------------------------------- 1 | #include "SelectInputHandler.h" 2 | #include "SoundEngine.h" 3 | #include "WorldState.h" 4 | #include 5 | 6 | int WorldState::WAVE_NUMBER; 7 | 8 | void SelectInputHandler::handleKeyPressed( 9 | Event& event, RenderWindow& window) 10 | { 11 | // Quit the game 12 | if (Keyboard::isKeyPressed(Keyboard::Escape)) 13 | { 14 | window.close(); 15 | } 16 | } 17 | 18 | void SelectInputHandler::handleLeftClick( 19 | std::string& buttonInteractedWith, RenderWindow& window) 20 | { 21 | if (buttonInteractedWith == "Play") { 22 | SoundEngine::playClick(); 23 | WorldState::WAVE_NUMBER = 0; 24 | getPointerToScreenManagerRemoteControl() 25 | ->loadLevelInPlayMode("level1"); 26 | } 27 | 28 | if (buttonInteractedWith == "Quit") { 29 | SoundEngine::playClick(); 30 | window.close(); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Chapter19/Space Invaders ++/SelectInputHandler.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "InputHandler.h" 3 | 4 | class SelectInputHandler : public InputHandler 5 | { 6 | public: 7 | void handleKeyPressed(Event& event, 8 | RenderWindow& window) override; 9 | 10 | void handleLeftClick(std::string& buttonInteractedWith, 11 | RenderWindow& window) override; 12 | }; 13 | -------------------------------------------------------------------------------- /Chapter19/Space Invaders ++/SelectScreen.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Screen.h" 3 | 4 | class SelectScreen : public Screen 5 | { 6 | private: 7 | ScreenManagerRemoteControl* m_ScreenManagerRemoteControl; 8 | 9 | Texture m_BackgroundTexture; 10 | Sprite m_BackgroundSprite; 11 | 12 | public: 13 | SelectScreen(ScreenManagerRemoteControl* smrc, Vector2i res); 14 | void virtual draw(RenderWindow& window); 15 | }; -------------------------------------------------------------------------------- /Chapter19/Space Invaders ++/SelectUIPanel.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "UIPanel.h" 3 | class SelectUIPanel : public UIPanel 4 | { 5 | private: 6 | void initialiseButtons(); 7 | 8 | public: 9 | SelectUIPanel(Vector2i res); 10 | void virtual draw(RenderWindow& window); 11 | }; 12 | -------------------------------------------------------------------------------- /Chapter19/Space Invaders ++/SoundEngine.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #ifndef SOUND_ENGINE_H 3 | #define SOUND_ENGINE_H 4 | 5 | #include 6 | 7 | using namespace sf; 8 | 9 | class SoundEngine 10 | { 11 | private: 12 | SoundBuffer m_ShootBuffer; 13 | SoundBuffer m_PlayerExplodeBuffer; 14 | SoundBuffer m_InvaderExplodeBuffer; 15 | SoundBuffer m_ClickBuffer; 16 | 17 | Sound m_ShootSound; 18 | Sound m_PlayerExplodeSound; 19 | Sound m_InvaderExplodeSound; 20 | Sound m_UhSound; 21 | Sound m_OhSound; 22 | Sound m_ClickSound; 23 | 24 | public: 25 | SoundEngine(); 26 | 27 | static void playShoot(); 28 | static void playPlayerExplode(); 29 | static void playInvaderExplode(); 30 | static void playClick(); 31 | 32 | static SoundEngine* m_s_Instance; 33 | }; 34 | 35 | #endif -------------------------------------------------------------------------------- /Chapter19/Space Invaders ++/Space Invaders ++.cpp: -------------------------------------------------------------------------------- 1 | #include "GameEngine.h" 2 | 3 | int main() 4 | { 5 | GameEngine m_GameEngine; 6 | m_GameEngine.run(); 7 | return 0; 8 | } -------------------------------------------------------------------------------- /Chapter19/Space Invaders ++/UIPanel.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include "Button.h" 4 | 5 | using namespace std; 6 | 7 | class UIPanel { 8 | private: 9 | RectangleShape m_UIPanel; 10 | bool m_Hidden = false; 11 | vector> m_Buttons; 12 | 13 | protected: 14 | float m_ButtonWidth = 0; 15 | float m_ButtonHeight = 0; 16 | float m_ButtonPadding = 0; 17 | 18 | Font m_Font; 19 | Text m_Text; 20 | 21 | void addButton(float x, float y, int width, int height, 22 | int red, int green, int blue, 23 | string label); 24 | 25 | public: 26 | View m_View; 27 | 28 | UIPanel(Vector2i res, int x, int y, 29 | float width, float height, 30 | int alpha, int red, int green, int blue); 31 | 32 | vector> getButtons(); 33 | virtual void draw(RenderWindow& window); 34 | void show(); 35 | void hide(); 36 | }; 37 | -------------------------------------------------------------------------------- /Chapter19/Space Invaders ++/WorldState.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class WorldState 3 | { 4 | public: 5 | static const int WORLD_WIDTH = 100; 6 | static int WORLD_HEIGHT; 7 | static int SCORE; 8 | static int LIVES; 9 | static int NUM_INVADERS_AT_START; 10 | static int NUM_INVADERS; 11 | static int WAVE_NUMBER; 12 | }; -------------------------------------------------------------------------------- /Chapter19/Space Invaders ++/fonts/Roboto-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter19/Space Invaders ++/fonts/Roboto-Bold.ttf -------------------------------------------------------------------------------- /Chapter19/Space Invaders ++/graphics/bullet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter19/Space Invaders ++/graphics/bullet.png -------------------------------------------------------------------------------- /Chapter19/Space Invaders ++/graphics/invader1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter19/Space Invaders ++/graphics/invader1.png -------------------------------------------------------------------------------- /Chapter19/Space Invaders ++/graphics/playership.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter19/Space Invaders ++/graphics/playership.png -------------------------------------------------------------------------------- /Chapter19/Space Invaders ++/sound/click.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter19/Space Invaders ++/sound/click.ogg -------------------------------------------------------------------------------- /Chapter19/Space Invaders ++/sound/invaderexplode.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter19/Space Invaders ++/sound/invaderexplode.ogg -------------------------------------------------------------------------------- /Chapter19/Space Invaders ++/sound/playerexplode.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter19/Space Invaders ++/sound/playerexplode.ogg -------------------------------------------------------------------------------- /Chapter19/Space Invaders ++/sound/shoot.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter19/Space Invaders ++/sound/shoot.ogg -------------------------------------------------------------------------------- /Chapter20-22/Space Invaders ++ 2/BitmapStore.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #ifndef BITMAP_STORE_H 3 | #define BITMAP_STORE_H 4 | 5 | #include 6 | #include 7 | 8 | class BitmapStore 9 | { 10 | private: 11 | std::map m_BitmapsMap; 12 | static BitmapStore* m_s_Instance; 13 | 14 | public: 15 | BitmapStore(); 16 | static sf::Texture& getBitmap(std::string const& filename); 17 | static void addBitmap(std::string const& filename); 18 | }; 19 | #endif -------------------------------------------------------------------------------- /Chapter20-22/Space Invaders ++ 2/BlueprintObjectParser.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "GameObjectBlueprint.h" 3 | #include 4 | 5 | using namespace std; 6 | 7 | class BlueprintObjectParser { 8 | private: 9 | string extractStringBetweenTags( 10 | string stringToSearch, string startTag, string endTag); 11 | 12 | public: 13 | void parseNextObjectForBlueprint( 14 | ifstream& reader, GameObjectBlueprint& bp); 15 | }; -------------------------------------------------------------------------------- /Chapter20-22/Space Invaders ++ 2/BulletSpawner.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter20-22/Space Invaders ++ 2/BulletSpawner.cpp -------------------------------------------------------------------------------- /Chapter20-22/Space Invaders ++ 2/BulletSpawner.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | class BulletSpawner 4 | { 5 | public: 6 | virtual void spawnBullet( 7 | sf::Vector2f spawnLocation, bool forPlayer) = 0; 8 | }; -------------------------------------------------------------------------------- /Chapter20-22/Space Invaders ++ 2/Button.cpp: -------------------------------------------------------------------------------- 1 | #include "Button.h" 2 | 3 | Button::Button(Vector2f position, 4 | float width, float height, 5 | int red, int green, int blue, 6 | std::string text) 7 | { 8 | m_Button.setPosition(position); 9 | m_Button.setFillColor(sf::Color(red, green, blue)); 10 | m_Button.setSize(Vector2f(width, height)); 11 | 12 | m_Text = "" + text; 13 | 14 | float textPaddingX = width / 10; 15 | float textPaddingY = height / 10; 16 | m_ButtonText.setCharacterSize(height * .7f); 17 | m_ButtonText.setString(text); 18 | m_Font.loadFromFile("fonts/Roboto-Bold.ttf"); 19 | m_ButtonText.setFont(m_Font); 20 | m_ButtonText.setPosition(Vector2f((position.x + textPaddingX), 21 | (position.y + textPaddingY))); 22 | 23 | m_Collider = FloatRect(position, Vector2f(width, height)); 24 | } 25 | 26 | void Button::draw(RenderWindow& window) 27 | { 28 | window.draw(m_Button); 29 | window.draw(m_ButtonText); 30 | } -------------------------------------------------------------------------------- /Chapter20-22/Space Invaders ++ 2/Button.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | using namespace sf; 5 | 6 | class Button 7 | { 8 | private: 9 | RectangleShape m_Button; 10 | Text m_ButtonText; 11 | Font m_Font; 12 | 13 | public: 14 | std::string m_Text; 15 | FloatRect m_Collider; 16 | 17 | Button(Vector2f position, 18 | float width, float height, 19 | int red, int green, int blue, 20 | std::string text); 21 | 22 | void draw(RenderWindow& window); 23 | }; -------------------------------------------------------------------------------- /Chapter20-22/Space Invaders ++ 2/ColliderComponent.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | All Functionality in ColliderComponent.h 3 | */ -------------------------------------------------------------------------------- /Chapter20-22/Space Invaders ++ 2/ColliderComponent.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Component.h" 3 | #include 4 | 5 | class ColliderComponent : public Component 6 | { 7 | private: 8 | string m_Type = "collider"; 9 | bool m_Enabled = false; 10 | 11 | public: 12 | 13 | /**************************************************** 14 | ***************************************************** 15 | From Component interface 16 | ***************************************************** 17 | *****************************************************/ 18 | 19 | string Component::getType() { 20 | return m_Type; 21 | } 22 | 23 | void Component::disableComponent() { 24 | m_Enabled = false; 25 | } 26 | 27 | void Component::enableComponent() { 28 | m_Enabled = true; 29 | } 30 | 31 | bool Component::enabled() { 32 | return m_Enabled; 33 | } 34 | 35 | void Component::start(GameObjectSharer* gos, GameObject* self) { 36 | 37 | } 38 | }; 39 | 40 | -------------------------------------------------------------------------------- /Chapter20-22/Space Invaders ++ 2/Component.cpp: -------------------------------------------------------------------------------- 1 | /********************************* 2 | ******THIS IS AN INTERFACE******** 3 | *********************************/ -------------------------------------------------------------------------------- /Chapter20-22/Space Invaders ++ 2/Component.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "GameObjectSharer.h" 3 | #include 4 | 5 | using namespace std; 6 | 7 | class GameObject; 8 | 9 | class Component { 10 | public: 11 | virtual string getType() = 0; 12 | virtual string getSpecificType() = 0; 13 | virtual void disableComponent() = 0; 14 | virtual void enableComponent() = 0; 15 | virtual bool enabled() = 0; 16 | virtual void start(GameObjectSharer* gos, GameObject* self) = 0; 17 | }; 18 | -------------------------------------------------------------------------------- /Chapter20-22/Space Invaders ++ 2/DevelopState.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #define debuggingOnConsole 3 | class DevelopState {}; 4 | -------------------------------------------------------------------------------- /Chapter20-22/Space Invaders ++ 2/GameEngine.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include "ScreenManager.h" 4 | #include "SoundEngine.h" 5 | 6 | using namespace sf; 7 | 8 | class GameEngine { 9 | private: 10 | Clock m_Clock; 11 | Time m_DT; 12 | RenderWindow m_Window; 13 | 14 | unique_ptr m_ScreenManager; 15 | 16 | float m_FPS = 0; 17 | Vector2f m_Resolution; 18 | 19 | void handleInput(); 20 | void update(); 21 | void draw(); 22 | 23 | public: 24 | SoundEngine m_SoundEngine; 25 | 26 | GameEngine(); 27 | void run(); 28 | }; -------------------------------------------------------------------------------- /Chapter20-22/Space Invaders ++ 2/GameInputHandler.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "InputHandler.h" 3 | #include "PlayerUpdateComponent.h" 4 | #include "TransformComponent.h" 5 | 6 | class GameScreen; 7 | 8 | class GameInputHandler : public InputHandler 9 | { 10 | private: 11 | shared_ptr m_PUC; 12 | shared_ptr m_PTC; 13 | 14 | bool mBButtonPressed = false; 15 | 16 | public: 17 | 18 | void initialize(); 19 | void handleGamepad() override; 20 | void handleKeyPressed(Event& event, 21 | RenderWindow& window) override; 22 | 23 | void handleKeyReleased(Event& event, 24 | RenderWindow& window) override; 25 | }; 26 | -------------------------------------------------------------------------------- /Chapter20-22/Space Invaders ++ 2/GameObjectFactoryPlayMode.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "GameObjectBlueprint.h" 3 | #include "GameObject.h" 4 | #include 5 | 6 | class GameObjectFactoryPlayMode { 7 | public: 8 | void buildGameObject(GameObjectBlueprint& bp, 9 | std::vector & gameObjects); 10 | }; -------------------------------------------------------------------------------- /Chapter20-22/Space Invaders ++ 2/GameObjectSharer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | class GameObject; 6 | class GameObjectSharer { 7 | public: 8 | virtual std::vector& getGameObjectsWithGOS() = 0; 9 | virtual GameObject& findFirstObjectWithTag(std::string tag) = 0; 10 | }; -------------------------------------------------------------------------------- /Chapter20-22/Space Invaders ++ 2/GameOverInputHandler.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "InputHandler.h" 3 | 4 | class GameOverInputHandler : 5 | public InputHandler 6 | { 7 | public: 8 | void handleKeyPressed(Event& event, 9 | RenderWindow& window) override; 10 | 11 | void handleLeftClick(std::string& 12 | buttonInteractedWith, RenderWindow& window) override; 13 | }; 14 | -------------------------------------------------------------------------------- /Chapter20-22/Space Invaders ++ 2/GameOverUIPanel.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "UIPanel.h" 3 | class GameOverUIPanel : 4 | public UIPanel 5 | { 6 | private: 7 | void initialiseButtons(); 8 | 9 | public: 10 | GameOverUIPanel(Vector2i res); 11 | void virtual draw(RenderWindow& window); 12 | }; -------------------------------------------------------------------------------- /Chapter20-22/Space Invaders ++ 2/GameUIPanel.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "UIPanel.h" 3 | 4 | class GameUIPanel : public UIPanel 5 | { 6 | public: 7 | GameUIPanel(Vector2i res); 8 | void draw(RenderWindow& window) override; 9 | }; -------------------------------------------------------------------------------- /Chapter20-22/Space Invaders ++ 2/GraphicsComponent.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | All Functionality in GraphicsComponent.h 3 | */ 4 | -------------------------------------------------------------------------------- /Chapter20-22/Space Invaders ++ 2/ObjectTags.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | using namespace std; 5 | 6 | static class ObjectTags { 7 | public: 8 | static const string START_OF_OBJECT; 9 | static const string END_OF_OBJECT; 10 | static const string COMPONENT; 11 | static const string COMPONENT_END; 12 | static const string NAME; 13 | static const string NAME_END; 14 | static const string WIDTH; 15 | static const string WIDTH_END; 16 | static const string HEIGHT; 17 | static const string HEIGHT_END; 18 | static const string LOCATION_X; 19 | static const string LOCATION_X_END; 20 | static const string LOCATION_Y; 21 | static const string LOCATION_Y_END; 22 | static const string BITMAP_NAME; 23 | static const string BITMAP_NAME_END; 24 | static const string ENCOMPASSING_RECT_COLLIDER; 25 | static const string ENCOMPASSING_RECT_COLLIDER_END; 26 | }; -------------------------------------------------------------------------------- /Chapter20-22/Space Invaders ++ 2/PlayModeObjectLoader.cpp: -------------------------------------------------------------------------------- 1 | #include "PlayModeObjectLoader.h" 2 | #include "ObjectTags.h" 3 | #include 4 | #include 5 | 6 | void PlayModeObjectLoader:: 7 | loadGameObjectsForPlayMode( 8 | string pathToFile, vector& gameObjects) 9 | { 10 | ifstream reader(pathToFile); 11 | string lineFromFile; 12 | 13 | float x = 0, y = 0, width = 0, height = 0; 14 | string value = ""; 15 | while (getline(reader, lineFromFile)) { 16 | if (lineFromFile.find( 17 | ObjectTags::START_OF_OBJECT) != string::npos) { 18 | 19 | GameObjectBlueprint bp; 20 | m_BOP.parseNextObjectForBlueprint(reader, bp); 21 | m_GameObjectFactoryPlayMode.buildGameObject( 22 | bp, gameObjects); 23 | } 24 | } 25 | } 26 | 27 | -------------------------------------------------------------------------------- /Chapter20-22/Space Invaders ++ 2/PlayModeObjectLoader.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include "GameObject.h" 5 | #include "BlueprintObjectParser.h" 6 | #include "GameObjectFactoryPlayMode.h" 7 | 8 | using namespace std; 9 | 10 | class PlayModeObjectLoader { 11 | private: 12 | BlueprintObjectParser m_BOP; 13 | GameObjectFactoryPlayMode m_GameObjectFactoryPlayMode; 14 | 15 | public: 16 | void loadGameObjectsForPlayMode( 17 | string pathToFile, vector& mGameObjects); 18 | }; -------------------------------------------------------------------------------- /Chapter20-22/Space Invaders ++ 2/RectColliderComponent.cpp: -------------------------------------------------------------------------------- 1 | #include "RectColliderComponent.h" 2 | 3 | RectColliderComponent::RectColliderComponent(string name) { 4 | m_Tag = "" + name; 5 | } 6 | 7 | string RectColliderComponent::getColliderTag() { 8 | return m_Tag; 9 | } 10 | 11 | void RectColliderComponent::setOrMoveCollider( 12 | float x, float y, float width, float height) { 13 | 14 | m_Collider.left = x; 15 | m_Collider.top = y; 16 | m_Collider.width = width; 17 | m_Collider.height = height; 18 | } 19 | 20 | FloatRect& RectColliderComponent::getColliderRectF() { 21 | return m_Collider; 22 | } -------------------------------------------------------------------------------- /Chapter20-22/Space Invaders ++ 2/Screen.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include "InputHandler.h" 5 | #include "UIPanel.h" 6 | #include "ScreenManagerRemoteControl.h" 7 | 8 | class InputHandler; 9 | 10 | class Screen { 11 | private: 12 | vector> m_InputHandlers; 13 | vector> m_Panels; 14 | 15 | protected: 16 | void addPanel(unique_ptr p, 17 | ScreenManagerRemoteControl* smrc, 18 | shared_ptr ih); 19 | 20 | public: 21 | virtual void initialise(); 22 | void virtual update(float fps); 23 | void virtual draw(RenderWindow& window); 24 | void handleInput(RenderWindow& window); 25 | 26 | View m_View; 27 | }; -------------------------------------------------------------------------------- /Chapter20-22/Space Invaders ++ 2/ScreenManager.cpp: -------------------------------------------------------------------------------- 1 | #include "ScreenManager.h" 2 | 3 | ScreenManager::ScreenManager(Vector2i res) 4 | { 5 | m_Screens["Game"] = unique_ptr( 6 | new GameScreen(this, res)); 7 | 8 | m_Screens["Select"] = unique_ptr( 9 | new SelectScreen(this, res)); 10 | } 11 | 12 | void ScreenManager::handleInput(RenderWindow& window) 13 | { 14 | m_Screens[m_CurrentScreen]->handleInput(window); 15 | } 16 | 17 | void ScreenManager::update(float fps) 18 | { 19 | m_Screens[m_CurrentScreen]->update(fps); 20 | } 21 | 22 | void ScreenManager::draw(RenderWindow& window) 23 | { 24 | m_Screens[m_CurrentScreen]->draw(window); 25 | } -------------------------------------------------------------------------------- /Chapter20-22/Space Invaders ++ 2/ScreenManagerRemoteControl.cpp: -------------------------------------------------------------------------------- 1 | /********************************* 2 | ******THIS IS AN INTERFACE******** 3 | *********************************/ -------------------------------------------------------------------------------- /Chapter20-22/Space Invaders ++ 2/ScreenManagerRemoteControl.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include "GameObject.h" 5 | #include "GameObjectSharer.h" 6 | 7 | using namespace std; 8 | 9 | class ScreenManagerRemoteControl 10 | { 11 | public: 12 | virtual void SwitchScreens(string screenToSwitchTo) = 0; 13 | virtual void loadLevelInPlayMode(string screenToLoad) = 0; 14 | virtual vector& getGameObjects() = 0; 15 | virtual GameObjectSharer& shareGameObjectSharer() = 0; 16 | }; 17 | 18 | -------------------------------------------------------------------------------- /Chapter20-22/Space Invaders ++ 2/SelectInputHandler.cpp: -------------------------------------------------------------------------------- 1 | #include "SelectInputHandler.h" 2 | #include "SoundEngine.h" 3 | #include "WorldState.h" 4 | #include 5 | 6 | int WorldState::WAVE_NUMBER; 7 | 8 | void SelectInputHandler::handleKeyPressed( 9 | Event& event, RenderWindow& window) 10 | { 11 | // Quit the game 12 | if (Keyboard::isKeyPressed(Keyboard::Escape)) 13 | { 14 | window.close(); 15 | } 16 | } 17 | 18 | void SelectInputHandler::handleLeftClick( 19 | std::string& buttonInteractedWith, RenderWindow& window) 20 | { 21 | if (buttonInteractedWith == "Play") { 22 | SoundEngine::playClick(); 23 | WorldState::WAVE_NUMBER = 0; 24 | 25 | getPointerToScreenManagerRemoteControl() 26 | ->loadLevelInPlayMode("level1"); 27 | } 28 | 29 | if (buttonInteractedWith == "Quit") { 30 | SoundEngine::playClick(); 31 | window.close(); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Chapter20-22/Space Invaders ++ 2/SelectInputHandler.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "InputHandler.h" 3 | 4 | class SelectInputHandler : public InputHandler 5 | { 6 | public: 7 | void handleKeyPressed(Event& event, 8 | RenderWindow& window) override; 9 | 10 | void handleLeftClick(std::string& buttonInteractedWith, 11 | RenderWindow& window) override; 12 | }; 13 | -------------------------------------------------------------------------------- /Chapter20-22/Space Invaders ++ 2/SelectScreen.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Screen.h" 3 | 4 | class SelectScreen : public Screen 5 | { 6 | private: 7 | ScreenManagerRemoteControl* m_ScreenManagerRemoteControl; 8 | 9 | Texture m_BackgroundTexture; 10 | Sprite m_BackgroundSprite; 11 | 12 | public: 13 | SelectScreen(ScreenManagerRemoteControl* smrc, Vector2i res); 14 | void virtual draw(RenderWindow& window); 15 | }; -------------------------------------------------------------------------------- /Chapter20-22/Space Invaders ++ 2/SelectUIPanel.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "UIPanel.h" 3 | class SelectUIPanel : public UIPanel 4 | { 5 | private: 6 | void initialiseButtons(); 7 | 8 | public: 9 | SelectUIPanel(Vector2i res); 10 | void virtual draw(RenderWindow& window); 11 | }; 12 | -------------------------------------------------------------------------------- /Chapter20-22/Space Invaders ++ 2/SoundEngine.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #ifndef SOUND_ENGINE_H 3 | #define SOUND_ENGINE_H 4 | 5 | #include 6 | 7 | using namespace sf; 8 | 9 | class SoundEngine 10 | { 11 | private: 12 | SoundBuffer m_ShootBuffer; 13 | SoundBuffer m_PlayerExplodeBuffer; 14 | SoundBuffer m_InvaderExplodeBuffer; 15 | SoundBuffer m_ClickBuffer; 16 | 17 | Sound m_ShootSound; 18 | Sound m_PlayerExplodeSound; 19 | Sound m_InvaderExplodeSound; 20 | Sound m_UhSound; 21 | Sound m_OhSound; 22 | Sound m_ClickSound; 23 | 24 | public: 25 | SoundEngine(); 26 | 27 | static void playShoot(); 28 | static void playPlayerExplode(); 29 | static void playInvaderExplode(); 30 | static void playClick(); 31 | 32 | static SoundEngine* m_s_Instance; 33 | }; 34 | 35 | #endif -------------------------------------------------------------------------------- /Chapter20-22/Space Invaders ++ 2/Space Invaders ++.cpp: -------------------------------------------------------------------------------- 1 | #include "GameEngine.h" 2 | 3 | int main() 4 | { 5 | GameEngine m_GameEngine; 6 | m_GameEngine.run(); 7 | return 0; 8 | } -------------------------------------------------------------------------------- /Chapter20-22/Space Invaders ++ 2/StandardGraphicsComponent.cpp: -------------------------------------------------------------------------------- 1 | #include "StandardGraphicsComponent.h" 2 | #include "BitmapStore.h" 3 | #include 4 | 5 | void StandardGraphicsComponent::initializeGraphics( 6 | string bitmapName, 7 | Vector2f objectSize) 8 | { 9 | BitmapStore::addBitmap("graphics/" + bitmapName + ".png"); 10 | m_Sprite.setTexture(BitmapStore::getBitmap( 11 | "graphics/" + bitmapName + ".png")); 12 | 13 | auto textureSize = m_Sprite.getTexture()->getSize(); 14 | m_Sprite.setScale(float(objectSize.x) / textureSize.x, 15 | float(objectSize.y) / textureSize.y); 16 | m_Sprite.setColor(sf::Color(0, 255, 0)); 17 | } 18 | 19 | void StandardGraphicsComponent::draw( 20 | RenderWindow& window, 21 | shared_ptr t) 22 | { 23 | m_Sprite.setPosition(t->getLocation()); 24 | window.draw(m_Sprite); 25 | } -------------------------------------------------------------------------------- /Chapter20-22/Space Invaders ++ 2/TransformComponent.cpp: -------------------------------------------------------------------------------- 1 | #include "TransformComponent.h" 2 | 3 | TransformComponent::TransformComponent( 4 | float width, float height, Vector2f location) 5 | { 6 | m_Height = height; 7 | m_Width = width; 8 | m_Location = location; 9 | } 10 | 11 | Vector2f& TransformComponent::getLocation() 12 | { 13 | return m_Location; 14 | } 15 | 16 | Vector2f TransformComponent::getSize() 17 | { 18 | return Vector2f(m_Width, m_Height); 19 | } -------------------------------------------------------------------------------- /Chapter20-22/Space Invaders ++ 2/UIPanel.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include "Button.h" 4 | 5 | using namespace std; 6 | 7 | class UIPanel { 8 | private: 9 | RectangleShape m_UIPanel; 10 | bool m_Hidden = false; 11 | vector> m_Buttons; 12 | 13 | protected: 14 | float m_ButtonWidth = 0; 15 | float m_ButtonHeight = 0; 16 | float m_ButtonPadding = 0; 17 | 18 | Font m_Font; 19 | Text m_Text; 20 | 21 | void addButton(float x, float y, int width, int height, 22 | int red, int green, int blue, 23 | string label); 24 | 25 | public: 26 | View m_View; 27 | 28 | UIPanel(Vector2i res, int x, int y, 29 | float width, float height, 30 | int alpha, int red, int green, int blue); 31 | 32 | vector> getButtons(); 33 | virtual void draw(RenderWindow& window); 34 | void show(); 35 | void hide(); 36 | }; 37 | -------------------------------------------------------------------------------- /Chapter20-22/Space Invaders ++ 2/UpdateComponent.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | All Functionality in UpdateComponent.h 3 | */ 4 | -------------------------------------------------------------------------------- /Chapter20-22/Space Invaders ++ 2/WorldState.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class WorldState 3 | { 4 | public: 5 | static const int WORLD_WIDTH = 100; 6 | static int WORLD_HEIGHT; 7 | static int SCORE; 8 | static int LIVES; 9 | static int NUM_INVADERS_AT_START; 10 | static int NUM_INVADERS; 11 | static int WAVE_NUMBER; 12 | }; -------------------------------------------------------------------------------- /Chapter20-22/Space Invaders ++ 2/fonts/Roboto-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter20-22/Space Invaders ++ 2/fonts/Roboto-Bold.ttf -------------------------------------------------------------------------------- /Chapter20-22/Space Invaders ++ 2/graphics/bullet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter20-22/Space Invaders ++ 2/graphics/bullet.png -------------------------------------------------------------------------------- /Chapter20-22/Space Invaders ++ 2/graphics/invader1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter20-22/Space Invaders ++ 2/graphics/invader1.png -------------------------------------------------------------------------------- /Chapter20-22/Space Invaders ++ 2/graphics/playership.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter20-22/Space Invaders ++ 2/graphics/playership.png -------------------------------------------------------------------------------- /Chapter20-22/Space Invaders ++ 2/sound/click.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter20-22/Space Invaders ++ 2/sound/click.ogg -------------------------------------------------------------------------------- /Chapter20-22/Space Invaders ++ 2/sound/invaderexplode.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter20-22/Space Invaders ++ 2/sound/invaderexplode.ogg -------------------------------------------------------------------------------- /Chapter20-22/Space Invaders ++ 2/sound/playerexplode.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter20-22/Space Invaders ++ 2/sound/playerexplode.ogg -------------------------------------------------------------------------------- /Chapter20-22/Space Invaders ++ 2/sound/shoot.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Chapter20-22/Space Invaders ++ 2/sound/shoot.ogg -------------------------------------------------------------------------------- /Runnable Games/Pong/Pong 2.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Pong/Pong 2.exe -------------------------------------------------------------------------------- /Runnable Games/Pong/Pong 2.ilk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Pong/Pong 2.ilk -------------------------------------------------------------------------------- /Runnable Games/Pong/Pong 2.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Pong/Pong 2.pdb -------------------------------------------------------------------------------- /Runnable Games/Pong/fonts/DS-DIGI.TTF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Pong/fonts/DS-DIGI.TTF -------------------------------------------------------------------------------- /Runnable Games/Pong/openal32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Pong/openal32.dll -------------------------------------------------------------------------------- /Runnable Games/Pong/sfml-audio-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Pong/sfml-audio-2.dll -------------------------------------------------------------------------------- /Runnable Games/Pong/sfml-audio-d-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Pong/sfml-audio-d-2.dll -------------------------------------------------------------------------------- /Runnable Games/Pong/sfml-graphics-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Pong/sfml-graphics-2.dll -------------------------------------------------------------------------------- /Runnable Games/Pong/sfml-graphics-d-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Pong/sfml-graphics-d-2.dll -------------------------------------------------------------------------------- /Runnable Games/Pong/sfml-network-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Pong/sfml-network-2.dll -------------------------------------------------------------------------------- /Runnable Games/Pong/sfml-network-d-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Pong/sfml-network-d-2.dll -------------------------------------------------------------------------------- /Runnable Games/Pong/sfml-system-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Pong/sfml-system-2.dll -------------------------------------------------------------------------------- /Runnable Games/Pong/sfml-system-d-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Pong/sfml-system-d-2.dll -------------------------------------------------------------------------------- /Runnable Games/Pong/sfml-window-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Pong/sfml-window-2.dll -------------------------------------------------------------------------------- /Runnable Games/Pong/sfml-window-d-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Pong/sfml-window-d-2.dll -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/BitmapStore.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/BitmapStore.obj -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/BlueprintObjectParser.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/BlueprintObjectParser.obj -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/BulletSpawner.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/BulletSpawner.obj -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/BulletUpdateComponent.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/BulletUpdateComponent.obj -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/Button.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/Button.obj -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/ColliderComponent.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/ColliderComponent.obj -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/Component.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/Component.obj -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/GameEngine.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/GameEngine.obj -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/GameInputHandler.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/GameInputHandler.obj -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/GameObject.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/GameObject.obj -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/GameObjectBlueprint.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/GameObjectBlueprint.obj -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/GameObjectFactoryPlayMode.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/GameObjectFactoryPlayMode.obj -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/GameOverInputHandler.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/GameOverInputHandler.obj -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/GameOverUIPanel.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/GameOverUIPanel.obj -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/GameScreen.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/GameScreen.obj -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/GameUIPanel.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/GameUIPanel.obj -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/GraphicsComponent.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/GraphicsComponent.obj -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/InputHandler.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/InputHandler.obj -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/InputHnadler.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/InputHnadler.obj -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/InvaderUpdateComponent.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/InvaderUpdateComponent.obj -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/LevelManager.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/LevelManager.obj -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/ObjectTags.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/ObjectTags.obj -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/PhysicsEnginePlayMode.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/PhysicsEnginePlayMode.obj -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/PlayModeObjectLoader.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/PlayModeObjectLoader.obj -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/PlayerUpdateComponent.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/PlayerUpdateComponent.obj -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/RectColliderComponent.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/RectColliderComponent.obj -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/Screen.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/Screen.obj -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/ScreenManager.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/ScreenManager.obj -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/ScreenManagerRemoteControl.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/ScreenManagerRemoteControl.obj -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/SelectInputHandler.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/SelectInputHandler.obj -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/SelectScreen.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/SelectScreen.obj -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/SelectUIPanel.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/SelectUIPanel.obj -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/SoundEngine.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/SoundEngine.obj -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/Space In.B7372C65.tlog/CL.command.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/Space In.B7372C65.tlog/CL.command.1.tlog -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/Space In.B7372C65.tlog/CL.read.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/Space In.B7372C65.tlog/CL.read.1.tlog -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/Space In.B7372C65.tlog/CL.write.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/Space In.B7372C65.tlog/CL.write.1.tlog -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/Space In.B7372C65.tlog/Space Invaders ++ 2.lastbuildstate: -------------------------------------------------------------------------------- 1 | #TargetFrameworkVersion=v4.0:PlatformToolSet=v142:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=10.0 2 | Debug|Win32|D:\OneDrive\VS Projects\Space Invaders ++ 2\| 3 | -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/Space In.B7372C65.tlog/link.command.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/Space In.B7372C65.tlog/link.command.1.tlog -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/Space In.B7372C65.tlog/link.read.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/Space In.B7372C65.tlog/link.read.1.tlog -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/Space In.B7372C65.tlog/link.write.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/Space In.B7372C65.tlog/link.write.1.tlog -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/Space Invaders ++ 2.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/Space Invaders ++ 2.exe -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/Space Invaders ++ 2.ilk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/Space Invaders ++ 2.ilk -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/Space Invaders ++ 2.log: -------------------------------------------------------------------------------- 1 |  Screen.cpp 2 | Space Invaders ++ 2.vcxproj -> D:\OneDrive\VS Projects\Space Invaders ++ 2\Debug\Space Invaders ++ 2.exe 3 | -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/Space Invaders ++ 2.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/Space Invaders ++ 2.pdb -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/Space Invaders ++.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/Space Invaders ++.obj -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/StandardGraphicsComponent.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/StandardGraphicsComponent.obj -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/TransformComponent.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/TransformComponent.obj -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/UIPanel.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/UIPanel.obj -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/UpdateComponent.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/UpdateComponent.obj -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/fonts/Roboto-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/fonts/Roboto-Bold.ttf -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/graphics/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/graphics/background.png -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/graphics/bullet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/graphics/bullet.png -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/graphics/invader1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/graphics/invader1.png -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/graphics/playership.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/graphics/playership.png -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/sfml-audio-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/sfml-audio-2.dll -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/sfml-audio-d-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/sfml-audio-d-2.dll -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/sfml-graphics-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/sfml-graphics-2.dll -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/sfml-graphics-d-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/sfml-graphics-d-2.dll -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/sfml-network-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/sfml-network-2.dll -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/sfml-network-d-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/sfml-network-d-2.dll -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/sfml-system-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/sfml-system-2.dll -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/sfml-system-d-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/sfml-system-d-2.dll -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/sfml-window-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/sfml-window-2.dll -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/sfml-window-d-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/sfml-window-d-2.dll -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/sound/click.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/sound/click.ogg -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/sound/invaderexplode.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/sound/invaderexplode.ogg -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/sound/playerexplode.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/sound/playerexplode.ogg -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/sound/shoot.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/sound/shoot.ogg -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/vc142.idb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/vc142.idb -------------------------------------------------------------------------------- /Runnable Games/Space Invaders/vc142.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Space Invaders/vc142.pdb -------------------------------------------------------------------------------- /Runnable Games/Thomas Was Late/Chapter 12 TWL.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Thomas Was Late/Chapter 12 TWL.exe -------------------------------------------------------------------------------- /Runnable Games/Thomas Was Late/Chapter 13 TWL.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Thomas Was Late/Chapter 13 TWL.exe -------------------------------------------------------------------------------- /Runnable Games/Thomas Was Late/Chapter 14 TWL.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Thomas Was Late/Chapter 14 TWL.exe -------------------------------------------------------------------------------- /Runnable Games/Thomas Was Late/Chapter 15 TWL.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Thomas Was Late/Chapter 15 TWL.exe -------------------------------------------------------------------------------- /Runnable Games/Thomas Was Late/Chapter 16 TWL.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Thomas Was Late/Chapter 16 TWL.exe -------------------------------------------------------------------------------- /Runnable Games/Thomas Was Late/fonts/Roboto-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Thomas Was Late/fonts/Roboto-Light.ttf -------------------------------------------------------------------------------- /Runnable Games/Thomas Was Late/graphics/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Thomas Was Late/graphics/background.png -------------------------------------------------------------------------------- /Runnable Games/Thomas Was Late/graphics/bob.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Thomas Was Late/graphics/bob.png -------------------------------------------------------------------------------- /Runnable Games/Thomas Was Late/graphics/thomas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Thomas Was Late/graphics/thomas.png -------------------------------------------------------------------------------- /Runnable Games/Thomas Was Late/graphics/tiles_sheet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Thomas Was Late/graphics/tiles_sheet.png -------------------------------------------------------------------------------- /Runnable Games/Thomas Was Late/levels/level1.txt: -------------------------------------------------------------------------------- 1 | 0000000000000000000000000000000000000000000000 2 | 0000000000000000000000000000000000000000000000 3 | 0000000000000000000000000000000000000000000000 4 | 0000000000000000000000000000000000000000000000 5 | 0000000000000000000000000000000000000000000000 6 | 0000000000000000000000000000000000000000000000 7 | 1111111111000111111222222221111133111111111411 8 | 0000000000000000001222222221000133100000001110 9 | 0000000000000000001222222221000133100000000000 10 | 0000000000000000001222222221000133100000000000 11 | 0000000000000000001111111111000111100000000000 -------------------------------------------------------------------------------- /Runnable Games/Thomas Was Late/openal32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Thomas Was Late/openal32.dll -------------------------------------------------------------------------------- /Runnable Games/Thomas Was Late/sfml-audio-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Thomas Was Late/sfml-audio-2.dll -------------------------------------------------------------------------------- /Runnable Games/Thomas Was Late/sfml-audio-d-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Thomas Was Late/sfml-audio-d-2.dll -------------------------------------------------------------------------------- /Runnable Games/Thomas Was Late/sfml-graphics-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Thomas Was Late/sfml-graphics-2.dll -------------------------------------------------------------------------------- /Runnable Games/Thomas Was Late/sfml-graphics-d-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Thomas Was Late/sfml-graphics-d-2.dll -------------------------------------------------------------------------------- /Runnable Games/Thomas Was Late/sfml-network-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Thomas Was Late/sfml-network-2.dll -------------------------------------------------------------------------------- /Runnable Games/Thomas Was Late/sfml-network-d-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Thomas Was Late/sfml-network-d-2.dll -------------------------------------------------------------------------------- /Runnable Games/Thomas Was Late/sfml-system-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Thomas Was Late/sfml-system-2.dll -------------------------------------------------------------------------------- /Runnable Games/Thomas Was Late/sfml-system-d-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Thomas Was Late/sfml-system-d-2.dll -------------------------------------------------------------------------------- /Runnable Games/Thomas Was Late/sfml-window-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Thomas Was Late/sfml-window-2.dll -------------------------------------------------------------------------------- /Runnable Games/Thomas Was Late/sfml-window-d-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Thomas Was Late/sfml-window-d-2.dll -------------------------------------------------------------------------------- /Runnable Games/Thomas Was Late/shaders/rippleShader.frag: -------------------------------------------------------------------------------- 1 | // attributes from vertShader.vert 2 | varying vec4 vColor; 3 | varying vec2 vTexCoord; 4 | 5 | // uniforms 6 | uniform sampler2D uTexture; 7 | uniform float uTime; 8 | 9 | void main() { 10 | float coef = sin(gl_FragCoord.y * 0.1 + 1 * uTime); 11 | vTexCoord.y += coef * 0.03; 12 | gl_FragColor = vColor * texture2D(uTexture, vTexCoord); 13 | } 14 | -------------------------------------------------------------------------------- /Runnable Games/Thomas Was Late/shaders/vertShader.vert: -------------------------------------------------------------------------------- 1 | #version 110 2 | 3 | //varying "out" variables to be used in the fragment shader 4 | varying vec4 vColor; 5 | varying vec2 vTexCoord; 6 | 7 | void main() { 8 | vColor = gl_Color; 9 | vTexCoord = (gl_TextureMatrix[0] * gl_MultiTexCoord0).xy; 10 | gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; 11 | } 12 | 13 | -------------------------------------------------------------------------------- /Runnable Games/Thomas Was Late/sound/fallinfire.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Thomas Was Late/sound/fallinfire.wav -------------------------------------------------------------------------------- /Runnable Games/Thomas Was Late/sound/fallinwater.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Thomas Was Late/sound/fallinwater.wav -------------------------------------------------------------------------------- /Runnable Games/Thomas Was Late/sound/fire1.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Thomas Was Late/sound/fire1.wav -------------------------------------------------------------------------------- /Runnable Games/Thomas Was Late/sound/jump.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Thomas Was Late/sound/jump.wav -------------------------------------------------------------------------------- /Runnable Games/Thomas Was Late/sound/reachgoal.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Thomas Was Late/sound/reachgoal.wav -------------------------------------------------------------------------------- /Runnable Games/Timber/Chapter 1 Timber.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Timber/Chapter 1 Timber.exe -------------------------------------------------------------------------------- /Runnable Games/Timber/Chapter 2 Timber.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Timber/Chapter 2 Timber.exe -------------------------------------------------------------------------------- /Runnable Games/Timber/Chapter 3 Timber.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Timber/Chapter 3 Timber.exe -------------------------------------------------------------------------------- /Runnable Games/Timber/Chapter 4 Timber.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Timber/Chapter 4 Timber.exe -------------------------------------------------------------------------------- /Runnable Games/Timber/Chapter 5 Timber.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Timber/Chapter 5 Timber.exe -------------------------------------------------------------------------------- /Runnable Games/Timber/READ ME.txt: -------------------------------------------------------------------------------- 1 | To run a game double click on the appropriate .exe file -------------------------------------------------------------------------------- /Runnable Games/Timber/Timber Enhanced Version.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Timber/Timber Enhanced Version.exe -------------------------------------------------------------------------------- /Runnable Games/Timber/fonts/KOMIKAP_.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Timber/fonts/KOMIKAP_.ttf -------------------------------------------------------------------------------- /Runnable Games/Timber/graphics/axe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Timber/graphics/axe.png -------------------------------------------------------------------------------- /Runnable Games/Timber/graphics/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Timber/graphics/background.png -------------------------------------------------------------------------------- /Runnable Games/Timber/graphics/branch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Timber/graphics/branch.png -------------------------------------------------------------------------------- /Runnable Games/Timber/graphics/cloud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Timber/graphics/cloud.png -------------------------------------------------------------------------------- /Runnable Games/Timber/graphics/insect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Timber/graphics/insect.png -------------------------------------------------------------------------------- /Runnable Games/Timber/graphics/log.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Timber/graphics/log.png -------------------------------------------------------------------------------- /Runnable Games/Timber/graphics/player.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Timber/graphics/player.png -------------------------------------------------------------------------------- /Runnable Games/Timber/graphics/rip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Timber/graphics/rip.png -------------------------------------------------------------------------------- /Runnable Games/Timber/graphics/tree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Timber/graphics/tree.png -------------------------------------------------------------------------------- /Runnable Games/Timber/graphics/tree2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Timber/graphics/tree2.png -------------------------------------------------------------------------------- /Runnable Games/Timber/openal32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Timber/openal32.dll -------------------------------------------------------------------------------- /Runnable Games/Timber/sfml-audio-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Timber/sfml-audio-2.dll -------------------------------------------------------------------------------- /Runnable Games/Timber/sfml-audio-d-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Timber/sfml-audio-d-2.dll -------------------------------------------------------------------------------- /Runnable Games/Timber/sfml-graphics-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Timber/sfml-graphics-2.dll -------------------------------------------------------------------------------- /Runnable Games/Timber/sfml-graphics-d-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Timber/sfml-graphics-d-2.dll -------------------------------------------------------------------------------- /Runnable Games/Timber/sfml-network-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Timber/sfml-network-2.dll -------------------------------------------------------------------------------- /Runnable Games/Timber/sfml-network-d-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Timber/sfml-network-d-2.dll -------------------------------------------------------------------------------- /Runnable Games/Timber/sfml-system-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Timber/sfml-system-2.dll -------------------------------------------------------------------------------- /Runnable Games/Timber/sfml-system-d-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Timber/sfml-system-d-2.dll -------------------------------------------------------------------------------- /Runnable Games/Timber/sfml-window-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Timber/sfml-window-2.dll -------------------------------------------------------------------------------- /Runnable Games/Timber/sfml-window-d-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Timber/sfml-window-d-2.dll -------------------------------------------------------------------------------- /Runnable Games/Timber/sound/chop.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Timber/sound/chop.wav -------------------------------------------------------------------------------- /Runnable Games/Timber/sound/death.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Timber/sound/death.wav -------------------------------------------------------------------------------- /Runnable Games/Timber/sound/out_of_time.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Timber/sound/out_of_time.wav -------------------------------------------------------------------------------- /Runnable Games/Zombie Arena/Chapter 10 Zombie Arena.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Zombie Arena/Chapter 10 Zombie Arena.exe -------------------------------------------------------------------------------- /Runnable Games/Zombie Arena/Chapter 11 Zombie Arena.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Zombie Arena/Chapter 11 Zombie Arena.exe -------------------------------------------------------------------------------- /Runnable Games/Zombie Arena/Chapter 6 Zombie Arena.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Zombie Arena/Chapter 6 Zombie Arena.exe -------------------------------------------------------------------------------- /Runnable Games/Zombie Arena/Chapter 7 Zombie Arena.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Zombie Arena/Chapter 7 Zombie Arena.exe -------------------------------------------------------------------------------- /Runnable Games/Zombie Arena/Chapter 8 Zombie Arena.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Zombie Arena/Chapter 8 Zombie Arena.exe -------------------------------------------------------------------------------- /Runnable Games/Zombie Arena/Chapter 9 Zombie Arena.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Zombie Arena/Chapter 9 Zombie Arena.exe -------------------------------------------------------------------------------- /Runnable Games/Zombie Arena/Zombie Arena Enhanced Version.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Zombie Arena/Zombie Arena Enhanced Version.exe -------------------------------------------------------------------------------- /Runnable Games/Zombie Arena/fonts/zombiecontrol.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Zombie Arena/fonts/zombiecontrol.ttf -------------------------------------------------------------------------------- /Runnable Games/Zombie Arena/gamedata/scores.txt: -------------------------------------------------------------------------------- 1 | 300 -------------------------------------------------------------------------------- /Runnable Games/Zombie Arena/graphics/ammo_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Zombie Arena/graphics/ammo_icon.png -------------------------------------------------------------------------------- /Runnable Games/Zombie Arena/graphics/ammo_pickup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Zombie Arena/graphics/ammo_pickup.png -------------------------------------------------------------------------------- /Runnable Games/Zombie Arena/graphics/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Zombie Arena/graphics/background.png -------------------------------------------------------------------------------- /Runnable Games/Zombie Arena/graphics/background_originalsize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Zombie Arena/graphics/background_originalsize.png -------------------------------------------------------------------------------- /Runnable Games/Zombie Arena/graphics/background_sheet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Zombie Arena/graphics/background_sheet.png -------------------------------------------------------------------------------- /Runnable Games/Zombie Arena/graphics/bloater.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Zombie Arena/graphics/bloater.png -------------------------------------------------------------------------------- /Runnable Games/Zombie Arena/graphics/blood.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Zombie Arena/graphics/blood.png -------------------------------------------------------------------------------- /Runnable Games/Zombie Arena/graphics/chaser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Zombie Arena/graphics/chaser.png -------------------------------------------------------------------------------- /Runnable Games/Zombie Arena/graphics/crawler.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Zombie Arena/graphics/crawler.png -------------------------------------------------------------------------------- /Runnable Games/Zombie Arena/graphics/crosshair.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Zombie Arena/graphics/crosshair.png -------------------------------------------------------------------------------- /Runnable Games/Zombie Arena/graphics/health_pickup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Zombie Arena/graphics/health_pickup.png -------------------------------------------------------------------------------- /Runnable Games/Zombie Arena/graphics/player.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Zombie Arena/graphics/player.png -------------------------------------------------------------------------------- /Runnable Games/Zombie Arena/graphics/sample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Zombie Arena/graphics/sample.png -------------------------------------------------------------------------------- /Runnable Games/Zombie Arena/openal32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Zombie Arena/openal32.dll -------------------------------------------------------------------------------- /Runnable Games/Zombie Arena/sfml-audio-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Zombie Arena/sfml-audio-2.dll -------------------------------------------------------------------------------- /Runnable Games/Zombie Arena/sfml-audio-d-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Zombie Arena/sfml-audio-d-2.dll -------------------------------------------------------------------------------- /Runnable Games/Zombie Arena/sfml-graphics-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Zombie Arena/sfml-graphics-2.dll -------------------------------------------------------------------------------- /Runnable Games/Zombie Arena/sfml-graphics-d-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Zombie Arena/sfml-graphics-d-2.dll -------------------------------------------------------------------------------- /Runnable Games/Zombie Arena/sfml-network-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Zombie Arena/sfml-network-2.dll -------------------------------------------------------------------------------- /Runnable Games/Zombie Arena/sfml-network-d-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Zombie Arena/sfml-network-d-2.dll -------------------------------------------------------------------------------- /Runnable Games/Zombie Arena/sfml-system-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Zombie Arena/sfml-system-2.dll -------------------------------------------------------------------------------- /Runnable Games/Zombie Arena/sfml-system-d-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Zombie Arena/sfml-system-d-2.dll -------------------------------------------------------------------------------- /Runnable Games/Zombie Arena/sfml-window-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Zombie Arena/sfml-window-2.dll -------------------------------------------------------------------------------- /Runnable Games/Zombie Arena/sfml-window-d-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Zombie Arena/sfml-window-d-2.dll -------------------------------------------------------------------------------- /Runnable Games/Zombie Arena/sound/hit.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Zombie Arena/sound/hit.wav -------------------------------------------------------------------------------- /Runnable Games/Zombie Arena/sound/pickup.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Zombie Arena/sound/pickup.wav -------------------------------------------------------------------------------- /Runnable Games/Zombie Arena/sound/powerup.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Zombie Arena/sound/powerup.wav -------------------------------------------------------------------------------- /Runnable Games/Zombie Arena/sound/reload.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Zombie Arena/sound/reload.wav -------------------------------------------------------------------------------- /Runnable Games/Zombie Arena/sound/reload_failed.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Zombie Arena/sound/reload_failed.wav -------------------------------------------------------------------------------- /Runnable Games/Zombie Arena/sound/shoot.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Zombie Arena/sound/shoot.wav -------------------------------------------------------------------------------- /Runnable Games/Zombie Arena/sound/splat.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Beginning-Cpp-Game-Programming-Second-Edition/be366347b020b750f76a499f6b97d38c31bd2099/Runnable Games/Zombie Arena/sound/splat.wav --------------------------------------------------------------------------------