Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sprites and Actor error
#4
(Nov-07-2018, 08:46 AM)ajlconsulting Wrote: The book just referenced it with no import statement
Are you sure that book did not define Actor class before that section somewhere? Did it reference a Glossary in the end of the book that defines classes? Or do they reference an online source of code somewhere?

It could be as little as
class Actor:
    pass
However if they use methods (class functions) like this
apple = Actor("apple")
apple.update()
then there is more defined in the Actor class.

Quote:So I'll move on! I just need to find the best library to manage sprites.
I would be cautious moving on. You can easily have the same occur later on and not find another class defined without finding where Actor is defined. And you would be more involved in the book by then. Possibly even more confused.

In what way are you using sprites? In games, pygame is the most used library for displaying and moving sprites.
Recommended Tutorials:
Reply


Messages In This Thread
Sprites and Actor error - by ajlconsulting - Nov-07-2018, 12:41 AM
RE: Sprites and Actor error - by nilamo - Nov-07-2018, 01:04 AM
RE: Sprites and Actor error - by ajlconsulting - Nov-07-2018, 08:46 AM
RE: Sprites and Actor error - by metulburr - Nov-07-2018, 01:02 PM
RE: Sprites and Actor error - by nilamo - Nov-07-2018, 04:25 PM
RE: Sprites and Actor error - by nitin - Jan-30-2019, 12:00 AM
RE: Sprites and Actor error - by metulburr - Jan-30-2019, 12:50 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  pygame, sprites, and rects menator01 12 2,096 Dec-07-2023, 02:37 AM
Last Post: Benixon
  [PyGame] Sprites just randomly appear and dissapear in my pygame.sprite.GoupeSingle trueShadoWrr 2 2,040 Feb-13-2023, 09:34 AM
Last Post: Vadanane
  Pygame Zero - no actor image toiling_away 2 1,869 Oct-14-2022, 12:16 AM
Last Post: toiling_away
  [PyGame] I found a way to generate sprites without .blit. Is it effecient? xBlackHeartx 19 8,629 Dec-07-2019, 01:06 PM
Last Post: metulburr
  [PyGame] Having 4 players(Sprites) all being able to jump ElijahCastle 5 4,065 May-07-2019, 05:04 PM
Last Post: SheeppOSU
  draw not showing all sprites ethanstrominger 0 2,628 Jan-25-2019, 10:10 PM
Last Post: ethanstrominger
  [PyGame] move randomly sprites reutB 4 8,289 Mar-29-2017, 01:12 PM
Last Post: metulburr
  How can I get rid of the line following the sprites? Houston11 1 3,779 Jan-06-2017, 10:14 PM
Last Post: Mekire

Forum Jump:

User Panel Messages

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