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

Flickering... only on regular computers

Started by HPWebcamAble, 20 August 2015 - 10:53 PM
HPWebcamAble #1
Posted 21 August 2015 - 12:53 AM
My latest program is compatible with Regular and Advanced computers.


Advanced computers work great, with very rare flickering

Regular computers have terrible flickering.


Is there some API on advanced computers that's optimizing draw calls or something?
Or is it more likely that I screwed up a bit of code that only runs on regular computers?

Program:
http://pastebin.com/JuNHQRZD
Controls:
Up / down arrow keys to change the selected item
Ctrl+up to move up a directory
Enter to open a folder or run a program
MOUSE SUPPORT IS WIP. Mostly not implemented yet.
Other keys can be found in the code, if you are so inclined.

NOTE: I'm using CCEmuRedux, which uses CC 1.74 at the moment
Haven't tested in MC yet
Edited on 20 August 2015 - 11:12 PM
Lyqyd #2
Posted 21 August 2015 - 01:03 AM
We can't provide any useful suggestions without seeing the code.
HPWebcamAble #3
Posted 21 August 2015 - 01:09 AM
We can't provide any useful suggestions without seeing the code.

Forgot to mention that the code is a little long at this point.
I was mostly wondering if there were any rendering differences between Advanced / normal computers.

But if someone figures out the problem, that would make me happy too
(Added pastebin to post)
Edited on 20 August 2015 - 11:11 PM
Lyqyd #4
Posted 21 August 2015 - 01:16 AM
Well, the biggest difference is that the advanced computers all have multishell, which means everything you draw is going through the window API. That shouldn't cause there to be fewer issues, though, as it's not particularly tuned for performance/smoothness. Do you experience more flickering if you redirect to term.native() before running the program on an advanced computer?
HPWebcamAble #5
Posted 21 August 2015 - 01:26 AM
Do you experience more flickering if you redirect to term.native() before running the program on an advanced computer?

No, if anything it helps a bit on the advanced computer.
Doesn't affect the regular computer, as one might expect
HPWebcamAble #6
Posted 21 August 2015 - 06:20 AM
UPDATE

Tested in MC (DW20 Pack 1.7.10, CC 1.74)

Minimal flickering in both advanced and regular computers
Must be CCEmu