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

How Can I Reduce Lag While Coding In Console?

Started by entIty, 12 October 2012 - 07:00 PM
entIty #1
Posted 12 October 2012 - 09:00 PM
How Can I Reduce Lag While Coding In Console?

I'm not enjoying coding much in the game (currently in Tekkit SMP), because it is very laggy and text slow to respond.
Any tips on how to improve this? Sorry if this has been asked already, not sure where to look/post.

Thanks
ent|ty
Ditto8353 #2
Posted 12 October 2012 - 09:02 PM
Is using the console a requirement for you?
If you are able to code outside of the game I suggest you do that instead.

P.S. I don't know…
GopherAtl #3
Posted 12 October 2012 - 09:04 PM
nothing you can do really except find a less-laggy server :/

And before anyone asks, there's ultimately no way to fix this in computercraft except to simulate the computer on both the server and every client, which would create a whole slew of problems of it's own, so it's just not gonna happen. The suggestion has been beaten to death in the suggestions forum.
billysback #4
Posted 12 October 2012 - 09:05 PM
Use the CC Emulator the test your programs;
Use a program like Notepad++ to code your programs;

Copy the programs from Notepad++ to your console manually (type it out)
entIty #5
Posted 12 October 2012 - 09:12 PM
nothing you can do really except find a less-laggy server :/
Server seems fine for everything else, but is laggy in both ComputerCraft terminal and Turtle

Use the CC Emulator the test your programs;
Copy the programs from Notepad++ to your console manually (type it out)
Yeah, I could do this and thought of it. Is this the only way? Is the lag just part of the interface and nothing can be done?
Are the hard-core coders doing it all outside of the game? Because for long entries later, one would still have to deal with the text lag at that point.
It would save a lot of time debugging though, that is where I could see the benefit.
GopherAtl #6
Posted 12 October 2012 - 09:22 PM
for everythign else, the server can "cheat." Server says entity started moving? client keeps it moving until it hears otherwise. Player just placed a block? client assumes it worked and renders it without waiting for server to confirm. You can see that this kind of thing happens in glitches with block protection mods. Computercraft, it is not reasonably possible to predict what will be displayed. All that exists on the client is the rendered console; it draws what the server tells it to draw. It doesn't know if keystrokes should be echoed to the screen or not, or what program is running, or where the cursor is, or anything else necessary to predictively draw characters to the screen as you type. To know, it would have to be simulating the entire computer, meaning when you right-click, the server has to send you the all active programs, the file structure, and the entire internal state of the lua processes related to that computer, which is just not viable.

And yeah, most "hard-core" cc programmers code outside cc, in ccemu, or in offline, local servers. I have played on servers with very little latency even when typing into cc computers, where it's not an issue, but that's the exception more than the rule.
Cranium #7
Posted 12 October 2012 - 09:26 PM
I just update my code on pastebin constantly. Get an error, change the code on pastebin, delete the old code on the terminal, and update with new code from pastebin.
Doyle3694 #8
Posted 12 October 2012 - 09:55 PM
I think tekkit in general is abit laggy/bad coding :)/>/> But yeah, don't wanna start any flamewars…

What's teh spec's of the server? Is it a public server with many users or a private with few users? That might affect it.
ChaddJackson12 #9
Posted 13 October 2012 - 01:25 AM
Use the CC Emulator the test your programs;
Use a program like Notepad++ to code your programs;

Copy the programs from Notepad++ to your console manually (type it out)
Oh wow, there is a Computer Craft Emulator? I must go and find this!