<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Gravitton</title><link>https://gravitton.github.io/blog/</link><description>Recent content on Gravitton</description><generator>Hugo</generator><language>en</language><lastBuildDate>Fri, 06 Nov 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://gravitton.github.io/blog/index.xml" rel="self" type="application/rss+xml"/><item><title>Go libraries for 2D games: geometry, hexagon and grid</title><link>https://gravitton.github.io/blog/posts/gravitton-libraries/</link><pubDate>Fri, 06 Nov 2026 00:00:00 +0000</pubDate><guid>https://gravitton.github.io/blog/posts/gravitton-libraries/</guid><description>&lt;p&gt;A 2D game asks the same two things of its map over and over: what can a unit see, and how does it get where it is&#10;going. &lt;a href="https://github.com/gravitton"&gt;Gravitton&lt;/a&gt; is a set of Go libraries for 2D games, written while building a&#10;game engine on top of them, and three of them take that task, each at its own level:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://github.com/gravitton/geometry"&gt;&lt;code&gt;geometry&lt;/code&gt;&lt;/a&gt;: points, vectors, shapes, paths and the collisions between&#10;them.&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://github.com/gravitton/hexagon"&gt;&lt;code&gt;hexagon&lt;/code&gt;&lt;/a&gt;: hexagonal coordinates, ranges, lines and sight, with no pixels&#10;and no storage.&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://github.com/gravitton/grid"&gt;&lt;code&gt;grid&lt;/code&gt;&lt;/a&gt;: a value per cell on a rectangular, isometric or hexagonal layout,&#10;with sight and pathfinding, built on the other two.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Beside them are smaller ones: &lt;a href="https://github.com/gravitton/spatial"&gt;&lt;code&gt;spatial&lt;/code&gt;&lt;/a&gt; for the broad phase of collision,&#10;&lt;a href="https://github.com/gravitton/container"&gt;&lt;code&gt;container&lt;/code&gt;&lt;/a&gt; for the storage under a grid,&#10;&lt;a href="https://github.com/gravitton/errors"&gt;&lt;code&gt;errors&lt;/code&gt;&lt;/a&gt; and &lt;a href="https://github.com/gravitton/assert"&gt;&lt;code&gt;assert&lt;/code&gt;&lt;/a&gt;. This post is the map of the series: what the three libraries do on one map,&#10;the rules they share, and the posts that each take one decision from them and show the code and the measurements&#10;behind it.&lt;/p&gt;</description></item></channel></rss>