( search forums )
Bullets and bugs
Soldat Forums - Soldat Talk - Developers Corner
Deleted User
September 14, 2005, 11:33 am
I think this might be where this goes according to how I am asking the question and some of the thoughts behind it

I woke up today...it had been a nice sweep of 6 hours playing soldat the night before (and still no dreams about it ^_^) and I was still really tired...I was thinking about some things and it hit me...The bullet through polygon bug might be easilly fixed

I figured that since scenery and with bugs even polygons can become transparent that possibly in game graphics can as well (the bug that makes invisible bullets could even help with it)

I think if bullets were made with the same property (not physics) that the rambo arrows have that causes them to stick into polygons rather than go through them that could fix the main problem of the bug...then all thats left are some ugly bullet graphics sticking out from the wall....thats where the above comes in...
could the graphics of bullets that hit polygons actually be reduced in visibility all the way into full transparency/invisibility?

If this is possible could someone with more programming knowledge than me and possibly a better insight into this figure if it is possible?

GAMEOVER
September 14, 2005, 11:39 am
Well id love to see a fix for poly abuse 1 of the worst spots is kampf if your ever on bravo the idiots just love sittin up there.

rapterion
September 14, 2005, 8:07 pm
Well my guess for the reason that it works is that bullet collision is done based on actual physical position of the bullet, which is fine if the bullets are slow enough, but when they start moving too fast they start to skip over things if they are smaller then the rate at which the bullet moves, a solution would be to have the bullet cast a ray in either direction, the length of which is based on its speed, and if any part of that ray collided with something then the bullet should be treated as if it directly collided.

To give an example, lets say the bullet is moving at a physical speed of 10 pixels per frame, that means that anything smaller then ten pixels can be skipped by the bullets collision detection, because if the bullets emission point starts at 0, then its next drawn point is going to be 10 which means it occupies both point 0, and point 10, but nothing in between, now if a ray was set to be 5 pixels back, to 5 pixels in front of the bullet, that means that no matter where the bullet was fired from, its ray would intersect the object.

[edit] A more logical method to this would be to make the ray from -10 to 0 behind the bullet, 0 being the start of the bullet and -10 being 10 pixels back [/edit]

Deleted User
September 14, 2005, 9:07 pm
...I actually understood that...and it makes alot ot sense...I mean yeah its basic but its not something Id think about broken down into pixels per second...which would explain why alot of the bugs happen to barret users only...

EDIT: Phear it...I am a corp. so now Im movin up... XD

jbobj
September 28, 2005, 12:07 am
Here is a simple solution to the polybug problem.

Since this bug rarely ever happens when the soldat is not sticking their gun into the wall, why not just do a quick check before the bullet is fired to see if this is true. If it is, The game will act like it fired a bullet (sounds, ammo update) but no bullet is actually fired. This could be nullified for guns such as m79 and Law to still allow us to blow ourselves up. Also, at very shallow angles into the wall, you might just fire the bullet anyway and let it richochet.

This would not get rid of all the occurances of the poly-bug, but it would get rid of a vast majority of them anyway.

Pyroguy
October 5, 2005, 8:47 pm
Actually, I think the problem lies in the richochet code. If im guessing correctly, the rochochet code first checks if a bullet collides. If it does, then it checks the angle. If the angle is sufficient, it will "bounce" the bullet. However, I dont think it ever checks exactly where it is "bouncing" the bullet. So, if it were to bounce it into another polygon, then it would just repeat and repeat until the bullet either runs out of speed or comes out the other side. Now, if you were using a really fast bullet (Berret or Ruger, namely) it would only take a few frames for the bullet to "bounce out". Someone who is good with delphi might want to check this.

Blue Devil
October 8, 2005, 10:19 am
quote:Originally posted by jbobjHere is a simple solution to the polybug problem.

Since this bug rarely ever happens when the soldat is not sticking their gun into the wall, why not just do a quick check before the bullet is fired to see if this is true. If it is, The game will act like it fired a bullet (sounds, ammo update) but no bullet is actually fired. This could be nullified for guns such as m79 and Law to still allow us to blow ourselves up. Also, at very shallow angles into the wall, you might just fire the bullet anyway and let it richochet.

This would not get rid of all the occurances of the poly-bug, but it would get rid of a vast majority of them anyway.


Well, wont this make lying doen and sniping impossible? if the gun just touches a poly it wont fíre...

zyxstand
October 11, 2005, 2:19 am
poly glitching with barrets? who would do that!

jbobj
October 11, 2005, 9:04 pm
quote:Originally posted by Blue Devilquote:Originally posted by jbobjHere is a simple solution to the polybug problem.

Since this bug rarely ever happens when the soldat is not sticking their gun into the wall, why not just do a quick check before the bullet is fired to see if this is true. If it is, The game will act like it fired a bullet (sounds, ammo update) but no bullet is actually fired. This could be nullified for guns such as m79 and Law to still allow us to blow ourselves up. Also, at very shallow angles into the wall, you might just fire the bullet anyway and let it richochet.

This would not get rid of all the occurances of the poly-bug, but it would get rid of a vast majority of them anyway.


Well, wont this make lying doen and sniping impossible? if the gun just touches a poly it wont fíre...



Ok, my bad. I did not mean to say that the gun wont fire if part of it was in the wall. What I meant to say is that if the point that is considered the end of the barrel is within the wall, it will not fire. Basically, this point is where the bullet is created and starts moving from, so bullets should not be created inside a wall in the first place.

The Geologist
October 11, 2005, 9:23 pm
quote:Originally posted by zyxstandpoly glitching with barrets? who would do that!


You would.

Michal Marcinkowski
October 12, 2005, 4:11 pm
The arrow has the same collision code as the bullet. The reason for bullets going through walls are ricochets. If there are lots of polygons and the bullet is fast it just gets through by bouncing. I don't know how to fix it yet.

GluLm
October 13, 2005, 7:42 pm
I'd say remove the ricochets, but I'll get flamed. ;)