-
-
Notifications
You must be signed in to change notification settings - Fork 115
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
Hitscan weapons #47
Comments
On updating the bullet, it will need to draw out a line to the destination, checking collision at each tile, and step (if tile is not empty). An easy way to do it is to give it a suitable speed, then update in a loop until its range is complete. To represent, add a bullet attribute For drawing, we'd probably want a new attribute: Weapon ideas:
|
Depends on #372 Since hitscan weapons play nicer with antilag, we may want to change some existing weapons to be hitscan too, like:
Also, with the addition of bullet mass (#444) it doesn't make sense to use speed/range anymore. Instead:
|
Actually, with #372 (almost) done, hitscan weapons aren't any different from normal weapons - they just move really fast. So they are still represented using But then there's the question of how to draw the trail. This could be done using SDL_RenderCopyEx, possibly with a new |
Another cheap option is to draw a simple line with |
This is actually going to depend on #440, since trails need to be part of the map, occluded by walls etc. |
Warning: GCW-Zero has a bug where SDL_RenderCopyEx is broken - it always renders unrotated at 0,0. Will need a workaround, or disable trails for GCW-Zero. |
Fix bullet bounce pos/vel for destroyed bullets, so that trails render correctly
This will also require drawing the bullet, in a way that has nothing to do with its hit detection.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: