Libove Blog

Personal Blog about anything - mostly programming, cooking and random thoughts

Tag: gamedev

#

#gamedev progress:

Can now place pictures in frame.

A framed picture of a house in a 3D game


#

#gamedev progress:

  • Added signs to each corridor showing to which room it leads.
  • The frame is build with a "9 patch" geometry.
  • Added alignment options to my text rendering function to allow centering the text inside the frame.

A sign showing "Room 8"


#

#gamedev progress:

  • Implemented a loader for OpenRaster files. This allows me to bundle all textures needed by an object in one project file. (inspiration by tsoding)
  • Reworked rendering to use a tint texture instead of a global tint intensity. This allow to have parts of objects untinted.

Game screenshot showing 3 flasks tinted in different colors. The label is not tinted

#rust #wgpu


#

#gamedev progress:

  • added a simple debug UI, as it got unfeasible keeping these options on function kes.
  • reworked lectern. It now has 3 places where flasks are placed. Flasks will be used to change drawing color on scrolls.

New lectern design with 3 flasks of different colors


#

I've implemented a simple rectangle packing algorithm, which I want to use for the font texture.

The algorithm is only 40 lines long. It keeps track how far each row is already filled and greedily inserts rectangle at the place where they are "most to the left", starting with the tallest rectangles.

Debug rendering showing 1600 random rectangles packed into a canvas

#rust #gamedev



#

#gamedev progress:

started work on a scroll, which will be used for drawing. Got the system setup to show a debug image.

Screenshot showing a scroll with a debug image. The scroll floats in a room with shelves.


#

#gamedev progress:

I've did a larger refactoring of the "level" generation in order to allow infinite levels. Each room is created individually and on creation a number of corridors are created. Each corridor has "portal" at the end connecting to another room. Rooms are only loaded once the player enters a corridor. This way only two rooms have to be loaded at a time.

Walking through the level with debug lighting. You can see the next room popping in once the player enters a corridor


#

#gamedev progress:

  • reworked application init to avoid unnecessary Option<_> wrapping
  • implemented lectern logic. Books can now only be edited on the lectern.
  • started work on saving. Edited books are now stored as txt files and loaded on start.

#

#gamedev progress

Prototype to write in books. I will have to refactor input handling. Currently I'm passing a big struct with the state of each key into the update function. This does not work well for typing.

game recording showing writing in book