-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Discussion: Precise collision for 3D models and sprites #1300
Comments
This is impressive, I wasn't aware that GZDoom can do that. I really like the possibility though and I'd be happy to have it part of BoA - especially when damage dealt to the head is stronger. I see a lot of fun happening with the sniper then. Regarding the hitmaps: Can you share how they are looking like? |
Here is an example regarding point 2 (for BoA, but the map has Doom II textures I did not bother to change): spritetracerv2.zip Warp to MAP01 slot, then high-five one of the imps to open the door (by pressing 'use'). If you slap him in the face instead, you'll be punished. Note that there are some +FLATSPRITE +ROLLSPRITE imps and some normal ones, angle, scale and roll are also accounted for. Then Does not currently work well with soldiers (and |
The hitscan-3D model collision code for tanks seems too contrived, I was not able (at least yet) to backport these changes into BoA without bugs. This has to do with e. g. I have a working example, but it is not built on BoA and cannot be modified easily. |
Well ackchyually I've managed to do 1. If anyone @Tormentor667 @Talon1024 @Ozymandias81 wants to check it out in BoA, it is in the branch I also decided I'd rather post my non-BoA example here. Yesterday I had failed because I wanted to incorporate every feature from this example at once.
Features:
As it is just a testing example, you can shoot way faster than the enemies. Please note that the damage will only be dealt if you shoot the hull or the turret (as the crewmen and the most important modules are there), and most of the details (like the gun, tracks, or fuel tanks, which are supposed to be empty during battle) are removed from the collision models! The models that are used in the calculations have around 200 triangles each, and the hitscan-model intersection algorithm is currently brute-force. If it becomes a performance problem, an octree generator would be easy to integrate here, but it would have to be written first :-) (I have never done it myself yet). |
Did anyone by chance have time to test the examples (two in the posts of this issue and one in a separate repository branch)? I am not going to do radical changes of this sort to |
Finally time for some answers. I tried it and I have to admit that I like it a lot and would like to see it at least for regular human guards incorporated. Would be nice to have but I have no idea how much work is involved and who could actually do it. On the other hand, we should also ask: How much will it impact gameplay? And is it worth the effort in the end? What do others think @Ozymandias81 @Talon1024 @AFADoomer @DoomJedi ? (will comment the rest later, just need to pick up my girlfriend from the train now) |
Could you be so kind and share me a download file? I am not very used to branches so I do not know how to make it on my own the best way. |
@Tormentor667 Eh, with my internet connection an upload of 700MB will take a few hours...
After doing this, you can return to the |
Here is a link to the version that was built from the branch: https://drive.google.com/file/d/1a9WqaZTXfMNqFTHBoQILYi8hoWlopRp8/view?usp=sharing |
Thank you, just got home from my vacation, will check things out next week :) |
@Tormentor667 decided that the tank concept is not suitable for BoA, and I have not yet started work on an hitmap generator, so I'll have to confine these features to my mod (if it ever gets done) :-) |
Now that we have around 50% less issues than a month ago, it's again time for some new features :-)
I have recently (March and April) written some code for precise collision on:
The bullets won't anymore score a hit when they hit the Doom hitbox but miss the enemy sprite or model. You can snipe enemy heads, shoot their arms for lowered damage or even miss an enemy and hit someone behind him.
Collisions are calculated for pointwise bullets/tank shells; in models, for hitscan imitations of
FastProjectile
s (these are used so very high speed projectiles do not become a performance drain), and in sprites, for (almost stock) BoA bullets. The code can be easily converted to either type.I would rather not wager all of this is completely bug-free for now, but both cases seem to work well during my tests, and I would like to ask the team members @Tormentor667 @Ozymandias81 @Talon1024 for opinions.
Should I try to do the following to the base game:
FastProjectile
bullets into hitscan imitations, for performance reasons?3 would be easy.
For 1 I already have a few tank hitboxes and a testmap (if anyone is interested, I can share it), it is built upon BoA tank code but with heavy modifications.
For 2 we need the hitmaps, which will be a huge task, however I have already done it manually for the Afrika Korps guard (around 80 sprites), and won't have to do other soldiers from scratch; I also have a demo.
I'll do any of these in a separate branch so we won't have to revert the master. Then, if the results are fine, you'll merge it.
The text was updated successfully, but these errors were encountered: