Search code examples
javac++packageencode

Encode Method for games packages?


sorry about the last question. (I hate google traductor).

Im working in a MMO (Masive Multiplayer Online) game, but i see many times some server emulator for example for Lineage 2 or Aion of NCSoft.

My game is C++ Based and the server emulator is in Java.

Then, i guess URL Encode method because can encode and decode in both programing languages but is easy to decode.

Another idea is create packages like uint values 0x00000 + Action Parameters(URLEncoded) but i think isn't a good idea because is easy to decode.

Another one, is create a simple encryption method remplace characters for another characters. An Example:

To encode: Hello
Encoded: 72S/101NK&108-ASK+108P$I111?TRY

Pretty simple to decode, split for no numeric characters and delete it. Is an ASCII simple encode per each character but incrence the package size alot.

Someone know an encode method than can be decoded in C++ and Java?

Thanks you for read. Have nice day, Marcos.


Solution

  • I assume you require a means to encrypt and decrypt data (I believe these are the terms you're looking for, rather than encode/decode). Or is it code obfuscation you're looking for?

    If this is about encryption/decryption, there are plenty of algorithms that have implementations in numerous programming languages. For the love of goodness, don't use something like URL encoding or a simple substituting cypher, since these are trivially easy to break.

    Where encryption and security are concerned, the users of your game rely on the developer to make robust, industry-standard choices that protect their personal information and the time they invest in their character build. So I suggest you either seriously read up on the concepts of encryption and authentication and then make a solid choice, or have this handled by an expert in the field.

    Don't roll your own here, as that's usually the best way to make something easily hackable. Encryption standards like AES, secured protocols like SSL and TLS, and authentication based on certificates are all well-established, thoroughly tested through years of use and properly documented. It probably matters little if there's a difference in the language used for client and server, but that's actually the case for any network communication if there's proper abstraction.