VectoFly looks like a simple arcade game, but a lot of work goes on underneath to make it fair, light enough for a phone and safe for everyone. This page explains the main ideas in plain language, for players who are curious and for anyone who wants to build a similar browser game.
VectoFly’s original concept and low-poly look come from The Aviator by Karim Maaloul, published on Codrops under the MIT licence. VectoFly extends that idea with many more planes, maps, hazards, four difficulties, touch controls and a global leaderboard.
The game is drawn with Three.js, a library that talks to the browser’s WebGL graphics system, and is animated with GSAP TweenMax. Everything uses simple “flat-shaded” shapes: planes, trees, boats, buildings, mountains and hazards are built from boxes, cones and spheres rather than from big image files. That has three benefits:
The sky changes colour through four stages as your level rises, and each map defines its own palette, ground type, scenery and far backdrop.
People play on 5-inch phones and 32-inch monitors, in portrait and landscape. The game measures its own area and adjusts the camera, the field of view and the spawn distances, so that obstacles are large enough to see and your reaction time is about the same everywhere. Scoring does not depend on screen size.
Random obstacles would sometimes be impossible. VectoFly uses a “director” that builds waves from patterns and then checks them:
A second director schedules map hazards. It picks from the threats of your current map, never shows two big threats at once, gives every one a visible warning, and shortens the pauses as your level goes up.
Online leaderboards attract cheaters, so VectoFly takes several steps:
There are no accounts. Your coins, planes, maps and settings live in your browser’s local storage and never leave your device. Only your random pilot name, score and a few run details go to the leaderboard. Hosting is by Vercel, the leaderboard database is Google Firebase, and Google Analytics counts visits (you can opt out). Details are in the privacy policy.
New maps, planes and hazards are added over time, and the updates page lists every change. Many features, such as sliding anywhere on the screen to steer and the free starter planes, came straight from player feedback. If you have an idea, write to contact@vectofly.com.