Jump to content




Menu #clickbaitTitle!


1 reply to this topic

#1 pofferman

  • Members
  • 32 posts

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.


(Oh, and the song is southern man by akshin alizadeh. :) )

Edited by pofferman, 14 February 2017 - 09:55 PM.


#2 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 6,702 posts
  • LocationTasmania (AU)

Posted 14 February 2017 - 11:07 PM

View Postpofferman, on 14 February 2017 - 09:41 PM, said:

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





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users