Hue Jumper – A 2 Kilobyte 3D racing game in JavaScript

For 2kPlus jam I made a 3D racing game that fits in 2 kilobyte zip! It includes physics, controls, rendering engine, and procedural level generator. The code is extremely dense and clean as I went through many iterations to fit everything. I also spent an immense amount of time polishing the look and feel. You can play the game in browser, or view the code on GitHub. I am working on a post that will go into some technical detail about how my game works. Also, check the other submissions to 2kPlus jam, there are some mind blowing entries!

Posted in Game Dev | Tagged , , | Leave a comment

Egg Time Rewind – An egg cracking low res shooter

Time REWINDS you die… but your PREVIOUS LIVES remain.

This game was made in 4 days for Nokia 3310 Jam 2 with the limitation of 84×48 resolution and only 2 colors. The them was “Death is Good”. It is written in JavaScript building off the code used by my js13k game Bounce Back.

I used the theme by having ghosts of your previous lives return to help you after each death. There is also a juggling mechanic like the Twin Bee / Stinger series of games where you can juggle an egg for massive bonus points. The level is procedurally generated every time you start a new game and gets progressively more difficult over time.

The game can be played with keyboard, mouse, or gamepad in several different configurations. There are 2 ways to shoot, hold fire for fully auto, or wait to charge up a powerful blast.

Player’s high score is tracked to add some replay value, though it is a pretty simple game. The font and font rendering system is the same one I made for Bogus Roads. The sound effects use ZzFX, my tiny JavaScript sound generator.

Posted in Game Dev, JavaScript | Tagged , , , , | Leave a comment

Adventures in Tiny Coding – My 2019 In Review

Last year was an interesting and productive year. Mostly I’ve been doing a deep dive into web development and JavaScript, while making ton of games, tools, tiny programs, and animations. The central theme to nearly everything I have been doing is something you might call “Tiny Coding”.

Tiny Ski code printed on a business card

My adventure in tiny coding began on April fools day, strangely enough. For the previous several weeks I had gone perhaps slightly mad, feverishly working on tiny C++ skiing game. Inspired by Andrew Kensler’s Business Card Ray Tracer, I had the urge to make a tiny game to print on the back of on my business card. On April first I published a half joking post about how I would only be making business card sized games now. Little did I know that would not be far from the truth.

I soon discovered the last annual JS1k was already in progress, a competition for making tiny JavaScript programs. At the time I had little experience with JavaScript but I was eager to learn. So I toiled for 2 weeks straight and ended up submitted 6 programs. My favorites are Queen’s Gambit (a robotron chess mashup) and Digit Dilemma (a tough new puzzle game).

Continuing my journey I stumbled across Dwitter, a website where people post tiny JavaScript programs that make art. I was (and still am) blown away by the wonders contained there, and knew that I needed to learn more. Fast forward about six months and over seven hundred dweets I can confident say that I am a master code golfer, though there is always more to discover. In fact I’ve made so many dweets that I created a special tool called The Dweetabase that can be used to quickly browse through them.

I was disappointed that I was unable to find a good tool to capture all the JavaScript animations I was producing, so I decided to make my own! This tool, called CapJS, has received considerable polish with some nice features like a fancy Code Mirror editor, Shadertoy support, beautifier, minifier, centering overlay, watch window, and easy to use drag and drop loading.

I began writing a column called “Dissecting a Dweet” that explains how some of these tiny programs work, which I post right here on my blog. The most popular one by far was “#3 – Mini Black Hole” is a good place to start. So far I’ve released eight of these and I have roughly the first twenty planned out if interest continues.

Towards the end of the year I moved on to building some larger programs, but still sticking with this new “tiny code” philosophy. For JS13k I made “Bounce Back”Β an action adventure roguelite that won second place! I also made “Bogus Roads” for #LowResJam, one of my most complete game with 3 procedural generated levels and 5 music tracks. A few weeks ago at MAGFest I presented a talk on tiny coding to a packed audience which I will continue refining for submission to GDC.

One of the coolest tools I’ve released is ZzFX, a tiny sound effect generator for people to use in their JavaScript games. This began as JS1k entry but I greatly improved it, added a better interface, cleaned up the code, and put it on GitHub. I felt something like this would be a boon to everyone that makes these kind of tiny games. To my delight, many people have already used it including some really incredible games like “The Wandering Wraith” by Mateusz Tomczyk.

Late in the year I released ZzArt on GitHub, a tool that can evolve abstract art using GLSL shaders. Though the code itself is fairly simple, I have been completely amazed by the results. I now have saved hundreds of amazing images, and ended up getting many of them printed for holiday gifts. I even had a few poster sized prints made and hung them in my living room! I will definitely continue developing this.

I recently had some exciting news recently when one of my videos won “Best Illusion of The Year” and now has over two million views! There are many more amazing things that I’ve left out, so keep reading for a organized list of everything I’ve done in 2019. Follow me on twitter for daily updates on my progress. Here’s to an amazing 2020 for everyone!

Continue reading

Posted in Projects | Tagged , | Leave a comment

Best Illusion of The Year 2019

Holy cow, I won Best Illusion of the Year! Thank you to the contest organizers, other participants and fellow illusion chasers.

This spinning shape appears to defy logic by rotating around both the horizontal and vertical axis at the same time! To make things even more confusing, the direction of rotation is also ambiguous. Some visual cues in the video will help viewers change their perception.

More Info…

Posted in Projects | Tagged , , | Leave a comment

JSONCrush – Compress JSON into URL friendly strings

I just open sourced an amazingly useful tool called JSONCrush. This simple system allows for excellent compression of URI encoded JSON strings using the JSCrush algorithm. It seems almost like magic how well it works. The minified version is under 2k of JavaScript!

JSONCrush on GitHub


JSON – 103 bytes


URI Encoded Component – 199 bytes


JSONCrushed – 81 bytes! 59% smaller

Posted in JavaScript | Tagged , , | Leave a comment

ZzArt – Abstract Art Evolution

This tool generates GLSL shaders (basically a bunch of math equations) that you can evolve into incredibly varied works of abstract generative art.

Images can be bookmarked, save as HD pngs or exported as GLSL shader code. The satellite feature shows a full screen preview on a second monitor. It even works on most mobile devices.

This is a work currently underdevelopment but it’s far enough to share. I am constantly adding new features and improvements. If you make anything cool, please share, I’d love to see it!

Posted in JavaScript, Projects | Tagged , , , | Leave a comment

Dissecting A Dweet #8: Shattered Tunnel

Howdy, folks! Today we will be looking at the JavaScript code behind this amazing 3D tunnel effect. This code has an interesting lineage so we’ll also talk about some of the history behind it.

for(c.width|=k=i=960;z=--i;x.fillStyle=`hsl(0 99%${i/9}%`)x.fillRect(k-z*C(j=i/k+t/4)+S(m=k*j)*(r=1e5/z),540+C(m)*r-z*S(j),s=3e4/z*S(j*9),s)

Continue reading on for a full explanation of how it works!

Continue reading
Posted in JavaScript | Tagged , , , | 3 Comments

Bounce Back Postmortem

The JS13k competition has been going on every year since 2012 but this was my first year entering. Participants get 1 month to make an original 13 kilobyte JavaScript game. This year the theme was “Back” and there were 245 entries! Bounce Back got 2nd place!

My game “Bounce Back” is a procedurally generated adventure game using a boomerang as the primary weapon. I was inspired to create an homage to one of my favorite games “Zelda: Link’s Awakening”. The game was mostly written from scratch and took about two weeks to complete. For the past few months I’ve been practicing JavaScript every day and learning more about game design. So I pulled out all the stops and put everything I’ve learned into practice, hopefully it shows!

In this post I will explain how my game works and the process I went through. Before reading, please take a few moments to play the game if you haven’t already. The source code is also available on GitHub!

Play Bounce Back – Latest Version

Official JS13k Entry – 13 Kilobyte Version

Bounce Back Source Code – GitHub Repository

Continue reading
Posted in Game Dev, JavaScript | Tagged , , , | 4 Comments

Bounce Back: A Boomerang Roguelite for JS13k

When life gets you down, it’s never too late to…

A Boomerang Roguelite / Zelda Homage for JS13k.

Play it in your web browser!

The souce code is also available on GitHub!

Posted in Game Dev, JavaScript | Tagged , , | Leave a comment

ZzFX – Zuper Zmall Zeeded Zound Zynth

Major update to ZzFX, my JavaScript sound effect generator! The browser is greatly improved with many more options. You can even download wave files! The micro version is still under 500 bytes.

Live Demo:

Here’s the latest version of the ZzFXmicro JavaScript code…

// ZzFX - Zuper Zmall Zound Zynth - Copyright 2019 Frank Force - MIT License
zzfxV=.3 // volume zzfx= // play sound (p=1,k=.05,b=220,e=0,r=0,t=.1,q=0,D=1,u=0,y=0,v=0,z=0,l=0,E=0,A=0,F=0,c=0,w=1,m=0,B=0)=>{let M=Math,R=44100,d=2*M.PI,G=u*=500*d/R/R,C=b*=(1-k+2*k*M.random(k=[]))*d/R,g=0,H=0,a=0,n=1,I=0,J=0,f=0,x,h;e=R*e+9;m*=R;r*=R;t*=R;c*=R;y*=500*d/R**3;A*=d/R;v*=d/R;z*=R;l=R*l|0;for(h=e+m+r+t+c|0;a<h;k[a++]=f)++J%(100*F|0)||(f=q?1<q?2<q?3<q?M.sin((g%d)**3):M.max(M.min(M.tan(g),1),-1):1-(2*g/d%2+2)%2:1-4*M.abs(M.round(g/d)-g/d):M.sin(g),f=(l?1-B+B*M.sin(d*a/l):1)*(0<f?1:-1)*M.abs(f)**D*p*zzfxV*(a<e?a/e:a<e+m?1-(a-e)/m*(1-w):a<e+m+r?w:a<h-c?(h-a-c)/t*w:0),f=c?f/2+(c>a?0:(a<h-c?1:(h-a)/c)*k[a-c|0]/2):f),x=(b+=u+=y)*M.cos(A*H++),g+=x-x*E*(1-1E9*(M.sin(a)+1)%2),n&&++n>z&&(b+=v,C+=v,n=0),!l||++I%l||(b=C,u=G,n||=1);p=zzfxX.createBuffer(1,h,R);p.getChannelData(0).set(k);b=zzfxX.createBufferSource();b.buffer=p;b.connect(zzfxX.destination);b.start();return b} zzfxX=new(window.AudioContext||webkitAudioContext) // audio context

Posted in JavaScript | Tagged , , , | 1 Comment