What is the best way to store area data for a text adventure?

I am developing a β€œZork” style text adventure in C # and it will have a fairly large number of different areas with descriptions and environment modifiers. I do not want to have a database, ideally, if this is really the best way to do this.

I need advice on the best way to store / load this data.

It will include:

  • Area description
  • Environmental modifiers (windows open / broken, door closed)
  • Items Presented By Default
+5
source share
8 answers

. , - . , , , . .

, xml, . , . / , . , "", , .

+7

, # Inform7. Inform7 - , - , .

Inform7 , , . , :

The iron-barred gate is a door. 
"An iron-barred gate leads [gate direction]." 
It is north of the Drawbridge and south of the Entrance Hall. 
It is closed and openable. 
Before entering the castle, try entering the gate instead. 
Before going inside in the Drawbridge, try going north instead. 
Understand "door" as the gate.

- , " ". , , , . " ", , , " ", , . . .

- , # , Inform7? - # - , . - , , .

+13
+1

, # . . ! .

# (load/save), .

0

"" ? , ?

, . , , , . - .

UPDATE:

XML, ...

<area id="DarkRoom1">
  <description>Dark Room</description>
  <item>Bucket</item>
  <item>Spade</item>
</area>

, .

0

(zip ).

, , (xml?). , .

:

:

  • ()
  • ()

, .

:

:

  • ( )
0

(, , (, ..), , , ( ..) / .

:

  • ; , , ,
  • , concurrency
  • Savegames - savegame .
  • The data structures you are dealing with are probably simple enough so that data integrity is not a serious problem.
0
source

All Articles