Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to create an internal database
    text
    copied!<p>Games, such as Nintendo DS games, have to store data of their objects, for example, RPG needs to store data of bestiary, weapons and spells.</p> <p>I want to know the best way to create a game database in C++ and use object-oriented features.</p> <hr> <p><strong>Example:</strong></p> <p>A RPG with the following tables:</p> <ul> <li>Class (Name, Race, Ability, Atk, Def, ...)</li> <li>Race (Name, ...)</li> <li>Ability (Name, ...)</li> <li>Skill (Name, Race, Power, ...)</li> <li>Learning (Class, Level, Skill, ...)</li> </ul> <p>Each class belongs to a race. "Human ranger" and "Elf ranger" are different classes. A class is not available to all races. Abilities are used outside battles (thieves can lockpick doors), and skills are for battles. Skills are invented by a race, but other races can learn it. A "human karateka" can learn "Tiger Fist Attack" from "cat men". A class can learn new skills when level up.</p> <p>The player can hire mercenaries, that are randomly generated. Mercenaries data is stored in player's save file.</p> <ul> <li>Mercenary (Name, Class, Level, Personality, ...)</li> </ul> <hr> <p>It could be stored as static data. Each table could be stored as an array of structs, where the array index is the key of each line in the table.</p> <p>I would have to create a function to initialize each array position with data of each line. But I think that it can be statically initialized in memory without a function.</p> <p>An easy way to edit database is important, because many attribute values need to be tested and balanced.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload