Category: English


… is to find a job in Greece. With the unemployment rate peaking at about 20% at the moment, to say that someone got a job (any job) these days is reason enough for hearty congratulations and celebration. To land a job on your field of expertise is inconceivable. Well what do you know, starting Monday I’ll be working as a software developer & software engineer at Interworks and I’m very excited about it!

I’m posting this here as a disclaimer of sorts, to clarify that this blog, its contents and my own projects are not affiliated nor endorsed by my employer (unless noted differently).

 

 

P.S: Interworks is perhaps the largest cloud & Microsoft services providers here in Greece, plus a Microsoft Incubation Center for Eastern Europe (now that’s prestigious)!

Friends who live out of the country keep asking me: “How’s the situation really in Greece?” (to say that they don’t trust the conventional media, would be an understatement and I can’t blame them).

Well, what do you know; things are actually lovely here. Apart from a wee little problem that is… (two, if you include the rather harsh weather that keeps going for about a month now): There’s an ever increasing shortage of cash. You see, most of us don’t really care or know about the crisis – after all, we’ve been hearing about it (combined with the tactless threats about a potential bankruptcy) for more than three years now – we got used to it.

The actual problem behind all this mess is having a government that doesn’t know how to do its job properly, attempting to milk dry the low and middle class with ridiculous urgent taxes while at the same time ignoring the real issues, such as grand tax evasion. This is further documented by the terms on the memorandums we’ve signed – there’s no requirement on punishing the real thieves and cheats, no agreement on any kind of substancial reforms; they terms mostly consist of savage measures against the less fortunate.
View full article »

Ever since I completed my (mandatory) 9 month military service on the 4 of November 2010, I was planning on creating a game that would mock it a little. I was aiming for a simple Tower Defence game and my platform of choice was Silverlight.

Only, there were two problems. First, I was busy at the time; there was no time (or mood) for side projects. Second, I had no experience with Silverlight at the time. Had I proceeded, there would be a third problem, the fact that Silverlight never enjoyed any real recognition and then it was repurprosed for the Windows Phone Platform. Plus, I’ve never worked with Flash (which would be the logical choice) so not only I’d have to spend time learning it, it would also cost me quite a bunch.

 

Fast forward one year and a half later. The other day, I came across this: http://www.cuttherope.ie/ which is a port of the famous Cut the Rope game to Javascript and HTML5 canvas. Well well well, look at that. Excellent framerate, nice UX and good compatibility (IE, Firefox, Chrome and Opera – no Safari though).

Seeing this, I’ve decided to have another look at my game idea (yeah, I still haven’t learned Flash, nor I have the money to buy it). While I am not new to the concept of 2D game creation and its requirements (I made a simple platformer 10-15 years ago in DOS) I had completely no idea about working with the Canvas element.

Looking around the internet, I found a rather comprehensive list of JS game engines, all with different levels of features, complexity, licensing and documentation. Thing is, I did encounter a few problems with almost every engine out there. Since the type of the game I was planning was a Tower Defence game, most of the baggage that comes with these libraries is not really useful for such a game. Combine this with the rather primitive documentation on most libraries, the learning curve is very gradual (that’s bad).

Here are some game engines that I found particularly interesting:

  1. Game.js This is an example of a small & solid engine which has rather tight coupling. It’s worth looking at, but you can also have a look at…
  2. Crafty has an interesting feature, in that it’s component based. Adding features (such as collision detection, movement etc) is as simple as attaching a component to it. It works very nice, but the documentation/tutorials are a bit anemic, plus it doesn’t support layers which I kinda like to have.
  3. The Render Engine is a monster of a game engine. However, due to its complexity and the lack of proper documentation and tutorials I find it kinda hard to get into. I will definitely keep an eye on this one.
  4. Melon.Js is a game engine that’s almost exclusively designed for platform games. Plus it has some nifty features, such as that you can design a whole level using an external editor (Tile) plus that it supports viewport scrolling out of the box. Since I’m planning on creating a platformer for my next game, I’m seriously considering using this one.

In the end, I decided to do it on my own and start from scratch. Well, not completely that is. I came across Kinetic.JS which offers some few but useful features. Specifically, not only it supports layers, but it’s designed to work with double buffering under the hood (which drastically increases performance). It also handles the drawing of objects for you.

 

So far, I created a Sprite class that subclasses the Shape class of Kinetic.js that represents a… shape object with which you can interact. I added some basic sprite map & graphical state support and it works ok so far. I’ve tested rendering 210 32×48 sprites with 4 levels of animation each in a 800×480 window with no performance issues (with the exception of Firefox which has an issue with mouseover – I have to look deeper into it). As soon as I make progress with the game, I’ll post again.

 

I am far from an expert with Javascript and I’m sure that the end result could be improved. In any case, when the game is posted I will post it under a MIT license with sufficient documentation.

Dear Content Creators (all of you, but let’s focus to the Game Industry for now),

 

I bought your game. Against my better judgement that is, since it proved to be an 8-hour €60 holding-hand crapfest, but I bought it. Your marketing spent millions of dollars to convince me that this game is so “rad” it could tele-rape my grandma. Well, guess what, my grandma was not tele-raped (thankfully) and I feel particularyly disappointed for bying this game.

View full article »

I was considering posting about ACTA, since 22 E.U countries signed it, but then again, lots of people have already provided excellent commentary on the subject (google about it; you’ll find lots of resources on the what and the why nots of ACTA).

However, while doing my own research, I came across the European Parliament’s Petition section of their web site. This is the real real, not a “me too!” petition website that nobody cares for most of the time. One could argue that, although those countries signed the treaty, unless the European Parliament votes for it, it will be for naught. The problem is that the majority of our representatives in most cases are either clueless about the effects of legislations they vote, or even downright malicious (as was shown in the US SOPA/PIPA vote). It’s our job to inform them, since they made their job to decide for us.

I’ve decided to compile a petition, using parts of existing petitions online plus some writing of my own, while at the same time keeping it as brief and informative as possible. Here’s what I’ve come up with:

 

Title: Vote against ACTA at the next E. P. cabinet meeting.

Dear Members of the Parliament,

As a citizen of a country in the European Union, I want to voice my concerns against ACTA.

ACTA stymies innovation and creativity in industry and on the internet by restricting new developments in science and medicine, diffusion of green technology, and emerging applications and software. ACTA does not represent balanced internet governance or efficient protection of intellectual property. In addition, it threatens civil and human rights of E.U citizens, allows for future attacks against net neutrality and creates a precedent for external pressure into the creation and approval of EU laws.

The US, India, Brazil and China have all rejected ACTA because its over-reaching language goes beyond the laws of their countries. Why should the EU be subject to restrictions that its competitors do not face?

For more information about my concerns on ACTA, please visit the following links:
http://en.wikipedia.org/wiki/Anti-Counterfeiting_Trade_Agreement#Criticism
http://www.laquadrature.net/en/three-core-reasons-for-rejecting-acta
http://www.laquadrature.net/files/201001_acta.pdf

Sincerely,
[Your name]

 

I’ve already sent the above petition and urged others to do the same. You can send the petition message as is, alter it or compose your own from scratch. Whatever you choose, do voice your concern and join us in the  struggle against this profound example of reckless and unbound corporatism; rest asurred that ACTA is only a single step towards that direction (not the first and certainly not the last).

Also, please share this call towards action with the people around you: Post a link to the European Parliamanet petition center together with this (or yours) petition message message to your social networks; participate in other petitions should ones exist (like this one); no matter what you do, don’t choose inaction.

 

Expecting the politicians to grow a conscience is unreal, expecting politicians that were not elected by the people (such as the members of the E.P) to act in our interests versus those of big conglomerates is downright impossible to fathom.

Act now.

Caveat emptor: I understand that this is a touchy subject for some. Well, tough luck, to those people. If you want to respond, please do so in a civil manner or else your messages will go the way of the dodo. I welcome all arguments as long as they don’t devolve into personal attacks, logical fallacies and unsubstantiated opinions.

 

When I was 14 or so, I had an epiphany. “Wow, everything I knew about religion sounds so incredibly stupid”. It progressively got worse: I started questioning everything about it. Suddenly, I was demanding proof about things I was taking for granted in the past, ending up in heated arguments with the majority of my environment.

The first real argument about Christianity’s teachings came a few years before that time, with my father criticizing parts from my theology high school book (a mandatory course). I realized that I didn’t really have any serious arguments to counter his. I remember vaguely that the only argument I could offer was that “religion isn’t bad as long as it remains personal”.

My father didn’t pursue the argument further. But the “damage” was done; slowly but steadily I started questioning things I was taking for granted, leading me not only to the epiphany I mention in the beginning but to a complete transformation on the way I handled unsupported and/or obvious claims too.

View full article »

I’ve decided to keep the default title the WordPress gives to the post it autocreates on new installations. I think it’s fitting; what better way to signify the conversion from BlogEngine.net to WordPress?

But first things first.

View full article »

The requirement

A few months ago came the need for a fax machine. Worse yet, it had to reside on a dedicated phone line since the main line was configured to redirect unanswered calls to a mobile number after a number of rings and incoming faxes could occur any time of the day.
View full article »

Generally speaking, I don’t like wasting time hunting down framework bugs. It’s not that I don’t like a challenge, it’s just that they are usually hard and very time consuming to fix (if at all possible), especially in case you have to deal with fringe cases (in other words, “Google isn’t going to help”).

Since we have lots of clients that are not limited to english-speaking markets only, Unicode has been a way of life for us, supporting it since we got off Windows 9x and moved on to Windows 2000. It’s always frustrating to see technology that doesn’t play nice with Unicode, especially considering that this is 2011, where everything is social and interconnected and having multilingual thingies is beyond cool; it’s a necessity.

I’ve stated before that despite its flaws, WordPress is an amazing product with a strong community and a plethora of available content that allows you to meet customer demands quickly and effectively (gone are the days of overpriced custom CMS solutions, especially since the global banks’ crisis began). Till now, the only real WordPress related problem we faced had to do with unicode permalinks, which to put simply…. just wouldn’t work with IIS: If your permalink contained unicode characters, WordPress would complain that it couldn’t find your post. There was no plugin that could solve the issue and as such, we usually resorted to ugly hacks in order to tackle it.

View full article »

Recently, I was searching the web for some information on a subject (I won’t get into details, suffice to say that it had to do with my sound card) when a promising link lead me to a forum discussion (which I won’t name here for obvious reasons). A user had uploaded an image as an attachment with his message so I naturally clicked on it, only to be greeted with an error that resembled the following (just a random page that I retrieved from Google; nothing specific to Kaspersky): http://forum.kaspersky.com/index.php?&showuser=150963. I had to create an account, which would translate in providing my details then trying to pass the usually incomprehensible case-sensitive CAPTCHA tests that seem to block humans alongside robots, only to wait for a verification e-mail that would never arrive.

Screw that noise, perhaps another post might help me find a textual answer to the problem. I searched using four terms (SB X-Fi Elite Pro) only to see that SB, X-Fi and Pro were removed from search, because they were too short. Okay, what about “Sound Blaster Elite”? That should yield a few results, right? Well, I had to wait 40something seconds for my next search, in order to protect flooding. And then I had a zen moment: “Man, forum software suck!”

View full article »

Up until yesterday, we were hosting all of our in house projects and our clients’ web applications to CBeyond (formerly MaximumASP). Today, we changed our hosting provider for a number of reasons.

 

Let me make it absolutely clear here that the service we received in MaximumASP was excellent. We found a deal and rented two relatively cheap quad Opteron servers for about $200 each (about €140 each). Not that new hardware, but good enough back then. The configuration was based on Active Directory (which simplified things a lot) and the technical experience of the staff was top notch.

[more]

Unfortunately, €280 in this economy is still pretty much and to tell the truth, the server did peak sometimes (WordPress can be a killer even with QuickCache). We’ve decided to look for a cheaper solution for at least a few months so we looked around. Here comes Hetzner.de into play.

Hetzner was a curious case. For starters, signs of budget offerings are all around the website. There are dedicated servers starting from $29 per month, they seem to like cross-selling a lot (especially that Flexi-pack offering is unethical to say the least) and the hardware is not server class but rather, desktop class. In any case, we decided to go with two EQ4 servers which provided 10 times the hard drive space we had before, a cpu that can handle 3 and half times the number of requests and 4 times the memory. The initial cost was about €49 per server, but with the inclusion of of Windows license, Flexi-pack (an empty requirement for stuff like extra IPs) and a /28 subnet the price went to €100 per server. Even so, these were cheaper and much more powerful than our previous servers. The only downside as I mentioned was that this was not server class hardware and as such the memory wasn’t ECC. Still, for that price we were willing to take the (mostly theoretical) risk of SEUs if ones were to occur.

 

But we were far from done. The control panel of our account (not Plesk or cPanel which were also provided) offered an abundance of features, such as custom DNS zone files, operating system reinstallation from PXE-boot, reverse DNS assignment to your IPs, a free /64 IPv6 block which gives us a few quintillion addresses (we are effectively IPv6 enabled now), status monitoring, 100GB backup space and a lot more.

So, is everything perfect? Not completely. There are some issues we faced but for some of these issues, it’s too early to tell yet and these problems might as well be temporary. For example, be careful with your Microsoft licenses since amalgamation is not supported, you will also not find any MSSQL support, the servers don’t belong into a domain and are completely unmanaged – I doubt the staff could login to your Windows installation with normal means, there is no MS certification and a few more similar issues. To tell the truth, all these make Hetzner more suited to Linux OSes, unless you are ready to take the risk of having a completely unmanaged Windows installation, which some people might consider a plus actually. We did and we are doing find so far.

 

We also faced a network issue where our connection with the outside world was limited to a mere 100-300KB/s. We sent a support ticket and the response was to test a connection to… another Hetzner server. Sure, it worked nicely but that wasn’t the problem anyway. The staff replied that unless that download had issues, they couldn’t help us (exact wording), effectively telling us that the network speed was not guaranteed at all. Well sure, we don’t demand a guaranteed 100Mbps uplink (that would cost a few thousand by itself), but 2Mbps is also too damn low to serve more than 3 users at the same time.

Speeds have improved a bit now and I hope that they will further stabilize. There’s also an issue when we attempt to upload files on our backup space which is on another server using SMB, but apparently FTP works fine as is reading files from that same server using SMB.

 

Hetzner has potential and unless you can afford a high profile solution at Orcsweb, Rackspace or CBeyond (with the adequate cost) I’d recommended them. Be warned though that while you’ll get a very fast and cheap server with lots of features, the hardware won’t be server class, the network speed is not guaranteed at all and (for the dedicated servers) you should be ready to manage it all by yourself.

“Properties are bad and should not be allowed in Java”

Wow… Once again, I’m impressed. The above is from a comment in this blog post. I remember admiring java for what it offered back then: innovation, garbage collection to the masses, clean APIs etc. More than 10 years have passed since my initial impression, and I can safely say now that this admiration has turned into despisement.

 

I’ve never denied that I am a .net fan, perhaps because it proved to be so much better than Java when it came out, containing (most of) the right parts from C/C++ while neatly offering what Java did and more. Not only that, but each version of .net and C# (my primary language of choice in the platform) offered an enormous amount of innovation.

It’s a fact that when .net came out, nobody cared much, apart from the Microsoft crowd. Everybody was talking about how Microsoft copied Sun’s invention and how C#/.net was a rip-off of Java. 10 years later, the .net platform is so ahead of the Java one, one can recognize patterns of Sun (and now Oracle) closely copying some of .net’s developments back to Java. That’s of course limited to stuff like Enums, Attributes (called Annotations), strings in switch statements and so, nothing really advanced (such as say, LINQ or DLR).

[more]

But, enough with the Java bashing. I don’t want to focus on that (for various reasons) and I only mentioned it so that I can pinpoint the blame. So, who’s to blame? The Luddites of the Java community that seem to hold innovation.

To be honest, I’m using .net as much as I can. I love it. I am not a fanboy, but I really enjoy working with it. Even when I’m forced to use other platforms, such as good-ole C++, PHP, Java, etc, I will first check whether a .net solution is feasible.

No matter what my preferences are, I still don’t want to see platforms I work with wain and become irrelevant. I want Java to become a modern language, I want it to copy the functional innovations C# brought to an imperative world. I want it to have proper generics. I want to have properties that simplify the development without sacrificing verifiability. I don’t want it to disappear; that would only make the fanboys happy (and really, who gives a damn about them anyway).

All in all, I want the Luddites to shut the hell up and to see Oracle ruling the Java world with an Iron Fist ™. Well, that sounded wrong. I mean an Iron Fist on the Java architecture teams, much like Microsoft does. Hate it as much as you want, but what allowed C# and .net to become modern and slick, were the genius minds of its creators and not the subgenius whiny little bitches that, while have no idea on how to properly design, support, extend and use a platform, actually demand that all innovation should cease. Just to be clear, I include myself in the subgenius crowd (just not on the whiny bitch one). I am smart enough to know that I am not smart enough to create a high performant language & platform and as such, I want the people who’ll actually do the work to be smarter than I am, so that I can get back to creating web-sites and crappy business applications we all hate (but also love to design and plumb together).

You give me new features? Great, I’ll sit down and learn about them and try to make the best of them, not whine about “how they killed the simplicity of my language”. This is what I think of the Java Luddite part of the community.

Hey, would you guys like some shiny new operator overloading? “Nooooo, it confuses and infuriates us; we don’t read component documentation anyways so we have to make sure that everything is dumbed down as much as possible, even if we have to do stuff like a.add(b.multiply(c).subtract(d)) where  a+(b*c-d) would suffice”.

This goes on and on for about EVERY damn feature that’s to be introduced in the language. What about Properties? “Nooo, they are bad and should not be introduced. So says me, the anonymous internet commenter”.

Okay, but Closures sure sound nice and useful, right? “Ummm, I don’t know, they look scary. What’s wrong with writing a few extra 100 lines of code here and there?”

 

I can go on and on but in the end you will find that, in most questions like the ones above the answer is “X is considered harmful for the Java language”. It’s nearly impossible to teach new paradigms to these people, but apparently their voice is loud enough to keep java from becoming a truly modern language. Sorry, it’s not modern anymore, deal with it.

In the end, the solution is to release Java v2.0 which will do away with the stupid limitations Java 1.x has and will build on a more flexible model, with time saving features from other languages and correct implementations that were broken before (such as generics). For f***’s sake, copy Microsoft, Python and Ruby  on that – you won’t have to feel shame for it.

You also don’t (and shouldn’t) have to make it fully backwards compatible – you can develop the two major versions in parallel for a while, releasing perhaps 1 or 2 more 1.x versions. That, together with an Iron Fist ruled team of Architects who can actually judge whether the voice of the community on a matter has merit or is simply a projection of the fear incompetent developers have (tm), is the only way to make Java relevant again.

 

I honestly look forward to it.

Today, a friend of mine came up with a great idea: “Are you in for some Burnout Paradise?” he suggested. And then, I remembered what a great game it was. I never bought it, since I am not really that much of fan for racing games, but I rented it for some time and I can safely say that this was the only sandbox game that I actually had fun with, plus the only racer that I played for far more than any other racing game.

“Sure, but since it’s pretty old, my only hope is to buy it online” I replied. So I searched Steam first. The price was set at only €15 which was good enough given the age of the game. There was a legal notice below however which stated that  “EA has the right to cancel online services yadda yadda” . I was aware that EA started removing its games from Steam, so I checked for other sources I could buy the game from. I then came upon Origin, EA’s new electronic distribution platform, which amazingly provided Burnout Paradise: Ultimate Box for only €6, less than half the price of Steam. And since this was an EA game to begin with and with no legal notices regarding the availability of online gameplay as in Steam, I entered my credit card’s details and bought it. 

[more]

However, while I was waiting for the game to download, that thing regarding the availability of online gameplay bugged me. So I searched the forums and the bugging became fear. You see, there were a lot of messages from PC, Xbox & PS3 gamers all stating that the servers were offline for quite some time now and what was more worrying was the official shutdown of the Burnout store, a place where you could purchase little extras for the game, about 10 months ago.

“To hell with that noise” I exclaimed, trying to maintain a positive stance. Eventually the game was downloaded and I was ready to dive into it. Aaaand this was where fear became reality. Upon entering my online profile details (the ones I got when I signed up with Origin) I was almost immediately “greeted” with a message which stated that the servers were unavailable. I tried everything I could think of to no avail. I was so decided to play a multiplayer session on the damn thing, I was ready to use Hamachi if I had to. Only… no Lan or custom server connectivity was allowed.

 

So, I just bought a game that’s pretty much missing the half of it (or more, if you are the type of person that mostly does multiplayer). Oh great… Seeing that I had no way to engage in multiplayer neither the time to play the single player all over again, I felt that my measly 6 bucks were wasted. I contacted the tech support, who put me through some meaningless tests. One of them involved performing a traceroute using a custom tool of theirs. True enough, the tool encountered some black holes and dead nodes but the server they wanted me to tracert to was reachable. I didn’t argue long for this matter with the support technician, since I could tell I hit a “brick wall” and I didn’t have the patience to explain how IP routing works and why the game server was in fact reachable. Apart from that brick-wall thingie, he was quite helpful in giving me a no questions asked refund.

 

In any case, I wouldn’t really mind not getting back my €6. I mind have ended up playing the single player portion again. Perhaps. But imagine if I had spent €60 buying the game on its release, only to find out that it had an expiration date. Suddenly I would have lost the multiplayer portion and, had I invested in any purchasable DLCs, *BAM*, I’d have lost them too, since upon a reinstallation the DLC needs to be reactivated online… with a server that had been officially taken down. Whoops.

I can understand how online restrictions help the companies deal with piracy and why we no longer see LAN-mode support in vritually any game today. I have no real problem with that, as long as it works (I DID have a problem back then, since an internet connection was not always available but these days it’s a non-issue for most countries). The problem here is that it clearly does not work. If I am to play an old adventure game from the DOS era, it may not work under Windows 7 (it almost certainly won’t) but there is a plethora of solutions available, be it a VMWare machine or DOS Box. Even if the solution is not plug-and-play as everything else wants to be in this Apple-simplicity world we live in, the alternatives exist.

Instead, Burnout has no real alternative. There isn’t any kind of burnout-server binaries leaked, nor could I hack the game in order to connect to my own servers. The online community is annoyed over this matter, but we remain pretty much powerless while the developers plus the support teams won’t help. This is what Burnout turned out to be with its online DRM: A novelty that you rent but never own marked with an expiration date, upon which you’re screwed.

 

Still, I mentioned before that I can understand the usage of DRM and I don’t mind up to a certain point. I do mind a permanentware TSR on my PC that will run even when I’m not playing the game. Or a Blu-ray player that needs an internet connection in order to phone home and verify my intentions. Or a video card and a display that should both support HDCP otherwise I’m treated with worse-than-DVD picture quality. But I digress though (although at this point you can safely assume that I consider Movie executives the most clueless and malintented people on earth and Satan would be proud of them. Just saying’s all). Thing is, the expiration date could have been done away with a minimal cost to the game studio. They could make LAN gaming available with a patch should they decide to kill their servers. They could even release the server binaries for free and allow us to setup custom servers or even provide patches for them like the Oblivion community does.

“But then who would buy the game?” one may counterargue. True, there are few people like me that may give €6 for a 4 year old game. But that’s exactly what they are: Few. At this rate, it would take 10 sales to match 1 sale during its “golden” era and since this is such an old game, I doubt they’d make 10 sales per month these days. Potential gain is an invalid argument here.

 

The worst part in the above is that, if you don’t really give a damn about multiplayer, you can easily crack the game and end up with the same features an honest gamer would end in a few years, only with none of the cost. I’ve long argued that proper incentives are required to make the game appeal to every kind of consumer, not only the multiplayer kind and honestly, this is not a difficult thing to achieve. In fact, it’s been done already, years ago. Go a decade or two back and have a look at the game boxes. They included maps, huge manuals that were essential and (usually) fun to read, figurines, accessories and stuff you wouldn’t believe they were provided. These were not limited to “collector’s editions”. they were the “standard issue”. You simply got more value for your money and you could clearly see which of the game developers really loved their creations (I remember a game including a map on a fake skin. I cannot remember its name -it was an RPG, but the fake skin thingie still amazed me. Larry 7 had an odour releasing scratching pad that you could scratch at specific screens of the game and feel more immersed in the game).

You may honestly believe that these are nothing more than gimmicks, but if you’ve actually lived through the transformation of the huge A4-sized boxes to the tight and slim DVD cases you know how it feels. It feels like… “less”. And as if that wasn’t enough, they managed to go to even lesser, this time completely killing the data medium and its case.

Still, while online authorisation no longer requires you to have the CD into the drive and endanger its condition, CD-authentication would allow you to play offline with no “parental approval” from a remote server. Online authentication takes this kind of control out of your hands. They now only need to provide you pure information, no substantial proof of ownership of the game and if one day the game studio closes its doors, you are boned. Pure capitalism, where the consumer always gets the short end – one way or another, and the game companies lose money thanks to their own stupidity (the lack of engaging gameplay comes to mind but this is reserved for another day).

 

I am not making a distinction between “indie” studios and large established developers here. I don’t want to, since the following request is essentially the same in both cases. You’ve decided that your server’s electricity bill is not worth supporting the last 50 online gamers of game X? Pull the plug, but give an alternative to those people. You’ll only have to do it once, e.g enable LAN play or allow them to make their own servers. It’s simple, it’s moral and it shows that you care – and you will need that when the time for the sequel comes. The other way is to become an even worse a$$h… like Capcom here. It’s not that they don’t want to protect themselves from piracy (the old and tired excuse), they want to protect themselves (never you) from… you, even when the game becomes irrelevant and a bunch of sequels have been released.

In any case, I refuse to be bullied around in this manner and simply accept the “change of things” and the “wave of the future”. It’s still our right to own what we pay money for (and not simply rent it) and it’s mostly their wrong for making unimaginative and repetitive games. You should too, since we have the power to boycott them!

 

PS. On a similar note, go read my review about Back to the Future: The Game from Telltalte studios, here: http://www.extrahype.com/extrahype-review-back-to-the-future-is-back. This is what games should have been today instead of pathetic excuses like Duke Nukem Forever.

I use a Logitech G700 as my mouse. Although it’s being marketed as a gamer’s mouse, I chose it for its many many customisable buttons (I love buttons when they are many and customisable) and the ability to assign different tasks to each part of it depending on my currently active application. I’d recommend it if you are a professional, but not if you are a gamer, since the weight of the battery might make the mouse a bit tiresome.

Today the scroll wheel started acting up. Scrolling the wheel would usually ignore some of the notches (when used in the notched-scroll mode in contrast to the free-scroll alternative) and trust me when I say that this can become annoying soon enough.

 

I was considering to RMA it, but then it occured to me. My office room is dusty. No matter how hard I try, it’s always dusty and I always have to wipe the dust off, usually even twice a week. I got meself a nice can of compressed air, blew a generous dose into the scroll wheel opening (no need to open it up and void your warranty) and voilà: Problem solved.

 

Now that you’ve read this, go buy yourself a compressed air can and give a proper dust-off treatment to your computer. Not only your mouse, but the back of your monitor where its heat dissipation grill is, your printer, your keyboard (if you are disciplined enough to crank it open and do a proper clean up, you’d be amased of what lurks in there – even shaking your keyboard while holding it upside down will release a fair amount of ugly dust and skin flakes) and most importantly, your computer case.

It’s far too hot in the northern hemisphere these days – forcing your computer’s fans to work harder (albeit ineffectively) because of the accumulated dust only increases the noise they produce and the risk of hardware damage.

Recently, I was forced to look into PHP caching, thanks to a series of events. Here’s what happened:

Once upon a fine day, the (windows) server demanded that I will install some windows updates it found and I proceeded in complying with my master’s wishes (dare say no, and it will kill your customers’ sites. It already send me their fingers once). After the restart though, I noticed that all of our PHP sites were timing out. It didn’t take long to find out that the one to blame was MySQL which due to the massive amount of files in the temporary folder, apparently needed a very long time to create its temp files. In the end, I found out the cause and boy, was it ugly or what?

It seemed PHP was creating session files on the Windows’ temporary folder but wouldn’t delete them after the session had expired. As a result, the amount of files in the folder reached the 1.000.000 (!), all of which were 0 or 32KB long, but nevertheless enough to make anything that tried to access the folder crawl like it never crawled before (such as MySQL).

[more]

This ugly event mustn’t  have to happen again and I need to ensure that. So, I took a deep breath and began digging into php.ini. It seemed that the following piece of advice was giving me a hint:

; If you are using the subdirectory option for storing session files
; (see session.save_path above), then garbage collection does *not*
; happen automatically. You will need to do your own garbage
; collection through a shell script, cron entry, or some other method.

Still, that wouldn’t explain why such an option was set, since I neved touched the session section of the php.ini, ever. I refuse to believe that by default php is designed to kill its hosting server (I may be wrong though, feel free to correct me). I took a quick look into the caching option I actually used, which was provided by the session.save_handler setting, which was set to files. Searching around for different options I could try, I found out about WinCache.

 

WinCache, or Windows Cache Extension for PHP is PHP accelerator in the form of a PHP extension which is designed to work in Windows, but strangely enough, not limited to IIS (although being developed by Microsoft). WinCache though is not just an opcode cache but also offers some other nifty features, such as file caching, user data storage (more on that later) and session storage. Also, tests conducted by other people seem to indicate that it does a pretty great job, even when compared to other solutions. Plus, it won’t mind if you’re having 1 or 16 PHP FastCGI processes, since the cache it creates is centralised, thus avoiding data duplication!

Now go to RuslanY’s (WinCache’s creator) blog and thank him for his great work!

I have to admit though that initially, I was sceptical about WinCache. I had tried WinCache as a beta and it had some serious bugs which made some of our PHP sites to unexpectedly crash and as such, I had removed it completely. Not so with version 1.2.614, a development release that gave me no problem. After verifying that all of our PHP sites would work without issue when this extension was enabled, I was curious to find out more about its session handling option. So, I changed PHP’s temporary folder to one that would be untainted by other processes, changed the session.save_handler option to wincache and went on an angry rampage using openload, which hammered my servers with requests, the best part of which was that it would create a plethora of new sesions. Let me tell you, I was relieved to see that WinCache only creates a single file for handling PHP’s sessions.

 

So, I had certainly solved that annoying problem, but now WinCache had proven to be interesting and had to find out more about it. After all, I was sold on this nice live stats page that showed the status of WinCache. The best part was already set and forget. Opcode caching and File caching were applied automatically to all of our PHP applications and required no tweaking from my part. The same goes for session caching (although in this picture the hit/miss ratio is low due to using openload which creates lots of new sessions). What peaked my interest was the User Cache session which initially was 0. I found out eventually that user cache is nothing more than an object storage provided by WinCache and which is accessible using the WinCache provided functions.

“Big deal” I thought. “We’re talking about PHP on Windows, who would bother to lock-in its application to Windows and WinCache?”. Although the question is valid, the answer was far simpler: “Caching plugins!” Indeed, applications that up until now used the disk to act as a cache, could benefit greatly from WinCache if they used it instead for that same purpose. First case in point? WordPress, a platform which is favoured by many of our clients.

 

Let’s take a specific example, extrahype.com. Extrahype is a heavily modified site based on WordPress for all things geek, be it movies, games, pop culture and more and we’re lucky enough to be hosting it. Using my crude benchmark tool, openload, like a an angry caveman wielding an obsidian knife, I went and performed a simple benchmark of its start page, without using WinCache or any form of caching within the site itself. The results on the 2xDual Opteron 2212 were a bit disappointing, even though this was PHP on IIS on a not that fast server processor. I only got about 14 requests/second, which is low. In contrast, our in-house developed site rekonit.com an online review aggregator for stuff that matter (such as cars, movies and games, you know, the geek stuff you see on extrahype.com) which uses ASP.net 4.0 & MSSQL server and self designed caching algorithms gets about 350 rps. Note, we are currently redeveloping rekonit.com in ASP.net MVC 3 & MSSQL, so get ready to be amazed within the summer (yes, it will also look cooler).

I then proceeded and enabled WinCache in the php.ini. The results were very positive. With WinCache enabled, the average requests/second extrahype.com could handle rose to 31 rps, a difference of more than 2 times! That was good, but still not good enough.

Here’s where WinCache’s user cache came into play in the form of WordPress plugin, WinCache object cache. After I installed this, I could see the user cache section in the WinCache statistics page populated with data. Did it make any difference? Well, a minimal one. The average rps climbed from 31 to 34 rps.

The differences were reasonable and it’s obvious here that the bottleneck appears to be the database server. Still, it provided my PHP websites with a nice performance boost that only costs a little RAM (thankfully, that’s in abudance).

 

I then proceeded on testing it with PHPBB 3. Using the same method of “before and after WinCache” I would end up with 18 and 30 rps respectively. PHPBB 3 uses a file caching mechanism as its default. I found an experimental WinCache implementation which, usurprisingly, uses WinCache’s user cache. The difference was still minimal, this time from 30 to 33 fps, but still a no brainer compared to other forms of caching. Note that the problem here were the serialized database accesses, since the PHP FastCGI processes were are at a cosy 10% of CPU usage while MySQL was struggling around 25-30% (a whole core in a quad core system, plus a little more).
As a comparison, a PHPBB 3 installation on my development machine (an Intel Q9550 quad core) achieves about 59 rps without WinCache and 82 rps with it enabled, with the same database bottleneck issues.

 

In the end, WinCache (as other PHP accelerators do) offers an almost free performance upgrade to your PHP applications. Its extra features such as file, user and session caching & handling are indispensible even if you don’t have that much RAM to spare. It’s highly recommended and if you run PHP on Windows you should definitely check it out!

Comments? Criticism? Testimonies? Feel free to comment below!

 

PS. Before closing this article, I’d like to present you with two additional plugins for WordPress that managed to blow my mind with their results:

I’ve also tested W3 total cache for WordPress, a highly sophisticated caching system which is designed to take advantage of any caching option you can think of, such as opcode and file caching, page minifying even CDNs and some additional features that didn’t have the change to use (yet). The improvement is simply spectacular, since with it enabled plus setting it to take advantage of winCache’s features (and WinCache obviously active) the requests/second I achieved for extrahype.com exceeded the 300 rps mark! This result is achieved mostly by creating static versions of components whenever it can.

If your site however does not need a complex caching mechanism nor is very complex in nature (extrahype.com for example is not as complex as it might seem) you can opt for another caching plugin, simply named Quick Cache. Quick Cache is essentially a very simple caching plugin that creates static versions of your site’s pages. It doesn’t have the sophistication level W3TC has and only few differentiation methods of the page are recognised, but if your site’s user base consists mostly of unregistered visitors or you want to deal with a sudden Reddit/Digg/SU/Slashdot attack, it will do a magnificent job. How magnificent? Well, with Quick Cache enabled in extrahype and WinCache enabled in the server, I managed to get 610 rps! This amazing number is due to the web server only serving static content, with minimal PHP processing.

Since most of our WordPress clients don’t really need (yet) the sophisticated features of W3TC and they mostly have unregistered users, we’ve decided to enable Quick Cache and migrate to W3TC when required. No matter what you select though, make sure the plugins have the required permissions on the cache folders they create, or you may end up with a bazillion of cache files!

Being quite fed up with Windows 7′s Media Center & Media Player inability to properly work with ffdshow (they ignored ffdshow audio decoder for AC3 files) I’ve decided to look for alternatives. It would also be a chance to go back to Media Player classic (I loved that player) and a non-Microsoft media center implementation. How could I have known what would follow though?

 

Let’s see now: The target PC is running Windows 7 x64. I’ve made a new installation and duly removed 7MC & WMP using RT7Lite, an application that allows you to customize the installation DVD (much like vLite did for Vista). My first priority was to find a media player that would comply with the following criteria:

  1. It wouldn’t sacrifice resources just to look pretty (or in case of iTunes, not even for that).
  2. It would work with the codecs I’d want and certainly not some kind of an internal implementation (the whole point remember, is to use ffdshow).
  3. It would support the Media keys on my keyboard, specifically, Previous track, Next track and Play/Pause while not on focus.
  4. It would use a simple interface with common conventions. When I double click on a playing video, it would go full-screen.

I first tried Media Player Classic Home Cinema. It complied with all these criteria, except one: 3. Since I have a MS Natural 4000 keyboard I have to install the Intellitype driver for it to take advantage of all its features. Too bad for MPC:HC because when the driver is active and MPC:HC is unfocused, it will ignore my media keys. Focusing the application or disabling the driver would allow MPC:HC to trap the Media keys.

Then, I tried GOM player. This appear to suffer from problem no. 2, since it wouldn’t play FLAC files. Also, when pressing Next track the application would instead skip forward by 10 seconds. There was no option to allow the Next track button correspond with a Next track command in the application, thanks to a hard-coded gimmick (not even an intuitive one).

KMPlayer came next. Apart from some annoying attempts on adware installation during the setup, this was a good player and complied with all of the above… almost… When I pressed the Play/Pause button my keyboard, the player would pause the song/movie that was playing. But if it were a song and then I pressed Play/Pause again, it would restart the song from the beginning (movies unpaused normally though)!

There it was. I was running out of options and the next choices didn’t fare very well. Quintessential player, SMPLayer, Banshee, ALLPlayer… I’ve tried everything in this list: http://en.wikipedia.org/wiki/Comparison_of_video_player_software and nothing worked.

 

Well, I decided to skip the media player part and go to the media center one. I first tried MediaPortal. It had some annoying quirks, regarding mouse accessibility and menu navigation, but it was a nice option. Too bad that it required a database dependency for the TV scheduling (MySQL or SQL server, as if they couldn’t use a small and simple disk database since we are talking about a very small amount of data) and an unexplainable dependency to Media Player 11. Also, the setup of the digital TV was cumbersome and unintuitive (I had to manually enter the search frequencies) and wouldn’t detect the analog radio capabilities of my hybrid TV Tuner.

Then it was Beyond TV’s turn. This one, wouldn’t find a single one of my DVB-T TV channels. Plus, it was a bit ugly and not to mention, proprietary.

SageTV was a proprietary disappointment that also required the Java runtime on my system. No thanks.

XMBC was nice but it lacked the ability to configure the decoding codecs as desired and it had no TV support out of the box. Am I running out of options fast, too?

My last attempt was NextPVR an application that is based on GB-PVR. It was a bit on the barebones but it was the one with the best results so far. I didn’t really like the fact that there was no easy to find ability to search through the EPG and it had some serious issues with navigation (I’ve used a MCE Remote controller V2 with all media center applications).

 

In the end, I was stumped. As I mentioned, I really hate that you have to go through so much trouble to change Microsoft’s default codecs on 7MC & WMP12. Also, I don’t like the fact that I can’t have multiple instances of WMP12 at the same time, plus that it sometimes “threatens” me with the “Server execution failed” error. On the other hand, 7MC is one of the most intuitive applications to use and works out of the box. Also, they both support Windows 7′s Libraries system which is a very nice feature to have.

It’s a pity that the alternative solutions fail on technicalities, technicalities that seriously hinder their accessibility though. MPC:HC, GOMPlayer, KMPlayer, MediaPortal & NextPRV have serious potential, but there are also serious accessiblity issues that must be resolved at first.

A few days ago, Cursed Mountain for the PC came into my hands. It advertises itself as a horror game but with a twist. Forget zombies and your typical western settings, what we got here instead is a himalayan setting with very definite buddhist religious elements.

The story is pretty much cliché: You and your brother are both mountain climbers. One fateful day, he’s hired to climb mount Chomolonzo and this leads to his disappearance. It’s your job (of course) to find him, or at least find out what has happened to him. Rather typical.

View full article »

I’ve started messing around with custom websites based on WordPress lately, since it offers a very flexible platform with lots of functionality while still allowing you to customize the final result to your heart’s content. Really, the only real issues with this approach is that 1) we are talking about PHP which happens to not be my platform of choice (but I can swallow my pride and develop on it anyway) and 2) WordPress’s performance issues that can be easily solved with a caching plugin.

 

So, I’ve created a nice custom layout from scratch. Tested it on all major browsers on which it worked perfectly (except from IE 6 and 7, but I can ignore these at this stage). Then I went on to implement specific functionality from WordPress on the layout. The drill is quite simple. You seperate the HTML into template files. In this case I had created 3 of them, header.php with the doctype, head tag and header declaration, footer.php with the site’s footer and all closing tags, and index.php with the main content of the page. You render the header by using WordPress’s get_header() method and get_footer() for the footer.

After a while, I’d noticed that viewing the page on Firefox there was some kind of a blank white space border in the uppermost side of the page, which had no reason to be there. I excluded the beta nature of the browser as a probable cause, since the standalone layout worked perfectly. Then, I attempted to view the result on IE and… there are no words to describe the colossal mess the browser rendered. Oh yes, the white border was there too.

As if that weren’t enough, double clicking on that white space on Firefox and then viewing the “selection source” would produce a quite different html source, specifically moving all declarations that belong to a <head> tag into the <body> tag. Chaos, chaos I tells ya!

Then, I moved the contents of header.php back to index.php and removed the call to the get_header() method. Whadayaknow, it worked perfectly again. Feeling adventurous, I added the call to the get_header() method again in the index.php file but with the header file empty. Oh boy, chaos once again.

 

I was stumped. There was no logical explanation for that (as far as I could see), since the source produced was the same in each case. But when I checked the file sizes and found them different, I suddenly knew… It was the 3 characters known as Byte Order Mark, and should be the first thing that should appear on a Unicode document, be it a text file, a code file or a Word document. It’s a sort of metadata, only that it’s contained within the document contents themselves. It’s quite useful actually since not only it informs you about the endianness of the document’s encoding but of the unicode encoding variant used. Most applications that are Unicode aware usually remove those characters when they present or process such data, but there are few that do not and… well… the least painful result is the literal appearance of these characters on the document itself. In other cases, such as in PHP this means misrendered documents due to them app.

The easiest solution is to save the files without a BOM, especially the one containing the DOCTYPE declaration! There’s also supposed to be a zend configuration option (enable-zend-multibyte) that checks for the existence of the BOM, but from what I can gather it’s quite buggy. Also, the folks at PHP expect such issues to go away with PHP 6.0 (and here’s another reason why I like developing on the .net platform so much: I don’t have to deal with such trivial issues).

 

 

In any case, that’s 2 hours of my life wasted on one of the most idiotic issues I’ve ever encountered…

So, here goes: I am a South Park fan. The spiritual child of Matt Stone & Trey Parker, (almost) always manages to crack me up; at least when the toilet humour is kept to a minimum. I find myself disagreeing with some of the messages its creators try to shove in our heads however.

 

Most people believe that the creators of the series (and in effect, South Park itself) are leftists/liberals. Guess again! Matt Stone is a registered republican and Trey Parker a Libertarian. But does it matter? Is the whole message wrong?
View full article »

I’m sure that most of you know of the cartoon comparison between Huxley and Orwell about the most effective totalitarian government methods. If not, have a look at this. Don’t worry I’ll wait.

 

You should agree that Huxley’s reality is (mostly) the reality of the average western world. Take your pick, Twitter/Facebook, Big brother, Showbiz magazines, Glenn Beck – it seems that we are constantly being bombarded by huge amounts of idiocy that slowly kill our brains. Now, I don’t mean to sound like an elitist wannabe philosopher (they are usually morons after all), but I have to admit that, since I’ve given up watching tv about 5 years ago, I’m feeling like I’ve woken up from a catatonic zombie state. Television is only an example here, you can find Huxley’s “truths” (excuse the term) all around us.

View full article »

Switch to our mobile site