This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Xelostar's profile picture

3D Rendering API v0.5.1 UPDATED! (Way better erformance + new functionalities)

Started by Xelostar, 05 June 2016 - 04:23 PM
Xelostar #1
Posted 05 June 2016 - 06:23 PM
v0.5.1 is released!




Hello everyone! First of all I want to say that English is not my native language, so please don't get angry if I make any mistakes. I have been trying to create a 3D renderer in computercraft. Please give me some feedback and tell me what you would like to see implemented.

Ideas to be implemented:
  • Vertical rotation of objects
  • Custom vertexshaders
  • Texture support (may not be implemented, because it would probably be very laggy to use real-time)
I have also showed it in my channel. This is the latest version (if the link doesn't work, the name of the video is "ComputerCraft - 3D Renderer v0.5.1 "):
http://youtu.be/wX_I0WwOtfY

API in action:
http://www.computerc...ine-highscores/

Documentation:
http://www.mediafire...tation.pdf/file

Pastebin downloads:
[ThreeD API minified (smaller file)] - pastebin get meXK8uweThreeD
[ThreeD API (original)I] - pastebin get g1xp8H5X ThreeD
[Engine] - pastebin get DqCTJBza Engine
[First demo] - pastebin get P5b7cAQc Demo1
[Second demo] - pastebin get xTgJQ0hk Demo2
[Third demo] - pastebin get vkaxmF1D Demo3

Complete download (with all files):
http://www.mediafire.com/file/pu8x031qe59rdcp/3D_Renderer_v0.5.1_Complete_Package.zip/file

Update notes:

Version 0.1:
  • Renders 3D objects
  • Ability to walk around
  • Ability to look left and right
  • Give objects rotation values
Version 0.2:
  • Renders 3D boxes
  • Ability to walk left and right
  • Ability to look up and down
  • Ability to fly up and down
  • More efficient code
Version 0.3:
  • The code is now split into an API and a demo :D/>
Version 0.4:
  • Now uses a buffer (to avoid flickering)
  • You can now create your own models
  • Square objects look square on screen because the not-square pixels have been compensated for
  • The oriëntation of objects is now changeable
  • Objects are not rendered when they're not in sight
  • Sky and ground colors are easily changed as background
  • Change sorting algorithm to use table.sort() for better performance
  • Added support for Bomb Bloke's blittle API - Render distance is changeable
  • Using term.blit() to render the screen for better performance
  • Cleaner code
Version 0.5:
  • Added support for multiple renders at the same time
  • Polygons are now only rendered from one side unless specified otherwise. (For better performance)
  • Crash fix
  • Lagspike fixes
  • Performance is better
Version 0.5.1:
  • Added the ability to trace what's on the screen at certain coordinates and returns the index of the object with the index of the polygon of the model that corresponds to that object
  • Added the ability to manually load models as a tabl
  • Added the ability to get the model of an object my model name if it has already been loaded
  • Performance is way better
  • The polygons can now have a character and char color in case the BLittle function isn't used
  • Way cleaner code
  • (Documentation added)
  • (More demos and comments added to the improved engine)
Edited on 22 July 2018 - 01:59 PM
jv110 #2
Posted 06 June 2016 - 05:35 PM
You should do a 3D rendering API, not a program in which you can walk around and add blocks.
ReBraLaCC #3
Posted 06 June 2016 - 09:53 PM
For some reason i cant access the video using the link, whats the name of the video?
Xelostar #4
Posted 07 June 2016 - 04:46 PM
You should do a 3D rendering API, not a program in which you can walk around and add blocks.

I will absolutely do that. Thank you for the idea. I will have to try a few things because I have never made an API.

For some reason i cant access the video using the link, whats the name of the video?

I have put the name of the video in my first post. The name is "ComputerCraft - 3D Renderer v0.2 "
Bomb Bloke #5
Posted 08 June 2016 - 02:29 AM
If you switch the Youtube link from "https" to "http", it'll actually embed into your post.
apemanzilla #6
Posted 08 June 2016 - 03:07 AM
If you switch the Youtube link from "https" to "http", it'll actually embed into your post.

But then it embeds with flash and the only way to access it all with flash disabled is to use the element inspector to get the URL :(/>
Edited on 08 June 2016 - 01:07 AM
Bomb Bloke #7
Posted 08 June 2016 - 04:28 AM
So enable Flash. Firefox has an "ask to activate" option for plugins which makes that pretty easy, and is what I use.

I've also installed an extension to force youtube.com to use the Flash player, as let's face it, their HTML5 player is still a bit rubbish. Once they sort out the overhead and the weirdly increased loading times it might be worth using, but until then, why suffer?

Still, I suppose there's always the option of posting both versions of the link.
Xelostar #8
Posted 08 June 2016 - 03:50 PM
If you switch the Youtube link from "https" to "http", it'll actually embed into your post.

Thank you for this tip!

EDIT:

It doesn't actually work. :/
Edited on 08 June 2016 - 01:52 PM
Bomb Bloke #9
Posted 09 June 2016 - 02:29 AM
You still had URL tags around it, forcing it to be treated as a link. I've removed them.
Xelostar #10
Posted 09 June 2016 - 10:07 PM
You still had URL tags around it, forcing it to be treated as a link. I've removed them.

Thank you! I am a litle bit new to the computercraft forum. :)/>
unnamedcoder #11
Posted 11 June 2016 - 06:38 PM
Love it! Nice, smooth and efficient, keep it up, it'd be cool if you could implement this into a game engine, for example having map creation, object creation, object placement, etc! Can't wait to see the future updates though!
Xelostar #12
Posted 12 June 2016 - 06:56 AM
Love it! Nice, smooth and efficient, keep it up, it'd be cool if you could implement this into a game engine, for example having map creation, object creation, object placement, etc! Can't wait to see the future updates though!

Thank you for your compliment! :D/>
I will split my code into an API other people can use and a demo which you can also edit.
I am almost done doing this! :D/> (I am having a little trouble debugging, but hopefully it will be finished soon. :D/>)
unnamedcoder #13
Posted 12 June 2016 - 09:35 PM
Thank you for your compliment! :D/>
I will split my code into an API other people can use and a demo which you can also edit.
I am almost done doing this! :D/> (I am having a little trouble debugging, but hopefully it will be finished soon. :D/>)
Good luck with the debugging, I'd like to know how you add shapes to the world, do you use files to import them, if so could you show me the code to generate the shapes? I'd love to have a go at making an api which allows you to create new objects for the world and import them, sort of like .mdl files
Xelostar #14
Posted 12 June 2016 - 10:07 PM
Thank you for your compliment! :D/>
I will split my code into an API other people can use and a demo which you can also edit.
I am almost done doing this! :D/> (I am having a little trouble debugging, but hopefully it will be finished soon. :D/>)
Good luck with the debugging, I'd like to know how you add shapes to the world, do you use files to import them, if so could you show me the code to generate the shapes? I'd love to have a go at making an api which allows you to create new objects for the world and import them, sort of like .mdl files

Well, I was thinking about that myself, but I like working together! :D/>
I will probably use some kind of table with relatve coordinates and a few things to draw the lines and stuff. The frame currently looks something like this:


shapeFrame = {
    coordinates = {
	    {x = -0.5, y = -0.5, z = -0.5}, -- These are the coordinates for one corner
	    {x = -0.5, y = -0.5, z = 0.5},
	    {x = -0.5, y = 0.5, z = 0.5},
	    {x = -0.5, y = 0.5, z = 0.5},
	    {x = 0.5, y = -0.5, z = 0.5},
	    {x = 0.5, y = -0.5, z = 0.5},
	    {x = 0.5, y = 0.5, z = 0.5},
	    {x = 0.5, y = 0.5, z = 0.5},
    },
    lines = {
	    {1, 5, colors.red}, -- Refer to the index numbers of the coordinates and the color of the line
	    {2, 6, colors.red},
	    {3, 7, colors.red},
	    {4, 8, colors.red},
	    {1, 3, colors.red},
	    {2, 4, colors.red},
	    {5, 7, colors.red},
	    {6, 8, colors.red},
	    {1, 2, colors.red},
	    {3, 4, colors.red},
	    {5, 6, colors.red},
	    {7, 8, colors.red},
    }
}

If you can pull such a thing off, I will make my API able to load those kind of models. If you have a better idea of how a model can be saved, please let me know.
Emma #15
Posted 12 June 2016 - 10:33 PM
Thank you for your compliment! :D/>
I will split my code into an API other people can use and a demo which you can also edit.
I am almost done doing this! :D/> (I am having a little trouble debugging, but hopefully it will be finished soon. :D/>)
Good luck with the debugging, I'd like to know how you add shapes to the world, do you use files to import them, if so could you show me the code to generate the shapes? I'd love to have a go at making an api which allows you to create new objects for the world and import them, sort of like .mdl files

Well, I was thinking about that myself, but I like working together! :D/>
I will probably use some kind of table with relatve coordinates and a few things to draw the lines and stuff. The frame currently looks something like this:


shapeFrame = {
	coordinates = {
		{x = -0.5, y = -0.5, z = -0.5}, -- These are the coordinates for one corner
		{x = -0.5, y = -0.5, z = 0.5},
		{x = -0.5, y = 0.5, z = 0.5},
		{x = -0.5, y = 0.5, z = 0.5},
		{x = 0.5, y = -0.5, z = 0.5},
		{x = 0.5, y = -0.5, z = 0.5},
		{x = 0.5, y = 0.5, z = 0.5},
		{x = 0.5, y = 0.5, z = 0.5},
	},
	lines = {
		{1, 5, colors.red}, -- Refer to the index numbers of the coordinates and the color of the line
		{2, 6, colors.red},
		{3, 7, colors.red},
		{4, 8, colors.red},
		{1, 3, colors.red},
		{2, 4, colors.red},
		{5, 7, colors.red},
		{6, 8, colors.red},
		{1, 2, colors.red},
		{3, 4, colors.red},
		{5, 6, colors.red},
		{7, 8, colors.red},
	}
}

If you can pull such a thing off, I will make my API able to load those kind of models. If you have a better idea of how a model can be saved, please let me know.

That's essentially how wavefront objs are, except with faces instead of lines. It is a surprisingly good system.
unnamedcoder #16
Posted 13 June 2016 - 03:56 PM
Well, I was thinking about that myself, but I like working together! :D/>
I will probably use some kind of table with relatve coordinates and a few things to draw the lines and stuff. The frame currently looks something like this:


shapeFrame = {
	coordinates = {
		{x = -0.5, y = -0.5, z = -0.5}, -- These are the coordinates for one corner
		{x = -0.5, y = -0.5, z = 0.5},
		{x = -0.5, y = 0.5, z = 0.5},
		{x = -0.5, y = 0.5, z = 0.5},
		{x = 0.5, y = -0.5, z = 0.5},
		{x = 0.5, y = -0.5, z = 0.5},
		{x = 0.5, y = 0.5, z = 0.5},
		{x = 0.5, y = 0.5, z = 0.5},
	},
	lines = {
		{1, 5, colors.red}, -- Refer to the index numbers of the coordinates and the color of the line
		{2, 6, colors.red},
		{3, 7, colors.red},
		{4, 8, colors.red},
		{1, 3, colors.red},
		{2, 4, colors.red},
		{5, 7, colors.red},
		{6, 8, colors.red},
		{1, 2, colors.red},
		{3, 4, colors.red},
		{5, 6, colors.red},
		{7, 8, colors.red},
	}
}

If you can pull such a thing off, I will make my API able to load those kind of models. If you have a better idea of how a model can be saved, please let me know.

I'll have a go at making a program that allows you to edit and create objects, if you wanna work by yourself, I'll leave you to it :)/>

EDIT: could you possibly provide a 2d linedrawing api for me?
Edited on 13 June 2016 - 02:16 PM
Emma #17
Posted 13 June 2016 - 04:51 PM
–snip–
could you possibly provide a 2d linedrawing api for me?

Just use paintutils.drawLine
Xelostar #18
Posted 13 June 2016 - 04:55 PM
I want to see what you come up with! :)/>
If you want to have a 2d line drawing API, you could just use:

paintutils.drawLine(x1, y1, x2, y2, color)
But I assume you want something like this:

for lineNr, lineCoordinates in pairs(linesToDraw) do
  paintutils.drawLine(lineCoordinates.x, lineCoordinates.y, lineCoordinates.x2, lineCoordinates.y2, lineColor)
end
Anyway, please let me know when you are getting somewhere! :)/>
Edited on 13 June 2016 - 03:01 PM
unnamedcoder #19
Posted 14 June 2016 - 01:03 AM
I want to see what you come up with! :)/>
If you want to have a 2d line drawing API, you could just use:

paintutils.drawLine(x1, y1, x2, y2, color)
But I assume you want something like this:

for lineNr, lineCoordinates in pairs(linesToDraw) do
  paintutils.drawLine(lineCoordinates.x, lineCoordinates.y, lineCoordinates.x2, lineCoordinates.y2, lineColor)
end
Anyway, please let me know when you are getting somewhere! :)/>

Well, at the moment I'm trying to figure out a way to do this, I was thinking that it could be done with layers, the arrow keys will decide which layer you are editing therefore you could create full block shapes, another idea was placing points to connect lines to, I'm still trying to wrap my head around the concept.
Xelostar #20
Posted 14 June 2016 - 01:36 PM
That is kind of how my 3D printer modeling program works… :P/>
I advise you to wait until I release my API. Then you can use it to draw what people are creating.
Well, it still is hard to create a program for creating models…
Maybe you can make it so that the user can click somewhere on the screen (2d) and then give a height value to that point. Later the user can connect these points to draw lines. I wish you a lot of succes! :D/>
Restioson #21
Posted 14 June 2016 - 02:36 PM
This looks really amazing! Nice work! +1
Xelostar #22
Posted 14 June 2016 - 03:47 PM
This looks really amazing! Nice work! +1
Thank you! :D/>
unnamedcoder #23
Posted 14 June 2016 - 04:00 PM
That is kind of how my 3D printer modeling program works… :P/>
I advise you to wait until I release my API. Then you can use it to draw what people are creating.
Well, it still is hard to create a program for creating models…
Maybe you can make it so that the user can click somewhere on the screen (2d) and then give a height value to that point. Later the user can connect these points to draw lines. I wish you a lot of succes! :D/>

Yeah I was thinking about that, I could make it next month, since I have to do exams starting monday and it is getting hectic for me, I need to spend my time on revision etc. I know exactly how I'm going to do it, I'll just need some time, also could you specify the dimensions of the model?
Xelostar #24
Posted 14 June 2016 - 04:33 PM
That is kind of how my 3D printer modeling program works… :P/>
I advise you to wait until I release my API. Then you can use it to draw what people are creating.
Well, it still is hard to create a program for creating models…
Maybe you can make it so that the user can click somewhere on the screen (2d) and then give a height value to that point. Later the user can connect these points to draw lines. I wish you a lot of succes! :D/>

Yeah I was thinking about that, I could make it next month, since I have to do exams starting monday and it is getting hectic for me, I need to spend my time on revision etc. I know exactly how I'm going to do it, I'll just need some time, also could you specify the dimensions of the model?

Awesome! Take your time! :)/>
If you mean that x and z are length and width and that y is the height, jsut like in minecraft, then here is your answer.
If you mean how big it shoud be:
from (-0.5, -0.5, -0.5) to (0.5, 0.5, 0.5) would be great! :)/>
Edited on 14 June 2016 - 02:34 PM
unnamedcoder #25
Posted 16 June 2016 - 04:12 PM
That is kind of how my 3D printer modeling program works… :P/>
I advise you to wait until I release my API. Then you can use it to draw what people are creating.
Well, it still is hard to create a program for creating models…
Maybe you can make it so that the user can click somewhere on the screen (2d) and then give a height value to that point. Later the user can connect these points to draw lines. I wish you a lot of succes! :D/>

Yeah I was thinking about that, I could make it next month, since I have to do exams starting monday and it is getting hectic for me, I need to spend my time on revision etc. I know exactly how I'm going to do it, I'll just need some time, also could you specify the dimensions of the model?

Awesome! Take your time! :)/>
If you mean that x and z are length and width and that y is the height, jsut like in minecraft, then here is your answer.
If you mean how big it shoud be:
from (-0.5, -0.5, -0.5) to (0.5, 0.5, 0.5) would be great! :)/>
Alright, I've made a quick mock-up for the program, I was thinking of something like this:

Sorry for the messy handwriting :P/>
Xelostar #26
Posted 16 June 2016 - 08:32 PM
That is kind of how my 3D printer modeling program works… :P/>
I advise you to wait until I release my API. Then you can use it to draw what people are creating.
Well, it still is hard to create a program for creating models…
Maybe you can make it so that the user can click somewhere on the screen (2d) and then give a height value to that point. Later the user can connect these points to draw lines. I wish you a lot of succes! :D/>

Yeah I was thinking about that, I could make it next month, since I have to do exams starting monday and it is getting hectic for me, I need to spend my time on revision etc. I know exactly how I'm going to do it, I'll just need some time, also could you specify the dimensions of the model?

Awesome! Take your time! :)/>
If you mean that x and z are length and width and that y is the height, jsut like in minecraft, then here is your answer.
If you mean how big it shoud be:
from (-0.5, -0.5, -0.5) to (0.5, 0.5, 0.5) would be great! :)/>
Alright, I've made a quick mock-up for the program, I was thinking of something like this:

Sorry for the messy handwriting :P/>

Looks promising! I want the model to be a 1 by 1 by 1. For other sizes, I will probably add a rotation and a size value. :-)
Can you make the "drawing space" a 10 by 10? That would be useful. I will probably upload by API tomorrow. :D/>
unnamedcoder #27
Posted 16 June 2016 - 09:14 PM
Looks promising! I want the model to be a 1 by 1 by 1. For other sizes, I will probably add a rotation and a size value. :-)
Can you make the "drawing space" a 10 by 10? That would be useful. I will probably upload by API tomorrow. :D/>

Sure, 10 by 10, I won't be able to make this until the 7th of July, so unless u wanna make it, go ahead
jv110 #28
Posted 18 June 2016 - 01:27 AM
Can I maybe help? I can add filled faces and textures. I don't wanna help the competitor, but I don't think this is really the same thing.
Xelostar #29
Posted 18 June 2016 - 07:46 AM
Looks promising! I want the model to be a 1 by 1 by 1. For other sizes, I will probably add a rotation and a size value. :-)
Can you make the "drawing space" a 10 by 10? That would be useful. I will probably upload by API tomorrow. :D/>

Sure, 10 by 10, I won't be able to make this until the 7th of July, so unless u wanna make it, go ahead

I have got all the time! :-)

Can I maybe help? I can add filled faces and textures. I don't wanna help the competitor, but I don't think this is really the same thing.

Yes, you can help. It is indeed not the same. I have already looked into it and I know how I would add the abillity for filled faces. Textures would be really hard though. Also it would be very slow if many textures are rendered. If you can pull that off and you have the time, I think it's OK. Do it if you really want to help. If you create a filled faces API, could you create a function like:


function drawFilledFace(face) --or something like that
    ...
end
Where face is something like this:

face = {
  color = colors.red,
  coordinates = {
    {x = 10, y = 8},
    {x = 10, y = 10},
    {x = 20, y = 18},
    {x = 15, y = 8},
  },
}
If it doesn't work out, I can do it. :-)
Emma #30
Posted 18 June 2016 - 07:49 AM
–snip–

Not to intrude or anything, but a good way of storing faces (in my experience) is to just reference vertices, it cuts down on memory and redundancy.
This looks really nice though! Can't wait to see what it turns into! :D/>
Xelostar #31
Posted 18 June 2016 - 08:08 AM
–snip–

Not to intrude or anything, but a good way of storing faces (in my experience) is to just reference vertices, it cuts down on memory and redundancy.
This looks really nice though! Can't wait to see what it turns into! :D/>

I have thought of an algorithm. I don't really know what you mean with reference verticles. Can you send me a link? I also just noticed that there is a GPU API. It seems to be work-in-progres, though. Anyway, thank you for your compliment! :)/>
Emma #32
Posted 18 June 2016 - 08:12 AM
–snip–

Not to intrude or anything, but a good way of storing faces (in my experience) is to just reference vertices, it cuts down on memory and redundancy.
This looks really nice though! Can't wait to see what it turns into! :D/>

I have thought of an algorithm. I don't really know what you mean with reference verticles. Can you send me a link? I also just noticed that there is a GPU API. It seems to be work-in-progres, though. Anyway, thank you for your compliment! :)/>

Sorry, should have been a little more explicit, what I meant is, that since you already have defined vertices for drawing lines to create objects, you can reference 3/4 of them to create a triange/quad respectively. For example:

vert1 = {0,0,0}
vert2 = {1,0,0}
vert3 = {0,1,0}
face = {vert1,vert2,vert3}
You then have all the information to draw a triangle in face, you can easily change it to work with quadrilaterals as well.
unnamedcoder #33
Posted 18 June 2016 - 12:43 PM
Sorry, should have been a little more explicit, what I meant is, that since you already have defined vertices for drawing lines to create objects, you can reference 3/4 of them to create a triange/quad respectively. For example:

vert1 = {0,0,0}
vert2 = {1,0,0}
vert3 = {0,1,0}
face = {vert1,vert2,vert3}
You then have all the information to draw a triangle in face, you can easily change it to work with quadrilaterals as well.
Even better:

face = { {0,0,0}, {1,0,0}, {0,1,0} }
Edited on 18 June 2016 - 10:44 AM
Xelostar #34
Posted 19 June 2016 - 07:06 AM
I might actually prefer Incinirate's way of doing it, because it would be more clear if you define the coordinates of the points and later the faces. Do it like you want. You have the choice. :)/>
Xelostar #35
Posted 19 May 2017 - 12:47 PM
If you switch the Youtube link from "https" to "http", it'll actually embed into your post.

Doesn't seem to work in my latest post. :/
Bomb Bloke #36
Posted 19 May 2017 - 03:08 PM
Currently I see:

[url="https://www.youtube.com/watch?v=-zEXvgoZhLs"]https://www.youtube.com/watch?v=Sc_2kFtxfdQ[/url]
[media]http://www.youtube.com/watch?v=Sc_2kFtxfdQ[/media]

You probably want:

http://www.youtube.com/watch?v=-zEXvgoZhLs
http://www.youtube.com/watch?v=Sc_2kFtxfdQ

Note that the rich-text editor is not your friend. Use the light switch up the top left of the posting dialogue box in order to toggle it.
Tag365 #37
Posted 26 May 2017 - 01:35 AM
Why don't you disable the rich text editor by default???
Xelostar #38
Posted 03 June 2017 - 11:00 PM
Currently I see:

[url="https://www.youtube.com/watch?v=-zEXvgoZhLs"]https://www.youtube.com/watch?v=Sc_2kFtxfdQ[/url]
[media]http://www.youtube.com/watch?v=Sc_2kFtxfdQ[/media]

You probably want:

http://www.youtube.com/watch?v=-zEXvgoZhLs
http://www.youtube.com/watch?v=Sc_2kFtxfdQ

Note that the rich-text editor is not your friend. Use the light switch up the top left of the posting dialogue box in order to toggle it.

It's working now. I'm certain I said that before, but I cant seem to find the post. :/
Thanks for your help! :D/>

Why don't you disable the rich text editor by default???

Because I didn't know why it's better to turn it off. :)/>
Edited on 03 June 2017 - 09:00 PM
Floyd #39
Posted 01 September 2017 - 07:50 PM
I would really love to see how it would look with shadows
Xelostar #40
Posted 01 September 2017 - 08:21 PM
Hm. Wouldn't shadows be pretty hard to implement? I may experiment with it though. Like using the characters that are filling the character space with some sort of gradiant effect for filling the sky. Maybe have edges be a little darker. By the way, here's a GIF. I've been working hard lately:
https://i.imgflip.com/1v3vwb.gif
Jummit #41
Posted 12 September 2017 - 08:36 AM
I would really love to see how it would look with shadows
I think you could make cool shaders if you change the palette to a white-gray-black thing. I don't like the default colors. Look: you could make this!
Edited on 12 September 2017 - 08:35 AM
Gorzoid #42
Posted 12 September 2017 - 10:30 AM
I would really love to see how it would look with shadows
I think you could make cool shaders if you change the palette to a white-gray-black thing. I don't like the default colors. Look: you could make this!
Your proxy is leaking you l337 h4x0r
Jummit #43
Posted 12 September 2017 - 10:35 AM
I would really love to see how it would look with shadows
I think you could make cool shaders if you change the palette to a white-gray-black thing. I don't like the default colors. Look: you could make this!
Your proxy is leaking you l337 h4x0r
Fixed?
Xelostar #44
Posted 13 September 2017 - 04:29 PM
I would really love to see how it would look with shadows
I think you could make cool shaders if you change the palette to a white-gray-black thing. I don't like the default colors. Look: you could make this!

You mean with the beta version of ComputerCraft
I'd like my API to be used everywhere, but maybe I'll create an extra option if you're on 1.80 or higher.

ALSO:
The use of the BLittle API can now be toggleable while the program is running:
Xelostar #45
Posted 11 November 2017 - 01:13 PM
New update is released!
Also: how do I change the title?
SquidDev #46
Posted 11 November 2017 - 01:21 PM
Also: how do I change the title?
When editing the original post, press "Use full editor" at the bottom - that will allow you to edit the title, tags, and post settings.

On topic, the update looks nice. I'm always impressed when people manage to achieve a relatively high FPS with these things. In your video there seemed to be a couple of issues with disappearing faces - I'm wondering if that's a bug in your renderer or was it just the background and shape had the same colour?
Edited on 11 November 2017 - 12:25 PM
Xelostar #47
Posted 11 November 2017 - 04:53 PM
Also: how do I change the title?
When editing the original post, press "Use full editor" at the bottom - that will allow you to edit the title, tags, and post settings.

On topic, the update looks nice. I'm always impressed when people manage to achieve a relatively high FPS with these things. In your video there seemed to be a couple of issues with disappearing faces - I'm wondering if that's a bug in your renderer or was it just the background and shape had the same colour?

Thanks! It worked!
The disappearing op the lime is because the lime on the emerald and on the pineapple is indeed the same color as the ground, but all colors can be changed. Maybe I'll add an option for CC 1.80 so you can have even more colors for the objects.

Thanks for the conpliment! I really appreciate it!
Xelostar #48
Posted 10 February 2018 - 03:49 PM
Okay, we've had a few updates! The 3D Rendering API is now a lot more useful and I boosted the performance a bit too. =D
I'm working on a CC version of Doom right now =).
jv110 #49
Posted 14 February 2018 - 04:29 AM
Can it render textures in the first place? If you add that feature, you'll see the reason why what you're trying to make hasn't been made before. Doom isn't 3D, by the way.
Xelostar #50
Posted 14 February 2018 - 01:10 PM
Can it render textures in the first place? If you add that feature, you'll see the reason why what you're trying to make hasn't been made before. Doom isn't 3D, by the way.
I'm not sure if I'm adding texture support, because that would be very laggy. Especially the way I implemented 3D rendering. Besides occasional bugfixing, adding some more rotation functions and vertexshaders I don't think I'm going to add much to it.

I know the original Doom wasn't 3D, but that's not stopping me from making it =P

It's about the fun you can have experimenting. I'm just doing what I want to and anyone is welcome to play with it and appreciate it.
The Doom I'm making is quite simple, but still fun. I have added online highscores to add a competitive aspect to it to help people stay interested a little longer trying to stay in the top 10. Honestly, I don't think people will play it for very long, but it was fun to make nonetheless. =)
LoganDark2 #51
Posted 14 February 2018 - 06:11 PM
Mediafire why?!

Why not pastebin or GitHub?
Xelostar #52
Posted 15 February 2018 - 11:08 AM
Mediafire why?!

Why not pastebin or GitHub?

Lol. I'm sorry. I hadn't used GitHub before and my pastebin is 100% full since I have a free account. There are quite a few files to the rendering. I'm working out a way to use STD to install stuff from GitHub though. I'll use that for Doom, so it won't be as much of a pain to install. :P/>
KingofGamesYami #53
Posted 15 February 2018 - 02:13 PM
my pastebin is 100% full since I have a free account.

There is no limit to # of public pastes on a free pastebin account.
Xelostar #54
Posted 15 February 2018 - 11:37 PM
There is no limit to # of public pastes on a free pastebin account.

There is. It's 25. Once you have reached that many pastes, you can only paste as a guest. If you want me to, I can send a screenshot?
LDDestroier #55
Posted 15 February 2018 - 11:53 PM
There is. It's 25. Once you have reached that many pastes, you can only paste as a guest. If you want me to, I can send a screenshot?

That can't be true. My free pastebin account has well over 25 pastes on it. Send me a pic.
KingofGamesYami #56
Posted 15 February 2018 - 11:58 PM
There is. It's 25. Once you have reached that many pastes, you can only paste as a guest. If you want me to, I can send a screenshot?
No, there isn't. I personally have 44 pastes on my free account - plus 5 unlisted pastes, for a total of 49.
Pastebin FAQ said:


How many pastes can I create?

The short answer is: as many as you like.
There are however some limitations to fight off spammers.
Guests can create up to 10 new pastes per 24 hours.
Free members can create up to 20 new pastes per 24 hours.
PRO members can create up to 250 new pastes per 24 hours.
Further limits are:
Guest can create unlimited 'public' pastes, unlimited 'unlisted' pastes, but can't create 'private' pastes.
Free members can create unlimited 'public' pastes, 25 'unlisted' pastes, 10 'private' pastes.
PRO members can create unlimited 'public' pastes, unlimited 'unlisted' pastes, unlimited 'private' pastes.

(emphasis mine)
Edited on 15 February 2018 - 10:59 PM
Xelostar #57
Posted 16 February 2018 - 12:34 AM
Nevermind. I suppose you are right. I'm dyslexic and it wasn't clear to me that it applied to unlisted pastes when I got the error :P/>
I guess I'll put it on GitHub soon and the API itself without the models and engine on pastebin.
Xelostar #58
Posted 17 February 2018 - 06:21 PM
Doom is finished :D/>
http://www.computercraft.info/forums2/index.php?/topic/29365-doom-ccs-first-3d-fps-with-online-highscores/
Edited on 17 February 2018 - 05:21 PM
roger109z #59
Posted 19 February 2018 - 05:20 AM
would it be possible for you to give a little documentation on the API? like what the arguments are and such
thanks in advance!
Xelostar #60
Posted 19 February 2018 - 10:53 AM
would it be possible for you to give a little documentation on the API? like what the arguments are and such
thanks in advance!
Yes, some people have asked me now. It's fairly simple, so I assumed people would be able to figure it out, but I understand a documentation could be very helpful. It's coming soon. :)/>
roger109z #61
Posted 19 February 2018 - 09:04 PM
would it be possible for you to give a little documentation on the API? like what the arguments are and such
thanks in advance!
Yes, some people have asked me now. It's fairly simple, so I assumed people would be able to figure it out, but I understand a documentation could be very helpful. It's coming soon. :)/>
Another thing:
could you make an option to rotate on the X axis?
also I noticed while making a model it's hard to know which axis something shows on
The API looks amazing so far though!
Xelostar #62
Posted 19 February 2018 - 10:06 PM
Another thing:
could you make an option to rotate on the X axis?
Yes, that was pretty much the next thing together with textures, but I don't think I'll implement texture support, because I know it will be very slow. (However someone wanted to help me with this and he thought it would be possible without too much lag, so I might still try when I haev time). Also shaders would be nice :P/>
Uhm, the rotation would be on the Z axis btw (not the X axis)
also I noticed while making a model it's hard to know which axis something shows on
The API looks amazing so far though!
For the backface culling? Yeah, I had that too. I just made the models at once and then I swapped all the ones that were wrong. I don't know if there's an easier way. Maybe if someone made a modelling program :P/>
Thanks for the compliment! :D/>

EDIT: quotes messed up, but you still get my point ;)/>
Edited on 19 February 2018 - 09:07 PM
roger109z #63
Posted 20 February 2018 - 12:05 AM
For the backface culling? Yeah, I had that too. I just made the models at once and then I swapped all the ones that were wrong. I don't know if there's an easier way. Maybe if someone made a modelling program :P/>
Thanks for the compliment! :D/>

EDIT: quotes messed up, but you still get my point ;)/>
maybe you could have an option while making the face to set which way it faces? I don't really know how this would be stored though
Also you deserve it this API is super cool!
EDIT: I am attempting to make a game with your api, kind of like a tdm/ffa first person shooter btw
Edited on 20 February 2018 - 12:28 AM
Xelostar #64
Posted 22 February 2018 - 11:43 PM
maybe you could have an option while making the face to set which way it faces? I don't really know how this would be stored though
Also you deserve it this API is super cool!
EDIT: I am attempting to make a game with your api, kind of like a tdm/ffa first person shooter btw

Could be, but that would make it more confusing. Swapping coordinates is easier I think?
I'm not quite sure what the best way would be either, but I know LDDestroier is attempting to make some sort of program that helps you make models.
Good luck with your game! I'm always here if you've got any questions!
Xelostar #65
Posted 22 July 2018 - 03:29 PM
I just updated the API to version 0.5.1! =D