←  Peripherals and Turtle Upgrades

ComputerCraft | Programmable Computers for Minecraft

»

[MC 1.6.4] CCLights2 v0.4.1

ds84182's Photo ds84182 05 Feb 2013

Disclaimer
CCLights2 is pretty easy to use... Until you get into the advanced methods. I am still trying to clean things up with these advanced methods, but if you use it wrong, your cat may die, you house may explode, your love interest may spontaneously combust. That warning goes for the rest of the mod also. That warning goes to modding in general.

Also, if you looked at Sangar's Camera peripheral and was disappointed because it doesn't take pictures, in the beta(on github in "yolobranch") we have a working camera for the tablet.

CCLights2 - a Minecraft mod for real-time pixel manipulation

Quick Info and stuff
Teel Deer, CCLights2 is a sequel to CCLights. You can do stuff with monitors AND lights in this one. You can do pretty stuff with the GPU, you can draw pictures, make pretty pixels, and, I dunno, make a real internet browser by porting Webkit to CC (Good Luck).


CCLights2 is opensource on Github:
https://github.com/ds84182/CCLights2/

Official Documentation on the ComputerCraft Wiki:
http://computercraft.../wiki/CCLights2

Jenkins Build Server:
http://alekbnc.opens.../job/CCLights2/

Download (Click the link that says CCLights2-[VERSION]-[BUILD NUMBER].jar):
http://alekbnc.tk:80.../artifact/dist/

Read "Fifty shades of pixel" from my Skydrive: https://skydrive.liv...hint=file%2c.do


So, if you are truly interested in CCLights2, the GPU api mostly resembles Love2D's graphics api. Internally, textures are essentially a framebuffer.


Posted Image

A CCLights2 tablet, showing an orange box with a drop-shadow.

CCLights2 was originally managed by myself, but now I welcome alekso56 to the development team! I hope to work hard to provide the ComputerCraft community with pixel manipulation and graphical drawing in ComputerCraft!


Edited by ds84182, 10 August 2014 - 05:08 PM.
Quote

NeverCast's Photo NeverCast 05 Feb 2013

I look forward to using this tonight.
Has the lag bug been fixed in CCLights2? I had to disable the mod because of it unfortunately.
Edit: Just noticed 'WIP'.. I'll keep watch for when it's available.
Quote

ds84182's Photo ds84182 05 Feb 2013

View PostNeverCast, on 05 February 2013 - 02:18 PM, said:

I look forward to using this tonight.
Has the lag bug been fixed in CCLights2? I had to disable the mod because of it unfortunately.
Edit: Just noticed 'WIP'.. I'll keep watch for when it's available.
You mean CCLights?
Just updated it a minute ago.
Quote

xuma202's Photo xuma202 06 Feb 2013

By rendering texture do you mean rendering an image from an external image file or also rendering minecraft textures?
I'd like rendering items and blocks like MC does in the inventories.

However I'm looking forward for the release.

Chris
Quote

Oddstr13's Photo Oddstr13 07 Feb 2013

View Postxuma202, on 06 February 2013 - 12:33 PM, said:

By rendering texture do you mean rendering an image from an external image file or also rendering minecraft textures?
I'd like rendering items and blocks like MC does in the inventories.

However I'm looking forward for the release.

Chris
Texture as in a picture you can use to draw on the screen, instead of setting many pixles every time you want to draw the same thing, you make a texture, and draw that texture to the screen several times over.

That is my understanding of it from the conversation on IRC atleast.


Also, feature request: Persistent image over world reloads (server restart)
Quote

CoolisTheName007's Photo CoolisTheName007 07 Feb 2013

1-up for mouse_up/mouse_down
Feature-request:
what I talk about here: basically many drawPixel calls in one call using Lua varargs since tables can't be passed around.
Textures are an improvement, though.
Quote

ds84182's Photo ds84182 07 Feb 2013

View PostOddstr13, on 07 February 2013 - 07:28 AM, said:

View Postxuma202, on 06 February 2013 - 12:33 PM, said:

By rendering texture do you mean rendering an image from an external image file or also rendering minecraft textures?
I'd like rendering items and blocks like MC does in the inventories.

However I'm looking forward for the release.

Chris
Texture as in a picture you can use to draw on the screen, instead of setting many pixles every time you want to draw the same thing, you make a texture, and draw that texture to the screen several times over.

That is my understanding of it from the conversation on IRC atleast.


Also, feature request: Persistent image over world reloads (server restart)
One problem with persistent images is that it makes the saves bigger. It also makes saving a lot slower. Trust me, you don't want that :)
Quote

ds84182's Photo ds84182 07 Feb 2013

View PostCoolisTheName007, on 07 February 2013 - 08:02 AM, said:

1-up for mouse_up/mouse_down
Feature-request:
what I talk about here: basically many drawPixel calls in one call using Lua varargs since tables can't be passed around.
Textures are an improvement, though.
This could be possible.
My proposed function name would probably be drawPixelBatch(x,y,(r,g,B) <- repeated hundreds of times.)
Quote

tesla1889's Photo tesla1889 07 Feb 2013

YAY GUI!

that was literally the only thing keeping me away from CCLights 1
Quote

lieudusty's Photo lieudusty 07 Feb 2013

Much more realistic. I like it! :D
Quote

xuma202's Photo xuma202 10 Feb 2013

View Postds84182, on 07 February 2013 - 02:00 PM, said:

View PostCoolisTheName007, on 07 February 2013 - 08:02 AM, said:

1-up for mouse_up/mouse_down
Feature-request:
what I talk about here: basically many drawPixel calls in one call using Lua varargs since tables can't be passed around.
Textures are an improvement, though.
This could be possible.
My proposed function name would probably be drawPixelBatch(x,y,(r,g, B) <- repeated hundreds of times.)

I have tried this for my mod but I had a multidimensional array and therefore wrote my own onpack() which called itself recursively. It worked but once I ran into trouble because lua was not able to handle my function as a function. So I guess there is a limit with parameters.

2nd:

Can you please allow placing the Light Grids facing upwards/downwards?
People have asked for this with CC Monitors many times. And it would enable creating a DISCO or holodeck thingy.
Quote

redeye83's Photo redeye83 10 Feb 2013

View Postxuma202, on 10 February 2013 - 03:38 AM, said:

2nd:

Can you please allow placing the Light Grids facing upwards/downwards?
People have asked for this with CC Monitors many times. And it would enable creating a DISCO or holodeck thingy.
I 2nd his 2nd!
Quote

MudkipTheEpic's Photo MudkipTheEpic 10 Feb 2013

View Postxuma202, on 10 February 2013 - 03:38 AM, said:

2nd:

Can you please allow placing the Light Grids facing upwards/downwards?
People have asked for this with CC Monitors many times. And it would enable creating a DISCO or holodeck thingy.

I 3rd his 2nd! Wait... I guess that doesn't work as well as I thought it would...
Quote

Kye_Duo's Photo Kye_Duo 18 Feb 2013

ok...so with this mod would it be possible to make a full touchscreen GUI for a program?

I also can't wait for this mod to come out...it'll make my Galaxy warp core so much cooler than it is now

and my friend can use this all over his Unova region map he's making

wonder how hard it'll be to make scrolling text screens with this...
Quote

ds84182's Photo ds84182 01 Mar 2013

View PostKye_Duo, on 18 February 2013 - 10:45 AM, said:

ok...so with this mod would it be possible to make a full touchscreen GUI for a program?

I also can't wait for this mod to come out...it'll make my Galaxy warp core so much cooler than it is now

and my friend can use this all over his Unova region map he's making

wonder how hard it'll be to make scrolling text screens with this...
Your friend's idea sounds awesome!
I've been pretty tired lately, so no release yet!
I still don't have Non-gui monitors yet.
Quote

Zaggy1024's Photo Zaggy1024 01 Mar 2013

While you're thinking about adding mouse_down and mouse_up events, what about key_down and key_up? Having them would make games so much more awesome it would be epic (CC itself would really benefit from having them too, because people could make some pretty amazing games). It might even encourage me to finally start rewriting my Minecraft clone (and this time with primarily CCLights)! :D
Quote

ds84182's Photo ds84182 01 Mar 2013

View PostZaggy1024, on 01 March 2013 - 08:38 AM, said:

While you're thinking about adding mouse_down and mouse_up events, what about key_down and key_up? Having them would make games so much more awesome it would be epic (CC itself would really benefit from having them too, because people could make some pretty amazing games). It might even encourage me to finally start rewriting my Minecraft clone (and this time with primarily CCLights)! :D
I might think about that.
The problem with _up and _down is that I have to send packets... So if people mash random keys then... I get Overburdened Memory Connections and lag.
Quote

JustPingo's Photo JustPingo 01 Mar 2013

Awesome.

We will be able to make powerfuls and beautifuls games with textures and mouse compatibility. It will be "easy" to make games fully in Lua !

Finish it speed :P
Quote

Kye_Duo's Photo Kye_Duo 01 Mar 2013

View Postds84182, on 01 March 2013 - 06:39 AM, said:


Your friend's idea sounds awesome!
I've been pretty tired lately, so no release yet!
I still don't have Non-gui monitors yet.

if you just make the pixel panels touch sensitive like the advanced monitors it'd be up to us to program in the right responses
my bro is creating an interactive text based GUI using advanced monitors for his "danger room" and a full GUI would make it soooo much better
with persistent textures, couldn't you use external files for the textures, like CC already does for the programs? it wouldn't increase the save time, but it would still increase the size, though if you could create a universal texture file that anyone could call up from any computer that would cut down on the size if it was a common base for several pixel panels...
and I'm helping my friend with his map, managed to get a fairly accurate Nimbassa City Gym thanks to RC...though we had to cheat and use Teleporters from IC2 cause that building is a massive TARDIS
Quote

amtra5's Photo amtra5 05 Mar 2013

View PostZaggy1024, on 01 March 2013 - 08:38 AM, said:

While you're thinking about adding mouse_down and mouse_up events, what about key_down and key_up? Having them would make games so much more awesome it would be epic (CC itself would really benefit from having them too, because people could make some pretty amazing games). It might even encourage me to finally start rewriting my Minecraft clone (and this time with primarily CCLights)! :D/>

Just as I predicted :)

View Postamtra5, on 04 March 2013 - 12:58 AM, said:

If you could make the screen touch, someone is going to make MCPE :P/>
Quote