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

A ComputerCraft the way it should be?

Started by Squizzle, 30 March 2012 - 01:26 AM
Squizzle #1
Posted 30 March 2012 - 03:26 AM
Minecraft was designed with LWJGL - Lightweight Java Game Library, basically a OpenGL Wrapper using java jni calls to the native OpenGL device. I myself am not skilled with OpenGL but I do know that you can Render to a Texture.

You (the developer(s)) create a draw api in Lua that wraps the opengl draw api in a way that is user friendly and renders to the ComputerCraft screen texture. Here is a page on the LWJGL wiki with a example for Rendering To Texture using the FBO http://lwjgl.org/wik...jects_%28FBO%29 neat? I thought so. So wouldn't it be neater to be able to draw stuff on to a ComputerCraft screen instead of just Text..

I read up about how they didn't want to add this because of sending a bunch of pixels over the internet… WHY would you send that much data over the internet to begin with…

If this is the reason that ComputerCraft can't expand into something more then I guess I should change my suggestion to a way of refactoring the Network logic. Instead of sending 50000 pixels, hook into the draw calls in your lua wrapper and send something like "drawPixel 0,0 red" when the function drawMethod is called. It wouldn't be a string though it would be something compact. A byte can represent the color. Also you'd buffer your messages so that your not sending small packets but bundled packets every second.
Edited on 30 March 2012 - 01:50 AM
Cloudy #2
Posted 30 March 2012 - 11:30 AM
I don't think dan has officially said it is because of network usage - I just think he hasn't implemented it yet. I assure you that he knows perfectly well how to render to the screen (he does is fair share of rendering with turtle movement).

dan is certainly considering adding graphics support. However, there is nothing stopping a peripheral being created to do this.
grinchfox #3
Posted 30 March 2012 - 05:24 PM
I dont mind about 8bit graphics with palette or atleast 1bit graphics BUT it needs something like RLE compression. Or atleast customizable fontpage for it to make graphics for GUI, like it was in real pcs.