Advertisement

storyline

Started by July 28, 2005 11:47 AM
4 comments, last by llvllatrix 19 years, 1 month ago
Hi all i am trying to build a quest game , my problem is how to program the script/storyline because alot of hardcoded if conditions is too complicated. anyone has suggestions how to solve it? 10x BlackRyder
I'll tell you what I've realized from black-box-analisys of various games... use scripting!

Last game I've checked had a (really lame) scripting language in which they declared global variables. Every frame, the scripts would have ran once and checked the results, possibly updating the world.
Here's the caveat: if they need to open a door, they needed to create a special object named that way (their object were always unnamed and everything worked by ID) or every object would have moved.

Considering the results however, they managed it pretty well.
Don't even think about do the whole stuff in code!
This is were the complexity blows up. You don't have to code a game, first code an engine. Then, code your game on top of that.

Previously "Krohm"

Advertisement
o.k thats what i thought but if you need to do scripting it means you need to build interperter to that language.
do you know where i can find reading material to get started?
also do you know if there are standart scripting language like there are in 3D modeling (3ds,md2,etc.) with a libraries?

10x in Advance
BlackRyder
Making a scripting language

There are a dozen of pre made languages. lua, angelcode and puython are the one that pops into my head, have a look here if you want more ínfo...


On a side note, making a trigger that executes a script when you get within a certain radius of it is, in my case, extremely helpful. With it I can unlock doors, enable enemies, start movies etc.
While I've heard of ready-to-go languages, I always saw ad-hoc scripting languages at work. It's not clear to me how, a standard language can interface with your technology, which may be somewhat different from the expectations.

Doing the parser itself is not really so difficult, altough making it efficient is a different story. The parser I am using seems to blow up at about 2000 lines of code. This is not a problem now but I would have liked it to go higher, at least 10k.

Personally, I suggest you to make your own and document it. You should really take a look at UnrealScript because I think it's very interesting.

Previously "Krohm"

Some more interesting reading:
http://www.gamasutra.com/features/20020821/dawson_01.htm

Cheers,
- llvllatrix

This topic is closed to new replies.

Advertisement