How to make arcade run faster?

I have noticed that when I make a larger project, it lags. Like, ALOT. The game itself runs fine, but the actual workspace is extremely laggy, like it actually looks like a slideshow. I can only guess that this is because the sheer amount of blocks, but is there a way I can make this run better? My computer is perfectly capable of running this, but the website is very laggy. It’s very hard to make progress when it’s running this terrible. Is there a way to get around this, or is makecode only practically capable for making small projects?

3 Likes

This is happens a lot on lower end computers and chromebooks. I recommend using a mac because it seems to lag a lot less

2 Likes

I’m pretty sure block coding was ever intended for such large projects. One thing I do is to use the scroll wheel when moving up which helps with movement. Zooming out also reduced movement distance.
Some actually useful solutions:
-Blocks of code can be minimised by right clicking on it which helps lag (I always do this with
arrays and character animations). Making and organising code with functions helps to do this.
-Cleaning up unused blocks lying around (tidying your workspace!)
-If you have lots of repeated code try cleaning them up with one function to reduce the amount of
blocks.
-You could switch to javascript or python but that takes learning a whole new language which even I
don’t want to do.
-Close the simulator when doing stuff as that is very laggy in itself.
-General optimisations to code (like using arrays instead of a gigantic if else line)
Sorry for the text wall lol

1 Like

One word: JavaScript

1 Like

Bro has all the pro tips

Robot Survival runs like powerpoint 2001 on a toaster in the editor I’ve got all the strats.

2 Likes

I’ve imported @UnsignedArduino’s arcade chess once. It ran like Crysis on a Windows 98 computer

3 Likes

Easier said than done buddy.

Can you please share your project?

1 Like

right click and click “Format Code” you all the code will be sorted
just the fact of having less block in vision helps
image

2 Likes

And the “Collapse Blocks”

1 Like

the “Collapse Blocks” just makes the block smaller like a function
image
like so
and now you dont have to look at you logic monster

1 Like

Yeah, these are also good options, collapsing the blocks will reduce the amount of blocks displayed in the workspace (and make the site run faster)

One thing to note though, is that this is a compromise between usability and performance. When you collapse blocks, it can get harder to get around and find what you are looking for


Just something to keep in mind

1 Like

I remembered another method, which is to hide the simulator (collapse it using the arrow on the side). That way your browser won’t allocate resources to rendering the sim and it should make the workspace run faster. The tradeoff though, is that you can’t preview your changes in real time

1 Like