kinda collison detection...
Posted: Wed Nov 09, 2005 2:13 pm
okay here we go...
there is a tank game made by someone else
the map you play on has boxes pyramids and
teleporters...
what i am trying to do is make a random map maker
for it..so far it works for the boxes and pyr's fine even
if the get placed on the same or close to the same spot
the game allows them to merge into one object....
BUT
for teleporters this is not good if a tele is buried inside
a box or pyr you can't get to it...
i'm am trying to find as easy of a way to place teles randomly
on the map without dropping them inside something i think
i know what i have to do but i might be doing it the LONG way
and am seeking a shorter soltuion...
here is the format of the boxes and pyrs in the map file:
box
position -69 -196 0
rotation 3
size 43 8 22
end
pyramid
position -328 134 0
rotation 26
size 14 3 12
end
position is the part i am having to look at
its X axis Y axis and Z on the map Z being how hi off the floor it is...
here what a teleporter would be like in the file:
teleporter
position -132 -346 0
rotation 144
size .125 10 10
border 1
end
again position is the part i am looking at ignore the rest...
the position is all generated by this formula
X Y or Z = int(rnd * 800) -399 the map is 400 x 400 units wide/tall
when i generate a position for the teleport what would be the easiest
way to not place it right on top(inside) of a box or pyr...
here is a screen shot of what a map looks like made with my random
map maker so far...

there is a tank game made by someone else
the map you play on has boxes pyramids and
teleporters...
what i am trying to do is make a random map maker
for it..so far it works for the boxes and pyr's fine even
if the get placed on the same or close to the same spot
the game allows them to merge into one object....
BUT
for teleporters this is not good if a tele is buried inside
a box or pyr you can't get to it...
i'm am trying to find as easy of a way to place teles randomly
on the map without dropping them inside something i think
i know what i have to do but i might be doing it the LONG way
and am seeking a shorter soltuion...
here is the format of the boxes and pyrs in the map file:
box
position -69 -196 0
rotation 3
size 43 8 22
end
pyramid
position -328 134 0
rotation 26
size 14 3 12
end
position is the part i am having to look at
its X axis Y axis and Z on the map Z being how hi off the floor it is...
here what a teleporter would be like in the file:
teleporter
position -132 -346 0
rotation 144
size .125 10 10
border 1
end
again position is the part i am looking at ignore the rest...
the position is all generated by this formula
X Y or Z = int(rnd * 800) -399 the map is 400 x 400 units wide/tall
when i generate a position for the teleport what would be the easiest
way to not place it right on top(inside) of a box or pyr...
here is a screen shot of what a map looks like made with my random
map maker so far...
