Laggy drag and drop tiles

so I am making a game where a doggo finds his friends but my game is getting super laggy with the drag and drop tiles I am fairly new at making code and the drag and drop keeps freezing for me also the game sim is also having a hard time starting up I also have good wifi is it just that it is a really big game or am I doing something wrong? this has happened to many other of my games please help! for some more info the way it’s laggy is when I drag something over it always slows down and I did the motion and after like 3 seconds it works. another thing you might want to know is that I have almost no idea how to use arrays so if any of you know how to could you please teach me?

Also, another thing that is not as important is: is there a way to remove the overlays that say what your score and life is at I don’t think this is changeable so this is not as important the reason I want to know this is cuz I have made my own health bar

I’m am very sorry for taking your guy’s time

heres my game its not done at all

To get rid of the lives, you should just need to remove the set life to 10 from your code. We only show the lives if you use the life blocks from the info category. Same for the score blocks, remove any score blocks to fix it

As for the performance, big block programs can cause lag. I would suggest closing or stopping the simulator. It should improve the performance by quite a bit! Remember to stop/close it again after you’ve finished testing your code.

As for arrays, we have a CS course for arcade! Here’s the section on arrays:

It’s written with teachers in mind but it might still be useful!

Thank you very much! I changed it and its running really smooth now thanks!

also thanks for the video

also i have another question (sorry for your time)

i have a sprite that will not take up the whole box (box as in drawing box when you draw your sprite) does he collide with stuff that is not colored in?

Only the pixels that are not clear are counted in overlaps between sprites; (so only if two colored pixels are touching)

On tile maps it’s similar, except it takes a bounding box around the image and bases collisions off that (that is, it finds the smallest rectangle that it can that includes all the colored in pixels), and finds collisions based off that.

Here’s an example: when you move over the blue square (a sprite) you’ll see it won’t collide until the pink and blue sprites on actually touching, but you can’t move into the grassy tile from the top right

1 Like