Apr-17-2019, 08:30 PM (This post was last modified: Apr-17-2019, 08:30 PM by kom2. Edited 1 time in total.)

Hello!

I've started working on my game in Python, using tkinter (so not any pygame or other gaming libraries). I have already made some steps in my plan, what to create and what should the overall game logic look like, but I stuck on one point. I cannot understand, or I cannot imagine, how to create a generator of number of some, let's say enemies, or cars. What I want to do is to create some road and let a huge number of cars spawning and moving there, each car using the same logic given for cars generally. Please, can you give me any hint, how could I create such a generator of objects, using one and the same logic each? I know I should use some classes and parentship, but that's all I can imagine now.

I will appreciate any help. Thank you!

I've started working on my game in Python, using tkinter (so not any pygame or other gaming libraries). I have already made some steps in my plan, what to create and what should the overall game logic look like, but I stuck on one point. I cannot understand, or I cannot imagine, how to create a generator of number of some, let's say enemies, or cars. What I want to do is to create some road and let a huge number of cars spawning and moving there, each car using the same logic given for cars generally. Please, can you give me any hint, how could I create such a generator of objects, using one and the same logic each? I know I should use some classes and parentship, but that's all I can imagine now.

I will appreciate any help. Thank you!