Posted 14 December 2017 - 08:22 PM
LUAComputers
(Kind of my own CC2.0 attempt)
The program is currently made with Love2D, although I might consider converting to Python, C++ (is an option, but I really do not prefer it) or Java. (Python and Lua/Love2D I experienced are very simple to use so I don't really know any reason to switch to Java or even C++)The window has a size of 1600x900 (to make the "pixels" of the terminal visible/big enough) and the terminal has a "size" of 102x38 (basically the double of current ComputerCraft)It still uses that background/foreground drawing system, meaning that these "pixels" are rectangles with a char on top of themThere isn't really any functionality other than drawing pixels onto the terminal (and I guess writing too) currently, as I started programming it yesterdayI will try to imitate the APIs of ComputerCraft, although I am not completely sure about that yetNetworking is planned using UDP sockets (very basic)
GitHub
SCREENSHOTS:
Spoiler
The emu-/simulator showing "Hello World" on a red background with different foreground colorsThe code for that program would be practically the same as in actual CC:
term.setCursorPos(3, 4)
term.setBackgroundColor({255, 0, 0})
term.write("Hello ")
term.setForegroundColor({0,0,255})
term.write("W")
term.setForegroundColor({0,0,0})
term.write("o")
term.setForegroundColor({255,255,255})
term.write("r")
term.setForegroundColor({0,255,0})
term.write("l")
term.setForegroundColor({255,255,0})
term.write("d")
--term.set[SOMETHING]Color currently uses a table with the pattern {rrr, ggg, bbb} but there will be a color table later on
I will gladly take suggestions from this (dead) community if there are any! :)/>
Also does anybody have an idea of how I could make the window be smaller, yet the pixels be still big enough to be readable? My current calculation of the width / height of a pixel is basically pixel_width = window_width / amountOfPixelsOnXAxis and pixel_height = window_height / amountOfPixelsOnYAxis.
EDIT:
To remove extra window space, the window has to be exactly 1530x874 to have the pixels as big as you can see and not have any extra useless window space.
EDIT: This version of the project is deprecated, as I remade it in Java. Take a look at post #6
Edited on 21 January 2018 - 03:13 PM