Showing posts with label Helsinki. Show all posts
Showing posts with label Helsinki. Show all posts

Tuesday, July 24, 2012

idTech 4 (aka Doom 3) ES2.0

I've pushed my Doom 3 ES2.0 branch onto GitHub including the GLSL shaders. These shaders could also be used as a template to write new ARB programs for the minimum assets required by iodoom3. The shaders are licensed as GPLv3 and Doom 3 is licensed as GPLv3 + additional terms as defined by id Software.

Things are starting to liven up over on #iodoom3 (Freenode) and we'll hopefully start seeing some cool things  very soon. :-)

I've put a PayPal donate button on my blog; many people don't realize the time and effort that goes into these hobby projects. If this project, or other projects of mine have been useful to you, please do make a donation (even if it's a "gold coin donation" 1-2€ or 1-2$)

I'll stop shamelessly pimping myself out now and get ready for my day job.

Happy hacking!

Friday, May 11, 2012

Doom 3 for Nokia N900

I'm sick with a cold, but since I ran out of movies to watch I thought it best to try to distract myself by seeing whether the N900 could run my Doom 3 branch. It turns out the answer is "yes, but very slowly."

I suspect due to the completely non-optimized code, poor choice of formats (should be using RGB565), and avoid using highp everywhere in the shaders.


Nevertheless, it does run despite the currently poor performance and few rendering bugs...

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.

Sunday, April 3, 2011

Expression parsing and evaluation...

Something which has been annoying for me for a while was the lack of proper expression parsing in libdecl, my engine's declaration parsing library.

This library is responsible for parsing the sound and table/material declarations as defined by id Software, and making them available to the renderer (or other backend: sound engine, etc) in easy to read structures guaranteed to have sane and correct values. libdecl is the component which will complain about your syntax, the backend doesn't have to care about any of this. Really makes the code look a lot nicer. :-)

I was debating the best way to parse expressions, because they can either be very simple, or quite complicated. I realized that I could not rely on line terminators, because it's very common to see an expression span multiple lines with all kinds of tabs and white-space in the file... Of course the lexer ignores white-space, but keeps track of the line count.

After a bit of thinking about this, I decided to rip out the current shunting yard algorithm from the renderer, move it into libdecl, clean it up and rework it quite a bit. Now, it does the following:
  1. Get a token from the lexer,
  2. Check this token matches our expected rules,
    1. the token is an operator or operand, or
    2. the token is a table name. (Detected from 1st-pass.)
  3. If our checks pass, go ahead with the normal algorithm, otherwise,
  4. Push the token back to the lexer, and return the completed expression in Postfix notation.
Here's a hypothetical example that I wrote with more comments than necessary...

/* "material" keyword is optional when inside the material directory */
material textures/screenBlur
{
        sort postProcess

        /* first stage */
        {
                if glslPrograms != 0 &&
                        !isMultiplayer  /* don't blur the screen in multi-player */
                map textures/blur       /* any image format supported */
        }

        /* ... */
}

Obviously simply parsing the "if" expression until the end of the line would fail, furthermore, "if" expressions may be written as if ... or if (...), so matching on parentheses won't work either.

It turns out the easiest thing to do is first a pre-pass which only looks at tables (so that we know "foobarTable" is valid), then a secondary pass which looks at everything (sounds, tables, materials.)

In this example "glslPrograms" and "isMultiplayer" are built-in variables which the parser correctly detects as operands. Therefore we'll only stop parsing after reading the "map" token, realize it's not a valid operator or operand, push it back to the lexer, and return the expression (after some processing.)

This solution seems to be quite elegant, despite the 2-pass algorithm, and handles all the cases correctly.

The next step is to get rid of static stack allocation. Some expressions are very long, so the stack is setup for 64 elements, but this is ridiculous for "time * 0.001" (for example.)

Wednesday, March 23, 2011

The Matrix at your local Apotek?

Couldn't help but laugh when I opened these (Paracetamol and Ibuprofen) as I usually buy a different brand of Ibuprofen which is your standard white pill.



That's why they are cost approximately 8 euros for 30 tablets! Damn, I don't need it decorated like an Easter egg, as long as it works...

Sunday, June 20, 2010

N900 Quake 3 isn't dead yet...

It's been a while since I've had some free time to hack around with Quake 3 on the N900, and strictly speaking that is still the case, but I've started to look into some issues now. Lightmap support, fixing up the input, and adding support for SixAxis/Dual Shock 3 controllers. :)

Okay, at this point I just have the hardware and basic input working on the device thanks entirely to Tomasz Sterna (and others) work.

I hope tomorrow to get some tangible code added to ioquake3 N900 branch as well as testing out the possible lightmapping fixes and refining touchscreen based input for those who don't have PS3 controllers; I only brought mine today. Btw, does anyone else consider it a bit cheap of Sony not to include a USB to Mini-B cable with the controller, or does the PS3 console come with more than one cable?

Yes, I know it's been a long time, and yes the TS input is currently slightly broken. But well, you know the deal with free-time (or rather the lack thereof) projects...

Tuesday, April 27, 2010

Airports ftw... yeah...

I've finally made it back to Helsinki although my dislike for airports has probably reached monumental levels by now... Unfortunately I had a lot of bad transfers; most of them about 6 hours. Long enough to be annoying, but too short to get a hotel and some sleep. Next time, I'll plan a multi-stop journey so that I can actually sleep during the ~36+ hour journey. Bill Hicks is right on the money when it comes to children on airplanes.

I didn't take many pictures during my vacation, but here's a good reason to remember to fill out the "stop delivering junk mail" form before leaving for over a month. I also have to replace my house plant. The post office apparently doesn't use any no-junk-mail stickers. Quite fun sorting through that to find the important mails...


I brought back some nice teas from Australia: Indian Spice and Turkish Apple. Which is really just sugar, citric acid, and other flavorings (well, it tastes nice anyway.)

Apparently it must have looked interesting enough for customs to open my suitcase. The tea box was left open, but they were nice enough to not rummage through everything... The resemblance is uncanny though.



Now just to sort out paper-work and other miscellaneous things, then back to the office tomorrow (hopefully not totally jet-lagged.)

Wednesday, March 10, 2010

Maemo 5/ioquake3 with native QVM's...

A number of people have asked me questions along the lines of "can I play my favorite Quake 3 mod with your package on Maemo?" The answer used to be that you could not, due to changes in the Client Game (cgame) module. I've now fixes these issues (mostly absolute vs. relative touchscreen events) so that an unmodified cgame will work correctly.

The short answer: yes, your favorite mod should now work.

I have done absolutely no testing other than checking that the vanilla, unmodified QVM's shipped on the Quake 3 CD work as expected. So your millage may vary.

There are still a couple of issues with UI interaction, but since this is a highly requested feature, and I have a flight to catch in some hours, I'm pushing ioquake3 (1558-maemo6) to extras-devel now.

Also, there are two cvar's you might like to tweak: sensitivity and accel_sensitivity.

Pro-tip: the key combination "Fn (Blue Arrow) + =" is Escape, and "Fn + Sym" is console up/down. Yes, eventually I will write some better release notes. :-)

Sunday, February 28, 2010

Helsinki: Fun in the Sun... or Not

It's been a bit longer between updates than I had hoped; busy with Maemo 6, random hacking projects, and of course (attempting to) have a life away from said activities. I have finally booked my vacation back to New Zealand (and will also be visiting a friend in Melbourne, Australia.)

I probably picked the worst day to do my pre-vacation shopping; the weather in Helsinki has warmed up just enough (+1 degrees C) that everything on the ground has turned into a slippery slush:
  • Number of times almost doing an unintentional back flip (or other such acrobatics): ~6.
  • Number of times sprayed by passing cars: 2 (one of which I saw coming, but couldn't move out of the way...)
However, it seems the Finns are not totally immune to walking on slush; I saw one unfortunate person do a back-slide into a melted puddle.

This was just walking from Kaisaniemi to Rautatientori (Forum) and back; I still need to pickup a few things at Verkkokauppa. Unfortunately it doesn't look like the slush will be freezing again any time soon (more likely it melts slowly over time) so my vacation has turned out to be quite well timed. I'm leaving on the 10th.

Since I tend not to get out nearly as much as I should, I'm going to attempt to try some things I've never done before. Currently tandem skydiving is something I'm considering; I figure jumping out of an airplane is about as far away from software engineering as you can get. ;-) (Yes, I know about n900fly)

Anyone who has some ideas for things to do in Australia or New Zealand, please, leave a comment. :-)

Monday, January 18, 2010

ioquake3 on the N900


Apparently my little after work project was cool enough to make the news page over at ioquake3.org. :-) I just thought I'd mention here that you can read some more about it in my earlier (first actually) blog post, and there are more pictures over here.

Thanks again to id Software and ioquake3 for a great code base! And to the people at Nokia and Maemo Summit for support and encouragement.

Btw, if you do own an N900 and have played with the ioquake3 port, please leave your comments and suggestions for improvements in case I feel the urge for another weekend hacking session. (I am aware there have been problems installing the package in the past, but they should now be fixed.)

Tuesday, January 5, 2010

Avatar 3D worth it...


I just got back from watching Avatar in the cinema this time, in much higher quality and in anaglyph 3D; actually I started out at the wrong cinema, Finnkino in Kaisaniemi; luckily the one in Kamppi is only a few minutes walk away.

I've mentioned before that usually these anaglyph 3D effects don't work very well for me due to varying degrees of myopia in both of my eyes, but I thought the movie was visually cool enough to give it a try with contact lenses instead of my normal glasses. I think this helped the effect significantly, but I still get the feeling that my brain starts to adjust to the effect over time so it's most impressive at the start of the movie.

This peaked my interest in ioquake3's anaglyph rendering mode, but unfortunately they ask for the glasses back after the movie, so no chance of trying it out (at least until I order a pair of my own.)

Anaglyph 3D on the N900 might be quite interesting, but of course I would either need to make much more efficient use of vertex buffer objects to make up for halving the FPS, or do a port of XreaL...

I think the later option is better for several reasons, but we'll see; Python, SCons and Scratchbox is a whole bundle of pain that I really don't want to be getting into at 02:00 in the morning.

Tuesday, December 29, 2009

Alarm clock vs snow plow...

Okay, technically it would be a backhoe scoping up snow/ice from the road and footpath, but seriously, at 09:45 and right outside my bedroom window!

I've had the alarm on my N900 fail to wake me several times, however this is much more effective; now if only they could do it at some reasonable time, like, oh, 12:00 or 13:00... and in keeping with the day of fail, my box at Nokia seems to have lost it's IP address, so no working remotely today.

Thursday, December 24, 2009

Holiday boredom...

I don't have any plans for the Christmas holidays, and Helsinki is at just the right temperature to make doing anything outside really difficult. Some of the snow has melted and frozen into ice, making it feel a lot like walking on broken glass: physically and emotionally; I stopped counting the number of unintentional acrobatics after about the 5th or 6th time sliding in some way.

I might implement zlib compression for network traffic in my engine, which should only be a few dozen lines... or something a bit more interesting; stencil shadow volumes could still use more optimization, or some SIMD stuff...

There are at least a few dozen minor X server issues discovered by Coverity, but that's getting dangerously close to Nokia work over the holidays. The majority of the issues are error paths anyway, nothing really critical.

In the more being lazy and doing nothing area, Avatar looks like it could be an interesting movie...

Sunday, December 20, 2009

Window drafts...

I'll be stopping by K-Rauta today and picking up some masking tape to put over the gaps between the window panes and the outer frame... I already replaced the older E sealing tape with thicker P tape before winter, but it seems there are still some nasty drafts coming through...

Now, I usually don't mind the winter; in fact I much prefer the shorter days instead of ~18 hours of sunlight, but it seems I don't share the Finns immunity for subzero temperatures.

Saturday, December 19, 2009

New city, new job, new blog...

I decided to start blogging again, now that I've somewhat settled down in Helsinki, and hopefully I'll be able to keep some regularity in the postings this time. Picture is from Snellmaninkatu, near my apartment at about 14:00 yesterday.

It's been an interesting year; moving to Finland, working for Nokia, speaking at this years X Developers Conference and Maemo Summit.

Maemo Summit was arguably the most interesting since I was giving a demo of an early version of Quake 3 running on the N900 (also another video.) The whole thing started from a weekend project after chatting to Phil Carmody, who wrote the touchscreen and accelerometer kernel drivers. Actually it ended up turning into a several weekend project, but I digress; funny what happens when engineers get bored after work...

Currently I'm working on fixing two XreaL bugs with projected lights; I did a quick patch for the first issue but the second one is being more troublesome; Robert will probably get that before I do, and when it's 05:30 in the morning, maybe it's time to call it quits for the day.

Although, tomorrow might see the N900 getting more of a workout than Quake 3...