MT-CTF / capturetheflag

Capture the Flag game using the Minetest Voxel Engine
https://ctf.rubenwardy.com
81 stars 86 forks source link

Discussion for combating the issue with multi team maps and barrier removal in them #1146

Open farooqkz opened 1 year ago

farooqkz commented 1 year ago

Currently in 4 player maps, we don't have classic barriers anymore which you can define by only 2 points and a big cube. While this works perfectly for 2 team maps which their barrier fits in a minimal cube, this isn't the case for 4 team maps. I am proposing two ideas to combat this issue:

image

The above image shows the shape of the red barrier(in red colour) and 2 pairs of points to efficiently define where the red barrier is(the black circles). As you see this method is very efficient and most or all of the blocks(or nodes) inside the defined positions are the red barrier blocks which later are to be removed.

image

This second image, shows the more general solution for maps like water academy. We can make the cubes(the pairs of black circles) in a size small enough to not contain much of the map but at the same time big enough to so that we won't have too many of them to iterate over(to look for red barrier inside to delete it).

src4026 commented 1 year ago

Reminds me of derivatives in calculus lol :joy: . Good idea by opening an issue :smile: .

farooqkz commented 1 year ago

Reminds me of derivatives in calculus lol joy . Good idea by opening an issue smile .

Did you mean Integrals?

src4026 commented 1 year ago

Reminds me of derivatives in calculus lol joy . Good idea by opening an issue smile .

Did you mean Integrals?

The last image looks like the diagram for derivatives. The concept of tiny areas does remind me of integrals and Riemann sums too :p.

LoneWolfHT commented 1 year ago

A better solution would probably be to search the map for barrier nodes and save their positions when the map is saved

farooqkz commented 1 year ago

Won't this solution require doing so for all the current maps?

LoneWolfHT commented 1 year ago

Yeah, so I need to implement mass-map-resaving at some point

farooqkz commented 1 year ago

Yeah, so I need to implement mass-map-resaving at some point

What is format of these binary mts files?

LoneWolfHT commented 1 year ago

Minetest Schematic. I would rather people looked to work on other things for now though, unless they have experience working with schematics