Game design and architecture for text adventures

I am trying to create an adventure game for a school school. I'm a little stuck in creating a map of the world and rooms.

Should room descriptions be part of the source code or should they be separate? I thought about placing all such descriptions and properties of a room in a MySQL database, and then have code to organize the logic of each room; putting the description of each room in the source code seems a bit untidy.

Is this the preferred way to organize descriptions in an adventure game? I also thought this might be preferable since I could then query the database to find common data properties.

Any comments would be appreciated.

+3
source share
8 answers

No, do not indicate the description of the level / room inside the code, it is not so dynamic.

Currently, many development structures tend to split code into data. So, for ordinary cases, we put the data of the game rooms into files and read them to create a level, and possibly allow the user to independently build a new level and ultimately create a new file for transferring data in the room.

+6
source

, , , , mysql. , , , , , . , , .

+4

. -, , , , , . , , .

-, MySQL. dos, ​​ , , pre-req "Install MySQL", -. , C, , SQLite, . , , , :)

+3

​​, ADRIFT, , , - .

+2

?

.

.

  • SQL ( )
  • , .
  • , , "".

Prolog Google.

+1

, . , - ; . TADS 3 7

+1

​​, , , (, , , ...). , .

0

, Room, Description, " " Facade, . , , , .

0

Source: https://habr.com/ru/post/1778456/


All Articles