How Would I Make a Grid Background Design?

A lot of tutorials I’ve seen online just say to make a static line object and just spam a bunch of instances of it in a grid pattern. However, that seems very inefficient and unoptimized to me. Is there a shorter and less object intensive way to do this?

Really depends on project specifics here. Probably quite a number of ways of doing this, but they depend on the particulars of your project. Some context would help.

Like spiney said, this question needs more context.

A background grid visual can be implemented with a shader. Which is then fed a global position in order to produce an illusion of an infinite surface with lines. In reality the rendered surface does not move, and may also be transparent.

It’s pretty simple, if that’s what you want. Although there is a lot of new stuff if you’re not versed with shaders or UVs.

You definitely don’t make bunch of line instances if you can help it.

1 Like

It’s a Top-Down Shooter, and I just want to make a simple grid for the background, so it’s easier to tell where the player is moving

Do not think about the word “inefficient” and “unoptimized” if you are at this level of game development.

If you think of these words you will permanently cripple your learning progress. It’s that bad.

Instead, go DO all the different ideas you can find in tutorials.

Here’s three random completely-different ways I can think of:

  • draw the grid on paper and put it on a sprite, set it to tiled and scale it properly
  • make a single line-renderer and dupe it across the screen manually, across and down
  • make long slender cubes (scaled at perhaps (100,0.1f, 0.1f)) and again, dupe them across

Whatever you do, GET IT WORKING AND MOVE ON. Until you do you are spinning in place making smoke and noise and not learning anything about the problem context.

GO! Try something, try anything…

Imphenzia: How Did I Learn To Make Games:

Add a quad game object with a material that has a grid texture and then set the tiling to 1000x1000 and then scale up the quad to cover the whole world.

Thanks, this worked great! I also looked up a tutorial to make it infinite by just following the camera

Okay, thanks for the general tips!