shmups.system11.org

Shmups Forum
 
* FAQ    * Search
 * Register  * Login 
It is currently Sun Dec 08, 2019 3:13 am View unanswered posts
View active topics



Post new topic Reply to topic  [ 33 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Do all bullets check hits every frame ?
PostPosted: Sun Sep 29, 2019 1:15 pm 


User avatar

Joined: 13 Sep 2019
Posts: 75
Oh, you mean line intersect.
I am not using line intersect, i dont know the math.
I might need the math for a laser beam that can shoot any angle.

You can tell how it works ?
thanks


Top
 Offline Profile  
 
 Post subject: Re: Do all bullets check hits every frame ?
PostPosted: Sun Sep 29, 2019 5:06 pm 


User avatar

Joined: 21 Apr 2012
Posts: 306
Location: West Coast, Canada
I used a raycast (what you're referring to when yous say "line intersect") for lasers in VariaBULLET.

Image


For the angle it shouldn't matter what your collision method is however. I made the laser rotate relative to a parent object and scale on the x axis.

There are some hidden issues you'll come across such as the raycast colliding with objects through the wall.

Lasers ended up being the most complicated shots in the system (homing being a close second).

If you can find a system to use in an engine, I'd recommend you pick one up. I'm glad I spent the time to make my own but if someone else made it I would have gladly bought it and moved on with development.
_________________
ATTN GameDevs: Easily make BULLET HELL patterns visually with VariaBULLET2D!


Top
 Offline Profile  
 
 Post subject: Re: Do all bullets check hits every frame ?
PostPosted: Mon Sep 30, 2019 1:02 pm 


User avatar

Joined: 13 Sep 2019
Posts: 75
I got the homing figured out cheap, with subtracting 2 vectors.
Then no expensive math-functions are involved.
I have to look what it was exact if you intrested, havent tested yet.

For rotated laser i wanted to use many box intersects, that is not the perfect way i think.
Raycasting is also math-functions involved ?, it sounds very expensive.

I look at the size of the target, and limit the maximum frame time, then i am sure the bullet can not pass the ship on a certain maximum speed.
If you dont limit the speed or frametime then you need raycasting for sure.

I also like this trick very much i want to implement,
if you look at batsugun or battle garegga you see when power up.
The bullet is double as big, the texture is repeated, so it looks like 2 bullets, while you only check once.
That you dont see individual explosion you wont notice in the chaos.
Make sure it deals double damage, maybe increase hitbox.


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 33 posts ]  Go to page Previous  1, 2

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Space Pilot 3K template by Jakob Persson
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group