Skip to main content

Adding Projectiles to a Player

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

Abstract

Creating a projectile and making it move is the first step. The second step is making that projectile appear when and where you want it during a game. In most cases, you want a projectile to appear where you aim, so this chapter is about adding a projectile to a player that you can move and rotate. No matter how you move or rotate the player, you can fire a projectile from the top of the player image. This chapter focuses on adding projectiles in case you want to make a simple 2D shooter game.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping 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). Adding Projectiles to a Player. In: Programming for Game Design. Apress, Berkeley, CA. https://doi.org/10.1007/979-8-8688-0190-7_14

Download citation

Publish with us

Policies and ethics