Topics /

Games & Graphics

The most popular blog posts about games & graphics on Hacker News. 2,047 posts.

Any year
1081

Writing a Raytracer in Rust – Part 1

Hello! This is part one of a short series of posts on writing a simple raytracer in Rust. I’ve never written one of these before, so it should be a learning experience all around. So what is a raytracer anyway? The short version is it’s a computer program that traces the paths of simulated rays of light through a…

1082

How to program a text adventure in C (2016)

This is not a C tutorial; there are plenty of those on the web. The reader is assumed to have some basic knowledge of programming in general, and preferrably the C programming language in particular. Maybe you just finished reading a tutorial, and you would like to learn some more by studying other people's source…

1090

Revisiting the Business Card Raytracer

What is the most beautiful piece of code you have ever seen? Not only it is subjective, "beauty" is also a word that can mean a lot of things. If we were to be discussing of raw speed, I would bring up the Fast Inverse Square Root [1] . If we were to judge by aesthetic, my answer would be Andrew Kensler's, 1337 bytes…

1092

Writing a Demoscene Intro for the ZX Spectrum

In the late 80s, I spent an embarrassing number of hours hunched over my ZX Spectrum, typing in Sinclair BASIC programs and rudimentary assembler routines copied from magazines, trying to re-create the Amiga crack intros I’d seen round at a friend’s house. Obviously, they never came even slightly close - but now, many…

1095

Visualizing Delaunay Triangulation

Take a look at this: This is a triangulation of a set of random points, such that all the points are connected to one another, all of the faces are triangles, and the edges include the convex hull of the points. I would like to claim that this is not a very “good” triangulation. This algorithm tends to produce lots of…

1098

Fooling Around with Foveated Rendering

Shadertoy is a wonderful tool which lets users create and share a type of program called a fragment shader online. The true magic of shadertoy is its community of very talented graphics programmers who build incredible works of art despite having access to only a sliver of the traditional graphics pipeline.