Get the latest tech news

City in a Bottle – A 256 Byte Raycasting System


Hello size coding fans. Today, I have something amazing to share: A tiny raycasting engine and city generator that fits in a standalone 256 byte html file. In this post I will share all the secrets…

Today, I have something amazing to share: A tiny raycasting engine and city generator that fits in a standalone 256 byte html file. There are several main pieces including the html code, frame update loop, rendering system, raycasting engine, and the city itself. This inner loop is the most complicated part of the entire program, where the raycasting system steps until something is hit, then bounces the ray to check for shadows.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of city

city

Photo of byte

byte

Photo of raycasting system

raycasting system

Related news:

News photo

Measuring the impact of zoning on housing in a city

News photo

PC Maker Raspberry Pi Plans London IPO Amid Listing Drought

News photo

City of Wichita breach claimed by LockBit ransomware gang