Mini Whiteboard

Today I’m gonna write about my mini whiteboard. I bought this whiteboard about half a year ago. I never really used it because I thought it needed to be put on the wall. I was too lazy to do that ( yes, I really was).  A few days ago or was it actually Sunday, yesterday it thought to myself “hey… why don’t give it another try… you don’t need to put it on the wall .. just use it like paper!”. So I did. And it’s actually fun. You can draw silly stuff you’d never draw on paper because of the permanent fear of people checking your trash for naughty drawings. After drawing you just clean the things you draw away.

Let’s talk about the specs. The mini whiteboard I have is bigger than usual “A4″. It’s square in shape (You could for example do some geometry hacks. w00t!) and one side measures 41 cm ( ~ 16” ). I got a blue pen, a few magnetic “hands” and a cleaning magnet with it. I don’t really need the hands. It would make sense to use them for paper notes or other stuff when the whiteboard would hang on a wall. Maybe I find them useful later.

Why should anybody use a whiteboard at home?  Maybe you want to program something and gotta sketch your algorithm or just draw a big smilie.  Maybe you’re a drug dealer and try to find the best cutting ratio and gotta handle variables. If you have a webcam or a digital camera you could make stop motion animations. You can use your whiteboard for solving your math homework or for drawing the nightsky in detail in inverse colour if you have savant syndrome. You can play tic-tac-toe or design new games on it. You can use it as messageboard or chatroom if you never see your flatmates. Design a new recipe on the fly while you cook with the stuff you just found in the refrigerator. The cool thing is. You don’t waste paper. You can draw and draw and draw and if you think something should be put on paper you can do copy it or take a picture of it. Maybe you  glue magnets to mugs and use the whiteboard as secure mug holder.

If you think “hey .. . maybe I should try out a whiteboard but I’m not sure I want to invest [how much it costs] and then after a while I throw it to the neighbours garden.” you don’t have to buy one. You can start by making one with paper, cardboard and plastic foil. Use the almighty google to find some manual. If you are too lazy look if you find a used one or just start drawing on your bathroom-walls. Maybe that’ll give you some inspiration.

And now let’s draw that naughty stuff!

My mini whiteboard
My mini whiteboard

“Use break in every switch case!” aka “The idiot in me.”

Today I experienced an Eureka! moment at work. I was working on some JavaScript code the whole week and didn’t understand why that dynamic stuff didn’t do what it should. I wanted to make some (yeah, boring .. HTML tags … sorry) multi-select list box where you can add your own options. I made buttons to select all options or default options or none. I just didn’t get those buttons to work. My code seemed correct and I just didn’t get it (note … because I used ActiveX-stuff I couldn’t really debug it in firebug…  and the Microsoft debugger  for IE wasn’t too helpful either).  Anyway… I thought ” hey .. if that multi-select list box won’t work I’ll program my own thing!” . Wrong, just wrong… 😉   .

I really made my very own nice multi-select   in JavaScript. But ..  the same thing happenend again. The same error. I thought I’m getting insane or something.  How could this be. Should I already arrange myself a room in an nursing home?

After several hours of searching help online and trying to find mistakes in the code I suddenly saw something.  In a function I had used the switch statement which you also have in other languages like C, Java or even in Visual Basic although it’s named “SELECT CASE … END SELECT there. And in the Basic-version you just have CASEs and only the stuff you put in a case will be executed. That makes sense.

A trivial example (yeah this doesn’t really make sense… I know that.) :

Visual Basic (I think, in VBScript it would work, too):


dim animal

animal = “dog”

Select Case animal

Case “dog” : MsgBox(“Dog.”)

Case “cat” : MsgBox(“Cat.”)

Case else : MsgBox(“Unknown pet.”)

End Select

-> the result will be a dialog bog with the text “Dog.” in it.

If we do this the same way in Javascript (or probably many other languages)…

JavaScript:

var animal = "dog";

switch(animal){

case “dog”: {

alert(“Dog”);

}

case “cat”:{

alert(“Cat”);

}

case default: {

alert(“Unknown pet.”);

}

}

What will happen here? First we get a dialog box saying “Dog.” then another dialog box saying “Cat.” and a third dialog box saying “Unknown pet.“.

Why is it like it is? Probably because you can construct stuff that will trigger several options with less code.  That’s if you want to do that. I wouldn’t want to do that. That it’d be very hard to read after a few days.

So what I have learned is…  use “break;” in every switch case! I don’t want to debug code for such a joke of bug anymore in the future.

The cool thing about such mistakes is… you most probably will remember them for a long time. And when it happens on a Friday you really have achieved something! Hooray.

I bet (and hope) everybody has their little bugs they had to invest massive amounts of time. The feeling of joy you get when you finally solve the problem correlates directly with the amount of time invested and is really great. Except when the problem inducing thing was something ultra small. Then you’d (or at least I’d) like to hit your (my) head on the table for several hours.

It’s nice to be an idiot when it’s only for a short moment.

HTML Color Codes

Yesterday at work I searched for a tool for getting html color codes fast and easily. I found the page http://html-color-codes.info/ . On that page you have a color picker where you can choose a color in seconds and get the correct RRGGBB code for it.

Ok… you’d probably find that page when searching for “html color” in google but maybe you’d like to add the link now to your bookmarks.

That’s it for now.

Spore

Hmm … last post was like over a half a year ago. Shame on me. But isn’t it better to shut up than just to force yourself to produce text when you don’t have anything important to tell?

Today I’d like to talk about spore. I assume there are already over 1 billion blog entries for that game. But hey…  probably somebody is interested in my opinion! We are all individuals, right? (individual #123 : “No I’m not!!”) ok.

Well… spore… spore is a game which was created by the same guy who has brought us Sim City and the whole Sim-whatever-series (including Sim Life, Sim Ants, Sim Tower, Sim City 2000, 3000, ok ok  enough 😉 ), Will Wright.

The idea is easy. You play through evolution (sorry to all you religious people out there!) in fast forward. You start with a protozoon (had to look this up) or something similar and evolute until you have creatures that build ufos and abduct poor, underdeveloped creatures from far planets. You can also kill them with a nice laser beam (*har har*)!

The cool thing about this? There are several different playmodes in this very same game. In the beginning you have this pacman-alike mode where you search for plankton to grow (and collect DNA or food or something) and every now and then you call for a mating partner and make that sweeeeeet luuuv’ .  And no .. you don’t see the process of reproduction, just some hearts ♥ .Ok enough of that. Every time you copulate you get into an editor where you can add stuff to your super small creature. You can add more eyes (or even make a creature without eyes!),  add mouth and defensive mechanisms like  poison or good old electrocuting-eel-taser. In this fashion you continue to some extent and then get in another phase.

Your creature will leave the water after some playtime and you can start messing around with limbs, tails, backbones and the details like mutliple mouths and eyes in the belly or whatever you like. Your creature can have 3 legs, 7 short t-rex arms which aren’t useful at all or other strange stuff. You can create your own frankenstein’s creature. You can create your worst nightmare and have fun with it!

Later you get into tribes and can fight other tribes of other species.

Even later you can build cars (you can design them yourself. how cool is that!), houses, ships and airplanes and conquer the whole world!

As soon as you have reached that you can fly into space and start abducting other creatures and conduct experiments on them (ok haven’t got so far .. don’t know if you can really do that). And you can colonize planets and so on. I can’t tell you more because I need to continue playing to be able to.

The animations of those 3d-monsters will be created with some clever algorirthms (at least I hope so) and also the planets (there are like ∞ planets because those are created in some procedural way, too afaik. ) . The game will get creatures of other players from the internet and include them in your game. So maybe you have some strange aliens on some planet which were designed by Klaus from Germany or by Igor from Russia. The possibilites are endless. These procedural concepts come from the demoscene (check www.pouet.net and wikipedia) who have to use tricks for putting many minutes of 3d realtime animation with music into as much as 64 kbytes (also check Candytron by farbrausch).

Here you have some videos of my creatures:

This is an editor where you can give your creatures accessories.

Here you can see one of my creatures domesticating a wild creature.

Here you see me flying the ufo and ‘scanning’. hrhrhr.

Thanks for reading!

pimuri

Ordinary morning commute.

I’m working in the outskirts of Berne, the capital of Switzerland. So I commute approximately 3 hours per day. First I walk to the bus-station. Then I ride the bus to the train station. After that I ride the RBS (it’s a train) to Berne. It takes about 35 – 40 minutes. This doesn’t seem long. But it’s a long ride when you have too much fluid in your body (and feel an urgency…) or aren’t in the mood to listen to early birds chatting about nonsense. I usually read the free daily newspaper “20 Minuten” ( English. “20 Minutes”) . Okay, usually I start with the crossword and later go through the rest. This newspaper is more like a doughnut with lots of sugar and fat (news about celebrities, horoscope, some comics I find very boring and some “important news”, too) than like a healthy meal. But hey! At least it’s free 😉 .

I try to solve the crossword using my left hand rather than using my right, “the right”, hand. I read a book called “train your brain” (ISBN-10: 3453600649 , ISBN-13: 978-3453600645 , I think there’s only a German version right now…) by Rüdiger Gamm. He’s called “The Human Calculator”. He can do unbelievable calculations in his head. In the book he writes what you can do for having a good memory and a well-oiled brain. It’s not only about memorizing techniques and nutrition but also about “brain synchronisation”. E.g. do things you usually do with your right hand with your left hand (writing, brushing your teeth, etc … but he says you should avoid shaving with the “wrong” hand because that can get bloody 😉 ) to activate those brain hemispheres. So that’s is why I’m solving the crossword with my left hand in the train. Even if it doesn’t make me smarter it’s still cool to be able to write with the “wrong” hand and better than learning nothing in the train.

Creativity in games

Fez

Today, a friend on IRC posted a link to a small article with a video. It’s about a Jump’n’Run game in development called Fez. There actually isn’t much text in the article. The author seemed to like this game very much even though he hadn’t played it yet. But… there is a video! In the video you first see a pixelated Super Mario alike game. The music which is played has this retro-touch (say C64, Amiga chiptunes and the like…) . It first doesn’t seem too spectacular.

(I wonder if this ghostlike thing, that represents the player is in this game, is some future promotional figure for dairy products?)

Fez

Screenshot from the linked video on the article “GDC 08 : Fez, the best game I have never played” .

It could be just another 2d Jump’n’Run. Saw that, next… but wait! At approx. 0′ 55” you get a small glimpse of what is different in this game. Suddenly the camera rotates in the 3rd dimension.

Fez

Screenshot from the linked video on the article “GDC 08 : Fez, the best game I have never played” .

In this game you can and even have to switch perspective to get further. In the video how the player switches the view to get on top of that strange structure. I think this is going to be funny and a good practise for the brain.

On the following two screenshots you see basically the same. On the second picture the view was rotated so the player has access to some previously unaccessible area.
FezFez

Screenshots from the linked video on the article “GDC 08 : Fez, the best game I have never played” .

Well I’m curious how it will be to play this game and when it will be available. If I read correctly it is made for PC. But maybe they will port it to other platforms, too?

Warning Forever

A game that has addictive potential and is already available (for several years..) is the freeware game “Warning Forever” for windows. It’s a 2d shooter made by a japanese guy named Hikoza T Ohkubo.

Basically what you have to do in this game is shoot and dodge (oh .. now that idea is so “new” 😉 ) . There is always only one enemy on the screen. It’s always some huge endboss who tries to destroy your “vector grahics” spacecraft.

Warning Forever

Screenshot from “Warning Forever” : Here you see me getting “kicked in the butt” by the third boss.

After destryoing a boss you get some stats about how well you did in this level and some time to breath. In the next level the enemy will be bigger and have more weapons shooting at you. If you get killed during the game you don’t lose lifes but time. For each level you get a basic ammount of time to get through. If you get killed you lose precious time. So this game is good if you like some adrenaline.

I like this game because it’s quite simple and addictive. It’s not complicated like many games today are. This game was made by one person. There are big companies with huge budgets who make games less addictive.

One advantage of making a game all alone is … you don’t have to listen to what some managers tell you to do. There is no deadline. You can make the game exactly how you want it to be. Of course I understand that game developers who earn money with their work can’t be blamed for this. It’s just about the same with artists who try to make money with their work or those who just do it as a hobby.

Ok enough of loud thinking ;-).

You can get “Warning forever” here.

If you like smaller shooters like this one check out the homepage “ABA Games” . There’s more creative, adrenaline releasing stuff!

Eight-ball

Yesterday evening I went out to play eight-ball ( in Switzerland we just call this “Billard” ) in a local club with some friends. We were three, so we had rotating 2 vs. 1 teams. Because I don’t play this game too often I usually live on lucky strikes. I (or probably it’s my subconsciousness) surprise myself when I try to pocket a ball and then something chaotic happens. I pocket a ball of the opponent, the targeted ball goes in the wrong pocket or I plunge the white ball (d’oh). Well, that’s probably just irrational behaviour because of wrong use of force or bad aiming. But when I pocket one of my own balls (it’s still about eight-ball, okay?) in such a situation I want to send my congratulations to my subconsciuosness ( I had to look up this word in my preferred german-english dictionary LEO).

Eight-ball and all other variations of cue sports seem to be quite good to practice concentration, coordination and to some extent body control. In this local club “Cue Club 311” the music is quite loud. So this is like added value or an additional obstacle you have to conquer. If you add beer to it (what I didn’t do on that evening) it’s even harder to be good. So if you don’t like to practice your brain, cue sports in loud clubs while drinking alcoholic beverages seems a nice option which also can be fun.

Darts is also fascinating. I once saw some Darts contests on television. It’s fantastic how well a human can throw such a small object on a targeted area on this relatively small dartsboard and even repeat this several times like a robot on an assembly line.

Later that night at home I watched the very first episode of “Married… with Children” (original language version – I have to add this information, because in german speaking countries usual the movies and series are translated and e.g. Al Bundy talks german! When I was younger I liked that because you didn’t have to think too much. Nowadays I prefer original language versions. It’s cooler because you hear the actor’s original voice, the jokes aren’t modified and your brain has some work to do. Sometimes I need subtitles because some dialects are very hard to understand) . It’s one of my favourite series that have been made. Some people don’t like that kind of humour but then I probably wouldn’t get along with those people, either 😉 . The only thing I don’t like too much about it is the recorded laughter in it. It almost forces you to laugh. I prefer to be able to decide when to laugh and when not 😉 .

Ok this is it for now,

pimuri