new posts

This commit is contained in:
nek0 2020-12-23 17:52:16 +01:00
parent c55b94cdf0
commit 35d8c9dd6a
4 changed files with 76 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

View File

@ -0,0 +1,44 @@
---
title: Tiles and maps
author: nek0
tags:
- "devlog: pituicat"
- english
description: Putting previous stuff to use and walking steadily forward
---
Hi there!
Another weekend passed and another step has been taken. Last time I was
struggling my way through OpenGL and got a single quad displayed on screen,
which I had hardcoded there. The next step I decided to take was reading level
maps and generate quads where tiles would be and texture them properly.
I had already put some thought into how to store level information.
May train of thought here is, that tiles are static and arranged in layers
above each other. To represent that I use a simple bitmap picture per layer.
every single pixel in this bitmap represents a tile. The red channel contains
the information of the tile type (at the moment there are only solid tiles,
platform tiles and decoration tiles). The green and blue channel mark the
offset on the tilemap. To make the information visible to the naked eye, the
information is stored inverted, so that filled areas appear white and empty
areas black.
I will have to figure out dynamic objects like collectibles or enemies later.
So after defining types for the tiles, the tilemap and the level map I also
defined a rather generic typeclass for anything drawable to spew out vertices
with texture coordinate information. Putting my game on the screen now looks
like this:
![Screenshot](/images/2020-12-14_preview.png "a black screen with white tiles")
Making progress is fun and I enjoy making it in my own bespoken way, though
havig to think in different coordinate systems at the same time (OpenGL
coordinates vs. Image coordinates mostly) can cause quite a headache and some
rather fun bugs.
As always, feel free to check out the code on [my gitea](https://gitea.nek0.eu/nek0/pituicat).
See you next time!

View File

@ -0,0 +1,32 @@
---
title: Player ready
author: nek0
tags:
- "devlog: pituicat"
- english
description: Progress yields now a displayable player character
---
Hello again and welcome to my little corner of the internet.
Between some christmas preparations and work I was able to squeeze in also some
development time on my game again with some visible results.
Most of the time I was preparing plumbing again for static objects (called
"Props") and interactable entities (called "Actors") to be displayed on top of
their according layer of residence.
After having the plumbing ready I created an entity for the player to be
displayed and this was the result:
![Screenshot](/images/2020-12-23_preview.png)
The player does not move yet and does not interact with anything, so the
graphics just sit there, but I am still quite happy for it to work.
Next up I will probably start implementing keyboard interaction, so the player
can actually move.
Until next time.
Keep calm and wash hands.