I was planning on making clones of simple 8-bit era games to start my 'career' in using pygame. I've almost finished my clone of snake. I was planning on putting these games on my laptop so I could play them on the go, but honestly, I don't know if the laptop could handle it.
While developing my snake clone, I noticed that the game would experience increasing lag as the game progressed. I was surprised at this, seeing as I'm running this on a high-end gaming computer. I determined the problem was that my algorithm for recording the snake's path (which I use for drawing the tail) was filling up insanely fast with coordinates. I fixed this by having the game only allow the list of coordinates to be as long as the snake's current length. This did a lot to fix the lag, but I still experience some slow down if I get the snake really long.
I don't understand why the game would lag on my computer just from a (relatively) small list of variables. This machine can run Skyrim on full graphics, yet it can't handle a game that uses over a few dozen variables? This has made me worried for my laptop, since, obviously that is NOT a gaming machine.
However, I have no clue how to determine if my laptop could run my game or not. Normally I just go to 'can you run it?' if I need to figure this out, but obviously I can't do that for my game. I don't know how to determine what kind of system a person would need to run any game I make. I wasn't expecting such primitive games to cause performance issues on my machine. I mean, if I can run Skyrim at full graphics, then why does my Snake game slow down as it progresses? It makes no sense. And I'm using pygame.draw
for graphics, so I'm not having to load and draw proper sprites either. Honestly, the only game out there that's less graphics intensive than mine is pong. How could something so basic have issues on a modern gaming computer of all things?