# Brohann's 3D devlog

**URL:** https://forum.makecode.com/t/brohanns-3d-devlog/20917
**Category:** Game Design
**Tags:** extension, javascript, art, demo, graphics-and-math
**Created:** [June 27, 2023, 5:01pm UTC](https://forum.makecode.com/t/brohanns-3d-devlog/20917 "2023-06-27T17:01:31Z")
**Posts on this page:** 20
**Page:** 4

<div class="post-metadata">

### Author: ![robotosaurus](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/robotosaurus/32/19294_2.png) [@robotosaurus](https://forum.makecode.com/u/robotosaurus)
#### Post date: [January 8, 2024, 9:54pm UTC](https://forum.makecode.com/t/brohanns-3d-devlog/20917/61 "2024-01-08T21:54:09Z")

</div>

Happy anniversary @richard ! You were a great help to everyone on the forums!

---

<div class="post-metadata">

### Author: ![randomuser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/randomuser/32/32505_2.png) [@randomuser](https://forum.makecode.com/u/randomuser)
#### Post date: [January 9, 2024, 3:56pm UTC](https://forum.makecode.com/t/brohanns-3d-devlog/20917/62 "2024-01-09T15:56:15Z")

</div>

That’s awesomeeeeeee!!

---

<div class="post-metadata">

### Author: ![Brohann](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/brohann/32/17380_2.png) [@Brohann](https://forum.makecode.com/u/Brohann)
#### Post date: [January 9, 2024, 4:05pm UTC](https://forum.makecode.com/t/brohanns-3d-devlog/20917/63 "2024-01-09T16:05:08Z")

</div>

> [@UnsignedArduino](#):
>
> I’m assuming this will become an extension soon? (how will you encode the vertices and triangles in a block friendly way 🤔 )

Making an extension out of it is on my agenda, but currently I’m not very good at making extensions. The vertices and triangle blocks will be pretty easy actually because they are both just arrays lol. It has also come to my attention that the sorting is a little bit worse than before, but it is worth it for the good performance

---

<div class="post-metadata">

### Author: ![Vegz78](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/vegz78/32/1201_2.png) [@Vegz78](https://forum.makecode.com/u/Vegz78)
#### Post date: [January 11, 2024, 9:53pm UTC](https://forum.makecode.com/t/brohanns-3d-devlog/20917/64 "2024-01-11T21:53:57Z")

</div>

Yeah, that would be great to see as a MCA game!! On for the challenge, @KIKIvsIT?

---

<div class="post-metadata">

### Author: ![Vegz78](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/vegz78/32/1201_2.png) [@Vegz78](https://forum.makecode.com/u/Vegz78)
#### Post date: [January 11, 2024, 9:54pm UTC](https://forum.makecode.com/t/brohanns-3d-devlog/20917/65 "2024-01-11T21:54:00Z")

</div>

Amazing, @Brohann!!!

---

<div class="post-metadata">

### Author: ![TheConeGuy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/theconeguy/32/13840_2.png) [@TheConeGuy](https://forum.makecode.com/u/TheConeGuy)
#### Post date: [January 17, 2024, 8:16pm UTC](https://forum.makecode.com/t/brohanns-3d-devlog/20917/66 "2024-01-17T20:16:17Z")

</div>

Do you think the SM64 castle grounds could be rendered with this? The lowest-poly model I found was 871 triangles and 760 vertices.

Actually, now that I think about it, probably not.

https://sketchfab.com/models/4defecec9ffc4ead82a8b6eae82a5699/embed?

---

<div class="post-metadata">

### Author: ![CreativeUsername](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/creativeusername/32/9601_2.png) [@CreativeUsername](https://forum.makecode.com/u/CreativeUsername)
#### Post date: [January 17, 2024, 9:45pm UTC](https://forum.makecode.com/t/brohanns-3d-devlog/20917/67 "2024-01-17T21:45:40Z")

</div>

The star fox model supposedly has 800+ triangles and still has a reasonably high fps so it could be possible  
Not the textures, at least for now though

---

<div class="post-metadata">

### Author: ![Brohann](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/brohann/32/17380_2.png) [@Brohann](https://forum.makecode.com/u/Brohann)
#### Post date: [January 17, 2024, 9:46pm UTC](https://forum.makecode.com/t/brohanns-3d-devlog/20917/68 "2024-01-17T21:46:19Z")

</div>

I’ve actually tried this and it does work perfectly fine. if 1000 triangles renders at 200 fps then we could technically use around 10000 triangles and still achieve 30fps. My only concern is some issues regarding triangle sorting and other camera bugs that might make it really hard to play when a model/level is super huge

---

<div class="post-metadata">

### Author: ![randomuser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/randomuser/32/32505_2.png) [@randomuser](https://forum.makecode.com/u/randomuser)
#### Post date: [January 17, 2024, 9:46pm UTC](https://forum.makecode.com/t/brohanns-3d-devlog/20917/69 "2024-01-17T21:46:22Z")

</div>

That’s so cool how it renders in the player! How did you do that?

---

<div class="post-metadata">

### Author: ![TheConeGuy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/theconeguy/32/13840_2.png) [@TheConeGuy](https://forum.makecode.com/u/TheConeGuy)
#### Post date: [January 17, 2024, 10:08pm UTC](https://forum.makecode.com/t/brohanns-3d-devlog/20917/70 "2024-01-17T22:08:39Z")

</div>

I just copied the link from Sketchfab, I didn’t even know there was a preview 😆

---

<div class="post-metadata">

### Author: ![Brohann](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/brohann/32/17380_2.png) [@Brohann](https://forum.makecode.com/u/Brohann)
#### Post date: [January 24, 2024, 12:55am UTC](https://forum.makecode.com/t/brohanns-3d-devlog/20917/71 "2024-01-24T00:55:45Z")

</div>

the extension is almost done, but it may be a little tricky to use(there are only 3 blocks lol)

---

<div class="post-metadata">

### Author: ![Brohann](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/brohann/32/17380_2.png) [@Brohann](https://forum.makecode.com/u/Brohann)
#### Post date: [January 24, 2024, 6:09am UTC](https://forum.makecode.com/t/brohanns-3d-devlog/20917/72 "2024-01-24T06:09:36Z")

</div>

**THIS IS IT! THE MOMENT YOU AAAAAALLLL HAVE BEEN WAITING FOR!**  
yay now it’s an extension!

```auto
Brohann3214/arcade-brohann-3d

```

⇧⇧⇧copy and paste that into the extension search bar⇧⇧⇧

* * *

it’s a little bit hard to use, and it is in very early beta right now, so don’t get super upset if something doesn’t work. It is also not compatible with the obj to makecode thingy yet. Let me explain what all of the blocks do.

* * *

* * *

 ![Screen Shot 2024-01-23 at 9.09.02 PM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/b/b41670db58dd33cf6fc6515d43228981152029b6.png)  
This block sets the method the 3d engine uses to sort the triangles. Accurate method is the original slow method, Fast method is the new less-accurate but super speedy method

.

 ![Screen Shot 2024-01-23 at 9.17.50 PM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/3/30e43dd1b387e1f36d47c50776f04b8177a2b4bf.png)  
this block does exactly what it says it does and changes the angle of the stage/3d model thingy

.

 ![Screen Shot 2024-01-23 at 9.19.18 PM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/f/fb9c937a7e7c007f6aae520ea4e51686b84ffe78.png)  
This block adds a new vertice to the vertices array. vertices are the point upon which the triangles are made of. this block should be in an on game update before render. The 3 inputs are the x y and z coordinates

.

 ![Screen Shot 2024-01-23 at 9.20.36 PM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/3/321ad4706f2e7c059947fea8b4adf60b2754c3b9.png)  
this block adds a new triangle to the triangles array. the triangles are the triangles that you see on the screen. this should also be in an on game update, but after the vertices and before render. the 3 inputs are the 3 vertices that the triangle is made of. (vertice #s start at 1 instead of 0 btw)

.  
 ![Screen Shot 2024-01-23 at 9.23.42 PM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/9/9edcc77fbdb06d9d49d753cec5bdcaa6710fc3f7.png)  
and finally, the render block. always put this at the end of an on game update. all it does is render the triangles currently in the triangles array to the screen. when it is done, it will erase the triangles and vertices arrays.

* * *

if you are confused (you probably are), just take a look at this example:

> **[Extension Example](https://arcade.makecode.com/S71793-44740-90873-29381)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

* * *

blocks coming soon are:

- change camera position
- set camera position
- set angle

* * *

---

<div class="post-metadata">

### Author: ![robotosaurus](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/robotosaurus/32/19294_2.png) [@robotosaurus](https://forum.makecode.com/u/robotosaurus)
#### Post date: [January 25, 2024, 1:36am UTC](https://forum.makecode.com/t/brohanns-3d-devlog/20917/73 "2024-01-25T01:36:46Z")

</div>

OMG! I think a lot of us have been waiting.

---

<div class="post-metadata">

### Author: ![randomuser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/randomuser/32/32505_2.png) [@randomuser](https://forum.makecode.com/u/randomuser)
#### Post date: [January 25, 2024, 1:36am UTC](https://forum.makecode.com/t/brohanns-3d-devlog/20917/74 "2024-01-25T01:36:48Z")

</div>

THAT’S AWESOME!!! Thanks so much for making this extension, even in beta its super cool 😃 You really are revolutionizing makecode arcade graphics!! I can’t wait to use this… 👀

---

<div class="post-metadata">

### Author: ![jackal](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/jackal/32/19506_2.png) [@jackal](https://forum.makecode.com/u/jackal)
#### Post date: [January 25, 2024, 9:25pm UTC](https://forum.makecode.com/t/brohanns-3d-devlog/20917/75 "2024-01-25T21:25:27Z")

</div>

yo venge might look crazy

---

<div class="post-metadata">

### Author: ![Brohann](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/brohann/32/17380_2.png) [@Brohann](https://forum.makecode.com/u/Brohann)
#### Post date: [January 25, 2024, 9:26pm UTC](https://forum.makecode.com/t/brohanns-3d-devlog/20917/76 "2024-01-25T21:26:41Z")

</div>

New Update (v0.0.0 → v0.3.1)

- bug fixes
- set angle block
- set size block
- new sorting method (as accurate as the slow original but about as fast as the new one)(I’m really excited about this one)
- updated example project  
[https://makecode.com/\_APkLaPHiraiH](https://makecode.com/_APkLaPHiraiH)
- changed the “set angle angle x” block to “set angle x”

---

<div class="post-metadata">

### Author: ![labfox29](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/labfox29/32/9252_2.png) [@labfox29](https://forum.makecode.com/u/labfox29)
#### Post date: [January 25, 2024, 9:26pm UTC](https://forum.makecode.com/t/brohanns-3d-devlog/20917/77 "2024-01-25T21:26:45Z")

</div>

The only thing I could think of adding to this is probably adding the color feature to the vertices if you can. It would make it easier to make stuff instead of adding the triangle indice every time you wanted a colored triangle. One more thing is even though I got a colored triangle, some time it won’t let me make a triangle in certain spot but forces it to stan in one spot no matter how much I tried.

---

<div class="post-metadata">

### Author: ![YuHayate](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/yuhayate/32/8275_2.png) [@YuHayate](https://forum.makecode.com/u/YuHayate)
#### Post date: [January 25, 2024, 9:26pm UTC](https://forum.makecode.com/t/brohanns-3d-devlog/20917/78 "2024-01-25T21:26:46Z")

</div>

noice

---

<div class="post-metadata">

### Author: ![Brohann](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/brohann/32/17380_2.png) [@Brohann](https://forum.makecode.com/u/Brohann)
#### Post date: [January 25, 2024, 10:04pm UTC](https://forum.makecode.com/t/brohanns-3d-devlog/20917/79 "2024-01-25T22:04:27Z")

</div>

can you share you code?

---

<div class="post-metadata">

### Author: ![labfox29](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/labfox29/32/9252_2.png) [@labfox29](https://forum.makecode.com/u/labfox29)
#### Post date: [January 26, 2024, 5:57pm UTC](https://forum.makecode.com/t/brohanns-3d-devlog/20917/80 "2024-01-26T17:57:56Z")

</div>

I can’t since I deleted it, but I had a super hard time with the indice feature because it wouldn’t work. I was just suggesting that maybe it should be the triangles be put on the 3d space by hand and colored by the same block with the vertices of the triangle.

[Previous page](https://forum.makecode.com/t/brohanns-3d-devlog/20917.md?page=3)

[Next page](https://forum.makecode.com/t/brohanns-3d-devlog/20917.md?page=5)
