Technical Inadvisory: Game Xi Fa Cai


  • Technical Inadvisory
  • Monday, 20 Jan 2020

Play our columnist's Year of the Rat game at his website: shaunanoordin.com/cny2020. — SHAUN A. NOORDIN/The Star

Happy Chinese New Year, everyone! I made a Year of the Rat greeting card just for you, and you can access it at my website: shaunanoordin.com/cny2020.

If you actually opened that link, you’ll realise that my “greeting card” is actually a tiny video game.

This is my personal Chinese New Year tradition: every year, I create a simple game to send out to my friends and family, as a reminder to myself of the feeling of celebrating Chinese New Year with my family in my youth.

Specifically, the feeling that I’d rather be home playing the Super Nintendo. Ha!

I mean, for a kid, attending these family gatherings was a chore – I’d have to wear fancy clothes, smile at distant relatives, visit too many houses, and there’s always this one weird uncle who’d give out ang pows filled with coins, because “kids have to learn the value of one ringgit”.

So, between eating pineapple tarts, I’d always think: “Wouldn’t it be great if we had games to play over Chinese New Year instead of, you know, maintaining family relationships?” (Keep in mind, this was an era before every baby had their own smartphone and iPad.)

I have been making CNY video games for several years – all the way back to shaunanoordin.com/cny2013 – when the Year of the Snake was celebrated with the game Snake, because of course.

Problem is, now that I’ve advertised this to the general public, I realise a lot of my old code doesn’t work any more. Whoops!

My CNY game projects are written in JavaScript and HTML5 – source code at github.com/shaunanoordin/cny2020 – and they’re essentially web apps to be played in Chrome, Firefox, etc.

I assure you, the games worked very well when they were released, but the Web keeps changing.

For example, a lot of my earlier games were programmed to use mouse interactions (called Mouse Events), but the ubiquity of touchscreens resulted in modern web browsers introducing Touch Events, and (fairly recently) the unified Pointer Events.

Many of those games now have a rougher time figuring out user input, since they can’t fully decide if a “click” on the screen came from a mouse, a finger, or a stylus.

Browser compatibility will always pose a challenge – my Snake game was tested thoroughly on Internet Explorer 10, but now the whole Internet Explorer series of web browsers has been discontinued.

Will the game still work on Edge? Or Safari? Or Chrome, which had 11 version updates in 2019 alone? Who knows?

Heck, when I started learning programming, the best way to make games for the Web was with Adobe Flash! And the virtual extinction of that system made a lot of classic web games completely unplayable.

This is the reality of web development: nothing works forever, and it’s easy to take what’s working for granted.

I try to set aside time to maintain and update my old code, because my silly little tradition of games is genuinely my way of connecting with people.

However, I have to put in so much time and effort into code maintenance that I sometimes wonder if it’s easier if I just gave my friends and family (and that weird uncle) a call instead.

Then I realised, not everyone I know is around any more. My grandparents are now but fond memories, my cousins are busy with their own lives, and I barely know what happened to my closest childhood friends who I visited every year.

I now have two nephews who join my family gatherings, and they’re adorable even though they clearly don’t know how to set up a decent team in Pokemon Go. (I keep telling you that you need an Electric type in there!) Even so, it won’t be long before they go their own way, living their own lives.

But then, this is the reality of life: nobody’s around forever, and it’s easy to take for granted the time you have with people who are important to you.

I’m starting to think that maybe it’s really worth my time, every once in a while, to stop and look back at the things that I have.

To make an effort to mend broken things and improve their compatibility, to get things working as long as possible before they’re archived as nothing but fond memories. Maybe I’ll make it a tradition to do so at least once a year.

I’ll let you decide whether I’m talking about maintaining old code, or maintaining friendships and family ties.

Happy Chinese New Year, and I hope you spend the new year in the company of loved ones.

I really should attend more family gatherings, tell my mum and dad that I love them, and, heck, maybe I’ll even be that weird uncle handing out ang pow filled with Pokemon cards.

Because, dammit, kids these days have to learn the value of one Pikachu!

(Raised by wild Nintendo consoles and trained in the ways of the computer scientist, Shaun A. Noordin tries to use his knowledge of web development, technology, and video games for the greater good. Or for entertainment and amusement, whichever is easier. He has a lot of advice to share, but they’re all inadvisable to follow.)

Article type: metered
User Type: anonymous web
User Status:
Campaign ID: 1
Cxense type: free
User access status: 3
   

Did you find this article insightful?

Yes
No

Across the site