Rework entirely the hitbox system #22

Closed
opened 2020-08-09 11:20:20 +02:00 by kazhnuz · 0 comments
Owner

Before, each actor was one hitbox, and the two were equivalent. It was simple, nice, and worked well.

SO THROW THAT IN THE TRASH AND DO SOMETHING ELSE.

More seriously, this way of doing add some limitation : it made it complicated to handle origin for hitboxes, multiple hitbox, and a lot of stuff really usefull in real games situations.

So, now, how work the new hitbox system ?

There is now an “hitbox” object. Each actor load a mainHitbox as a special hitbox that will handle all its “normal” collision. Other type of hitboxes are loaded into a special list, that can either be generated manually (by adding and removing hitboxes), either by letting it be handled automatically by a file.

Each of its hitboxes are determined by a width, an height and its relative position to the actor x and y.

Fixes #17 #18 #19 and #20

(note : this was a MR before, it have been made a ticket to preserve it)

Before, each actor was one hitbox, and the two were equivalent. It was simple, nice, and worked well. SO THROW THAT IN THE TRASH AND DO SOMETHING ELSE. More seriously, this way of doing add some limitation : it made it complicated to handle origin for hitboxes, multiple hitbox, and a lot of stuff really usefull in real games situations. So, now, how work the new hitbox system ? There is now an “hitbox” object. Each actor load a mainHitbox as a special hitbox that will handle all its “normal” collision. Other type of hitboxes are loaded into a special list, that can either be generated manually (by adding and removing hitboxes), either by letting it be handled automatically by a file. Each of its hitboxes are determined by a width, an height and its relative position to the actor x and y. Fixes #17 #18 #19 and #20 (note : this was a MR before, it have been made a ticket to preserve it)
kazhnuz added the
0. Imported
label 2020-08-09 11:20:20 +02:00
Sign in to join this conversation.
No description provided.