Tuesday, March 31, 2009

FSF shoots itself in the foot/MHColour Update

In other news: absence of airborne pigs continues.

I don't know how old this article is, but their "Explaining why we don't endorse other systems" page (at http://www.gnu.org/philosophy/common-distros.html) lists Ubuntu as one of the "other systems" that they don't endorse, with the reason being that it's not 100% "free" (by their definition, although who gave them the right to rewrite the definitions - or exclude common alternate definitions - of English language words as they see fit, I sure don't know).

Now, the point of the page is to promote the "gene pool purity" thing I mentioned before, but it totally misses the key point which is that in order to get people using their OS of choice, there has to be a version of said OS out there that people (who are not Unix afficiandos) will use. Ubuntu is the current flavour of the month for user-friendliness and reduced-pain-of-transition, so the hypothetical prospective user now has another reason not to dip their toe in the water.

Talk about a rock and a hard place - far better to have not published that article in the first place. Sorry folks, but ideological crusades just don't make it. You'll never get over the last hurdle of acceptance by Joe-User-Who-Just-Wants-To-Browse-The-Web-And-Stuff until you start getting pragmatic. Joe-User hates Unix-like OSs, here you had a golden opportunity to sell him on one that he could use, and you blew it.


Rant Over
There's a mini discussion on QuakeOne.com about the LIT files generated by the old MHColour utility I wrote back in the year 1536. I've been aware almost from the start that these lit files had lightmap corruptions on certain surfaces, caused by the program generating slightly different sized lightmaps in some cases than those generated by the original light.exe written by ID. As each surf has it's own lightmap offset, and these are stored in the faces lump in the BSP rather than in the lighting lump, the old MHColour attempted to fit the new lightmaps into the same filespace as the old lightmap was in, but in some places (where there are multiple lightstyles on a surface) things just didn't match up. I've had for some time (and released a short while back) an updated version that - kinda - fixes it by also regenerating the original light data, but this produces LITs that are only compatible with it's own BSPs. Now I'm getting the itch to go back and do it right, especially as I have a better colouring algorithm and a better understanding of the code and file formats involved. So - while DirectQ will remain on hold on account of this - I may be making a release of a new MHColour, and possibly even a full ID1 LIT file pack before the end of April.

Tuesday, March 24, 2009

DirectQ Temporarily on Hold

I'm putting DirectQ temporarily on hold while I'm working on something for another passion of mine - audio editing. This has been an on/off hobby for quite some time now, and I'm getting the itch to do something new with it right now. I might release whatever I come up with or I might not; it's certainly a useful tool that I've seen people in other places looking for (if your curiosity is burning a little, hold fire for a bit - I'll reveal more when - and if - I get things coming together well).

Hopefully this won't take too long.


Some relevant points have emerged as part of this exercise, however.

Firstly, and I've said it before elsewhere, but I am of the opinion that the GPL can be an extremely restrictive license in certain circumstances. I'm feeling it with this current project; right now I have a certain amount of code taken from elsewhere, all of which is free, but none of which is GPL. I'm not willing to take risks on whether or not the licenses are GPL-compatible, so if I release this, it won't be GPL. This is a practical problem, whereas with the GPL the focus seems more on maintaining some kind of Free Software gene pool purity. The irony here is that the GPL mentality seems to have ended up being very right-wing, despite all best intentions (this, by the way, is one reason for a lot of my previous derogatory comments on Linux).

Just read the "what you should not say" section on the FSF site - Thought Police, anyone?

Secondly, the quality of tutorials on a lot of things leaves much to be desired. I found this with OpenGL, and I'm finding it now (to a greater extent) with FFT and spectrum analysis. The information available falls into two main camps; it's either very mathematically intensive or it's extremely basic. One thing I need to do is obtain a full spectral analysis of a Wave file - not in real-time, just the full file data. Good luck with finding anything that's useful for that. You can get some reasonably decent basic FFT material, but beyond there you're straight into the realms of Masters Degree level technical papers. The inbetween sweet-spot just does not exist.

Thursday, March 19, 2009

Todays Updates

A little bit done today; making the new Multiplayer game config menu work with runtime game changes, and some particle system reworking. I think the particle system is about 50% done; it obviously needs some optimizations (grouping particles by texture for example is one thing) but the functionality is coming on well.

Won't be updating for a few days; until Wednesday at the earliest.

Wednesday, March 18, 2009

Another Engine Update

Today I finally tackled one outstanding item in the Menu code, and wrote a proper "Apply" option for vid_mode switching; this means that it will no longer switch immediately as you browse through the available modes.

This is handled using Enable/Disable/Show/Hide calls on menu items, so I will probably end up going through the rest of the menus and seeing where I can clean things up with these. The Multiplayer New Game options are one for sure (actually this is now required as a result of game switching).

I've also added in better looking blood particles (optional and off by default, remember...), making it smoke, tracers and blood that have now been done. I think I'm going to leave the explosion largely as is; the reason being that a different effect would mean having to hack out the sprite, which in turn means that mods which use custom explosion sprites would break. This can get real ugly real fast; the classic effect is decent enough. I'll change the texture and number of particles, and maybe add some smoke to it, but I see no real reason to go further. Might do that tomorrow (day off work - whoo-hoo!)

One major bug reported - a crash on changing from Start to E1M1 in ID1. I've seen this once before, but haven't been able to reproduce it since, so it will like stay unfixed.

The next release will also include source code for two utility tools I wrote; the first one will take a greyscale bitmap and construct a PNG with an alpha channel from it (handy for making particles), the second one is just for creating the DirectQ splash screen (just writes the version number into a bitmap). Neither are essential or awesome, but I've decided to include them anyway just to keep everything complete. Anything else I write as a development or content creation aid will probably also be included in future releases. All GPL, of course. For these I generally use Visual C# 2005 Express, still my favourite for Windows GUI work.

Tuesday, March 17, 2009

Engine Update

I'm still on a slowdown (and committed to it), but have done some work on the engine lately. First up is the long promised ability to load FX files (AKA HLSL shaders) from disk as an alternative to embedded resources. This is nice as it can let you specify your own shaders. It's not my job to teach you about HLSL and so forth, so you'll need to grab yourself some online tutorials at a bare minimum if you want to play with this. Things to watch out for include needing to have the correct number of passes, correct technique names, correct input and output formats, etc, but in the vertex and pixel shaders themselves it's pretty much fair game what you do. You can get the original FX files I wrote in the "src" subdirectory of any recent release.

This is also PAK file friendly, by the way.

Secondly I've started on an "enhanced" particle system. I've decided not to mess with the original effects too much, so what's going to be done is a replacement of textures, possible reduction in the number of particles (where appropriate), and some scaling and fading of the particle sprites. Basically the objective will be to have blood that looks like blood, smoke that looks like smoke, etc, while retaining as much of the Q1 "feel" as possible. I haven't yet decided on how far to go with this, whether to have everything hard-coded and/or embedded, or whether to allow a certain amount of user customization. Right now the textures are embedded resources, and I'm thinking of modifying my embedded resource texture loader to allow for external replacements. But this isn't meant to be a general purpose engine, it's Quake.

I'd previously rewritten the particle system to be able to support all of the extra stuff that this will need, so it should be possible to turn this around quickly enough: just supply a texture, check a cvar and set some parameters. Making it look right might take more time.

The "enhanced" particle system will be off by default, but I hope it's going to be trad enough to at least meet with reluctant approval in certain quarters.

Barring any bugfixes that should probably be as far as things go prior to the next release. It's still too early to confirm this for definite though.

Dark Matter

Advance warning - this has NOTHING to do with Quake...

I'm writing about the whole Dark Matter thing because once again I see a lot of eminent and respected scientists blowing their own trumpets over having found more proofs of it. I am neither eminent, nor respected, nor a scientist, when it comes to this, but I do have the advantage that I'm on the outside looking in.

Nothing much qualifies me for this aside from the fact that I've read a few books and thought a little about stuff.

Before I start off for real though, I want to go back in time by about 1000 years. The world was much smaller then, most of it unknown, and when medieval cartographers would get to a part of the map they did not know about, some of them would write "here be dragons" on it.

Fast forward to the present. We have two main cornerstones of science: theory and observation. Let me quote some Stephen Hawking at you:

"You can disprove a theory by finding even a single observation that disagrees with the predictions of the theory."
Still with me?

OK, now I'll throw the next part into the mix: we have a cosmological theory that predicts that the amount of matter in the universe should be some figure which I'll call X, and we have observations that say "hold on, it's actually quite a lot less, 5% or thereabouts of X".

Ba-da-bing, theory disproved (or at the very least it gets a "must try harder") one would think, but OH NO! Instead of that, theorists have invented what is - when you think about it - mystical pixie dust - so as to enable them to claim that the observations are somehow lacking.

"Here be dragons" indeed! In fact this is even a case of "here be epicycles" - another classic example of trying to shore up an inadequate theory - and in the process impeding genuine scientific advancement for a whole long time - by inventing more and more unlikely explanations.

"But the standard model of cosmology is one of our most successful theories ever" is the general cry, but then again so were Newtons laws of gravitation; so successful in fact that they can still be used today for virtually all practical purposes. But success doesn't change the fact that they were WRONG WRONG WRONG.

Dark Matter, or Mystical Pixie Dust, is a great victory for theoretical hubris, the refusal to accept that a theory could be wrong or lacking in the face of observational evidence.

Thursday, March 5, 2009

1.6 Begins!

I didn't think there was anything major left, but I've remembered that there was quite a bit of work on the Input system outstanding. So far I've added in support for the XBox 360 Controller, which I had been threatening to do for quite some time. A menu is also available to configure it. I'm also going to add a menu for Joysticks. One nuisance here is that the 360 controller will also be caught by the regular Joystick API (and by DirectInput, so that's no way out), so they're exclusive; if you have a 360 controller attached (or any other XInput device) you can't use a Joystick. Microsoft provide code to detect this and handle it, but it's messy WMI stuff, so I'm happier with the simpler (but admittedly less flexible) approach.

I think particles are also going to make it into this release.

In Real Life, I'm going to be moving to a development job in a few weeks time. This is an exciting and interesting change after 3 years away from one, but it does mean that I'll be coding for a huge chunk of the day even before I get home to look at DirectQ. I know from past experience that this isn't a healthy situation, so hence the fact that I said in my last post that I'm going to be slowing down the engine.

If I have something releasable before I move I'll release it then, but I'm not going to be rushing the engine and doing lower quality work on it just to meet that objective.

Monday, March 2, 2009

Been a While...

Real Life took over again; been generally having fun and doing cool stuff these past coupla weeks. Anyway, here's 1.5 - enjoy!

https://sourceforge.net/project/showfiles.php?group_id=248000

The main changes here are that I finally finished off resolution changing, and have added game changing. Otherwise it's mostly small things. Note that both of these are tested and working so far as I have been able to test them, but they might cause problems for you. Bug reports to the usual place (Inside3D | Engine Programming).

I'm thinking that from here on I'm going to be slowing down a lot on development. I've now achieved most of what I had originally set out to achieve, so I'm quite happy with what I've got.

One thing I may be doing is looking for a new host. I'm rapidly becoming massively annoyed with SF; it may be the primary Free Software site but it's shockingly clunky, inconsistent and amateurish in execution and implementation (...now I wonder why that would be...) - OK, maybe if I'm using Linux command-line stuff it's cool, but this is 2009 and I just wanna release some files; I've no interest in getting involved in kooky religions, thank you very much.