-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
17 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
This is towards the goal of making the world more 3D. | ||
|
||
Everything will have a position in 3D space. Not, like, actually, like using a 3D camera or anything; but in a abstract way. The hitbox of entities will only be around their feet, instead of their whole sprite. | ||
|
||
Tiles will be similar. Some tiles will take up the whole 32x32 in the x/y world plane, and that's fine. That can be specified. But the height won't, it will just be the height of the sprite. Now, where should the sprite be anchored..? X center of the sprite with the x center of the tile, but for Y... I guess that will have to be specified too. | ||
|
||
Basically, tile sprites (and entity sprites) will specify a rectangle of pixels in each sprite that serves as its hitbox. Animations will also specify an anchor offset for sprites of different sizes, and whether the distance to the left or right should remain the same, and top or bottom; or the sizes will just be the same. | ||
|
||
Maybe multiple rectangles for hitboxes, idk. Though that could get difficult to deal with fast. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
I just had some cool thoughts: hitboxes can be made out of a collection of overlapping rectangles, for all collision checks. If any rectangle from one hitbox overlaps a rectangle from another hitbox, then they can be considered as colliding. | ||
The only issues I see with this is deciding exactly which direction to go to back out of a collision. I bet I could firgure out something given time, though. | ||
|
||
The other thing: property maps. After seeing the utility of a DataMap for tile properties, I kinda wish I would have done that for everything. Sure, my previous tile system was property-based, but it had all the properties integrated into a big ol' system. I kinda like the "if has property, do action" sorta setup. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters