Tag Archives: Windows

Mount and Blade: with Fire and Sword

Earlier this year I decided to give Mount and Blade a try, only because Wikipedia describes the game as a “medieval, single-player nonlinear action role-playing video game”. For the first time, before buying the game, I decided to watch the typical “Lets play” videos, to see if I would (sort of) like the game.

Before I start going on that review-tangent: There are a couple of “Mount & Blade” games around. There are: “Mount & Blade”, “Mount & Blade: Warband”, “Mount & Blade: With Fire and Sword” and (just recently released) “Mount & Blade Warband: Napeoleonic Wars”. Today: I’m mainly going over the third game (Fire & Sword), as that version seems to be universally despised by M&B fans. While concepts between all the games are generally the same, Fire & Sword introduced firearms to Mount & Blade. The firearms aspect is what M&B hardcore fans mostly despise as apparently it’s rather easy to be killed by bullets than by arrows (the main projectile weapon in the original M&B series is the bow). Additionally, Fire & Sword appears to be sort of a mod on top of the original Mount & Blade, which does not include several game enhancements introduced by ‘Mount & Blade: Warband’, significantly, the option to build your own empire.

Surprisingly, since I started out with Fire and Sword, I find the game’s mechanics actually better than ‘Warband’. Certainly, if someone fires a bullet at you, you’re either dead or barely alive. However, during battle mode, Fire and Sword forces you to strategically position your troops particularly when the odds are against you. In Warband, while it does provide the option, I’m able to singled-handedly commit genocide even when the odds are 1 to 5. Anyway.

So Mount & Blade is indeed an ‘open-ended RPG slash strategy game’. You mainly move your band over an iso-metric map, collecting as much money as you need and taking on tasks from different factions. In Fire & Sword, the factions seem to resemble factions from Russian history books (Cossacks, Moscovites and Polish). When you cross the path of other warbands, you can either attack or run away. In the case of ‘attack’, the game puts you in a 3D map, where (from a third-person perspective on your horse) you can start attacking or defending yourself against a horde of enemies. There’s an additional aspect to combat: when you’ve collected enough experience, you can actually lay sieges and attack fortresses and strongholds.

On the overall, the combination of combat (sword, firearm) and RPG elements make ‘Mount and Blade’ a compelling game to play. As a matter of fact, I’ve not had so much fun as the combat and strategy elements are unique: there is no other game around where you can ride your horse and squash people with your sword or firearm, not to mention, laying siege and attacking fortresses and that all in first person. Surely, it’s not typically an easy game and it can go on endlessly, making you (mostly) forget about tasks you were assigned by your factions and friendly commanders. You don’t get punished for missing tasks. On my famous frustration scale (if you forgot) it’s a solid 7.5. Graphically, “Mount & Blade” is not a demanding game either (and to be honest, it does look outdated) so I think you should be able to run it on yer faithful Duo Core computer with a lower-end-ish Nvidia 96xx graphics card. If you’re into sandbox games with RPG elements and you love horse riding (haha), you should probably check out the game. If you’re not into ‘one bullet can kill you’ games but like horse riding, you may want to check out “Mount & Blade: Warband”.

Pictures below the fold.

Continue reading

The devil is in the SerialPort

I‘m surprised how many people look here for help on the .Net 2.0 SerialPort component (reference, which leads to this posting). I have plenty of example code, but I haven’t had time to re-test the project or even try com0com on this 64-bit Windows box. Com0Com (link) does support 64-bit environments, provided that you:

The com0com.sys is a test-signed kernel-mode driver that will not load by
default. To enable test signing, enter command:

bcdedit.exe -set TESTSIGNING ON

What is bcdedit?

No examples for now but my earlier mentioned posting should get you somewhere.

Ice, Ice, Maybe

Everytime a Wix script (Windows Installer XML) fails to compile, it logs ICE errors. For some kind of reason, whenever these errors or warnings pop up, I keep humming the tune of Vanilla Ice’s “Ice Ice Baby” (Youtube, if you’re so obliged).

I have always been a fan of NSIS (@sourceforge), the Nullsoft Installer System, but I hear that NSIS’s installers don’t run 100% flawless on Vista systems. Wix then, and that’s not because it’s the best system: it’s slow, clunky and the errors are highly Vanilla Ice, Baby.

A couple of years ago, I used to use InnoSetup, but nowadays, I find it too tied to the Delphi language: There’s no doubt in my mind that Embarcadero has great plans for Delphi, but their “reasons why you should buy Delphi” remind too much of the old ‘slogan’ days. You know: “RAD”, “productive”, “rich” and “ease”. I don’t want that: I want Push-Button Spreadsheet Power.

And shit, yo.

Canvas

During my programming career, I’ve ran into several cases where I absolutely had to use owner-draw to accomplish customized drawing. Originally, as a Delphi programmer, this required knowledge of the specific graphic wrappers around the Windows GDI (and GDI+) functions which Borland (appropriately) called TCanvas. The C#/.Net equivalent is called ‘Graphics’, which (admittingly) does not sound as fancy as Canvas.

That said: in my never-ending quest to fill a niche craving, I decided to look into the basics of photo-editing; that is, on a much smaller scale. The first step was to create a component that (given a specific image), drops a frame on it, which you can use to crop a photo (by either moving it and/or resizing it). Additionally, I always liked how some photo-editors integrate the Rule Of Thirds during cropping of photos, so, that had to be part of the custom-draw routine too.

There are couple of common tasks that need to be taken care of when doing own-draw stuff, all in C# (however, should be similar in Delphi):

  • The first thing is to decide which control you’re going to ‘descend’ from, or rather, which control is going to be your base-class
  • If your control requires user-interaction (i.e. mouse/key input), you should probably override the control’s MouseUp/Down and MouseMove events. Most likely you’ll need a couple of (private) flags that track down if a mouse button is still ‘pressed’. Add to that a couple of variables that track down the last positions clicked on the screen.
  • Separate the drawing routines and call these routines from an overridden OnPaint event.
  • Debugging (owner-draw) graphical routines is extremely painful, so think through your drawing routines.

Boring sample code is about to follow.

Continue reading

FFMpeg

Between all the ripping of my (legally) purchased DVDs and transcoding them to the proper format for my iPod I found out that most of the applications that I used have something in common (from Videora [free] to Mediacoder (open source). All these applications actually use FFMPEG under the hood: FFMPEG literally accepts many fileformats, open-sourced and runs on too many platforms (it’s highly portable, I guess). Trouble is, since it’s part of the other multi-platform media player (MPlayer) and, particularly, thanks to the legal minefield that is called transcoding, the binaries for FFMPEG are hard to find (well, you can’t miss it now!) (you can also fetch the sources and compile a binary yourself: you’d probably need to get the MingW compiler/environment).

Anyway, all videoconverter applications that I found had either crappy interfaces or they came with that ‘build-in’ Internet browser that allows the developer to push unneeded and unwanted ads to your desktop. So yeah, it shouldn’t be too hard to build your own fricking video converter. You only need to know and study FFMPEG’s commandline options after reading this (boring code after the fold).

Update: Slightly related: the BBC’s programming team released the very first version of their Dirac Video Compression codec.

Continue reading

You asked: Windows+applications+laptop

Obviously, a lot of people prefer buying laptops nowadays and the question ‘Which+applications+install+laptop+windows’ pops up regularly in the Apache logs at this domain. I’m not providing links to the applications (or will use links sparingly, I guess). I assume you know how to use Google.

Internet

  • Email – Thunderbird (and RoundAbout): Thunderbird is the logical choice for your POP3 and IMAP addiction. RoundAbout I still use to read all my older archived mails and may (or may not) work for you. Disclaimer: I was a member of the RoundAbout developers team. (open-source)
  • Web – Firefox, Opera and Safari (in that order): Firefox 2 is currently my default browser. Opera and Safari I regularly use to check for errors in CSS.
  • SSH, SCP and FTP: There’s only one good SSH client and that is PuTTy. This is actually one of the first applications I install on new computers. And while you’re at it: you may just as well download WinSCP. I think Alfons introduced me to SCP, like in, a long time ago. Currently, I don’t use any FTP client except for the command-line ones that come with either your Windows (ftp) and Unix system. I’m quite comfortable with the command line, thank you very much.
  • Communciation: I’m not a big fan of messenging and online communication, but yes, I do install Skype on my computers.

Media

  • ISO/CD/DVD: I use ImgBurn extensively. If I’m not wrong, the program uses some open/sourced/infamous/legendary applications underneath the screens.
  • Video: Because most AVIs I have are encoded in Div-X format, I install the DivX encoder/player, grudgingly. I have an aversion for Windows Media Player and I generally use Media Player Classic.
  • Audio: Audacity for editing and converting audiofiles to MP3 or OGG formats. As a reminder, if you download Audacity, don’t forget to download the LAME encoder.
  • Graphics: The GIMP (which is open-sourced, as you may have already found out). There are a lot of people who are impressed with Paint.Net. I haven’t tried it, really. For conversion to different (graphic) formats, you may consider Irfanview (freeware). I also use Picasa for (simple) management of my JPG photos.

Tools

  • Development: This ranges from the C# Express edition to SharpDevelop. Also, WinCVS comes to mind. Yes, I know a lot of people shudder at the thought of WinCVS. I use HelioSQL.Net for my SQL stuff. If you need to test and install test databases, you may consider installing SQLite and Postgres. Also, NSIS. TinyHexer (Hex-editor).
  • Office: OpenOffice, hands down.
  • Password management: I use KeePass, which is a great application with an unfortunate name.

I guess, that’s most of it.

MSIBA

This morning I noticed an ‘MSIBA.tmp’ entry in my (Windows) process list, which I eventually tracked down to a service named asurscsi. The service starts up that same tmp file (which I assume to be some executable) from my user’s Temp directory. It’s a left-over file from a Voyetra demo package I once installed, a couple of months ago. I’m not sure why it was never deleted during uninstall of that very same demo package (I think it’s officially called ‘Audio Surgeon’). I’m also not sure what it exactly does: the Voyetra pages aren’t all that clear.

If you’re so inclined you can either ‘disable’ it or remove it from your registry:

  1. Go to Control Panel, Administrative Tools, Services and locate the name ‘asurscsi’ in the list. Double-click and set start-up type to ‘disabled’.
  2. Open up a command prompt, and type in ‘sc delete asurscsi’.

Like I said, I’m not sure what the program exactly does, but since it’s not a critical service, you may just as well discard of it completely.

Your Windows just broke

So, you have a Toshiba laptop and Windows doesn’t want to start anymore and shows a message in the form of ‘system config corrupt’ and ‘please insert the original Windows disk and press ‘r’ to start Windows Recovery Console’.

If you read this, it is already too late (that is, unless you have the original XP disk, but this is highly unlikely since your Windows XP is an OEM one). Your only option is to use the Toshiba Recovery Disk (which should come with your laptop) and that one has several options but all of them lead to the ‘one way': DESTROY UR D474. So: before you run that, use Knoppix to retrieve all your precious data and start the recovery (this is not as hard as it sound: you basically insert the Knoppix disk, insert your USB backup drive and off you go). Or:

If you read this before something bad has happened: most OEM installs don’t include the much needed ‘Windows Recover Console’. This is something you have to install yourself manually and trust me, you will need it.

Most OEMs install basic Windows XP data in the C:\windows\i386 directory: this is the directory you should head for and look for a file called ‘winnt32.exe’. Install the Console by issuing the following command:

YourDriveAndWindowsDirectory:\i386\winnt32.exe /cmdcons

So: if you ran into that error shown above and you did install the recovery console, this is the Microsoft KB article you should read.

Visual

While working on billing software, I was planning to write something on visual inheritance in Visual Studio Express (C#): this feature is ‘amiss’ in the lower end versions of that programming environment. I decided not to because the concept is simple (and natural for all object-orientated languages). I like the way how it is implemented in Delphi, naturally, where all forms that work as your base class are stored in a central repository so that they can be reused for other applications as well.

Earlier we saw ‘Babel’ (2006), which I can only describe as ‘a complex story with a happy end’. I thought the end part was surprising, were the viewer finds out that that single phone actually happens in the past. The movie is rated R (nudity, violence and some drug use) by the MPAA.

I read that the bald eagle is soaring in the US. I’m not sure if I mentioned it here before, but there’s a pair of bald eagles living around Middle Stewiacke. I thought this was ironic (More on bald eagles in Nova Scotia).

And last but not least, I ran into one of those ‘ErrorSafe’ popups (it wasn’t stopped by FireFox). If you run across it, the (general) advice is to pull the plug of your ethernet before it starts downloading. In my case it didn’t make the download but if it did, Symantec has a page describing how to remove the program manually. (ErrorSafe was sighted around about.com). I used fandro to verify recently changed or created files.

That didn’t work

Windows Update downloaded the latest security update (KB925902), but after restart I got the folllowing error message:

RTHDCPL.EXE – Illegal System DLL Relocation. The system DLL user32.dll was relocated in memory. The application will not run properly. The relocation occurred because the DLL…

Alrighty!!! A patch gone wrong, apparently. On today I guess, the same day they released that security patch, Microsoft issued a hotfix (KB 935448). Notice that you may get errors while getting to the actual download: it appears that this fix is quite popular. If you run a RealTek card, you probably ran into the same issue. Particularly, if you own a Toshiba laptop.

Oh: and talking about patches, you may also consider updating your WordPress (see also here for more details).

04/04/07: Slashdot discusion.
04/11/07: A weeks later, the issue brought up over at the BBC.

The Tech-huh?

Left over stuff from the weekend:

The Neuros OSD, which claims to be the first Open Source Linux Embedded Media Center for US$ 229.00 or something. It’s the buzz around now since it’s Linux-based and (evidently) a growing community of hackers developing software for it: from FTP servers to XMMS2 streaming servers.

The other thing I noticed was the Debian Windows boot loader/Installer: it’s brilliant, although I have my doubts about it. When I have time, I’ll do a test run.

Windows Vista officially goes on sale today, but as you guessed it, don’t expect line-ups. What is really new to it? Even the beta-testers (the Windows fans as other would call them) don’t have me convinced. Better user-experience and productivity? They promised that since Windows 95, if you remember. And if Vista does break-even, what else can we expect in the future?1, 2, 3, 4 I bet that there are hundreds of discussions going on about that within Microsoft. Listen: if I’m not allowed to make a legitimate copy of a file and listen it elsewhere on my own property and on my own hardware, count me out of your ‘Digital Revolution’.

1 Michael Geist about Vista’s DRM and fine print.
2 Security researcher breaks Microsoft’s DRM.
3 Microsoft patents idea taken from professor
4 Microsoft withdrawing patent-application.