What? I have a blog?!

Yes, I've been away for a while... Choose whatever excuse you prefer: Work, Exams, other Exams, or lazyness. End result is the same.

There hasn't been much progress on the project lately, mostly because I'm dumb and try to do too much. Thing is, I've been trying to merge the LWJGL source with mine since there are many point in which they both match, and, truth be told, I just love to take programs apart to see what makes them tick.

This time, once I saw how it ticked, I realized it'd be stupid to do what I was trying to do, and have thus been reverting back to my previous setup, with the intention of just linking to the LWJGL libraries instead of integrating them.

So now I'm working on that, and also moving code around to where it should be. Turns out I've built most of the existing code under a "test" namespace, while all the proper namespaces for the different pieces of the engine sit there, sand and empty, while the "test" namespace grows big and bloated.

I'm thinking about doing another mockup, just to get me in a more positive mood. Ironically, using per-pixel lighting makes it harder to produce a mockup manually than it was when I intended to have simple overlayed shadows. Maybe I could do the mockup in-engine.... Yeah, that sound interesting.


miniDooM: GlooMy...

I've been tinkering a little more with the lighting code, as well as the textures. It is starting to look rather good:

There's a trick to that image, though... It is actually done using GLSL shaders through the LWJGL libraries.

I still need to benchmark it, but performance is way better. I might even get an animated gif once I figure how to avoid making them so heavy.

On other news, I've gone through all the archives and renamed the project from DooM-4K to miniDooM, as well as doing some typo hunting.

I'd better stick to that project name, lest I have to do the whole renaming thing again.


System Fault That Happens Over A Distance

Funny thing happened recently. I got my hands on the latest (as of this writing) Weekly Sale from Humble Bundle, a collection of rogue-like games, and my attention was drawn immediately to the game I'm plugging talking about today:

Why do I want to talk about this game?


miniDoom: In Light of New Events...

Wooo! Real-Life twice-a-year obligations I can use as an excuse to post nothing over! (for now)

Actually, it's not like I haven't been doing anything during this latest exa... excuse period. I was a little burnt out with the polygon/collision detection code, so I've been tinkering with something else. And now, to appease my ego: Let there be LIGHT!

As I usually do, the breakdown:


miniDooM: And There was Motion (and Polygons!)

So I finally decided to stop stalling and got around to installing and using some screencast capture software on Ubuntu. Here's the result:

Now for the analysis:


miniDooM: Intersecting...

Will you look at that? Turns out the largely untested intersection-detection code I had written is actually working! Must be my birthday...

Yes, that red line is the green Doomie "shooting", and yes, that square is indeed rotating and the intersections update properly... I really need to get on to recording animated gifs of these updates...

miniDooM: More Polygons

So I fixed the issue with the edges not rotating properly. The problem was... that I wasn't using the proper method (of the ones I programmed myself), so yeah, a bit silly, but, on the bright side, I got to test that other method too!

I've also realized why the polygons kept growing as I added more sides, and, again, it was a case of the algorithm working properly and me not using it correctly.

The thing is that, in order to create regular polygons, I would calculate the radius (distance from the center to a vertex) based on the side length, the formula being:

radius = sideLength / ( 2 * Sin ( 180 / numberOfSides ) )

Which means that, for a constant side length (as was the case in my tests), the radius will change as the number of sides changes.

So I've added a method that accepts a fixed polygon radius rather than side length, and here's the result:

For those who care to know:

Polygon2d( Point2d center, double radius, int edgeCount )

Oh, and yes, they are all rotating.

Incidentally, I need to rework that hexagon grid floor, it pops way too much for a floor texture.