@tyrnannoght - what's in a bytesteemCreated with Sketch.

in gamedev •  4 months ago 


well ... i was adding some explo on goldmanmorgan but i ended up with a page and a half again so i thought id just make into this weeks "update" and skip the weekend post :

some illustration

whats taking so long ? well i'm not linus torvalds or peter molyneux for one thing and also i stay busy on small things like saving bytes, considering i have one small bit for the first zone with one map with nine levels i see using tiled and object properties costs

{
         "draworder":"topdown",
         "id":4,
         "name":"Object Layer 1",
         "objects":[
                {
                 "gid":12,
                 "height":64,
                 "id":5,
                 "name":"",
                 "properties":[
                        {
                         "name":"goto",
                         "type":"string",
                         "value":"{\"map\":\"2\",\"x\":3\",\"y\":\"9\"}"
                        }],
                 "rotation":0,
                 "type":"",
                 "visible":true,
                 "width":64,
                 "x":192,
                 "y":64
                }, 
                {
                 "gid":12,
                 "height":64,
                 "id":6,
                 "name":"",
                 "properties":[
                        {
                         "name":"goto",
                         "type":"string",
                         "value":"{\"map\":\"2\",\"x\":3\",\"y\":\"9\"}"
                        }],
                 "rotation":0,
                 "type":"",
                 "visible":true,
                 "width":64,
                 "x":384,
                 "y":64
                }],
         "opacity":1,
         "type":"objectgroup",
         "visible":true,
         "x":0,
         "y":0
        }

which makes me think if all that loads in memory thats a lot of bytes (who the hell cares about bytes , well i prefer custom and i just saw today assembly language is still number 10 in the worlds top popular languages for one - call it a want to be "demo" or whatever) - if i end up with 48 zones each with their own maps with x levels and subsections thats a whoooole lot of json so if i add a custom bit that goes :


{"1":{"3":[[2,3,9]],"6":[[2,6,9]]}}

which for my purposes does exactly the same with a lot less bytes and lines of code involved

then i already save

[email protected]:~/Desktop/pastemap$ wc -c byte*
1345 byte1
  37 byte2
1382 total

on two entries ... (this is mainly b/c i want a way to have moving from map to map to not be coordiante dependent so you can have secret passageways for instance or shortcuts or you move from map 1 topside and enter map x leftside or somewhere in the middle ? See TILED is great okay, i will definitely support Bjorn on Patreon the moment i am sure i can miss the contribution without error but just like "blockchain" the pre-made solution isnt always the way, hybrid and custom imo is highly underrated and undervalued in the age of framework, so if i can combine the mans great work with my own concoctions in order to keep the page-size (download) and use of memory lower then i think thats the way to do it ... (and if im not mistaken using JSON "in-string" in an object property is on the list but not supported yet as i see escaped characters when i do and despite that it would still cost an extra 600+ bytes per single object, eyes on the future as an extreme example : i dont know how many objects in the object layer world of warcraft would have :p (slightly exagerrated to make a point ...) and im not sure if phaser will read the file if i add my own bit at the end .., so , rest assured, bored i am not...
the site atm is locked somewhere due to some security checks that havent translated from the localhost to the "live" but as there's nothing to play i dont see that as a problem - its not like anyone has linked the accounts yet last time i checked, that should fix by next week when i overwrite some scripts, hmm, i should probably have kept this for my weekly @tyrnannoght post ...

and also, i havent found anything that actually describes something that combines phaser, php and ajax/jquery both server/clientside , having had zero actual formal education on the matter its a lot of googles but it IS by far the most interesting thing i have set my head on in YEARS , and i DO intend to work this out but the earliest access possible i see would be limbo + washed-up beach playable AND secure ways to keep the gamecoins numbers from corrupting thats why i keep saying : dont wait up for it

there's always drugwars and steemmmonsters if you want something steemrelated and im sure there's many more to come


so that was the "bit" i added to the bottom of todays morgan ... but consider :

if you were to drive this through ? the absolutely fabulous #condenser used by #steemit and about any application running on the #steem #blockchain would have a massive increase in delivery speed.

It's not a proposal or anything, it just popped in my head as i was re-booting the system.

At the cost of readability the volume of data would DEcrease drastically , now a lot of people go for readability first and json is a pitfall when it comes to that but think about it how many billion internet users, how many transactions per millisecond around the globe, how many bytes sent , if 1 million people make a request the difference as per example is 6 million bytes (not much ? HELLA-much imo)
not that it would literally translate ofcourse but the data IS shown as "op" and "vote" and "transaction" and what not, which makes it hella-easy to decode and use, HOWEVER, what just popped : if you provide a clientside tool to interpret it you can leave the compact data to your servers, your servers certainly wont care if it say "transaction" or "O:" all that server sees is ones and zeroes, the rackspace to keep a whole blockchain would decrease by i dont know what, the transfer time would decrease by i dont know what, which in essene means ever MORE speedy transactions as far as i understand.
Just a small tool on the client that replaces the "o:" with "transaction:" and so on and bob's your uncle AND alice is your aunt. In essence the nodes would have to push out less data, the nodes would have to translate less as it would already be compact and all translation toward human readability can be handled on the clientside with a simple tool ... in theory ... as far as i can see from my laymans point of view ... if anyone actually reads this and finds grave errors in my reasoning i would implore you to let me know, please, i dont mind learning, just leave out the "noob" and "idiot" if you like i wasnt born programming ....

Practicalities ?
Well you can't just "do that" you cant just switch in the middle of of a blockchain or you need to add to the intrepretation that "starting at" its now .... BUT .... what condenser delivers IS already a translation (if im not mistaken) so basically it would speed up requests in translation only, which is still an increase.

You can't change data in a blockchain due to the nature of the thing : every "block" in it can only fit EXACTLY between two other blocks, thats the wizardry of satoshi there , that's why its called a "block-chain" its linked and you cant just remove a shackle or it breaks.

But in theory what you can do is re-stream it ... you can take the whole thing, pick out the data one by one and push it to a new one as you crack the hashes to fit it all in place.

"you're dreaming again, cat"

i know precious ... it just popped up and i had to say it

the danger with restreaming IS ofcourse the temptation to alter data that was in it before you did


so i guesss that's this weeks @tyrnannoght

in de hoop u hiermee voldoende te hebben geinformeerd,

sincerely,

@goldmanmorgan or one of the others

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

I'm afraid im going to correct myself on a small matter, for lack of RC i'll do it from here : where it says 6 million bytes it should say 600 million bytes ... that's like 100 times hella-more ... at the risk of commenting a new post on my post : i know what i say there with the clientside tool is very anti-cloud, but cloud, like "blockchain" is not the alpha and omega, the best solutions are custom and hybrid, taking the best from the best for the particular situation. Imo cloud is more about control than it is about service but i think i could do a rudyardcatling post on that ... thats more the style ...
ghm there's several way, you can have a central server that handles the "translation protocols" or whatever but still another layer or you could have browsers store a one-time download per site/app but that's probably just a hole for messing with, i think a custom client-side tool or embedded in the particular application would be the best way to take a whole load off of the net ... here i go again, must be the witching hour

You got a 72.75% upvote from @mitsuko courtesy of @gmdatacenter!