Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How do i make the background endless for agar.io
- cs2411456
-
41 posts
How do i make the background endless for agar.io
I have been making a substitute for agar.io, but i find it really annoying when it goes off the background. I have tried multiple thing, such as creating clones of the background, or changing the size, but it just wont work. Please help me!
- drchubbington
-
100+ posts
How do i make the background endless for agar.io
Pen is the answer. You have to draw a grid for the background, so you can do this:
Here is the example:
https://scratch.mit.edu/projects/299057888/
For reference only; this won't work for your project.
Here's how to do it to satisfy your own needs:
Say you are spacing your lines 20 pixels apart, and you have two variables called ScrollX and ScrollY to mark the offset of the character.
Create a myblock with “run without screen refresh” checked
Here is the example:
https://scratch.mit.edu/projects/299057888/
For reference only; this won't work for your project.
Here's how to do it to satisfy your own needs:
Say you are spacing your lines 20 pixels apart, and you have two variables called ScrollX and ScrollY to mark the offset of the character.
Create a myblock with “run without screen refresh” checked
define Draw grid with offset (x) (y) (spacing)Then make the script:
set [Var v] to (0)
repeat ((480)/(spacing))
go to x: (((-240)+((Var)*(spacing)))+((x)mod(spacing))) y: (180)
pen down
set y to (-180)
pen up
change [Var v] by (1)
end
set [Var v] to (0)
repeat ((360)/(spacing))
go to x: (-240) y: (((-180)+((Var)*(spacing)))+((y)mod(spacing)))
pen down
set x to (240)
pen up
change [Var v] by (1)
end
when I receive [Start Game v]Sorry for the red block; I haven't figured out how to make scratch recognize it as a MyBlock yet.
forever
clear
Draw grid with offset (ScrollX) (ScrollY) (Your spacing)
end
Last edited by drchubbington (April 1, 2019 22:53:59)
- cs2411456
-
41 posts
How do i make the background endless for agar.io
Thanks, Ill try it! Totally helped :-)
- drchubbington
-
100+ posts
How do i make the background endless for agar.io
No problem! Let me know if you have any troubles extra things you need for the grid!
- bS5M8ExK
-
21 posts
How do i make the background endless for agar.io
thanks
when green flag clicked
forever
(thanks!)
say [thanks] for (2) secs
end
- bS5M8ExK
-
21 posts
How do i make the background endless for agar.io
define Thanks
say [THANKSSS!]
- DUYdeptrai2019
-
93 posts
How do i make the background endless for agar.io
please dont necropost, this topic is 1 years olddefine Thanks
say [THANKSSS!]
- drchubbington
-
100+ posts
How do i make the background endless for agar.io
Lol I got a notification from that 

- bS5M8ExK
-
21 posts
How do i make the background endless for agar.io
when green flag clicked
forever
Be happy,Be awsome
set [ happiness ] to [Infinity]
end
- _Polygon
-
16 posts
How do i make the background endless for agar.io
I tried it, but it didn't work.
- bS5M8ExK
-
21 posts
How do i make the background endless for agar.io
Okay thanksplease dont necropost, this topic is 1 years olddefine Thanks
say [THANKSSS!]
- Discussion Forums
- » Help with Scripts
-
» How do i make the background endless for agar.io