Skip to content

Dynamically creating and drawing actors #293

Answered by tbukfrc
tbukfrc asked this question in Q&A
Discussion options

You must be logged in to vote

Nevermind, fixed it. For anyone in the same scenario as me, you can create actors from a dictionary, but it wasn't working in my case because of how my multithreaded multiplayer works. It was resetting the dictionary containing the actors every loop (due to a bug in my code), and replacing it with a new dictionary with updated positions, which wouldn't normally be an issue, but because it was running asynchronously alongside pgzero it was out of sync just enough so that every time pgzero went to draw the actors, the dictionary was empty. I blame this issue on my brain being fried because I spent 10 hours today just coding an account system, GUI to login with tkinter, and real-time network…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by tbukfrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant