# A 3d thing

**URL:** <https://forum.makecode.com/t/a-3d-thing/41142>\
**Category:** Show & Tell\
**Tags:** game, graphics-and-math\
**Created:** [December 20, 2025, 1:36am UTC](https://forum.makecode.com/t/a-3d-thing/41142 "2025-12-20T01:36:09Z")\
**Posts on this page:** 5\
**Page:** 3

<div class="post-metadata">

**Author:** ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)\
**Post date:** [April 8, 2026, 11:43pm UTC](https://forum.makecode.com/t/a-3d-thing/41142/41 "2026-04-08T23:43:53Z")

</div>

@not_a_lemon see my answer here:

> [@star SAMMY: Text-To-Speech / Speech Synthesizer Extension!](https://forum.makecode.com/t/sammy-text-to-speech-speech-synthesizer-extension/39499/39):
>
> if the data you’re including in your extension is lots of number arrays, then you should absolutely use buffers instead. they are way more efficient than arrays in terms of both memory usage and code size. however, if your data is a bunch of strings or images then you probably won’t gain anything by converting them to hex buffers. here’s a little bit of code to get you started if you do have some number arrays you want to convert. this code will convert a number array into the string representa…

or if you just want to convert one number:

```ts
const hexChars = "0123456789ABCDEF";

function toHex(int: number) {
    return toHexByte(int >> 24) + toHexByte((int >> 16) & 0xffff) + toHexByte((int >> 8) & 0xffff) + toHexByte(int & 0xffff)
}

function toHexByte(byte: number) {
    return hexChars.charAt(byte >> 4) + hexChars.charAt(byte & 0xf);
}

```

---

<div class="post-metadata">

**Author:** ![not\_a\_lemon](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/not_a_lemon/32/35289_2.png) [@not\_a\_lemon](https://forum.makecode.com/u/not_a_lemon)\
**Post date:** [April 9, 2026, 12:23am UTC](https://forum.makecode.com/t/a-3d-thing/41142/42 "2026-04-09T00:23:16Z")

</div>

Ok, thanks.

---

<div class="post-metadata">

**Author:** ![IAmMyGuy21th](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/iammyguy21th/32/16978_2.png) [@IAmMyGuy21th](https://forum.makecode.com/u/IAmMyGuy21th)\
**Post date:** [May 7, 2026, 1:52am UTC](https://forum.makecode.com/t/a-3d-thing/41142/43 "2026-05-07T01:52:18Z")

</div>

i used to to this:  
`projectedx=(x/z)+80`  
`projectedy=(y/z)+60`  
80 and 60 is half of screen width and height.

---

<div class="post-metadata">

**Author:** ![VoxelMaster64](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/voxelmaster64/32/32075_2.png) [@VoxelMaster64](https://forum.makecode.com/u/VoxelMaster64)\
**Post date:** [May 7, 2026, 5:03pm UTC](https://forum.makecode.com/t/a-3d-thing/41142/44 "2026-05-07T17:03:29Z")

</div>

same! But with many polygons/points, it gets increadebly slow. That is mainly why when i found a [fast raytracing algorithm](https://www.youtube.com/watch?v=ztkh1r1ioZo), I switch to that.

---

<div class="post-metadata">

**Author:** ![KawaiiGoddess](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/kawaiigoddess/32/33722_2.png) [@KawaiiGoddess](https://forum.makecode.com/u/KawaiiGoddess)\
**Post date:** [May 7, 2026, 5:15pm UTC](https://forum.makecode.com/t/a-3d-thing/41142/45 "2026-05-07T17:15:01Z")

</div>

I used lines.

[Previous page](https://forum.makecode.com/t/a-3d-thing/41142.md?page=2)
