a-game

2D platformer written from scratch.
git clone git://git.amin.space/a-game.git
Log | Files | Refs | README | LICENSE

commit 2f6166208b9f82d3b089eaa262ad949de81d0f3a
parent d86c00fef61101315fa5484c7314584a5888e55e
Author: amin <dev@aminmesbah.com>
Date:   Mon,  1 Apr 2019 01:52:01 +0000

Make player smaller

FossilOrigin-Name: dfae07fed909dbe519d092f69b0bb736d847e511490120eaf5867d318ce1f643
Diffstat:
Msrc/game.c | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/game.c b/src/game.c @@ -110,6 +110,9 @@ void game_update_and_render(struct GameState *game_state, f32 dt, v2u framebuffe //glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); + // In Knytt, the player is a 9 by 14 pixels and a tile is 24 by 24 pixels + // TODO: Use world coordinates for everything other than rendering + // render tiles { glBindVertexArray(game_state->tiles.vao); @@ -206,7 +209,7 @@ void game_update_and_render(struct GameState *game_state, f32 dt, v2u framebuffe glBindVertexArray(game_state->tiles.vao); m4 model = glmth_m4_init_id(); model = glmth_translate(model, (v3) { player.pos.x, player.pos.y, 0.0f }); - model = glmth_scale(model, (v3) {15.0f, 30.0f, 1.0f}); + model = glmth_scale(model, (v3) { 9.0f, 14.0f, 1.0f }); shader_setm4(&game_state->tiles.shader, "model", &model); v3 color = (v3) { 1.0f, 0.0f, 1.0f }; shader_setv3(&game_state->tiles.shader, "color", &color);