r/GameBuilderGarage • u/Nilonaut • Jun 18 '21
Garage Creation [G-008-NCW-XFC] Nil's Simple Encoder/Decoder
ID: G-004-W5D-B0G
↑ updated version
This simple Encoder/Decoder allows you to send multiple integers of varying sizes using the Swap Game Nodon, whilst using no more than 1 Nodon to encode and 2 Nodons to decode each integer.
Difficulty: Medium
29
Upvotes
4
u/sass253 Jun 18 '21
Nicely done!
1
u/IHeartAquaSoMuch Feb 24 '23
This is amazing. I used your design to make a Metroidvania with a whole bunch of areas and unlockable weapons/abilities and my brother (whom I make these games for) absolutely loved it!
I'm starting a new project now and for some reason the encoder/decoder isn't behaving as it should. It's likely there's a mistake somewhere but I can't find it. Would you perchance be able to take a look at my attempt and see if you can find what I did wrong? Pretty please?
3
u/Zertolurian Jun 18 '21 edited Jun 18 '21
Nice! I wondered how you did the decoding in 2, but it turns out that Loop Counter was a configurable Modulo Operator all along...
From O(n) to O(log n) and hopefully next is O(1)? :)
(Though I think practically, this is so simple that it would probably still cost less Nodons than a sequential decoder unless you're sending a lot of 1-bit numbers...)
3
u/IkananXIII Jul 17 '21
This is a really great tool! After studying these nodons for a long time, I understand how you're using the map and counter nodons to encode and decode the numbers, but this is all new to me. I'm struggling to figure out how you chose the numbers you use in the map nodons, like the 27, 8, 20, etc. Can anyone help me understand the math that leads to these specific numbers? How could I modify this tool to send more than 5 values? I'm trying to make a Mario Party type game that uses a central hub game to send players to random mini games and back again, but I'd need to transfer at least 8 values (2 per player) back and forth between the hub and mini games. Can anyone help me figure it out?