Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bullet firing
#2
Your code is all over the place and hard to dissect. It is much easier to have a 1) Bullet class 2) use pygame rects for coordinates 3) and arbitrary surfaces so that we dont have to have the resources to run the program. Then you can have a bullets list of Bullet objects in the Player class to contain all the bullets and their respective coordinates. In this tutorial i do just that.
Recommended Tutorials:
Reply


Messages In This Thread
Bullet firing - by skillamac - Aug-06-2020, 04:00 PM
RE: Bullet firing - by metulburr - Aug-07-2020, 09:56 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  I want to add a bullet function to my game. how would i go about it? Iyjja 5 1,322 Jan-09-2024, 05:42 PM
Last Post: Iyjja

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020