Archive

Archive for the ‘General’ Category

Mac and Windows not resolving *.local hostnames

January 4th, 2011

Yesterday, after all these holidays, I was trying to get back to working on my game. For developing iOS games I’m using: my laptop with Windows 7, that hosts all code in SVN; and a Mac Mini with Mac Os X, that I basically use to port and test games on iOS. For several months, I had them in separate rooms, because our house has one router in a garage, and each room gets only one Ethernet cable. So yesterday I’ve got another router, setup a mini network in my room and connected laptop and Mac Mini to it. I’ve committed all the code from laptop to SVN, proceeded to check it out on a Mac Mini, and was surprised with a nice “Host sandbox.local not found” (sandbox is a hostname for my laptop).

I’m using Bonjour (which is an implementation of Zeroconf) on Windows to resolve it’s hostname to IP for Mac. It’s a single nice side effect of having iTunes installed. :-) Our router has a DHCP service, and since I’m using laptop in a lot of different places I’d hate to mess with “/etc/hosts” and switch to a static IP, or relocate SVN in a Mac Mini to a different IP of my laptop each time I needed to get sources from SVN. It’s so nice just to be able to enter “svn://sandbox.local” for a repository url and see everything magically work. So if you’re struggling with a similar situation, then I advice to look into solving this with Bonjour.

And finally the solution to the problem… since Bonjour uses multicast for it’s service, router also must support it, and it must be enabled. I’m using Linksys BEFSR41, so for me the option was in “Security->Filter->Filter Multicast”, and it simply had to be enabled. The option is also misleading, as it seems that enabling it would actually filter out multicast packets, but it’s backwards. Another name that this might hide behind is IGMP, so if it’s not working, then check related settings too.

Smilediver General , , , , , ,

50 lines of code. To little or a lot?

July 1st, 2010

Just finished organizing a small local gamedev community contest, that lasted a bit over a week, and where participants were required to write a game in just 50 lines of code. When I’ve announced the contest, reactions where kinda interesting. People were asking if 50 was a mistype and I’ve meant 500 instead of 50, some stated that it was hard and some even argued that it’s impossible. On the other hand, some just asked questions to clarify rules and went to work. Later in the evening someone already sent me a game written from scratch. Wow, that was quick. :-)

The common problem at the start was that old thinking habit. People were shocked: it takes more lines than that just to initialize the window and start OpenGL or DirectX. And what about loading assets? Models, textures, levels? And arghhh… engines! This shows how such habits are really constraining creativity. Instead of thinking about game ideas, and only then about how to stuff those ideas into 50 line limits and other constraints, people go the other way and try to think about limits, their usual ways of work and only then about ideas. As my experience through whole game developers career showed it multiple times – it’s a bad thing to do. As they say: think out of the box!

Star Wars Kamikaze game. My entry for contest.

Contest’s main rules were quite simple: only 50 lines of code, any programming language was accepted, and game could use unlimited amount of assets (data files). Unfortunately, I’ve had to add some sub rules to explain what exactly one line of code was, because it’s very easy to abuse this with reaaaaally long lines. So, rule of one command per line was added. As expected, it’s hard to grasp what one command could mean, so I’ve had to add a bunch of other sub rules, to explain what was allowed and what was not. This is probably the only part of the contest that has failed, because simple one line rule became a couple pages of explanations on what was considered one line or command. I’ve wanted to keep it simple, but it quickly got out of hand. Next time, I think it would be easier just to limit line length to 80 or so symbols, so in the end, you just need to keep your code in a 50×80 box. ;-) Then the only problem would be language differences, where some languages may be able to stuff more code in a single line than others.

JTG - Journey Through Games by KestasL. Winner of best game award.

Despite some problems with rules, final games were AWESOME. It’s amazing what is possible to do in just 50 lines of code, and I must say, that some games made my jaw drop. This is the link to the final games with their source code, have a look at it: 50LocAllGames. In the end 10 games were submitted and participated in the best game’s vote, and 3 more submitted applications were disqualified, because they lacked common features making them as games. The best game was voted “JTG” aka “Journey Through Games” by KestasL. It’s absolutely amazing, considering it was written in just 50 lines of code. Yes, it uses a lot of assets, but the idea and concept of the game is ingenious! Congratulations to KestasL.

Conclusions? 50 lines of code is a lot! People imagination, as always, has a surprise ready. It was a great deal of fun. It’s awesome to write small games in a small amount of time and get the feedback quick. In the end, contest went really well. It was a lot of fun and people liked it. I want to organize it sometime again, and I already have some interesting ideas floating in my mind. ;-)

Smilediver General , , ,