back
user profile
KilledByAPixel
514karma·111submissions·April 2, 2019
recent activity (111 total)
comment
Thanks, I also referenced this jk1k racing game in the post... https://js1k.com/2019-x/demo/4006 …
comment
That's cool! Reminds me of pavel's 1 line cube tornado. https://www.dwitter.net/d/14485
comment
With ray casting engines for each column of pixels you cast a ray and collide it against world geometry to see what it hit and where. With this engine, and most modern 3d engines you apply a transform…
comment
I think there is a middle ground of many indie games I see on steam that are much larger then they should really be. As a dev, one problem I saw often is UE4 is massive, well over a hundred meg for ju…
comment
Ok, I just tried it. Removing every Math. and adding let{cos,sin,PI,min,max,tan,atan2,abs,ceil}=Math; to the top. It worked better then I expected, though it is still 1 byte larger then without. Could…
comment
Do you have an HD monitor? If so the game is in HD. Many tiny games and demos like this are rendered to a smaller canvas and will either not stretch to fill your monitor or are rendered at a lower the…
comment
Alien trees...
comment
Double click to jump.
comment
You could do that, but it would not compress as well. For example the word const is not use anywhere in the 2k version, while Math. is used about 40 times so it becomes essentially free when compresse…
comment
Nope! It is not a raycasting engine at all, but instead built similar to old school racing game tech.
comment
HD because many tiny games like this do not stretch to fill the whole window. It requires extra code to do this and have everything scale properly.
comment
It is the JSCrush code. I don't fully understand it, but it's a brute force approach to find the longest substrings.
comment
Yes, localstorage is great, but this for making URLs that are short enough to share on twitter, dischord, etc. The max twitter url length is ~4000 characters I think.
comment
Awesome project.
comment
Thanks, that is good reference. It makes sense that Zip would beat out JSON for longer strings. Just as another point of comparison, how about encodeURIComponent(gzip(input))?
comment
Also, LZ beats it out for longer strings, but not by much for strings in the target range (~5000 characters).
comment
I do want to use that as reference if I ever decide to clean it up.
comment
I assume they minified it, but I don't have access to the unminified source. I'd like to clean it up or find a cleaner version, but for now it works well enough.
comment
Looks cool, I just checked into it. It does work well, but doesn't appear do anything to reduce repeated substrings. Maybe a combination of the two would work well though.
comment
Encoding to base64 increases the size by at least 33%. This is to help make links small enough to share on places like twitter, dischord etc where the max length is around 4000 bytes.
comment
Yes, I'm interested in trying to make it work with longer strings. Worst case scenario if it gets long strings it could just split it up into strings of length that it can handle. The speed seems…
comment
This is the JSCrush algorithm that I did not write and it is kind of magic. The uncompressor is crazy small. You can read more about it here... https://nikhilism.com/post/2012…
comment
As far as I know base64 is not guaranteed to be uri safe, though most of the time you should be fine. However more importantly converting to base64 automatically increases the size by 33% https:/…
comment
I had some issues with long strings, like 5000 or greater. What length string were you using?
comment
It worked great for my use case http://zzart.3d2k.com Reduces share urls by about 75% for these very repetitious JSON strings.