41 Commits

Author SHA1 Message Date
178d6a23d3 Reduce performance analysis frequency 2025-01-02 15:50:15 +00:00
e7e1b40dd9 Take ceiling of endx and endy in mapdraw()
This fixes an issue where tiles around the right and bottom edges
would not be drawn when vpos was just under a tile boundary.  I'm
guessing it wasn't noticable before fixing the frame rate as the buggy
frames were only on-screen for a hilariously short amount of time.
2025-01-02 15:43:31 +00:00
bbaf58869a Measure game code performance in engine 2025-01-02 15:35:57 +00:00
d9981d8d61 Rename app/ directory to game/ 2025-01-02 14:21:12 +00:00
2dd55b5533 Restructure game to use engine 2025-01-02 14:18:37 +00:00
b14d2f292a Create basic engine 2025-01-02 14:16:35 +00:00
c02068f1ba Move player entity into static 2025-01-02 00:18:25 +00:00
f196440112 Remove unused tests directory 2025-01-02 00:16:58 +00:00
dc53a2d8de Snap view and entity positions to grid when not in motion
This fixes some chunky movement badness.
2025-01-01 21:31:47 +00:00
e8eba7e90c Add blinking box to indicate frames 2025-01-01 21:06:08 +00:00
e48e566dd2 Round coordinates when drawing 2025-01-01 17:24:53 +00:00
cbb4b7884c Add support for map objects 2025-01-01 16:50:51 +00:00
12751a49f8 Store asset dir path in static var 2025-01-01 13:38:11 +00:00
dab37ddeff Update impassable tiles 2024-12-31 20:28:47 +00:00
8397666cb2 Write script to extract frames from a spritesheet 2024-12-31 20:07:24 +00:00
0aab456433 Load and draw additional layers 2024-12-31 13:55:34 +00:00
8de374bcfb Extract map logic into functions 2024-12-31 13:15:57 +00:00
b39189b6d1 Create entity_t struct and define entityupdate() and entitydraw() 2024-12-31 13:01:48 +00:00
e7a19b7d91 Fix camera when at edge of map 2024-12-29 18:49:04 +00:00
31f7895bf3 Support new map and tileset 2024-12-28 19:56:07 +00:00
c24cd75360 Implement terrain collisions 2024-12-28 18:57:29 +00:00
f17530af4a Use walking animation 2024-12-28 17:22:48 +00:00
c5daa136c1 Use directional sprites for player 2024-12-28 14:27:13 +00:00
10bb223bdd Move view to keep player on-screen 2024-12-28 14:01:10 +00:00
e5752a5fe7 Draw player centered on position 2024-12-28 14:01:10 +00:00
6ca053f126 Use game coordinates for view and player positions 2024-12-28 13:35:13 +00:00
fad49a7d15 Handle player motion (arrow keys) 2024-12-28 13:35:13 +00:00
39e8002caf Render player with animated sprite 2024-12-27 17:13:33 +00:00
fa7315d6b3 Implement basic map drawing from tileset 2024-12-27 16:13:21 +00:00
4151ca5717 Add some block comments 2024-12-27 12:46:39 +00:00
eaf8df0fb1 Handle map path being too long 2024-12-27 12:46:39 +00:00
296975caa1 Add assets/ directory to .gitignore 2024-12-26 20:01:01 +00:00
9234c6d421 Update README 2024-12-26 20:00:55 +00:00
c0fc016b85 Implement TMX map loading 2024-12-26 20:00:42 +00:00
57a9b20449 Create basic SDL2 application 2024-12-26 15:40:36 +00:00
12bbdce162 Add license file (AGPL-3.0) 2024-12-25 18:16:41 +00:00
7f3519bdf6 Create README 2024-12-25 18:09:04 +00:00
ad798ec0be Create .gitignore 2024-12-25 18:09:01 +00:00
69b958d393 Set up linter 2024-12-25 18:08:55 +00:00
5c49bb98ce Set up auto-formatter 2024-12-25 18:08:53 +00:00
21cf170b5a Create project skeleton 2024-12-25 18:08:50 +00:00