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.
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.
, , , , mysql. , , , , , . , , .
. -, , , , , . , , .
-, MySQL. dos, , , pre-req "Install MySQL", -. , C, , SQLite, . , , , :)
, ADRIFT, , , - .
?
.
Prolog Google.
, . , - ; . TADS 3 7
, , , (, , , ...). , .
, Room, Description, " " Facade, . , , , .
Source: https://habr.com/ru/post/1778456/More articles:How to create a release branch in GIT? - gitReading structure from NameValueCollection - httpDifference between "import cv" and "import opencv.cv" using Python + OpenCV? - pythonWhat is the maximum Java heap size that I can safely use on a 64bit Windows platform? - javaImplementing a credit card in an Android application - androidHow to display the link only for registered users? - dotnetnukeХранимые процедуры и ОПТИМИЗАЦИЯ ДЛЯ НЕИЗВЕСТНОГО - sql-serverCan I build a vector of structure vectors with structure vectors? (Yes, indeed) - c ++What is the difference between (;;) and while (1)? - c ++DLL callback pointer - c ++All Articles