|
|
|
|
|
by Waterluvian
1273 days ago
|
|
How?! How did you get PyGame not to be so brutally slow? Is it basically that all the graphics are done separately and pygame only offers up IO and game loop? This is just brilliant and wonderful and beautiful. The premise of this game is just amazing. |
|
Think of (fragment) shaders as programs that run in the GPU per-texture-pixel. There is some initial CPU/memory-bound work setting everything up (e.g. uploading textures to GPU RAM, compiling the program, sending vertex buffers...) and then per-frame you just call the shader with some parameters (e.g. character's current position) and the GPU does the rest.
In-CPU you mostly do the non-parallelizable work such as collisions, game logic, keyboard input, etc. which can be very light for a simple 2D platformer.