Tag Info

New answers tagged

1

A straightforward approach could be to produce a folder which contains always the same executable, copied, and different files next to it. The executable would look for data files relative to itself. .../MyNewThing/ MyNewThing.exe <-- renamed but identical resources/ <-- files with known names or name-patterns MyNewThing.data <-- ...


3

This provided some simple XOR encryption: #include <iostream> using namespace std; string encryptDecrypt(string toEncrypt) { char key[3] = {'K', 'C', 'Q'}; //Any chars will work string output = toEncrypt; for (int i = 0; i < toEncrypt.size(); i++) output[i] = toEncrypt[i] ^ key[i % (sizeof(key) / sizeof(char))]; return ...


0

How about using Set Theory to model your data as relations (this is easy with any relational database, or any language/library support for sets and tuples): Imagine a relation killed_by(a, b) where a and b are both members of the set of all living things. character_x_is_dead when there exists any solution to killed_by(?, b). You could store this on disk or ...


0

tl;dr You have rooms, you need "keep an eye on them" by saving them and their contents (NPCs / items) to your sqlite. Each room has entities that can be in different states, you need possibly a simple Enum to save those states, the one row per entity can "remember" that entities state for you. Elaborate answer: You are mixing two things together. One is ...


1

You have two initial options: to hard-code the conditions or to use scripts. Hard-coding is quick and great for prototypes, but it allows 0 flexibility. I expect your game to out-grow this very quickly. Using a script takes more time to get started because you need a script file parser first. Apart from proven scripting languages like LUA, you can devise ...



Top 50 recent answers are included