2017/09/21

DooM fangame: Progress Report #7 - Tile-Based Headaches

So it's been a while since I last updated, and, sadly, I got no screenies today.

I'm working on the map rendering code, having to rework a lot of it to make it function properly.

The main issue has been using bitmasks to map situations where an individual tile has different types of neighboring tiles, like say, a floor tile sitting between a chasm and a wall.

After much headache and lots and lots of calculations, I had a revelation: What if I split my 32x32 tiles into four 16x16 tiles? That way they'll be guaranteed to only have, at most, two different types of neighboring tiles!

One of the many pages...

I, of course, immediately slapped myself after that epiphany, because that's a very common technique I should've been using since the beginning instead of my usual trying to re-invent the wheel.


That settled, I also decided to turn the rendering process on its head, as, in those screenies in previous posts, what I'm doing is calculating the bitmasks for rendering each frame, for each tile, which made locating the points where the calculations were failing quite a hassle.

Now I've reworked it so I pre-generate a map with the actual texture indices for the tiles at map load, so there are no calculations done during rendering.

Currently, I'm having difficulty defining a proper syntax for the  tile mappings (that is, the definition of which part of the texture to use based on the surrounding tiles), given that I have to consider different tile types, plus some exceptions.

But I feel like I can give it all a good push this weekend. We'll see.


2017/09/12

DooM fangame: Progress Report #6 - Tileset Bitmasking

So I've managed to get tileset bitmasking working, with some literal corner cases:




The way I handle corners, is to draw them over the base tile when needed, so I don't have to use a massive tile sheet with all the possibilities drawn in.

Something is amiss when drawing specific cases, I have to find out why. In any case, it' is looking good to me, and soon collisions will be implemented!

2017/09/07

DooM fangame: Progress Report #5 - Tilesets

Seems like my guess that I'd start speeding up and posting more screenshots was correct. Hope I keep it up.

Anyways, here's today new incremental step towards greatness:


The Caco moving is not really important here, but rather the tilemap, as it is being generated dynamically from an arbitrary data set, more precisely this data set:

0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,1,1,0,
0,0,1,1,1,1,0,1,1,0,
0,0,1,1,1,1,0,0,0,0,
0,0,1,0,1,1,1,1,1,0,
0,0,1,1,1,1,1,1,1,0,
0,0,0,1,1,0,0,0,0,0,
0,1,1,1,1,1,1,1,0,0,
0,1,1,1,1,1,1,1,1,0,
0,0,0,0,0,0,0,0,0,0 

Next step is to do some bitmasking magic so tiles are rendered based on their adjacent tiles, so it looks a bit less flat.

And then, after some housekeeping (lots of temporary code floating around right now) it'll be collision time.

2017/09/05

DooM fangame: Progress Report #4 - Spritesheets

Aaaaaaand..... Spritesheets!


So here we have me fiddling with the keyboard so our friendly Cacodemon looks around. That sprite is still a work in progress, but looks quite well, I think, really looking forward to finishing it.

Unfortunately there are a lot of flaws in this implementation, mostly regarding how I handle texture coordinates, but I expect to iron them out quickly.

Next stop, tilemaps!

2017/09/04

DooM fangame: Progress Report #3 - Rendering at last!

Behold! A screenshot!



Yes, I know, it looks like the preview of the cover art I posted a while back, but it is actually being rendered in-game.

I've finally managed to crack rendering in LWJGL3!

I'm really hoping things will speed up now as I finally can see more than just log messages.

I had been postponing creating content (drawing sprites and tilesets) until I could put them in game, since that's a pretty time-consuming task and would've been all for naught had I ran out of time.

Now, having a working framework? Even if I don't make the deadline, I will certainly have something to reuse for my next project.

Onwards!

2017/08/30

DooM fangame: Progress Report #2 - Nuts and Bolts

Someone has posted a comment complaining that I don't do updates!

Such a remarkable event must be rewarded with an update! :P

TL;DR - Been working on under-the-hood stuff, so no screenies yet.

2017/07/15

DooM fangame: Progress Report #1 - Re-Setting Up

So, it's been over two weeks since I decided to set a final-ultimate-this-time-for-realsies deadline.

Stuff I've done in this time:
  • Updated the Projects page on this site. Cleaned up a few old scripts and made it all look a bit better. Still needs work, particularly the mobile version, but the whole blog needs a bit of a cleanup as far as coding goes, the standard Blogger template I don't completely like, and it's fun to tinker about.

    I'm happy about the hand-drawn DooM fangame logo though.

  • I've set up the development environment for LWJGL3 properly, mainly by looking up decent tutorials that gave me a basis for all I need (tiles, sprites, shaders, UI) and adapting it to my coding style.

    So I expect to have some workable demo to show here in a short time.

    The code I'm using is from ElegantWhelp's LWJGL3 tutorials.

  • Just right now I found out that my scanner is still alive! I was already looking for replacements, but it seems like the poor thing (it is more than 10 years old!) was just being bullied by the OS, which was taking its sweet time to recognize it over the USB connection.

    This means I've been able to scan the following entry.

  • I got a cover!


    The above is a low res version of the scanned inks. I will colour in and pixelize the whole thing digitally, possibly using Krita, which I'm taking a liking to, although I expect the result to be as pixely as the above (320x240).