Page 2 of 2 FirstFirst 12
Results 21 to 21 of 21

Thread: RPG equipment

  1. #21
    Originally Posted by edderkop View Post
    save your savegame in a binary file would also prevent the casual cheater from cheating.
    Adding some kind of obfuscation under the cover of "disk space optimization" :P

    Use the struct module for that: https://docs.python.org/3/library/struct.html
    You need to take into consideration the type of each value you want to store, but it should work out ok !

    Or if you don't care about cheaters at the beginning just go either with the `bge.logic.saveGlobalDict` or dumping things using `json` (or `pickle`). Its up to you really.

    (you can even just dump the json string representation as base64, should prevent lambda people from looking at some ugly file, it requires almost 0 work and acts as a simple deterrent)

    Because I think you already have some fun work to do setting up the items you will spawn in the BGE

    edit:
    Lastly, just in case you want to learn a side skill, you can use this resource: https://pythonschool.net/category/databases.html

    Depends on what you want to do, but I think it can be fun to learn a new tech from times to times, and using SQL with SQLite can be a nice little experience.
    Last edited by WKnight02; 17-Feb-18 at 04:47.
    BGE Python framework: https://gitlab.com/bgez/bgez.git



Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •