🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

non-linear event handling

Started by
21 comments, last by dwarfsoft 23 years, 7 months ago
OK, here goes at explaining that non-linear event thing again. It is pulled from "The Grail of Game Writers" in the Game Writing thread, but I thought it was a Game Design Issue, so here it is (I also posted this at GameDeveloper.net in Pauls ''Game Design forum'' ). Here it is again: If you wanted to have a non-linear game in which events could happen at certain times etc, then you could adopt the following approach: You have a list of EVENTs that can occur (not specifically when or where or with what). The EVENT can then be attached to certain things. The event could be attached to a time, or a player, or an NPC. It could also be attached to an action, or a location. There are also several rules that go with these events. An event may have PREREQUISITE EVENTs that are required to have been triggered BEFORE an EVENT is triggered. There may be any number of MULTIPLE PREREQUISITE EVENTS or there may be CONDITIONAL PREREQUISITES. The way in which these PREREQUISITE events work together in these two ways are such that the EVENT will only be triggered once its trigger condition is met and also ONLY once all of the MULTIPLE PREREQUISITE EVENTS or one of the CONDITIONAL PREREQUISITES are met. MULTIPLE PREREQUISITE EVENTS may be grouped under one heading (like putting parentheses around code in C/C++) so that two MULTIPLE PREREQUISITES may be compared as two CONDITIONAL PREREQUISITES to give the final result (if you don''t understand this then I can clarify). CASCADING PREREQUISITES are just a natural byproduct of this system. An EVENT may require one PREREQUISITE EVENT to have occured, but that PREREQUISITE EVENT may have PREREQUISITE EVENTs of its own. This way, you can have a CASCADING PREREQUISITE tree which gives a bit of LINEARITY to the current EVENT (in the form of a METHOD to follow to reach that EVENT). In this way, you can have triggers for EVENTs that occur at specific time intervals (like Scheduling NPCs) or you can have triggers when a Character (PC/NPC) performs an action, or is in a location. You could also have a combination of a Character being in a location combined with it being a certain time, and also providing that the player had already completed a task. Basically, an EVENT could occur at ANY TIME in ANY ORDER (except for PREREQUISITES) and thus make the game more non-linear. Any thoughts or Explanations required? -Chris Bennett of Dwarfsoft - Site:"The Philosophers'' Stone of Programming Alchemy" - IOL The future of RPGs - Thanks to all the goblins over in our little Game Design Corner niche           
Advertisement
I think that''s a very good system to work with for what I''ve been calling the "Calendar" in the context of designing the Goblin Framework. I understand all the concepts you''ve put forward, and I don''t think that any more need to be added for a complete event system.
It will also give a very large feeling of consistency to the world, since you might be able to trigger certain events the same way over and over and over, if you keep triggering the PREREQUISITES.

Hrm, that gives me one idea of a possible missing link: sometimes, events need to be removed as PREREQUISITES.
For instance, if event A is part of the prerequisites for event B, then as soon as event B happens, event A might no longer be counted as a prerequisite for the next time B happens.
Otherwise, the same PREREQUISITE event might trigger another event over and over and over, just because it has occurred once.


People might not remember what you said, or what you did, but they will always remember how you made them feel.
Mad Keith the V.
It's only funny 'till someone gets hurt.And then it's just hilarious.Unless it's you.
That is very true... I had not thought of that. We could call it EXCLUSIVE PREREQUISITE to indicate that it need only have that prerequisite triggered once. Then, I also forgot, EXCLUSIVELY CONDITIONAL PREREQUISITEs where either one PREREQUISITE is triggered XOR the other. Not both. There should also be a NEGATION PREREQUISITE where a PREREQUISITE EVENT must NOT be triggered. It works on the principles of logic.

I am glad that you understand it MKV, because I could see this working for Goblin on a definition of triggers and events level (*dwarfsoft shudders as memories of the SQL exam come back to haunt him* ). It took me a few posts to try and explain the theoretical side of this system to Gregor_Samsa.

Oh yeah, in case you didn''t know (people in general) I have capitalised all of the important keywords. All except ''trigger'' that is, but it is just for references sake

-Chris Bennett of Dwarfsoft - Site:"The Philosophers'' Stone of Programming Alchemy" - IOL
The future of RPGs - Thanks to all the goblins over in our little Game Design Corner niche
          
Actually, I think I misunderstood you. Did you mean that EVENT B could be triggered and therefore force EVENT A to be triggered and cause an infinite loop? Or was it just the EXCLUSIVE PREREQUISITE that I explained in my previous post?

-Chris Bennett of Dwarfsoft - Site:"The Philosophers'' Stone of Programming Alchemy" - IOL
The future of RPGs - Thanks to all the goblins over in our little Game Design Corner niche
          
I like it but you just described legend of mana. events occur based on NPC''s and times. they also occur based on lacations and previous events. The problem with this though, and i have gone to war about this in your linier vs interactive post, if events can be composed in such a way that there is little scripting there would not be a very easily decernable story. part of the reason that games are linier is so that a story line can be told. given, i think this is more to suit the developers insatiable urge to place many cutscenes in their games. *cough* ff9 *cough*. To make a story line work out right, there would have to prerequsites on almost everything meaning it is linier or semi linier. but hey.

I am not text, I am not organized pixels, I am not killed by turning off your monitor, I am not isolated by turning off your computer. I just am.

Conshape Electronic Arts

Yeah that''s a good method. It also allows you to choose how linear you want the game to be. You can do all kinds of logic in the prerequisites. Any boolean phrase will fit. It does get rather complicated though.

Several billion trillion tons of superhot exploding hydrogen nuclei rose slowly above the horizon and managed to look small, cold and slightly damp.-The Hitchhiker''s Guide to the Galaxy by Douglas Adams
Several billion trillion tons of superhot exploding hydrogen nuclei rose slowly above the horizon and managed to look small, cold and slightly damp.-The Hitchhiker's Guide to the Galaxy by Douglas Adams
I just wrote up an example (with pictures) in the doc... You can have a look at the specific page here. If it has already been used in a game then GREAT, but I don''t see it infringing upon a predefined story... You just have one main LONG PREREQUISITE TREE that tells the main story, with all of the other mini-quest trees being able to occur when they want to. I think that this would add in a new element... I think I might have to play the Legend of Mana tho

-Chris Bennett of Dwarfsoft - Site:"The Philosophers'' Stone of Programming Alchemy" - IOL
The future of RPGs - Thanks to all the goblins over in our little Game Design Corner niche
          
Dwarf - I meant what you thought I meant
And I agree on the storyline - it''s perfectly workable within the system described, it''s just a single chain of events that happens to start at the beginning of the game and ends the game when you complete the last one.


People might not remember what you said, or what you did, but they will always remember how you made them feel.
Mad Keith the V.
It's only funny 'till someone gets hurt.And then it's just hilarious.Unless it's you.
Yeah, I didn''t think that it was the loop, thought that might be fun too . Anyway... What do people think of the write up so far? I need to add in the EXCLUSIVE PREREQUISITE and NON-EXCLUSIVE PREREQUISITES... The way that it is structured at the moment allows for ony EXCLUSIVE PREREQUISITES in which each event is only triggered once. Further EVENTS down the line can change the triggered value of an earlier EVENT, thus allowing the event to be triggered again.

Hmmm, should I make it so that each time an EVENT tree is finally parsed it resets all to UNTRIGGERED or should I do it the other way (where the last EVENT UNTRIGGERS the entire tree, or what is needed)?

-Chris Bennett of Dwarfsoft - Site:"The Philosophers'' Stone of Programming Alchemy" - IOL
The future of RPGs - Thanks to all the goblins over in our little Game Design Corner niche
          
So, in effect, if you had an event that would be triggered when you entered a certain building at a certain time and those were the only prerequisites, then the player may enter that building 20 times because it was not in that certain timeframe then the 21st time it would happen and it would seem pretty dynamic.

This is a great idea. If you wanted something to be really dynamic you could even make it so that some of the prerequisites such as time could be randomly set at the very start of the game so if the player replays the game it would happen at a different time. This randomness probably wouldn''t be used for every event but just the ones that you wanted to seem really dynamic.

I was planning on doing something like this, but I couldn''t think of a better way than the forceful approach...just to have a bunch of boolean values for all the individual things that could happen and just have a ton of if statements That''s a pretty lame way to do it, so if you guys thought of a bettter way that would be great.


"All you touch and all you see is all your life will ever be --Pink Floyd
Quidquid latine dictum sit, altum viditur.
Need help? Well, go FAQ yourself.

Click here to see my current project.
Need help? Well, go FAQ yourself. "Just don't look at the hole." -- Unspoken_Magi

This topic is closed to new replies.

Advertisement