<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Game-Dev on NicoLabs</title>
		<link>http://blog.hellonico.info/tags/game-dev/</link>
		<description>Recent content in Game-Dev on NicoLabs</description>
		<generator>Hugo</generator>
		<language>ja-JP</language>
		
		
		
		
			<lastBuildDate>Sun, 28 Jun 2026 11:30:00 +0900</lastBuildDate>
		
			<atom:link href="http://blog.hellonico.info/tags/game-dev/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>Hardcore Chaos Testing for Coni&#39;s Native Float32 Arrays</title>
				<link>http://blog.hellonico.info/posts/coni/float32-chaos-testing/</link>
				<pubDate>Sun, 28 Jun 2026 11:30:00 +0900</pubDate>
				<guid>http://blog.hellonico.info/posts/coni/float32-chaos-testing/</guid>
				<description>&lt;p&gt;When you&amp;rsquo;re building high-performance applications in the browser, JavaScript&amp;rsquo;s generic &lt;code&gt;Number&lt;/code&gt; type often isn&amp;rsquo;t enough. You need raw, contiguous memory arrays. In Coni WASM, we rely heavily on native WebAssembly &lt;code&gt;float32&lt;/code&gt; arrays for our most mathematically intensive applications.&lt;/p&gt;&#xA;&lt;h3 id=&#34;where-is-float32-actually-used-in-coni&#34;&gt;Where is Float32 actually used in Coni?&lt;/h3&gt;&#xA;&lt;p&gt;Native &lt;code&gt;float32&lt;/code&gt; arrays (&lt;code&gt;make-float32-array&lt;/code&gt;, &lt;code&gt;f32-set!&lt;/code&gt;, &lt;code&gt;f32-get&lt;/code&gt;) are the absolute backbone of Coni&amp;rsquo;s performance layer. You&amp;rsquo;ll find them powering:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;strong&gt;WebGL Geometry:&lt;/strong&gt; In our &lt;code&gt;deep-focus-webgl&lt;/code&gt; app, we use &lt;code&gt;float32&lt;/code&gt; arrays to mathematically sculpt an 80,000-vertex brain matrix (240,000 floats!) natively, before shipping it to the GPU in a single shot via &lt;code&gt;js/float32-buffer&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Game Engine Particle Systems:&lt;/strong&gt; For games like &lt;code&gt;flappy-bird&lt;/code&gt; or &lt;code&gt;neon-boids&lt;/code&gt;, parallel &lt;code&gt;float32&lt;/code&gt; arrays keep track of thousands of X/Y coordinates, velocities, and lifetimes without garbage collection pauses.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Raw DSP Audio:&lt;/strong&gt; Our &lt;code&gt;sound-nodes&lt;/code&gt; synthesizer calculates complex impulse responses and noise waveforms natively using &lt;code&gt;float32&lt;/code&gt; arrays before mapping them into WebAudio channels.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h3 id=&#34;the-bug-type-coercion-and-f64reinterpret_i64&#34;&gt;The Bug: Type Coercion and &lt;code&gt;f64.reinterpret_i64&lt;/code&gt;&lt;/h3&gt;&#xA;&lt;p&gt;Because of how critical these arrays are, any bug in them is catastrophic. Recently, we discovered an issue where passing an exact integer (like &lt;code&gt;150&lt;/code&gt;) into &lt;code&gt;f32-set!&lt;/code&gt; would mysteriously yield &lt;code&gt;0.0&lt;/code&gt;.&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
