Tag Info

New answers tagged

1

You could define how these would affect the character and add flavor text. If you group them into something like biomes, you can randomly select a few at a time for each battle depending on where the battle takes place. For example, if you has just two attributes - Offense and Defense: "Rocky Biome" : { "Rock : { "Take cover behind rock" : { ...


1

A random number generator and a simple test is all you need, for example, in C#: Random rnd = new Random(); int value = rnd.Next(100); if(value < accuracyValue) { //We have a hit } else { //We have a miss } This works when accuracyValue is a number between 0 and 100, representing the player's hit chance. For example, a hit chance of 75% would ...


0

This depends on how the race affects the character. 1) Do you just want to save the type, e.g. when checking if the user is an Elf to receive bonus damage when wielding an Elvish Blade? Then you might just go with an enum: enum Race { Elf = 0, Ogre, Gnome, Human }; 2) If you want to include special behaviour and/or properties, you can go with a ...


1

There's a few variables that aren't mentioned like how big you expect it to be, what platform the games are going to go on, etc so as usual there's a lot of "it depends" on any answer. One option is to serialize the data out to JSON. If you store some sort of checksum against the data you'll immediately know if the data has been changed. You can also ...


2

Depending on your needs, you could just serialize a Dictionary to a binary file. I can post some code after I get home, but this link explains the serialization features of C#: http://tech.pro/tutorial/618/csharp-tutorial-serialize-objects-to-a-file This is only secure-ish (a binary file is harder to hack than an excel spreadsheet) but that's all you ...


1

If a disconnection event of an entity is received on the server side, do you iterate through the actions of all entity in the map and remove these which are related to an entity that has just dropped connection? You could do that, but it may be unnecessarily inefficient. When an entity gets disconnected from the simulation or otherwise leaves the ...



Top 50 recent answers are included