System The Shortest Save/Load Code Ever

SerraAvenger

Cuz I can
Reaction score
234
NOTE:
I think I read some time ago that your system doesn't use multiple integers, instead it tries to save as much info into one integer as possible in order to save space...
Just in case you really map n-dimensional arrays into integers (I did that), this might be intersting for you...

length = Log_base( integer + 1)
adding codes:
length = length1 + length2 = Log_base( integer1 + 1 ) + Log_base( integer2 + 1 ) = Log_base( integer1 * integer2 + integer1 + integer 2 + 1 )
mapping n-dimensional arrays:
length = Log_base( integer1_max * integer2 + integer1 +1 )
since integer1_max >= integer1,

integer1_max * integer2 >= ( integer1 + 1 ) * integer2 (in any reasonable case it's > )

hence it is actually stupid to compress everything into one integer, lots of space will be lost. In fact it should be clever to encode every number on its own and use + and - as a seperator. That way you can save _any_ JASS integer in upto x digits (with a reasonable base of 36, that would be log(2^31)/log(36)=31*log(2)/log(36)=5.99=> 6 ), which is absolutely fine. The smaller the integer, the shorter the code... That is the most clever "compression" I can actually think of.
(example code, in base 10)
+304-41423-425+3566
->
+304
-41423
-425
+3566
In base 36 the code would ofc get much shorter.


If you find any flaws, plz tell me....
 

Zwiebelchen

You can change this now in User CP.
Reaction score
60
I use KODE in Gaias Retaliation ORPG; however, I got a really strange problem:

When reaching a certain number of digits (I think at around 12 blocks a 4 digits or something), the system doesn't load anymore. There is no invalid code displaying and the "loading lag" occurs. However, nothing else happens. It works fine with shorter codes, though (for example saving with the progressive int being 0)

May it be possible that KODE can not save up to that many digits?

This is what we store:

- a progressive int (10,5) ... common values at around 1000-10000
- ordinary ints: 1000, 12x300, 12x2, 3x200, 51, 7, 20, 50x4


EDIT: testet it with the following edit of the KODE's source code:
JASS:

function load_code takes player p, integer security, string s returns boolean
    local integer num_chars
    call BJDebugMsg("KODE executed")
    call clear_bits()
    set num_chars = parse_code(s)
    call decrypt(p, get_num_bits_supported(num_chars))
    call BJDebugMsg("KODE did reach end")
    return is_valid(security)
endfunction

As expected, only the first message is displayed.

In fact, everything works fine until decrypt.
 

SerraAvenger

Cuz I can
Reaction score
234
Try to put a couple of waits into the decrypt loop, then see if it _still_ stops working with so many digits. Sounds like an OP problem to me. If it works then, but you don't want to have that pause, you'll need a system that doesn't encrypt/decrypt but uses hashsums... I could code you one, if you want.
 

Zwiebelchen

You can change this now in User CP.
Reaction score
60
Hmm, I set the encryption strength lower and it works ...

Seems like there is a need to split the decryption process into multiple threads to avoid operation limit.
Feel free to write an optimized system SerraAvenger, I think Korolen is fine with that too. ^^
 

SerraAvenger

Cuz I can
Reaction score
234
Hmm, I set the encryption strength lower and it works ...

Seems like there is a need to split the decryption process into multiple threads to avoid operation limit.
Feel free to write an optimized system SerraAvenger, I think Korolen is fine with that too. ^^

Glad you got it to work.

I won't copy this system just to make it avoid the op limit. I'm no fan of heavy decription / encription after all when it comes to save load codes... Doesn't make them harder to crack, but means a lot of hazzle. Mapping to a different alphabet would be more than enough, if you ask me.

wishes, Davey
 

Zwiebelchen

You can change this now in User CP.
Reaction score
60
Well, I encountered another problem with KODE, which is something I can not fix without a new security method.

The problem is, that KODE does not recognize in its validy checker, wether a letter is capital oder lowercase.

This means that if you load a code with the exact same letters, but without the right caps (if you used a 62 letter system), the code loads (and of course, returns weird results) ...
A checksum validy checker may be the better solution here, so I would gladly take your offer to improve KODE @SerraAvenger.
 

xXGauntletXx

New Member
Reaction score
4
After looking at kode, then gobbledygook (sp?) it seemed much easier to edit gobbledygook than kode.
To make kode MPI took much more work than to change 1 value in gobbledygook.
 

Korolen

New User (Why do I keep getting those red bars?)
Reaction score
69
Kode is MPI, last time I checked.

Kode is neither MPI nor not MPI, the categorization doesn't really apply to a save/load system. Kode can generate codes for as many players as you need it to, one right after the other.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    So what it really is me trying to implement some kind of better site navigation not change the whole theme of the site
  • Varine Varine:
    How can you tell the difference between real traffic and indexing or AI generation bots?
  • The Helper The Helper:
    The bots will show up as users online in the forum software but they do not show up in my stats tracking. I am sure there are bots in the stats but the way alot of the bots treat the site do not show up on the stats
  • Varine Varine:
    I want to build a filtration system for my 3d printer, and that shit is so much more complicated than I thought it would be
  • Varine Varine:
    Apparently ABS emits styrene particulates which can be like .2 micrometers, which idk if the VOC detectors I have can even catch that
  • Varine Varine:
    Anyway I need to get some of those sensors and two air pressure sensors installed before an after the filters, which I need to figure out how to calculate the necessary pressure for and I have yet to find anything that tells me how to actually do that, just the cfm ratings
  • Varine Varine:
    And then I have to set up an arduino board to read those sensors, which I also don't know very much about but I have a whole bunch of crash course things for that
  • Varine Varine:
    These sensors are also a lot more than I thought they would be. Like 5 to 10 each, idk why but I assumed they would be like 2 dollars
  • Varine Varine:
    Another issue I'm learning is that a lot of the air quality sensors don't work at very high ambient temperatures. I'm planning on heating this enclosure to like 60C or so, and that's the upper limit of their functionality
  • Varine Varine:
    Although I don't know if I need to actually actively heat it or just let the plate and hotend bring the ambient temp to whatever it will, but even then I need to figure out an exfiltration for hot air. I think I kind of know what to do but it's still fucking confusing
  • The Helper The Helper:
    Maybe you could find some of that information from AC tech - like how they detect freon and such
  • Varine Varine:
    That's mostly what I've been looking at
  • Varine Varine:
    I don't think I'm dealing with quite the same pressures though, at the very least its a significantly smaller system. For the time being I'm just going to put together a quick scrubby box though and hope it works good enough to not make my house toxic
  • Varine Varine:
    I mean I don't use this enough to pose any significant danger I don't think, but I would still rather not be throwing styrene all over the air
  • The Helper The Helper:
    New dessert added to recipes Southern Pecan Praline Cake https://www.thehelper.net/threads/recipe-southern-pecan-praline-cake.193555/
  • The Helper The Helper:
    Another bot invasion 493 members online most of them bots that do not show up on stats
  • Varine Varine:
    I'm looking at a solid 378 guests, but 3 members. Of which two are me and VSNES. The third is unlisted, which makes me think its a ghost.
    +1
  • The Helper The Helper:
    Some members choose invisibility mode
    +1
  • The Helper The Helper:
    I bitch about Xenforo sometimes but it really is full featured you just have to really know what you are doing to get the most out of it.
  • The Helper The Helper:
    It is just not easy to fix styles and customize but it definitely can be done
  • The Helper The Helper:
    I do know this - xenforo dropped the ball by not keeping the vbulletin reputation comments as a feature. The loss of the Reputation comments data when we switched to Xenforo really was the death knell for the site when it came to all the users that left. I know I missed it so much and I got way less interested in the site when that feature was gone and I run the site.
  • Blackveiled Blackveiled:
    People love rep, lol
    +1
  • The Helper The Helper:
    The recipe today is Sloppy Joe Casserole - one of my faves LOL https://www.thehelper.net/threads/sloppy-joe-casserole-with-manwich.193585/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top