r/ComputerCraft • Computercraft graphics research • Aug 24 '22

Finished my isometric rendering library

Post image
151 Upvotes

30 comments sorted by

7

u/9551-eletronics Computercraft graphics research Aug 24 '22

1

u/toasohcah toastonryeYT Aug 25 '22

Do you have any tips for learning how to use it?

3

u/9551-eletronics Computercraft graphics research Aug 25 '22

I can gwt on my pc and send some example code if you want. For example a script zhat has sand falling since i already have that :P

1

u/toasohcah toastonryeYT Aug 25 '22

Yea if you have some samples to share that would be great. I'm still pretty new to lua, and I've made a few neat programs. But I have never really used a library someone else made.

2

u/9551-eletronics Computercraft graphics research Aug 25 '22

https://gist.github.com/9551-Dev/07af2109def59159859b65aea9f374b7

the textures it uses are from https://github.com/9551-Dev/IsometriH/tree/main/iso/blocks

what this basically does it makes a dirt box and spawns sand that falls down, really simple example

5

u/Tweaked_Turtle Aug 24 '22

What is the block above the Computer?

9

u/9551-eletronics Computercraft graphics research Aug 24 '22

Plethora advanced manipulator. i put a block scanner in it, so i can scan the area to be displayed

1

u/krajsyboys Aug 24 '22

That is really cool! But how do you do the textures for the blocks? Does it work with blocks from other mods automatically?

3

u/9551-eletronics Computercraft graphics research Aug 24 '22

it does not. i made these textures by hand. it automatically tries to find the closest texture by name using some metatable that i applied to the textures table. you can load any textures. the api doesnt come with any by default. you have to draw and use the load_tiles function to add them, this isnt a program for making maps i just made the map as an showcase of what the api is capable of

1

u/krajsyboys Aug 24 '22

I wonder I there is a way of getting a blocks default texture in any way, if not I'll start looking into modded just to add it lol

1

u/9551-eletronics Computercraft graphics research Aug 24 '22

ig you could make your own peripheral which allows you to extract block textures

3

u/[deleted] Aug 24 '22

Man. I would love to learn how to use all these Computers efficiently. Just even for doors and shit. But my stone age neanderthal brain just won't allow it 😂

1

u/9551-eletronics Computercraft graphics research Aug 24 '22

yee, you should try experimenting with things, most people stop on something simple but its good playing with niche things. just like here. i managed to write this just within 3 days, with no previous knowledge about how this rendering methods and the maths work

2

u/[deleted] Aug 24 '22

I don't even understand how to make it work with a redstone signal and a door 🥲

2

u/CiroGarcia Aug 25 '22

Damn bro wtf

How bored do you have to be to do that in lua? That's some real amazing work right there

1

u/9551-eletronics Computercraft graphics research Aug 25 '22

Not very much.. this was surprisingly not super hard actually, thanks tho !

1

u/CiroGarcia Aug 25 '22

Is it actual isometric projection or is it done using isometric tiles?

1

u/9551-eletronics Computercraft graphics research Aug 25 '22

this is done using isometric tiles. however i am working on an actual 3D rasterizer in CC.

https://cdn.discordapp.com/attachments/477911902152949771/998193926727020554/2022-07-17_13-45-45.mp4

1

u/notanimposter Aug 24 '22

Awesome!

1

u/9551-eletronics Computercraft graphics research Aug 24 '22

thanks :P

1

u/NyoriE01 Aug 24 '22

As always, sir 9551, awesome work. This is indeed very interesting.

1

u/9551-eletronics Computercraft graphics research Aug 24 '22

thx ^^

1

u/toasohcah toastonryeYT Aug 25 '22

This is insane, I was literally Googling last week looking for an isometric library! Looks like 1.12?

1

u/9551-eletronics Computercraft graphics research Aug 25 '22

Yep ! 1.12.2, i used it so i can use the plethora block scanner. Otherwise it should work on newer versions just fine :P

1

u/temotodochi Aug 25 '22

So, in-game dynmap?

1

u/9551-eletronics Computercraft graphics research Aug 25 '22

The range is not the largest but ye, kinda. Again this is just a demo for my rendering library. It can do much more

1

u/PositiveInterview789 Aug 26 '22

How did you join the multiple monitors as one? I'm looking for a way to do this for some time, trying to find if there is a library, or some example, so I can make a library

1

u/9551-eletronics Computercraft graphics research Nov 24 '22

a bit late on this one hehe.

but there is this: https://pastebin.com/sNxkB0YV it is what i used. it is a very slightly modified version of the stitch library cause the original had typos which had it not work properly :P