Devlog #5: Texturizor


I'll try to keep this update fairly short but there's quite a bit to go over :)

A lot of effort has been put into perfecting the level geometry parser, and this time around that energy has be put into  what's referred to as the two sided middle texture. Let's take a look at this example: 


Image result for doom "middle texture" -3D"

As you can see walls are generally made up of three textures, Upper, Middle, and Lower. In most cases only the middle texture will be visible, for walls that are designated as 1-sided. This version of the middle texture is pretty straight forward and quite easy to parse. However the Middle Texture that lies on a two sided wall is far more complex. In this case, the middle texture does not repeat vertically in traditional doom map formats. In fact the geometry for a two sided middle texture will sometimes not even extend the full height of the wall, and setting the vertical offsets for this texture will actually change the location of the geometry on a wall segment, much like the fence in  this image:


As you can see this is something that we've now implemented into Dopefish. In previous updates middle textures were, well, broken:


Compare that to how it's actually supposed to look:


So you can see things are looking pretty great for the level generator itself, now let's take a look at some of the other texture related changes to the engine.

In order to test out the features of DopeFish while adding them to the engine, it was important to me that I began creating a custom map as a showcase of what the engine could do. So I downloaded the OTEX.wad texture pack that was used in the construction of the great megawad Eviternity:

Eviternity

Release Thread
After fiddling around for a couple of hours I managed to have the start of a pretty cool looking blood castle:


This is great! Except.... what's that seam on the cliff face? The heck? Turns out that's not a problem with Dopefish! This is actually showcasing a limitation of the original doom engine. Texture patches can't exceed a height of 254 pixels, and that texture there is 256 pixels. I can't tell you how long I messed around with the map, and the engine code until I stumbled upon the solution while doing an internet search. This texture pack has what they call Boom compatibility. This means there are features in this texture pack that are not supported by the original Doom source port, in this case, DeePsea Tall Patches. This is a method for storing larger textures in the wad format without having to actually change the format at all. You just have to change how you read the format. After a few hours of trying to decipher the format I finally finished implementing the Tall Patches feature. Now DopeFish can load textures as tall as you can imagine, just look at this, that chain texture there is hundreds of pixels tall and wide (it's currently cropped to fit smaller geometry) and it's working just fine! And no more seams too!


And finally the last thing i want to glance over really quickly is middle texture alignment. Let's take a look at this section of the castle interior that I built:


You can tell something weird is happening here, those skull textures are completely misaligned. There's reason for that. You see middle texture alignment can be an odd thing because sometimes the height of the wall actually extends far beyond the height of the ceiling, as evident in this image here taken from the map editor I was using:


Here you can see that the textures are aligned properly, in fact the top of these textures is perfectly aligned to the height of the ceiling. This means that I needed to change my code to shift the textures downward by the amount of world units that separate the height of the wall from the height of the ceiling. And with that, we finally have excellent texture alignment. Here, have some more screenshots and whatnot!



I hope that this has been an enlightening devlog for you guys. I want to let you all know I greatly appreciate your support through this development process. I'm working painstakingly on getting this engine optimized enough to release the WadLab. You can expect to hear more about these optimizations in the next devlog!

Cheers!

Get DopeFish: Now Open Source!

Download NowName your own price

Comments

Log in with itch.io to leave a comment.

This is actually really exciting stuff!! I really hope this gets more views all this hard work.. And the concept of this would save people a ton of time when they can use tools they are familiar with.

That is my exact goal for this. There are so many tools out there for crafting incredible maps that are highly interactive. Having support for these features in GMS just might make it a little less scary for people to dip their toes into crafting 3D content!