22 Sep

Introducing My Latest Projects

… Or, How to Procrastinate Productively.

klystrack3

I decided to make one of my current projects open source and post them on Google Code just for fun. The project is a tool chain that I’m using to remake Thrust. In reality, I decided to divide the project into two separate projects: the actual game engine (called klystron) and related tools, and a music editor that uses the engine.

Here are two videos I made a while ago that demonstrate the engine. The first is the music editor (called klystrack) — it’s much less ugly at the moment but the sound synthesis is the same, and that’s what matters:

The sound engine (“Cyd”) is basically a very simple software synthesizer with capabilities comparable to the SID or any 8-bit machine from the 80s. The editor is a fairly standard tracker, much like GoatTracker.

The graphics half of the engine is basically a wrapper around a quite fast collision detection system (pixel-accurate, or it wouldn’t be much good for a thrustlike) built on SDL. It also does background collisions and drawing as well. As you may have guessed, the whole point is to provide a limited but still helpful set of routines that are useful for creating 2D games not unlike what video games were in 1991.

And, here’s a proof I’m actually working on the actual game (the sound effects are created in real time by the sound engine):

A note on Google Code: it’s rather nice. It provides the standard open source development stuff like source control an such but I really like how clean and hassle-free it is. Adding a project takes a minute and after that it’s simply coding and some quick documentation on the project wiki. The project wiki is good example of how simple but elegant the system is: the wiki pages actually exists inside the source control as files, just like your source code.

Go check Google Code out and while you’re at it, contribute on my projects. :)

19 Jul

Wordle and Classics

More Wordle madness. Try to guess if you recognize the works summarized below (no cheating allowed!)

pulp-fiction

slaughterhouse-five

The first is easy but the second probably is something you uneducated mooks should read.

01 Jul

Wordle and 30 Years of Games

Here’s a superficial analysis on game titles. I have used Wordle to generate a word cloud from lists of recurring phrases in game titles. What I generally wanted to know is how a generic title from 1985 would differ from a generic title from 2009. The size of a word or phrase is relative to how many different titles contain the text and also how complex the phrase is (so one word long “phrases” won’t dominate the more interesting, relatively rare phrases).

What the word clouds show are very generic words like “space” or “super”, the number two (a game series is more likely to be two than three games long) and multiple word phrases which usually are popular game series, clichés (Foobar of Doom) or games with many versions or expansion packs. It is interesting that the generic words tend to be the same across 30 years — all generations of gamers seem to love dragons. Another point of interest is that a phrase from a 1980s game title is much less likely an established brand as it most likely is in the 1990s. Also, in the 1990s is became common that a game title has the release year attached to it, since EA et al started to churn out minor updates to their sports games as brand new releases.

30 years of games. Find your favorites!

1980-2009

1980-2009

1980-1989

1980-1989

1990-1999

1990-1999

2000-2009

2000-2009

07 May

Migrating From 32-bit XP To 64-bit Windows 7

Quick summary

Here is a quick summary (based on the search terms people use when finding this page):

  • Will <insert software name here> run on Windows 7? In short: Yes, most likely.
  • Will I be able to open documents created using <insert software name here> on 64-bit Windows 7? Yes, most likely. The 32-bit to 64-bit transition only affects the applications itself, not files. And, most of all you can simply use the 32-bit version of the program like you used to use.
  • The whole 32-bit vs. 64-bit thing is a non-issue and gets better all the time as developers update their software. A bigger issue is if a program works on Windows 7, which it should if it’s written at least somewhat properly (which is the case with 95% of software).
  • Yes, even games still work quite well, especially those released only a year or two ago
  • Do not simply format C: — you need to reinstall but you can copy a lot of stuff from the previous Windows installation (see below how)
  • No major problems in daily use
  • No major slowdowns even with Aero enabled
  • If you are knowledgeable enough to worry about the above, you can overcome most problems/differences you’ll encounter
  • Just do it already!

Introduction

Here’s some quick pointers and answers to questions I, a stereotypical diehard XP user, had that made me hesitate trying out the new Windows 7 RC. I didn’t immediately find such info on the webs and as a chronic luddite I didn’t even think about finding out until absolutely necessary.

My goals, as always with OS installs, were to minimize reinstalling of apps and data so that I can pretty much pick up where I left. Even though it’s common for even experienced or otherwise sane people to advocate a simple reformat of the hard drive and installing everything yet again, it’s just magical thinking to me (although it does make things simpler, but more laborous). In my experience, it takes just a bit of planning to avoid that. A tiny bit. What I did was taking backups of the most vital data (emails, most cherished boobie picture bookmarks and such) but I knew beforehand that’s not a part of plan B, even.

Then, I just installed the new OS.

First impressions

After some waiting and a reboot or two, the following is a list of what went through my head:

  • I was worried about if old programs still work. Most programs you used to use in 32-bit XP should work OK. You simply drop them in C:\Program Files (x86). Generally, I think you should not have trouble with common (non-game) programs because they are not native 64-bit code but see below.
  • Windows 7 didn’t remove my C:\Documents and Settings, even though for a short moment I thought it did. It’s simply relocated to C:\Windows.old, as are the Program Files folder and of course C:\Windows is there too in case you need it.
  • The Application Data and the Local Settings\Application Data folders that previously were right under the user directory are now in C:\Users\kometbomb\AppData\ and C:\Users\kometbomb\AppData\Local\, respectively. I just dropped the Firefox and Thunderbird profile folders in there and here I am again with the same setup.
  • I immediately noticed the way I set Viewer2 as the default program for image files no longer works in Windows 7, so this might be a minor annoyance in case someone else does it the way I do. In the Control Panel there’s a working way to change the default programs manually, although I would hate to do it for more than the 4 different extensions Viewer2 needs. It seems you have to click every extension through and select the program you want to open them. Stuff like this probably is avoided if the program is done exactly as the MS specs tell etc. but the reality is that not everyone did that.
  • You will have trouble with file permissions if you were using NTFS (especially if this is your first time with more restrictive permissions), but this has always been the case if you move files around inside the same OS and the file owner is different (i.e. you but under a different OS etc.). Currently, I have had an interesting problem which causes some files being unable to open even though the folder has the permissions set as they should be. Even Explorer shows the files without the modification date and most programs report they can’t find the file (which in reality means they can’t open it even though the file is there).

    Found a solution: some (seemingly random) files are recognized as coming from another computer (i.e. my previous OS) and they have to manually be unblocked (file properties -> Unblock). I don’t know why 99% files that are in the same directory work without a question…

    Personally, I think they could have done without this kind of stuff somehow. Yeah, big boys’ OS’s have that kind of stuff but it’s just confusing if you really don’t want to know about that. After all, it’s the computer that should do the work. It’s kind of interesting how otherwise the interface is very much like something your mom would use after a bit of practice but if you just right click a file and go in the properties, there be dragons there.

Problems

After a week months of use, here’s the problems I have encountered:

  • A total of two BSOD’s in a few weeks. Both times occurred when I played a video (in Windows Media Player, I mostly use Media Player Classic and there has been no problems with it). The crash happened when the video card tried to reboot itself but failed to do so (crash happened in atikmdag.sys which is responsible of the reboot stuff). Good news: I think this is related to the AVIVO technology my card uses since I have had no problems except with WMP (because I am guessing MPC won’t utilize AVIVO — this is very much a thin, optimistic hunch, though).

    Update (2009-08-14): Haven’t gotten any BSOD’s in two months or so. Additionally, my video card has rebooted a few times successfully (which is still annoying but not fatal) so I guess either Microsoft or ATI fixed the issue.

  • It is not possible to mix and match 32-bit and 64-bit binaries freely. That is, a 32-bit program can’t use a 64-bit library and vice versa. Some examples when this is something that is the user’s problem, too:
    • A 64-bit media player can’t use the old 32-bit codecs. So, for some videos you’ll be using the 32-bit version of, say, Media Player Classic.
    • Let’s imagine you compile your hobby project as a 64-bit app for fun. Oops, all the libraries you are used to use are 32-bit and you for some reason can’t/don’t bother to compile them as 64-bit DLL’s. Solution: You revert back to 32-bit code.
    • Shell extensions (e.g. WinRAR’s “Extract to here…” when you right click a file and such things) of 32-bit programs that otherwise work perfectly won’t work anymore (since the extensions are DLL’s with 32-bit code in them and they can’t be used by Explorer which is not 32-bit). Solution: Use a 64-bit version of the program (which often still need you to double click on a .reg file to enable the extensions).
  • Almost constant high CPU use when nothing of value is happening. The culprit was WMPNetworkSvc (I really like the new Performance Monitor that shows an average of used resources and not just the current level of use — makes it easier to catch those processes that use tons of power except when you are looking). I disabled the service in Control Panel\System and Security\Administrative Tools\Services as it sounded like it’s not useful for me (the label on the tin says it shares media across UPnP devices, whatever that means).

Overall, I conclude there will be some problems but nothing that you can’t fix. I am happy with Windows 7 and relieved the whole 32/64-bit issue was nothing but a overblown scare. Some things about the GUI I don’t like but then again it’s usually just something you have to learn to do a bit differently, not that you can’t do something anymore.

Useful tips

How to migrate your old Firefox/Thunderbird profiles

  1. Install Firefox and run once so all the directories and files will be created.

  2. Exit Firefox.

  3. Go to C:\Users\YourName\AppData\Roaming\Mozilla\Firefox\Profiles (AppData might be hidden, you can simply just type in the path and press return).

  4. Copy the old profile directory (e.g. C:\Documents and Settings\YourName\Application Data\Mozilla\Firefox\Profiles\dl34875xyz to the Win7 directory above. If you have multiple profiles, just copy them all.

  5. Copy C:\Documents and Settings\YourName\Application Data\Mozilla\Firefox\profiles.ini to C:\Users\YourName\AppData\Roaming\Mozilla\Firefox\profiles.ini. Also, open the .ini with Notepad and double check the lines that say “Path=Profiles/xyz123.default” etc. are relative, i.e. that the path starts with “Profiles/“.

  6. Open Firefox and it should now load your old default profile!

To migrate Thunderbird profiles, do the same for the Mozilla\Thunderbird directory.

A general way for migrating programs and settings

This should work for programs that do not use the registry to store settings. Note that this also means uninstall information will not be migrated and you may need to delete files manually. Try the below method only if you have a basic understanding what you are doing (which said I’ll add it’s not hard at all — just don’t blame me for anything you did.)

I assume the old files from the previous installation are in C:\Windows.old which should be the default.

  1. Copy the program folder from C:\Windows.old\Program Files to C:\Program Files (x86)

  2. Copy the settings folder from C:\Documents and Settings\Username\Application Data\Local Settings to C:\UserData\Username\AppData\Roaming. You may need to find out which folder to move but generally it’s C:\Documents and Settings\Username\Manufacturer Name\Software Name

  3. Create a shortcut on the desktop by dragging C:\Program Files (x86)\Software Name\Software.exe with the right mouse button on the desktop and selecting “Create shortcuts here”. Again, you need to find out which file is the executable that has to be run to run the migrated software.

  4. Double click the new shortcut and cross your fingers!

04 Aug

Is X Bullshit?

X… Score
Sounds too good to be true1 +1
Competes with an existing theory while offering simpler, more convenient (and often incomplete, less explanatory) explanations2 +1
Main proponents are willing to test the theory/claim for validity -3
Someone directly or indirectly benefits of people accepting it as a truth, as an individual (i.e. someone sells the more books/placebo the more people believe in it)34 +2
Existing knowledge undeniably makes it impossible5 +3
… and the main proponents ignore (and suggest followers to ignore) existing knowledge that clashes with their own ideas6 +4
Has peer-reviewed research and/or credible evidence in case it is completely new idea -2
Is a radically new idea7 +1
Main proponents and experts are from the same field (e.g. evolutionary biologists defending natural selection vs. mathematicians defending creationism)8 -2
People supporting the claim or theory are more interested of defending their position and/or creating more supporters rather than researching the subject9 +1

Links

  1. Cold fusion
  2. Intelligent design
  3. HeadOn, see this
  4. Immortality devices by Alex Chiu
  5. Homeopathy
  6. The Flat Earth Society
  7. A lot of sound science goes here, including quantum mechanics, relativity and such but they satisfy the peer-reviewed research requirement
  8. Creationism has tons of this, including using them as an authority rather than a guy who knows about things. And tons of Steves disagree.
  9. The whole climate change hassle fits here, albeit only because while the supporters probably are right, they use their energy to moan about the subject and boosting their egos instead of doing anything.