So I want to make a game that uses randomly generated loot that the player can equip (Think Diablo or Borderlands). However, getting any sort of inventory system with swapping in gear with each individual piece having potentially dozens of stats is either impractical or impossible. Each additional inventory slot adds even more complexity to coding such a system.
So, how about a way for me to store infinite items. All the items are stored as passwords which the player can note down outside of the game. These are items with randomized stats and affixes, of course, and will probably consist of at least 10 numerical variables each.
The easiest implementation system for this would be to just list all the variables in turn for the password. For example a sword (item type 1, sprite 46) with 65 damage, 1.3 attacks per second and an extra 5 fire damage might show up as this:
01460065013005
However, that kind of password system is so easily exploitable that it isn't even worth using, because someone could just make a sword like this: 01469999999999 to give it 9999 damage, 99.9 attacks per second and 999 fire damage.
So my question is what kind of encryption system could be created in scratch that would prevent simple password cheats like that and also prevent players mashing in random passwords until they got a good item.
Last edited by blaster395 (2012-08-17 15:06:58)
Offline
You could use a hidden sprite. I once used a hidden sprite to stop people from taking the music I had put in the project, and the hidden sprite was actually the dot of the "i".
Last edited by henley (2012-08-17 16:35:28)
Offline
To make a hidden sprite:
1) Click the "paint new sprite" button
2) Drag the window to the left, so the same button is now visible.
3) Click the button again.
4) Close out of the paint editor
You should notice that there is now a white square (I think 10X10 pixels, but I'm not sure) towards the middle of the screen. You will notice that it doesn't have a thumbnail, like that you would click to view the scripts, and store the passwords in that sprite. To access it's scripts, double-click it when it's on the screen. You can disguise it as something else in-game, or you could just put it in a corner and make it hide.
Offline
I don't think you understand. The game doesn't have a single password. The game will have billions of randomly generated items and billions of passwords that work, each for 1 item. Ever played a game with a password system to save your game? This is the same but with individual items.
Reread what I originally posted, because I don't think you realized what kind of password system I am referring to.
I need a system that turns the raw stats of the item (58 attack, 5 fire damage, whatever) into a password (0058 0005), without players just being able to type 9999999999 and get items with massive stats.
Last edited by blaster395 (2012-08-17 17:15:09)
Offline
Maybe you could use something that scrambles the numbers (See my encoder-decoder) that's undoable. Then, lock the game if the player enters an invalid code 2 or 3 times in a row (ex. Something that doesn't decode to a string of numbers)
Last edited by Molybdenum (2012-08-17 17:40:54)
Offline
henley wrote:
MathWizz wrote:
@henley, that is so NOT effective.
![]()
How?
Because it doesn't even fit the explanation for what I need.
Offline
Technically you can do that with any game. You just need to know the saving system, and then you can open up the save file and edit it.
An idea to make it harder is to use letters and numbers, not just numbers.
1. Type 2. Attack 3. Defense 4. Bonus against fire 5. Bonus against ice 6. Bonus against evil 7. Bonus against good 0-Z are positive. !-) are negative.
Sword: 1C620@@
Type: 1 Attack: 12 Defense: 6 Fire: 2 Ice: 0 Evil: -2 Good: -2
But as I said, if you know the system, you can't really stop people from changing the values, and if you have access to the code, then you can easily change the values either way.
With Henley's hidden sprite idea and encryption, you could probably get the result you want. The encryption you would use, I don't know what you could possibly use.
Last edited by Magnie (2012-08-17 20:10:18)
Offline
blaster395 wrote:
henley wrote:
MathWizz wrote:
@henley, that is so NOT effective.
![]()
How?
Because it doesn't even fit the explanation for what I need.
Not that, but there are easy ways around it. Well... Maybe I'm the only one who knows about these ways. xD
Offline
blaster395 wrote:
henley wrote:
MathWizz wrote:
@henley, that is so NOT effective.
![]()
How?
Because it doesn't even fit the explanation for what I need.
You could store/scramble/encode/decode the codes in the hidden sprite so that people can't easily find them.
Offline