Hitbox issues

This forum is currently in read-only mode.
  • Okay so once again referring to the Touhou games, the game can use a ton of bullets because of small hitboxes, the main hitbox is just a pixel and since I have the option that works fine but when it comes to bullets of it gets weird, if I go with per pixel then their too big, and bounding box is even worst obviously, can I make like a certain box withing a bullet for the hitbox?

    Info:

    All graphics for bullets are in the same bullet object, as frames, id need to be able to change said bounding box

    there are many bullets onscreen, so this process should not take much CPU

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I think if you make two objects, a much smaller one and use a bounding box for that, and then the larger bullet sprite, and no collision for that. Make them a container of each other, and spawn the smaller one, make that always invisible, and instance a copy of your actual bullet sprite on top of it. That should work.

    I think deadeyes platform tutorials mention something along those lines involving using another object as the collision box rather than the actual sprite. So you might wanna check those out as that's what you're looking for.

  • It might not be a good idea to make separate hitboxes for bullets in a bullet-hell shmup.

    If you want tiny, 1-px hitboxes then why don't you use Point collision? It basically turns the hotspot into the only collideable point.

    Or, if your bullets are only one frame, then you may be able to re-draw the collision mask for them.

    Moved thread to Help/Tech

  • It might not be a good idea to make separate hitboxes for bullets in a bullet-hell shmup.

    If you want tiny, 1-px hitboxes then why don't you use Point collision? It basically turns the hotspot into the only collideable point.

    Or, if your bullets are only one frame, then you may be able to re-draw the collision mask for them.

    Moved thread to Help/Tech

    He said it goes weird when using point collision, that's why I suggested the alternative. Besides, doing so would slow it down, and that would be best for all bullet hell games *grins*

    No seriously though, why not do what a lot of them do and rather than change the collision of the bullets, shrink the collision area of the player, would achieve the same effect in the end, wouldn't it. I think Progear was one that did that (only comes to mind cause I was playing it earlier heh).

  • He said it goes weird when using point collision, that's why I suggested the alternative. Besides, doing so would slow it down, and that would be best for all bullet hell games *grins*

    Hmm... I guess you can read run-onish better than I. It looked to me like FS tried Per Pixel and Bounding Box, but I see how you might have been able to translate more with the Lolsetta Stone.

    My mistake

  • > He said it goes weird when using point collision, that's why I suggested the alternative. Besides, doing so would slow it down, and that would be best for all bullet hell games *grins*

    >

    Hmm... I guess you can read run-onish better than I. It looked to me like FS tried Per Pixel and Bounding Box, but I see how you might have been able to translate more with the Lolsetta Stone.

    My mistake

    Bah, now you got me wondering if I read it wrong too lol. When he said the main hitbox was just a pixel, I assumed he meant the point/single pixel collision method and didn't actually create one of a single pixel.. or maybe he did, gah hahaha.

    Edit: I'm gonna take a guess that the weirdness is along the lines of bullets going through things cause of there being so many things on screen and frame rate suffering. But I don't know enough about this timedelta thing to suggest a fix, assuming that's the problem anyways.

  • You cant get per pixel on anything less than 2 pixels, so yeah point would be better.

    If your ship isn't terribly oblong you could try distance(x1,y1,x2,y2). Something like:

    system compare distance(bullet.x, bullet.y, ship.x, ship.y) is less than ship.width

    bullet destroy

    or what ever

    Distance works off of the image point, so as long as it comes within that circumference it should work.

    Other wise the only other thing you could try is instant hit with step, but that would be best with a percentage type of system... wouldn't really work with a bullet hell shump.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)