xavieran / BaKGL

Remake of Betrayal at Krondor using OpenGL
GNU General Public License v3.0
43 stars 3 forks source link

Suggestion - Open the graphic format somehow to achieve hi-res packs #207

Open Tormentor667 opened 4 hours ago

Tormentor667 commented 4 hours ago

I wonder if there is a chance to open the gfx-format somehow so people could make hires packs for this project. I am a graphics designer myself and would be very interested in contributing to this.

xavieran commented 2 hours ago

It's certainly possible, I can just add support for some other format to the engine. What do you think you would need in order to do this?

The original game uses the following very simple 3d format: https://github.com/xavieran/BaKGL/blob/master/bak/model.hpp#L71 A list of vertices, then a list of components made up of vertex indices. The texturing is achieved by giving each face an index into a list of textures, alternatively a face can just have a colour instead.

I will spend a bit of time later today describing the format in more detail.

The engine's (current) internal format is the following: https://github.com/xavieran/BaKGL/blob/master/graphics/meshObject.hpp#L21 And is probably a bit closer to what a modern graphics engine would use.

For the 2D UI (inventory, inns/shops, etc.) the game just uses BMP files. These can be easily substituted. I have hand coded a lot of UI dimensions and coordinates so some work would be required there to generalise the UI code to make it easier to use custom formats.