2D Room system architecture
The 2D room architecture has very simple set of defined elements. Its popularity is because of various reason including easy implementation and easy to for the players to understand. The architecture has only four parts. The main drawbacks with this system architecture is that use of physics and RNGs becomes difficult. The architecture is quite good for telling epic save the world stories.
Application Input Output System (AIOS)
In the classic RPGs that used this system architecture the game state was a few attributes, a location, quantity of items. In the modern era of computing the game state in this system architecture is minimal and can in most cases be stored in a simple text file, one for system settings and one text file for the save file. The exception to this is when there is a need to store randomly generated dungeons. It is possibly to store random dungeons in very little space because of how RNG in computers work. This is done by storing the seed value of the dungeon in a single parameter. Check information on RNG regarding this. A limitation to this technique that changes made to the random dungeon cannot be stored. An alternative to using simple text files is to use serialization techniques in modern object oriented languages, however this technique has the problem that save files stop working across different versions of the game. This limitation makes the serialization techniques unsuited for storing save files. It is possible to use a database like SQLite, however the amount of code required to retrieve and store data in a database makes this a decent but not perfect solution.
The individual rooms in the game. A room in an object oriented language is a simple object with a few methods to render and calculate physics. There may quite a few methods to allow mixing different attributes from different rooms. For instance modern 3D JRPGs have battle rooms that inherit the landscape of the in game map. In a basic game every room is coded from scratch, tough more advanced application may use different types of code reuse to make it easier to create new rooms. It is advisable to support room transitions that store a stack of active rooms to support GUI and NPC stores within the game. Several stacks may be required if the game has a lot of complex transitions or if the GUI is implemented as rooms.
This one of more defining elements of this system architecture. The simplest transition is teleportation from one location to the next. In old adventure games teleporation was used for implementing doors (see world builder). There would be a script that checked if you clicked on the door, and if you did the door would be changed to opened. When clicking on the opened door the game would then teleport the player to the new location. Other transition methods between room is when clicking or entering a store, sometimes a completely new user interface pop up and when clicking exit from the store the player is returned to the same location. This can easiest be implemented by using a stack of rooms. Allowing stacked transitions allows some other types of effects, for instance when speaking with NPCs the background is shown. Allowing to sack rooms makes it also easy to blend attributes from multiple rooms to fix a few of the drawbacks of the architecture.