2D destructible world inside Circle

Hi

I am creating a 2D game, kinda like worms but I want to make a destructible world inside a circle or torus with a space setting.

Could I use voxels to build the world inside the circle and how would I fit them in a circle?

I just made a picture to visualize things better. The brown is supposed to be a layer of dirt while the green is a layer of grass. Ofcourse other elements will be added later.

Thanks in advance.

A voxel (volume element), represents a value on a regular grid in three dimensional space. This is analogous to a texel, which represents 2Dimage data in a bitmap (which is sometimes referred to as apixmap). As with pixels in a bitmap, voxels themselves do not typically have their position (their coordinates) explicitly encoded along with their values. Instead, the position of a voxel is inferred based upon its position relative to other voxels (i.e., its position in the data structure that makes up a single volumetric image). In contrast to pixels and voxels, points and polygons are often explicitly represented by the coordinates of their vertices. A direct consequence of this difference is that polygons are able to efficiently represent simple 3D structures with lots of empty or homogeneously filled space, while voxels are good at representing regularly sampled spaces that are
Also use Wiki like this : Voxel - Wikipedia or this one.
Cheer!

1 Like

Thanks for your valuable input and links you have proved.
Best - 10HighTech.com

I am too facing the same issue and the guide you posted is really confusing. Can you please explain in simple language?

I think the simple version is: this is 2D, so we’re talking about pixels or polygons, not voxels.

Wanting to do this in a circle does complicate things quite a bit. You could use something like PixelSurface , which was designed for Worms-like 2D destructible games, but the pixels are on a square (or rectangular) grid, not a circular one. You can of course approximate a circle on a square grid, but you can’t get it exactly right.

To do what the OP is asking, on a true circle, you’d have to implement everything yourself… it’d be a massive mesh of tiny little polygons around the circle. You’d probably use vertex coloring to set the color of each one.

From a design perspective, it’s not clear exactly what is wanted in the detailed shape of these circle-based “pixels”… do they get larger as you dig deeper (more to the outside of the circle)? Or do you have more of them? In the latter case, the pixels from one layer won’t line up with pixels in the next layer, do we care?

If it were me, I’d avoid those thorny questions, and just use PixelSurface and approximate a circle in the regular square grid of actual pixels. But maybe I’m biased. :wink:

1 Like