Multiple hitbox in one Sprite

Discussion and feedback on Construct 2

Post » Tue May 26, 2015 10:28 pm

Hi! this is an idea that i think will help a lot of users creating fighting games, the idea is simple,
construct 2 already have collision polygons but you can only add one per sprite, so i think it will be awesome
to add more than 1 hitbox, i know you can code hitboxex by putting other sprites but that will end with a game
fully of sprites.
Image

Image
B
38
S
14
G
7
Posts: 408
Reputation: 8,338

Post » Tue May 26, 2015 10:43 pm

You can add other hitbox sprites to a container with your player so, when you create the player then all of the hitboxes are created as well. Careful positioning of image origin points will ensure they are positioned where you need them - then just use On Created (player) to pin each hitbox to the player. Not multiple collision polygons, but it's really just the same thing IMO.
A big fan of JavaScript.
B
76
S
20
G
74
Posts: 2,248
Reputation: 46,470

Post » Fri May 29, 2015 6:27 am

but those hitbox will be sprites??? if are sprites you will end up with a game full of files and very fat files.
Image

Image
B
38
S
14
G
7
Posts: 408
Reputation: 8,338

Post » Fri May 29, 2015 10:05 am

You only need a few and if you're concerned about memory or download then just make the image 4x4 and then stretch the first instance to whatever size you need so the others that are created will be that size as well. If they are set to invisible then they will not use any GPU time. So far for Umbra I'm using 9 sprites as sensors that move with the player to check for various collisions or overlaps with the scene... Total memory used is negligible :).
A big fan of JavaScript.
B
76
S
20
G
74
Posts: 2,248
Reputation: 46,470

Post » Fri Jun 12, 2015 6:40 am

@colludium .. OT but, you're a biker? Biker that makes games? Hi five.
Krish
Hey! Did you know that you can hire me to make your games?

Click Here to See More
B
21
S
6
G
5
Posts: 391
Reputation: 5,662

Post » Fri Jun 12, 2015 10:42 am

Hey @krish - high five back! That pic was taken a couple of years ago... I'm currently 'enjoying' a holiday from biking because there are no race tracks near where I live. But it never leaves your soul!
A big fan of JavaScript.
B
76
S
20
G
74
Posts: 2,248
Reputation: 46,470

Post » Mon Jun 22, 2015 5:42 pm

Colludium wrote:Hey @krish - high five back! That pic was taken a couple of years ago... I'm currently 'enjoying' a holiday from biking because there are no race tracks near where I live. But it never leaves your soul!


haha, yup. It's irreversible once it gets in :) Hope you find yourself to tracks soon.
I was cross-country & international touring and all till now, and no track here too, until recently there opened a small chicane circuit... not a fast track but just works :)
Krish
Hey! Did you know that you can hire me to make your games?

Click Here to See More
B
21
S
6
G
5
Posts: 391
Reputation: 5,662


Return to Construct 2 General

Who is online

Users browsing this forum: rgunawans and 13 guests