how are game events processed?

BlitzMax Forums/BlitzMax Programming/how are game events processed?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I'm working on an RPG as well (2 actually) and I don't have every little detail worked out, but here's how it works more or less in theory.

Each map has a list of events than can be in 1 of 3 states; ACTIVE (able to be ran), RUNNING, or NONACTIVE. Every game loop check to see which events are running and process them and also check to see if any active ones should be ran. I keep the lists separate for the sake of speed.

It helps to think of them as objects that preform actions rather than events or something that happens to objects. All my NPCs are events for example.

Edit: Using a scripting language can be helpful. I myself am using lua, but using a scripting language won't automatically make it fall into place. It just help the development process go a little smoother if you know what you're doing. I may or may not know what I'm doing... we'll see in after a little while i guess.