Hitting Enemies with Projectiles

  • Chapter
  • First Online:
Programming for Game Design
  • 283 Accesses

Abstract

Once you have a player you can control and a way to fire projectiles, the next step involves hitting enemies with a projectile. This involves creating an enemy, detecting when a collision occurs between a projectile and an enemy, and then removing both the projectile and the enemy afterward. By removing the enemy, the enemy is eliminated in the game.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
EUR 32.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or Ebook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (Brazil)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (Brazil)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (Brazil)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free ship** worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2024 The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Wang, W., Walcott, T. (2024). Hitting Enemies with Projectiles. In: Programming for Game Design. Apress, Berkeley, CA. https://doi.org/10.1007/979-8-8688-0190-7_15

Download citation

Publish with us

Policies and ethics

Navigation