Today is the big day I’ve been preparing for: Styrkeprøven, the bike race. 5,000 crazy Norwegians are going from either Trondheim (540 km), Lillehammer (190 km) or Eidsvoll (60 km) to Oslo on bicycles. Our train to Lillehammer goes in 2 hours with Morten, Eilef and me on board.
I am not feeling at the top of my game this morning, but I think I can do this. I haven’t cycled this long since I was 17, and certainly haven’t tried to do it in under 8 hours, ever. Also, the weather is bad – it’s been pouring all day yesterday and the forecast for today says more rain for both Lillehammer and Oslo. We’ll probably be riding in the rain, and definitely on wet roads.
Wish me luck. I’m a nervous wreck.
Morten showed me this article by David Byrne (of Talking Heads fame) about bicycling in NYC: Link. I wholeheartedly agree with him. Bicycling is the best way to get around in any town. I’ve cycled in a couple of cities (London was scary), and the alertness you need to navigate through traffic coupled with the sense of superiority because you’re faster than the gridlocked cars is a wonderful drug.
Two things stuck in my head: One, he calls the painted-on bike lanes “imaginary bike lanes”, and that is true for Oslo, too. They are generally treated by motorists as a parking lane and by everyone else as a dumping ground for glass bottles. With a racing bike and sensitive tires, it’s best to ignore their existence entirely.
Secondly, I liked the mayor of Bogota: “If an eight year old kid can’t ride on it safely then it isn’t a bike lane.” I wonder how many city planers would let their eight year old child take a trip on the (imaginary) bike lanes around Oslo’s Ring 2? Would you?
The challenge posted earlier resulted in some interesting entries. The winner was Jesper, who sent in a Nintendo DS rom that played a Pacman that plays on the upper screen (and spouts lots of debug info to the lower one). The DS screen is too small to fit the entire level, so he made it scroll. His ghosts seemed a bit smarter than mine. Jesper wins my cherished papercraft leet.
Knut wrote his solution in Python with pygame. Steffen wrote it in C++ with SDL just like I did, but his ghosts respawn when they die, and blink before the pill timeout ends, so he went beyond the limits of the prototype requirements.
What have we learned? I learned that something like this takes no more than a few hours to put together, less time than I expected. Also, SDL is great for this stuff – except for the NDS solution, everyone used SDL. The resulting code is horrible – for example, I’m just redrawing the entire screen each frame. I think everyone agrees that it’s not possible to extend it much further, and shouldn’t go into production. Would I want to make the full game, I’d definitely start from scratch. Coding is quick, good coding takes time.
I’m definitely going to prototype more in the future, and try to get small ideas on the screen that can be completed inside of a day. I don’t think it should be longer than that, this is really about having something to show to either check how feasible something is, or sometimes to just get the sceptics of your back.
The follwoing is a competition in speed-coding. Your task will be to implement a Pacman prototype. Mind you, not the entire Pacman game.
Your prototype game should have the following features:
- display a pacman level (one is enough)
- let the player move pacman around (keyboard input is enough)
- move 4 different-coloured ghosts around, and let them pick new directions when they get to an intersection.
- eat dots, and finish the game if you ate them all
- eat pills, and afterwards be able to eat ghosts for some time
- animate pacman and the ghosts,
- draw ghosts differently when pacman can eat them.
- pacman dies when he collides with a ghost and isn’t “on the pill”
- ghosts disappear when pacman is on the pill
Everything else is unnecessary. No need to count score, no need to make the ghosts smart, resurrect dead ghosts, implement fruit, death animations or any other UI. No sound required, either.
You are free to use any language you like, on any hardware and with any library that is convenient. There is a set of assets you can use that contains some bitmap sprites and the level data. You may modify these assets as much as you like.
Assets in this zipfile:
- pac.bmp, 3 sprites that make up pacman’s animation in one direction
- level1.bmp, this is how the level should look.
- levelsprites.bmp, 8×8 sprites that the level is made of.
- ghost.bmp, a ghost moving in four directions (see eyes)
- frown.bmp, ghosts that can be eaten
- level1.dat, the 28×32 cells that make up the first level. each cell is one byte containing an index into levelsprites.bmp, and they are written row by row from top to bottom
To win, you must be the first person to email me a .zip file containing the source, assets and compiled executable (if you’re not using an interpreted language) of your prototype that fulfills all the requirements above.
Today is the first day of my new life. Wish me luck!
When did Operating Systems stop being something that came on a bootable disk, and start being something you had to install before you could use it? When did the manufacturers of software decide that they had to send the user through a lenghty, complicated procedure, making them give hopeful answer to questions that in 90% of the cases, they had no chance of understanding? Do I want ALSA or OSS? Well, durr…
Are there no more viruses? Or are we so protected from them that we no longer notice them? I honestly cannot remember the last time I got in contact with a virus – whether by mail, in a word document or otherwise. It must have been two years or more. And when did the last virus do any kind of damage to me? This was in a time of DOS and Windows 3.1, I assume, at least 15 years now, when I was trading floppy disks with less-than-trustworthy sources (teachers, mostly).
And still, virus scanners are everywhere. I vividly remember the last time I had a virus scanner wreak havoc to my PC: Overnight, the heuristics had decided that all my .class files were suspect and had to be deleted. Hilarity ensued.
So really, do I still need this thing?
Foxmarks is a more recent addition to my ever-growing list of Firefox Extensions, but it’s already proven itself many times. What it essentially does is upload my bookmarks to a server, and any time firefox starts, compare the local bookmarks to the server version to synchronize the two.
This makes a lot of sense if you have a scenario like me:
- A computer dual-booting into Linux and Windows
- A desktop and a laptop
- A computer at home and one at work