After getting into A7 by writing some smaller test games, I'm going to write my first adventure game.
First of all I'd like to gather some thoughts and ideas how to build the "Adventure System" that holds all object information like "can be taken", "can be opened" ... and state information like "has been taken", "is open/is close" and so on.
One idea I had was using a database like mysql to build all the structures I need there, but then my game always depends on an installed mysql server.
Has anyone did an adventure like system before? How did you implement it in c-script/lite-c ??? Can anyone give me some hints and tipps?
There are different playable characters in the game. An object can be taken by just some of them then it would be not nice to set the values who could take the object by setting skills in wed.
Then there must be stored different texts for the objects just like the ones that are displayed when looking at the object and so on.
I think it would be better to have a more complex structure than just using skills. What do you think?
What would be a good way to get information stored in a file or database related to the entities?
For example when I stored let's say the following information:
name: desk description: A desk made of dark wood ... canBeTaken: no text_take: Sorry, I can't take it. It's too heavy. canBePushed: yes text_push: Let's try. canBeCombined: yes canBeCombinedWithObjectID: 13 canBeOpened: yes isOpen: no
... and so on.
What would be a good way to access all those data without reading in a file or accessing a database with every action?
Can I use structs for that? How and when would I fill the structs object with those data and how to build the relation between the entity and the struct object? How can those data like 'isOpen' be persistated so that a door that was opened before is still open when I come back to this door? Can I use the skills to store those state information?
Yes, you can use structs for that. I see 2 ways to initialise them at startup - in the script, or a harder, but more flexible way - program a function that reads data from file and fills structs with it. After you have initialised the structs you can access and alter it's content anytime. Yes, you can use skills for temporary information, but i currently don't see reasons for that
Re: Help for Adventure System
[Re: Shadow969]
#215765 07/13/0810:2907/13/0810:29