eric-hedengren / calculus-project

Just a final project
0 stars 0 forks source link

Graph Plotting and Other Screen Blits Cannot Exist Simultaneously #5

Open eric-hedengren opened 3 years ago

eric-hedengren commented 3 years ago

When a variable using a pixel array (pygame.PixelArray()) exists and a screen blit is attempted, for some reason an error is thrown, although I am unsure as to why this would happen, because multiple sprite groups and other drawings can co exist on the screen. A work around should be found as soon as possible, or find a way to make them compatible.

eric-hedengren commented 3 years ago

Instead of plotting individual pixels, the points on a graph should be stored, then drawing with lines (like connecting the dots) using pygame's draw line function. This will make the graph and buttons and the ball compatible!! And it will create a cleaner looking graph. As a side note, the lines should be drawn onto a surface which is saved and recopied instead of drawing all those lines every single frame.