Greetings everyone. I just jumped into Python for the first time this weekend and I'm finding it to be a very easy and enjoyable learning process. This forum has been particularly useful for finding code snippets and answers to questions that I ran into and others had posted about. So that's why I'm here, now posting for the first time.
After starting with a rather ambitious idea for my first project, I decided to take a step back and stick with text-based applications for a while so I can get a good grasp of the language before moving into GUI/graphics territory. Last night I started working on my second program that will be a text-based, turn-based medieval arena combat game. But it was my work on that, and my years of playing single and multi-player role playing games (MUDs in particular) that have me wondering about how to do something within a text-based game. And because my programming experience prior to starting Python has been 99% ASP/Javascript/SQL, maybe I'm just not aware of a very simple answer.
If you've ever played a MUD before, or even a game like World of Warcraft, the game world is always moving. It's alive. How do you do that? For my arena game everything progresses as a result of a user action. But I would really love to know how to make it so that if I am in my arena game, and I don't do anything, that my computer-controlled opponent would still be attacking me.
I think I understand the idea of what I'm talking about in terms of programming, but I have no idea how to actually code it. Rather than creating a loop that stops during each cycle in order to get user input, the loop would have to continue processing over and over while keeping an eye out for user input and also while managing computer-controlled items/beings/etc. Hence the idea that the game world is living in some way.
Thanks in advance for any responses, and for the great forum/site as well!