I'm currently working on making a simple 2D "engine" of sorts in which I can assign certain objects to certain coordinates and it will render them out there. It's mainly to be about 2D animation and the like, but that's besides the point.
I'm working on a coordinate grid (possibly called array) which will be invisible but will be the coordinate system used to identify where objects are going to be rendered. It uses an x and y axis and I'm trying to make it so that you can choose the size of the grid so it's not misceallaneously rendering out blank space.
Heres the code I have:
import math calculatingcoords = True coordinates =  xlength = 10 ylength = 10 while calculatingcoords == True: if xlength != 0: calculatingcoords.append((xlength - 1, ylength)) if ylength != 0: coordinates.append((xlength, ylengt - 1)) if ylength == 0: if xlength == 0: calculatingcoords == False
The problem I get here is that an memory error on line 10. I know a memory error is when your program runs out of RAM to run off of, but even when I replaced the xlength and ylength values with 1's, making it so that there would only be about 4 in the list, it still gets the error. I'm not sure why.
I'm willing to scrap the program as it is if there is a simpler solution, so is there a way to fix it? Or should I start all over. Thanks in advance, everybody!