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.
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