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

Menu #clickbaitTitle!

Started by pofferman, 14 February 2017 - 08:41 PM
pofferman #1
Posted 14 February 2017 - 09:41 PM
Hallooo :D/>

So i had some spare time, and i made a menu.
(If you guys know why it's making that flickering could you please tell me why?)

The idea is that the menu can control a bunch of turtles, and make them do all sorts of stuff.
My plan is to finish this GUI, and then connect it to the server i have made for a Quarry program. (Basicly calculates some coordinates and sends them to the turtles)

To make the menu i used metatables, and stored all the objects in a giant array, that will be looped and then drawn.

[media]http://youtu.be/1J4qz0DOCAk[/media]
(Oh, and the song is southern man by akshin alizadeh. :)/> )
Edited on 14 February 2017 - 08:55 PM
Bomb Bloke #2
Posted 14 February 2017 - 11:07 PM
(If you guys know why it's making that flickering could you please tell me why?)

Kind of difficult to review code in video form, but basically you're trying to execute too many instructions in between the time you clear the screen and when you complete your redraw process.

In your case, it appears most of the screen refreshes you do don't even justify clearing the screen in the first place. The effect could be easily mitigated by drawing over the top of what's already there.

Also consider the types of functions you're calling while redrawing. If you need to gather information via rednet communication for eg, then it'd be better to get all of that before you start drawing.