current position：Home>Question about pygame
Question about pygame
2022-08-06 19:02:30【CSDN Q&A】
While continuously accepting commands from the console with input, while drawing on the pygame window according to the command, it sounds simple, but there are too many problems
First pygame needs
while True: for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.
On the other hand I need
while True: com = input('>') if 'add' in com: pygame.draw.circle(screen, (0, 0, 0), ( 250, 250), 3)
Adding the input directly to the while True loop outside pygame.display.update() will cause the pygame page to freeze, the multi-thread attempt fails, and the multi-process fails: EOF when reading a line
Would you like to write a picture for me?
author[CSDN Q&A],Please bring the original link to reprint, thank you.
The sidebar is recommended
- Deep understanding of volatile, Synchronized, and already the underlying implementation principle
- Spring common annotation analysis
- Docker quickly builds a PHP+Nginx+Mysql environment and steps on the pit diary
- Mac's own software - play with focus search
- What is the principle of the second type of dictionary method?
- Implementing a caching mechanism using soft references
- Vue entry page for the first time, how to distinguish between created and activated?
- Things to do with your new mac notebook
- [Java Interview] After 7 years of work, I went to the byte interview and turned around on this question. Could you please tell me your understanding of the time wheel?
- Optimization, genetic algorithm (ga)
guess what you like
Advanced Guide to Algorithm Competition Recursive Implementation of Permutation Enumeration
How to use the second type of dictionary method?
mac Maven error No compiler is provided in this environment. Perhaps you are running on a JRE rat
[Help] In the vue2 that the vue3 project is connected to as a subsystem, the whole project using el-drawer reports an error?
【Macbook software sharing｜Use skills】Dry goods
Advanced Guide to Algorithm Competition Recursive Implementation of Exponential Enumeration
JAVA based - 11 - encapsulated inherited polymorphism - nine five small jean-marie le pen
Trend Micro Written Test Review (Algorithm Question 2)
Multilayer Perceptron - MLP
- (3) write their own - YOLOv3 - loss function
- Sketch91: How to set an aligned reference object and align it according to the specified element tutorial
- Target tracking actual combat deepsort+yolov5 (on)
- Tensorflow - recurrent neural network (5) subword text classification
- Linear Algebra and Probability Theory
- Big data "killed": who am I, where am I, and what have I (was) done?
- Study together to build the react + webpack + ts framework!!!!!!(a)
- Java Data Structures and Algorithms Lesson 9 - Sorting
- Hardcore!The internal manual "MySQL Notes" written by the technical director of Ali is really strong
- How Spring solves the circular dependency problem
- What is the goal of quantization coding?
- What are the quantification methods?
- I the first page of the scaffold - AST abstract syntax tree
- What is the core idea of the first type of dictionary coding method, can you give an example?
- iOSUIKit and Swift ｜ Youth Training Notes
- Vue about embedded iframe page?
- Likou 93 - Restoring IP Address [Backtracking Algorithm]
- Why is run-length encoding a better encoding method for computer desktop images?
- What is the Cartesian product type in quantization coding?
- Cache series: cache consistency problem solution
- Vue family bucket - Vue-CLI2 and Vue-CLI3 hands-on teaching
- [Tips] Mac uses commands to view the size of sub-files or sub-directories in a directory
- Why build an index?
- Descartes set type and what is the effect of quantization coding?
- [Written in the romantic moment of Qixi Lang] The solution for obtaining data when encountering http codes 206 and 302 in Go
- [Operating System] Process Creation and Destruction
- AQS synchronization component - CountDownLatch analysis and case
- Why is there an index in quantization coding?
- What is the linear combination type in quantization coding?
- Arduino Painless Development _LED8*8 Dot Matrix Experiment (Detailed)
- element ui table changes the default style, removes the border and changes the table background color
- Data Structure ----- Quick Sort
- Node.js test SMTP service
- Create Nginx docker container reverse proxy https
- Python batch get gitlab project code
- Do phrases created by the second-class dictionary method have to have a specific meaning?
- How do I select the quantitative method for the quantitative characteristics of the coding?
- What is the result after straight-sum quantization?
- What are the types of high-dimensional indexes?
- Back-end writing Swagger interface management documentation