Posted 17 November 2012 - 01:29 PM
Being a kid who grew up in the 80's and first learned programming with an Apple ][ computer, I can appreciate the style of these computers in computercraft. One thing I remember about the old apple ][ and programming it, though, was graphics. There was low res graphics, which is pretty much already what you have possible (playing with the paint program on an advanced computer), but there was also hi res graphics mode, and this is what really opened up the possibilities for making games and doing more interesting stuff on the apple ][. I think something similar should be implemented in computer craft. I think you would see a similar explosion of new creativity from people once such a thing exists.
It wouldn't need to be a huge resolution or anything. It could be a little blocky. Probably have pixels the size that the text is. Ok, that didn't make sense so let me try again. You should be able to reproduce text with pixels in the graphics mode. The text on computer craft computers looks like it is made up of rather big pixels so I'm thinking pixels of that apparent size would be good.
The Apple ][ hi res mode was (if I still remember correctly after all this time) 280 x 192 I think? There was like only 6 colors too, and it was tricky to work with and had limitations. Lores mode, by contrast, had 16 colors without limitations, but was only 40 x 24 resolution. Almost everyone prefered the hires mode. Goes to show the power more resolution had.
There was also full screen and mixed mode. Mixed mode had like the bottom 4 lines of text area in text mode and everything above that point in graphics mode. I was thinking maybe you could specify an overlay area to use if you want to activate graphics mode. So you could have the whole screen in graphics mode, or maybe just the right half of the screen, or even just a smaller window in the corner of the computer screen. Perhaps you would need to limit the left and right edges of the overlay area to multiples of 8. On the Apple ][ graphics memory was set up such that each bit of memory represented a pixel on the screen, except that the high order bit in each byte was a color mode bit. So a byte layout was something like ABABABAC, where C is the color mode bit, and A is one color and B is another color. Either the colors are green and purple or red and blue, depending on the color mode bit for that byte. As you can see, hires graphics was limiting and tricky to work with but still worth the effort.
I'm still not that familiar with Lua yet, but I'm thinking maybe a string to represent graphics memory might be best? Perhaps using hexidecimal values (0-9a-f), so each character in the string represents one pixel in one of sixteen colors. On the Apple ][ people generally used a vtable as it was called, which allowed you to get the start of each scanline easily. This might be easiest for people using computer craft as well, so organizing graphics memory into a table using numeric keys, which represents each scanline. Something tells me this wouldn't work, though. Gives you an idea of what I have in mind anyway.
It wouldn't need to be a huge resolution or anything. It could be a little blocky. Probably have pixels the size that the text is. Ok, that didn't make sense so let me try again. You should be able to reproduce text with pixels in the graphics mode. The text on computer craft computers looks like it is made up of rather big pixels so I'm thinking pixels of that apparent size would be good.
The Apple ][ hi res mode was (if I still remember correctly after all this time) 280 x 192 I think? There was like only 6 colors too, and it was tricky to work with and had limitations. Lores mode, by contrast, had 16 colors without limitations, but was only 40 x 24 resolution. Almost everyone prefered the hires mode. Goes to show the power more resolution had.
There was also full screen and mixed mode. Mixed mode had like the bottom 4 lines of text area in text mode and everything above that point in graphics mode. I was thinking maybe you could specify an overlay area to use if you want to activate graphics mode. So you could have the whole screen in graphics mode, or maybe just the right half of the screen, or even just a smaller window in the corner of the computer screen. Perhaps you would need to limit the left and right edges of the overlay area to multiples of 8. On the Apple ][ graphics memory was set up such that each bit of memory represented a pixel on the screen, except that the high order bit in each byte was a color mode bit. So a byte layout was something like ABABABAC, where C is the color mode bit, and A is one color and B is another color. Either the colors are green and purple or red and blue, depending on the color mode bit for that byte. As you can see, hires graphics was limiting and tricky to work with but still worth the effort.
I'm still not that familiar with Lua yet, but I'm thinking maybe a string to represent graphics memory might be best? Perhaps using hexidecimal values (0-9a-f), so each character in the string represents one pixel in one of sixteen colors. On the Apple ][ people generally used a vtable as it was called, which allowed you to get the start of each scanline easily. This might be easiest for people using computer craft as well, so organizing graphics memory into a table using numeric keys, which represents each scanline. Something tells me this wouldn't work, though. Gives you an idea of what I have in mind anyway.