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

[MC1.5.2] Custom CCLights2 Enhanced Build + Love3D demo in CCLights2

Started by gamax92, 11 July 2013 - 04:35 PM
gamax92 #1
Posted 11 July 2013 - 06:35 PM
Just showing off this little project of mine.

Changes in this build:
Added circles and triangles:
gpu.circle(x,y,radius,r,g,b)
gpu.filledCircle(x,y,radius,r,g,b)
gpu.triangle(x1,y1,x2,y2,x3,y3,r,g,b)
gpu.filledTriangle(x1,y1,x2,y2,x3,y3,r,g,b)

All functions now have "r,g,b" at the end.
Example:
gpu.line(x1,y1,x2,y2,r,g,b)
gpu.rectangle(x,y,w,h,r,g,b)

Normal Rectangles are now faster.

Monitor is changed from 256x144 to 320x200

Download
CCLights2 - GamsEnhanced.zip - for MC.1.5.2

Demonstration of the new build's triangles.
[media]http://www.youtube.com/watch?v=v0bu1uGKPcE[/media]

I decided to give a shot at some 3D stuff on CCLights2. What I did here was create a small Love2D wrapper, providing only the functions needed for Love3D.
Love3D can be found and downloaded here: Love3D page

If you want to try this out for yourself, look at:

- Demo program - name the file "main.lua"
- Love2D wrapper - Call this what ever you want to.

Credits go to:
ds84182, for creating CCLights2 and helping me out with the LOVE wrapper used in the video.
The person who made Love3D, Love3D is really nice.

Notes:
I do want to clarify something, the demo runs at a full 20 fps.
You may see some laggyness in the video because my computer isn't too powerful, but good enough for use.
Robotonic #2
Posted 11 July 2013 - 07:58 PM
You know, exactly as I began thinking of this, I scrolled over a post on Nitros' 3d, then I found this one, and wow, this is pretty damn nice, instead of large bulky pixels.

Don't get me wrong, sometimes I love the look of those pixels, but this is just amazing.
Mads #3
Posted 12 July 2013 - 03:37 AM
I don't see how the screen size would be a problem. You just create your projection matrix accordingly.



Where f is the frustum scale, a is the aspect ratio(often width / height), Cf is the far clipping point, and Cn is the near clipping point(both along the z-axis).
gamax92 #4
Posted 14 July 2013 - 02:33 PM
[media]http://www.youtube.com/watch?v=qfqPChIRqGE[/media]
EDIT: If this is 144p, its YouTube fault. I uploaded in 480p.

Having more fun with 3D things. I just recently switched the functions in CCLights2 to have "r, g, b" at the end of the arguments.
Then I forgot to fix the love wrapper to be compatible …

This is the result …
nutcase84 #5
Posted 14 July 2013 - 09:07 PM
[media]http://www.youtube.com/watch?v=qfqPChIRqGE[/media]
EDIT: If this is 144p, its YouTube fault. I uploaded in 480p.

Having more fun with 3D things. I just recently switched the functions in CCLights2 to have "r, g, b" at the end of the arguments.
Then I forgot to fix the love wrapper to be compatible …

This is the result …

Oh… awesome. Keep it up. Mineception, here we come!