<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dw="https://www.dreamwidth.org">
  <id>tag:dreamwidth.org,2017-04-25:3165654</id>
  <title>Kevin Reid's blog</title>
  <subtitle>Kevin Reid</subtitle>
  <author>
    <name>Kevin Reid</name>
  </author>
  <link rel="alternate" type="text/html" href="https://kpreid.dreamwidth.org/"/>
  <link rel="self" type="text/xml" href="https://kpreid.dreamwidth.org/data/atom"/>
  <updated>2020-08-09T15:06:50Z</updated>
  <dw:journal username="kpreid" type="personal"/>
  <entry>
    <id>tag:dreamwidth.org,2017-04-25:3165654:54200</id>
    <link rel="alternate" type="text/html" href="https://kpreid.dreamwidth.org/54200.html"/>
    <link rel="self" type="text/xml" href="https://kpreid.dreamwidth.org/data/atom/?itemid=54200"/>
    <title>Cubes reboot: All is Cubes</title>
    <published>2020-08-09T15:06:50Z</published>
    <updated>2020-08-09T15:06:50Z</updated>
    <category term="cubes"/>
    <category term="rust"/>
    <category term="web"/>
    <category term="webgl"/>
    <category term="all is cubes"/>
    <category term="programming"/>
    <dw:security>public</dw:security>
    <dw:reply-count>0</dw:reply-count>
    <content type="html">&lt;p&gt;I've been getting back into playing Minecraft recently, and getting back into that frame of mind caused me to take another look at my &lt;a href="https://github.com/kpreid/cubes/"&gt;block-game-engine project titled "Cubes"&lt;/a&gt; (&lt;a href="https://kpreid.dreamwidth.org/tag/cubes"&gt;previous posts&lt;/a&gt;).

&lt;p&gt;I've fixed some API-change bitrot in Cubes so that it's runnable on current browsers; unfortunately the GitHub Pages build is broken so the running version that I'd otherwise link to isn't updated. (I intend to fix that.)

&lt;p&gt;The bigger news is that I've decided to rewrite it. Why?

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;There's some &lt;a href="https://github.com/kpreid/cubes/issues/71"&gt;inconsistency in the design&lt;/a&gt; of how block rotation works, and the way I've thought of to fix it is to start with a completely different strategy: instead of rotation being a feature of a block's behavior, there will be the general notion of blocks derived from other block definitions, so “this block but rotated” is such a derivation.
&lt;li&gt;&lt;p&gt;I'd like to start with a client-server architecture from the beginning, to support the options of both multiplayer and ✨ saving to the cloud!✨ — I mean, having a server which stores the world data instead of fitting it all into browser local storage.
&lt;li&gt;&lt;p&gt;&lt;strong&gt;I've been looking for an excuse to learn &lt;a href="https://www.rust-lang.org/"&gt;Rust&lt;/a&gt;.&lt;/strong&gt; And, if it works as I hope, I'll be able to program with a much better tradeoff between performance and high-level code.
&lt;/p&gt;&lt;/li&gt;&lt;/p&gt;&lt;/li&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;

&lt;p&gt;The new version is &lt;a href="https://github.com/kpreid/all-is-cubes"&gt;already on GitHub&lt;/a&gt;. I've given it the name “All is Cubes”, because “Cubes” really was a placeholder from the beginning and it's too generic.

&lt;p&gt;I'm currently working on porting (with improvements) various core data structures and algorithms from the original version — the first one being the voxel raycasting algorithm, which I then used to implement a raytracer that outputs to the terminal. (Conveniently, "ASCII art" is low-resolution and thus doesn't require too many rays.) And after getting that solid, I set up compiling the Rust code into WebAssembly to run in web browsers and render with WebGL.

&lt;p style="text-align: center;"&gt;
&lt;img src="https://switchb.org/kpreid/2020/all-is-cubes-first-console.png" alt="[console screenshot]" style="margin: 4px; max-height: 30em; max-width: 50%; border: none; padding: 1px; box-shadow: #22A 0px 1px 4px 0px; vertical-align: middle;"&gt;
&lt;img src="https://switchb.org/kpreid/2020/all-is-cubes-first-webgl.png" alt="[WebGL screenshot]" style="margin: 4px; max-height: 30em; max-width: 50%; border: none; padding: 1px; box-shadow: #22A 0px 1px 4px 0px; vertical-align:middle;"&gt;
&lt;/p&gt;

&lt;p&gt;(In the unlikely event that anyone cares, I haven't quite decided what to do with the post tags; I think that I will switch to tagging them all with &lt;a href="https://kpreid.dreamwidth.org/tag/all+is+cubes"&gt;all is cubes&lt;/a&gt;, but I might or might not go back and apply that to the old posts on the grounds that having a tag that gets everything is good and I'm not really giving the rewrite a &lt;em&gt;different&lt;/em&gt; name so much as taking the opportunity to replace the placeholder at a convenient time.)&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="https://www.dreamwidth.org/tools/commentcount?user=kpreid&amp;ditemid=54200" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/&gt; comments</content>
  </entry>
</feed>
