Guild icon
DDraceNetwork
Development / bugs
Report client & server bugs, especially but not limited to release candidates.
Between 2024-10-25 00:00 and 2024-10-26 00:00
Avatar
the bounce tune allows to skip tiles like freeze. is this fixable? if yes, it should be fixed soon because some mappers are working on bounce maps and i think there are no maps with the feature yet (edited)
21:22
also currently 2 rows (maybe more) of tune zone tiles are required to make the tune work properly (in cases where its not a global tune but the bounce is added via tune tiles)
Avatar
bwoah that's so cool tho. Maybe it's just me but I think that those "features" might create some interesting ideas. (if it's not fixed I'm probably stealing this x)).
Avatar
Avatar
Devinci
bwoah that's so cool tho. Maybe it's just me but I think that those "features" might create some interesting ideas. (if it's not fixed I'm probably stealing this x)).
some mappers are working on bounce maps, not exactly sure what you would "steal" as soon as you create something original
Avatar
The bug. O.o
Avatar
OHHH now i get it XD
22:07
i said nothing
Avatar
Avatar
Welf
the bounce tune allows to skip tiles like freeze. is this fixable? if yes, it should be fixed soon because some mappers are working on bounce maps and i think there are no maps with the feature yet (edited)
what is this tuning called?
Avatar
Avatar
Tater
what is this tuning called?
ground_elasticity_y 0.75 is used in this map
Avatar
does the bug only happen when it's applied with tune tiles or also globally?
Avatar
Avatar
Tater
does the bug only happen when it's applied with tune tiles or also globally?
i don't understand, in this map i'm using a global tune, but i described 2 bugs
Avatar
I mean the freeze tile skip
Avatar
(i used a tune zone at the spawn for the setup, because the thing needs a specific heigth i think)
22:12
the map only has tune tiles on the spawn not at the freeze
Avatar
hmm it's not clear to me why the bounce skips the freeze tile, if you open an issue on github someone might take a closer look
Avatar
so what the tile probably does is measure how far the tee would go into the wall, and simply 'reflect' the velocity vector of the tee off of the wall
22:25
so to skip the freeze tile, the velocity vector must simply be big enough that the tee starts outside the freeze, and in one tick move to the wall -> back outside the freeze
Avatar
I was thinking that but I don't think that's what the code intends to do (edited)
22:26
it's supposed to put you AT the wall and set your velocity to negative
Avatar
and for pretty much the same reason, I'd expect that you sometimes need two tiles: the tee starts outside the tune, and hits the wall before it entered the tune zone
Avatar
Avatar
Tater
it's supposed to put you AT the wall and set your velocity to negative
:o that sounds really weird
Avatar
void CCollision::MoveBox(vec2 *pInoutPos, vec2 *pInoutVel, vec2 Size, vec2 Elasticity, bool *pGrounded) const { // do the move vec2 Pos = *pInoutPos; vec2 Vel = *pInoutVel; float Distance = length(Vel); int Max = (int)Distance; if(Distance > 0.00001f) { float Fraction = 1.0f / (float)(Max + 1); float ElasticityX = clamp(Elasticity.x, -1.0f, 1.0f); float ElasticityY = clamp(Elasticity.y, -1.0f, 1.0f); for(int i = 0; i <= Max; i++) { // Early break as optimization to stop checking for collisions for // large distances after the obstacles we have already hit reduced // our speed to exactly 0. if(Vel == vec2(0, 0)) { break; } vec2 NewPos = Pos + Vel * Fraction; // TODO: this row is not nice // Fraction can be very small and thus the calculation has no effect, no // reason to continue calculating. if(NewPos == Pos) { break; } if(TestBox(vec2(NewPos.x, NewPos.y), Size)) { int Hits = 0; if(TestBox(vec2(Pos.x, NewPos.y), Size)) { if(pGrounded && ElasticityY > 0 && Vel.y > 0) *pGrounded = true; NewPos.y = Pos.y; Vel.y *= -ElasticityY; Hits++; } if(TestBox(vec2(NewPos.x, Pos.y), Size)) { NewPos.x = Pos.x; Vel.x *= -ElasticityX; Hits++; } // neither of the tests got a collision. // this is a real _corner case_! if(Hits == 0) { if(pGrounded && ElasticityY > 0 && Vel.y > 0) *pGrounded = true; NewPos.y = Pos.y; Vel.y *= -ElasticityY; NewPos.x = Pos.x; Vel.x *= -ElasticityX; } } Pos = NewPos; } } *pInoutPos = Pos; *pInoutVel = Vel; }
22:27
ah wait
22:27
actually you're correct
Avatar
is Elasticity the tune zone, or smth different entirely?
Avatar
it is
22:28
it's only used for this tune
22:28
the reason it skips is because the loop keeps going after a bounce is found
22:29
so m_LastPos and m_Pos never pass through the freeze tile
22:30
probably because no one ever though you could have such a sharp reflection in a single tick
Avatar
@AssassinTee do you think this is a thing that could be fixed? :)
22:33
you could actually end up hitting a freeze tile you didn't hit if you are moving fast enough (edited)
22:35
Exported 34 message(s)
Timezone: UTC+0