Commit graph

201 commits

Author SHA1 Message Date
Sara 635fb7b69f removed impl macro for default physics solver 2023-10-24 23:18:55 +02:00
Sara 4047d04686 renamed physics_entity_solve_contacts (was default_contact_solver) 2023-10-24 23:18:13 +02:00
Sara e86fa1bdef implemented collision constraint solver 2023-10-24 23:14:30 +02:00
Sara 256fef97d9 Did not implement edge based collision (performance concerns) merged other modifications 2023-10-23 21:59:30 +02:00
Sara 0a9c6745ad added shape_get_points 2023-10-23 21:59:05 +02:00
Sara fa2ca7241c added anglebetween to vmathf 2023-10-23 21:59:05 +02:00
Sara 1f56608950 shape now has shape_get_points for getting the List of points 2023-10-23 21:59:05 +02:00
Sara d76f9a0af9 Merge branch 'main' into edge-based-collision 2023-10-23 21:59:05 +02:00
Sara a84e8dbc5b added shape_get_points 2023-10-23 21:54:01 +02:00
Sara 919aa8406b shape now uses list 2023-10-22 12:02:05 +02:00
Sara f373fada26 added custom collision solvers 2023-10-22 11:25:44 +02:00
Sara 788c1970e2 disabled some debug drawing 2023-10-19 18:04:27 +02:00
Sara a52169892d separated rigidbody handle and solve contact functions 2023-10-19 18:04:13 +02:00
Sara 90b93a8817 replaced spring function 2023-10-19 18:03:34 +02:00
Sara 9541157e04 disabled sprite drawing for debugging 2023-10-19 13:51:24 +02:00
Sara aa9a51dc76 improvements to collision solvers 2023-10-19 13:51:17 +02:00
Sara 169fd63d9e now also displaying force in debug display 2023-10-19 13:50:58 +02:00
Sara 092e8670cd player now spawns at 5,-5 2023-10-19 13:50:43 +02:00
Sara b8ae02109a collision relative velocity is now calculated in one line 2023-10-19 13:50:35 +02:00
Sara 37b1fc3228 implemented velocity verlet integration 2023-10-18 22:51:56 +02:00
Sara 2b1014e603 modified hardcoded values for collision forces 2023-10-18 13:49:54 +02:00
Sara 19daff6ddd using better method to decide whether or not a collision is valid 2023-10-18 13:49:41 +02:00
Sara ed274c415f IT FUCKING WORKS (collision resolution is now working) 2023-10-18 13:21:02 +02:00
Sara 74369d88fe more debugging for collision sovler 2023-10-17 17:17:16 +02:00
Sara c7e6b2aa29 progress on physics 2023-10-16 21:31:48 +02:00
Sara 6cc16cf1f8 moved input code to player.c 2023-10-14 20:55:21 +02:00
Sara 30c1e780a1 added contiguous dynamic length array List 2023-10-14 20:54:59 +02:00
Sara a7846a48d9 player is now of type Player 2023-10-08 23:10:48 +02:00
Sara 47264c3da3 added tilemap collision 2023-10-08 23:10:37 +02:00
Sara 878b4c5595 added debugging logs for player collision 2023-10-08 23:10:27 +02:00
Sara 4e966b42a8 player now implements SpriteEntity 2023-10-08 23:10:13 +02:00
Sara c1e99e5038 now initializing, ticking and cleaning physics world from program_run 2023-10-08 23:09:41 +02:00
Sara 25e4fa652c added shape_new_square to construct a square collision shape 2023-10-08 23:09:17 +02:00
Sara d3d5382eb5 formatting changes 2023-10-08 23:08:56 +02:00
Sara 49191e85ba transform_point now more explicitly rotates input position 2023-10-08 23:08:38 +02:00
Sara 9783774a7b tilesets now have a 1x1 square as a collision box & implemented tiledef_get_shape 2023-10-08 23:08:09 +02:00
Sara 6bb5fe7837 tilemaps now have a rigidbody, tile instances refer to their containing tilemap 2023-10-08 23:07:30 +02:00
Sara 6df816e778 added sprite entity trait 2023-10-08 23:07:04 +02:00
Sara ac24521b34 camera_world_to_pixel_point now also takes camera fov into account 2023-10-08 23:06:47 +02:00
Sara 62410b7d72 prefixed internal helper functions with _internal 2023-10-07 23:00:31 +02:00
Sara a108aa21f7 physics entity interface now requires a callback for collisions 2023-10-07 23:00:03 +02:00
Sara 37008f455e the physics world will now work for physics entities 2023-10-07 22:59:24 +02:00
Sara 7337592855 added behaviour entity type 2023-10-07 22:58:51 +02:00
Sara b7721baeb7 collision_check will now return 1 if there is a collision, and write collision data to the new out variables 2023-10-07 22:58:15 +02:00
Sara f237da1b93 renamed self to data for transformable interface 2023-10-07 18:43:30 +02:00
Sara 59f6c7d1ee moved shape overlap code to collision.c 2023-10-07 18:42:38 +02:00
Sara 6f49f846cc renamed self to data for impls 2023-10-07 18:42:28 +02:00
Sara c136bc1494 implemented basic player struct with impl for behaviour physics and transformable 2023-10-07 18:42:09 +02:00
Sara 9c0c354fcd physics entity now extends transformable 2023-10-07 18:41:12 +02:00
Sara 8c78395219 changed other type of collision to PhysicsEntity and added separation force 2023-10-07 18:39:57 +02:00