Feed on
Posts
Comments

An absolutely interesting bug was discovered on Christmas Eve on the project that I’m currently working on in collaboration with Duration Inc.

Basically, what we have is a landing page that launches a buncha games that the user chooses. The user will login to his/her account and gets directed to the appropriate starting screen of the game.

What’s happening however, is that after logging in, the user ends up in the developers’ page instead. It’s one of those things that just happen out of the blue and appears infrequently enough to brush off as some random screw-up by the browser or OS. However, when I managed to replicate it a number of times, it was safe to say that something was not quite right.

Naturally, I immediately jumped to my usual suspect when I’m debugging and testing on my machine, which was Windows Vista, since the other machines were on XP and 7 were fine.

And then it started popping up in XP, and we blamed Firefox. The blame game continued until the senior developer asked to take a look at the cookies generated for the session. He immediately noticed that there were 2 cookies with the same ID generated under the same domain, and I pointed out that the only difference was in the host attribute. One was www.project.com, while the other was just project.com

That’s where it gets a bit weird. It seems that although both URLs lead to the same page, different cookies will be generated. I’m not too sure about how all this works, but I think that apparently, if the cookie’s host did not match the full domain name of the login page, i.e. “www.project.com” as opposed to “project.com”, it will not be recognized, and it redirects to the default page which is the developer’s page.

So in the end, the culprit was that when testing on Firefox, I used project.com minus the www prefix. The problem was then swiftly resolved with redirection.

So the moral of the story is: Shit just happens to fuck you up outta nowhere, and you gotta need a bit of luck and quite a lot of tenacity if you wanna survive in this field.

I wish schools just taught that. Maybe they should have a project that has obscure bugs implanted on purpose and have students try to debug it. At least they don’t have to wait till they start encountering these kinda bugs on time critical projects and then get kicked in the nuts by the deadline.

Initially, when I learnt that I was gonna move from developing an application on a Winform to developing it on a Webform, I thought it’ll be a pretty quick and easy transition. After all, they’re both in C# and part of the .NET framework, eh?

And as always, my eagerness to assume bites me in the ass again. Application Life Cycle vs Web Form Life Cycle, Instanced Variables vs Session Variables, Callbacks vs Postbacks…and far too many more differences for my liking.

Nevertheless, it’s gonna be another interesting albeit bumpy ride in my journey through game development. As the wise sages in the mountaintops spake thusly, “What don’t kill you makes you stronger.”

Gesture recognition

Gesture recognition seems to be a pretty interesting step up from the traditional forms of human-computer-interaction via keyboard, mouse or controllers. While gesture recognition technology started off(to my knowledge) as being used in personal communication with PDAs, game developers have caught on to the possibilities of implementing it in games. The first game I came across that made use of that was Black & White, where the user plays a god that could cast ’spells’ based on the runes drawn on the screen. Although it did not constitute a major portion of the gameplay, it was still an interesting concept at that time.

I think game developers started looking into this more seriously with the launch of the Nintendo DS. Most games developed for the handheld console used the stylus more as a clicker, but there were a few which set themselves apart from the rest by implementing gestures as well, like Okamiden and Castlevania Dawn of Sorrow.

With traditional input, you will always get a well-defined set of outcomes from the user, or at least, a set of outcomes that a normal person can visualize and categorize. However, with the addition of user gestures, the possibilities increase exponentially, even within a small area of interaction. The trick is to find a way to turn all that seemingly random data into something recognizable that can be categorized easily.

And that is going to be the basis of my research for now.

From what I’ve gleaned from online sources so far, there seems to be a few popular solutions, from translating the input into histograms and accelerometer data, to machine learning with neural networks.

However, for me, I’m going to try to do it a simpler way, with vector averaging. I feel that it’ll be something a bit more easier to understand and implement, that even novice game programmers can get the hang of too. Efficiency-wise, probably not that great, but I’ll leave that as my next topic of research.

Path of Least Resistance

After some advice and quite a lot of frustration on my part in getting nicely formatted syntax that Actionscript is willing to parse neatly, I’ve thrown in the towel and taken the path of least resistance by choosing to integrate Flash into Wordpress instead of the other way around.

And honestly, with my lack of knowledge of web design, the Wordpress templates do look a heck lot neater and well-organized than the mishmash I came up with.

Whelp, before I can even start putting more interesting stuff into this blog here, I run into the big problem of integrating Wordpress into my Flash-based website at www.harukaze.sg. After much Googling, the majority of discussions on this subject ends with the consensus that it’s better to code the main website in HTML  and embed Flash into it as a component.

However, I noticed that it’s possible to parse XML, CSS and Javascript with Actionscript 3.0, which I think, with my minimal knowledge on web programming, are the only components required to reconstruct the blog.

So for now I guess I’m gonna work on developing a template that will basically take in a Wordpress blog and spit out an SWF for me. It’ll keep me busy for now whilst I’m looking for a job, and probably be a good practice run to get myself familiarized with Actionscript and some web development.