BenV's notes

Widelands, settlers and scons

by on Sep.18, 2009, under Fun, Morons, Software

Today the project to try out is Widelands, apparently a Settlers clone.
Since I loved the Settlers (the first one was the best) when the graphics were still acceptable, it is interesting enough to try it out. What I loved about the Settlers was the whole simulation concept. The construction of buildings, the little lemmings that moved the goods around, chopped down trees, fished, etc. The entire war aspect of the game was terrible (what do you mean my maximum level guy just got p0wnz3d by their new lowlevel rookie?!) . Therefore I liked the games that followed less and less. Settlers 2 was acceptable, a welcome upgrade in graphics and interface and stuff like that, but the war aspect… blegh. Then at 3 I had enough of the series. Why can’t it be a simulation where tribes co-exist in peace? I see how that might not attract many gamers, but how about an option huh? Another thing that was great about the Settlers 1 was the multiplayer multi-mouse splitscreen mode, where both players had a mouse on 1 PC and could control a single empire together. With SVGA mode it was great 🙂
Today you need dosbox to run the ancient Settlers 1 game, but that’s no problem. However, I would like to see a remake of that game (preferably without the combat element), because the ancient graphics etc are just agonizing now that I’m spoiled with high resolution and more advanced games.

The Settlers 1

The Settlers 1


The Settlers 2

The Settlers 2


It seems that they have arrived at Settlers VI these days. The graphics look impressive, but I wonder how the gameplay came along in all those years.

Anyway, today I decided to try out this free open source clone (that can even import Settlers II maps these days, isn’t that cute?).
So on to the build process. I leeched the SVN version (you know me, official releases are for sissies) and took a look through the source. Waaaah! SCONS…. so much for getting my hopes up. Oh well, let’s see how well it does today.
Running scons started with some notifications about not having optipng and pngrewrite and such (might get those later if I care about those 3 bytes they might shave off, I like the programs though) and then bailed out with this:

Could not find the SDL_gfx library! Is it installed?

To which I told it “No, it is not.”. Guess I’ll have to fix that for you huh? Fine. (yeah, I don’t bother to check requirements these days… they’re all for pokemon OS anyway, I’ll just find out where the train stops by letting it derail).
So I find the SDL_gfx site from google and copy paste the latest release link to slackbuild.pl, which leeches it and starts compiling. Until:

libtool: compile: gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"SDL_gfx\" -DVERSION=\"2.0.19\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DBUILD_DLL -I. -g -O2 -O -DUSE_MMX -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -MT SDL_imageFilter.lo -MD -MP -MF .deps/SDL_imageFilter.Tpo -c SDL_imageFilter.c -fPIC -DPIC -o .libs/SDL_imageFilter.o
SDL_imageFilter.c: Assembler messages:
SDL_imageFilter.c:34: Error: `pusha' is not supported in 64-bit mode
SDL_imageFilter.c:38: Error: `popa' is not supported in 64-bit mode
SDL_imageFilter.c:77: Error: `pusha' is not supported in 64-bit mode
SDL_imageFilter.c:93: Error: `popa' is not supported in 64-bit mode
SDL_imageFilter.c:152: Error: `pusha' is not supported in 64-bit mode
SDL_imageFilter.c:176: Error: `popa' is not supported in 64-bit mode

Oh really, asshole… mhm, maybe google did not give me the latest release page. Or maybe SDL_gfx fails. Let’s find out.
So I run into ohloh’s sdl-gfx page, that has a button that made me slightly mad/angry/annoyed/I kill you.
It looks like this: Where’s the download?. Yeah, where’s the fscking download, that’s what –I– want to know. So I follow the link and get the option to

provide your users with downloads in 2 ways

. *RAAAH*. Do I look like a project manager to you? *RAGE*.
The quickest way to fix these kind of issues is usually to forget about official sources and immediately walk to the pokemon OS repositories to get the patches. Funny how they are convenient sometimes. So I run to their latest repository version, fetch their patches and check them out. Huh, no patches for this? After which I finally read the README from the official SDL_gfx source. *hehehe*, maybe I should have done that before I started ranting about this. The README mentions:

To build without MMX code enabled (i.e. PPC or for AMD64 architecture
which is missing pusha/popa):
./configure –disable-mmx

Aha! To be fair, it was kind of hidden in the README after a lot of blabla about stuff that I really don’t care about like what primitives it supports. Normally I do read the INSTALL file, but that contains the boilerplate GPL install file for this source. Makes me wonder why they don’t automagically disable MMX, that’s what configure is for after all. Oh well.
With the –disable-mmx configure switch it compiled and I had a package. Back to Widelands:

Checking for ggzcore_conf_read_int() in C library libggzcore... no
Could not find libggz or ggz-client-libs! Are they BOTH installed?

What the heck is libgigglez?

libggz wraps many common low-level functions which are often used in C programming.

I see, another Boost wannabe. Or maybe libc. Or glib. You get the point.

The first such group is memory handling, which offers functions such as ggz_strdup() or ggz_malloc(), which resemble their counterparts from libc but are more convenient to use. For instance, ggz_strdup(NULL) returns NULL instead of crashing, and ggz_malloc() includes a reference counter to be used for debugging in combination with ggz_free().

Ahaha, yeah, more convienient. Instead making sure you’re not trying to copy garbage in the first place you could simply copy NULL by using ggz_strdup and have your program end up with empty strings or a not working communication protocol. Much more convenient indeed 🙂
And obviously they haven’t heard of the malloc debugging features that are already present in the libc library. Hopefully their debugger is more easy to use and shows more info, but I don’t care for now. I’ll regard this ggz library as “More choice is always better”. Let’s see if it works on slackware64.
I stashed libggz-0.0.14.1.tar.gz through slackbuild, which compiled it without any issues. Good. Scons also wanted ggz-client-libs so I also ran it through slackbuild. Another win for slackbuild.

Back at Widelands scons finally agreed on the libraries and went on, then complained about my TERM variable since it was not equal to “xterm-color” or “dumb”… seriously, why bother checking if you’re going to act retarded anyway. Stick to terminfo/termcap for color support. After that it complained about me not having ‘krazy2’ and

you will submit code with i. a. spelling errors!

Yeah, that’s just what I was planning to do. And they will quake in their boots when looking at my code.

After 5 million more “Checking for errors” checks it went on compiling. Finally it said:

*** No errors detected
scons: done building targets.

Time to play!

Widelands titlescreen

Widelands titlescreen


The game indeed looks/feels like the Settlers 1-2:
Widelands ingame (1)

Widelands ingame (1)


Widelands ingame (2)

Widelands ingame (2)

While it’s still very much in development, it already is fun to play. You’ll recognize a bunch of stuff from the original game, but Widelands also changed some things like buildings and resource names. For example where Setllers 1 required a Sawmill, Widelands requires a “Wood hardener”. Convenient stuff like watch windows are implemented so you can keep track of a building, roads can be built piece by piece but also in 1 go like in the later Settler games, statistics about buildings and production, and there’s tons more. They included background music and sounds like birds singing etc, which is cute, but it’s a good thing they can be turned off as well.

Widelands with watch window

Widelands with watch window


Another thing in the game is the story stuff. An advisor will now and then tell you to do stuff or give background information on the land etc. Fun, but sometimes annoying when you’re doing something and the advisor suddenly feels the need to nag you.
Widelands ingame story stuff

Widelands ingame story stuff

So far I enjoyed playing the tutorial campaign. However, I haven’t done the combat part yet, I’m quite sure I’ll get bored of the game when I run into that….. but don’t let that stop you!
Go give the game a try, it’s fun 🙂

Widelands ingame Statistics

Widelands ingame Statistics





Leave a Reply

You must be logged in to post a comment.

Archives

  • 2018 (1)
  • 2016 (1)
  • 2015 (7)
  • 2014 (4)
  • 2013 (11)
  • 2012 (27)
  • 2011 (26)
  • 2010 (25)
  • 2009 (68)