Monday, January 30, 2012

STOP ACTA...

I suspect that I'll be receiving quite a few more hits here given the recent retweets. Unfortunately I haven't had much time to update my blog... In fact, I may not have any time in the future.

On a more positive note, I am much more active on Twitter, so you can follow me there (@omcfadde)

Of course the topics we're discussing, SOPA, ACTA, etc are definitely not pleasant or positive. Let's show them we mean business and that we will not accept these agreements!

STOP ACTA

Updates (possibly) coming in the future.



Epäilen, että tulen saa melkoisesti lisää osumia tässä äskettäisten retweets. Valitettavasti minulla ei ole ollut paljon aikaa päivittää blogiin ... Itse en ehkä ole mitään aikaa jatkossa.

Myönteistä huomata, olen paljon enemmän aktiivisia Twitterissä, jotta voit seurata minua sinne (@omcfadde)

Tietenkin aiheita olemme keskustelleet, SOPA, ACTA jne. eivät varmasti miellyttävä tai positiivinen. Katsotaanpa näytä heille että olemme tosissamme ja että me ei hyväksy näitä sopimuksia!

STOP ACTA (In Englanti - Lue!)

Päivitykset (mahdollisesti) tulossa tulevaisuudessa.

Tuesday, August 9, 2011

I was originally going to post this as a tweet, but verbosity got the better of me. Colleagues whom I have worked with (you know who you are) will attest to this fact...

I frequently consider how things may have turned differently based on my own choices; jumping directly into employment versus attending university. Choosing a career as a software engineer as apposed to pursuing interests in chemistry and biology.

I like to think that all-in-all everything worked out okay... On the other hand, there are so many possibilities that I will no longer be able to explore, and that is very disappointing. I will likely never know what it would be like to attend a university, graduate with a PhD (which would probably be in computer science, chemistry and/or biology -- the two being closely related.)

I have even contemplated the idea of assembling a small team for developing small to medium scale games. I don't think there is a way for a small group to compete with triple-A titles, which again is disappointing. Of course this is a pipe-dream. I don't know artists capable of creating the media required, nor any software engineers who would be willing to participate project which has an unknown chance of commercial success. I think these kinds of projects are a Euro short and a decade late.

Well, maybe not a decade late, but at least I don't have the means to bankroll such an endeavor from my personal account. Perhaps it would be interesting to sketch out a graph of my life based on decisions made and not made and see what the projections look like...

If only for more productive hours in the day; but that is another brain-dump entirely.

Monday, July 11, 2011

Using dlopen() for fast engine prototyping...

I recently became tired of the cycle of hacking on the renderer, starting the whole engine, checking where and how it's failing, exiting the engine and the pointless time wasted during this process. Typically it's only a specific area I'm working on, thus perhaps one or two C source code files are actually changed, so it doesn't make sense to reload the entire engine and all media assets.

I started working on a smaller project for rapid-fire prototyping, μEngine. Currently it's a pretty basic project. It provides the basic framework for detecting that a shared object has changed, unloading the current version from memory, loading the new library, resolving the required symbols, and continuing the "rendering" loop (which actually doesn't perform any OpenGL rendering yet.)

Here's an example of the engine running:

~/uengine/src (master) $ make && ./uengine 
make: Nothing to be done for `all'.
... .libs/libuengine.so
0xdeadbeef
0xdeadbeef
0xdeadbeef
0xdeadbeef
... .libs/libuengine.so
0xcafebabe
0xcafebabe
0xcafebabe
0xcafebabe
... .libs/libuengine.so
0x0
$ 

While the engine was running, I edited libuengine.c, which is compiled by Automake into a shared object:

$ sed -i 's/0xdeadbeef/0xcafebabe/' libuengine.c && make
  CC     libuengine.lo
  CCLD   libuengine.la

Now I want to terminate the program (and I'm too lazy to have written a signal handler yet) so μEngine's main-loop is setup to terminate when dlsym_main returns a zero value.

$ sed -i 's/0xcafebabe/0x0/' libuengine.c && make 
  CC     libuengine.lo
  CCLD   libuengine.la

μEngine also links with libengine (which provides all of the math/geometry/etc functionality for Trinity), libdecl (which provides access to id Software style declaration files), and liblwo2 (which, well, loads LWO2 model files.)

This little experiment is far from complete. I still need to setup an OpenGL and GLX context, handle X11 input, and keep track of any ARB fp/vp or GLSL programs loaded. GPU programs will be reloaded in much the same way as the shared object itself.

There is of course a few frames delay between invocation of make and the new library being loaded, because should stat fail to obtain the file modification time (because it's still being written out) μEngine just continues with the old shared library until stat succeeds. The modification time is checked every "frame."

I think this should help with faster prototyping, since μEngine has the ability to access all of the assets and libengine library functions that Trinity can, but without the requirement of loading all the assets for a full world map into memory at start up.

Saturday, May 28, 2011

More BSP compiler hacking...

I've started working on my engine's BSP compiler (based on Q3Map2/XMAP2) looking to add proper shader parsing and areaportal detection. Currently the shaders are all parsed by libdecl which avoids duplication of code between the engine and utilities.

The engine does not yet use portal based rendering (which is why you can see light clipping through the wall in the images.) The BSP compiler has portal debugging enabled, which outputs an extra surface with a translucent shader for areaportal visualization and debugging.

This is a very simple demo map, however you can already see several issues. The BSP compiler needs to carve the polygons into discrete areas (e.g. the floor polygon should not span two areas.) There are still a few areaportal bugs in the BSP compiler, and of course the engine must be updated to use areaportal based rendering.

 Image showing light leaking through the wall/areaportal.
Image showing the triangles rendered; the floor and walls should be carved at the areaportal boundary.








Who knows, maybe I'll even get this finished before id Tech 4 is (hopefully) released under the GNU General Public License.

Friday, April 22, 2011

HP LaserJet Pro CP1525nw Review

I received the CP1525nw on Thursday, and it turns out this is a really great printer for GNU/Linux (which probably means the other HP network-compatible printers are good, too.)

Basically I unpacked it, plugged in Ethernet and power cables, it fetched an IP address from DHCP and displayed it on the small LCD. You can do some basic configuration through this LCD/few-button interface, but it's not worth the trouble; just note the IP address, enter it into a browser, and setup from there.

You can't setup the wireless via the LCD interface (unless you make use of this silly PIN code system which my router doesn't support anyway.)

Everything is configurable over the web interface, and by default mostly everything is enabled and unsecured. I disabled features I wouldn't use, configured the wireless, assigned a static IP, and secured the interface with a password.

Note that while you can configure the wireless it won't actually become active until the Ethernet cable is disconnected. You can't use both interfaces (Ethernet and WiFi) at the same time.

Everything went very smoothly and you don't need any proprietary software, even for setup, which is wonderful. :-)

Complaints thus far, although I haven't had the chance to use it much due to only having a few sheets of blank paper lying around, are as follows:
  • No duplex printing, although you can of course manually duplex your documents by printing even/odd pages in separate jobs.
  • Paper tray is a bit small: 150 sheets. It would be nice to have a 500 sheet tray which would accomidate an entire ream of paper.
Not big issues, and the print quality is very good, so I would recommend this printer. CUPS configuration was quick and painless, and CUPS has a built-in driver.

Saturday, April 9, 2011

Ultrasonic modem update

I did a little more digging into underwater ultrasonic digital communication. There is a publication from DTIC which looks interesting. It includes some rather boring source code, but provides a lot of good advice in the text.

Available for purchase is An Ultrasonic Sensor Based Low-Power Acoustic Modem for Underwater Communication in Underwater Wireless Sensor Networks by Heungwoo Nam and Sunshin An. It's €25 for the publication, so I'll probably purchase it (unless some anonymous person with access would email me.)

Of course, this is leading to the ultimate conclusion of setting up an EE workbench and buying a bunch of expensive equipment (solder station, oscilloscope, function generator, multimeter, etc.)

I seem to have expensive hobbies. :-( I should really spend some money on a good vacation, which I sorely need.

Thursday, April 7, 2011

Printer for Home Office...

Dear Lazyweb,

I'm currently looking for a printer for my home so that I don't have to wait until I'm at the office and use the printers there... Unfortunately it seems many laser printers (especially Canon, which Verkkokauppa are pushing to sell) either don't have Linux support, or have only proprietary drivers. What ever happened to just accepting a Postscript file?

Canon are especially nasty in that they provide a "source" package, which is really just the source code for some of the utilities, but the core library is still proprietary. Every time I see a shared object or binary inside a source package, I die a little inside...

Besides Xerox printers (very expensive) HP seem to have a couple of good options:
Both accept the following languages:
  • HP PCL 6
  • HP PCL 5c
  • HP Postscript Level 3 Emulation
According to this forum post it looks like it should work out-of-the-box with CUPS, without any proprietary drivers which is a precondition for my purchase...

Verkkokauppa have a rather silly return policy. Maybe this was inaccurate as I only asked one of their sales people, but apparently should you purchase something from their shop in person, then you do not have the option to return it (except if the product is defective.) However, should you purchase online (even to pick-up from the store) you have a 2 week return period...

I am leaning towards the CP1525nw because it seems like it will work with CUPS without proprietary crap, and the wireless network feature means I can put the printer in a walk-in closet or similar and keep it out of the way. Unfortunately it's a 1-2 week order time from the supplier.

It seems a reasonable deal for around the €200 to €300 range.