16 Mar 2013, 11:59

Improv math

I always loved math and it was one of my favourite subjects during school. I have to thank my dad and my bro for instilling that love in my head. My young self was always baffled by how most people around me not only hated math, but they seemed to have a hard time with it. How could it be hard? It was all logical, you hardly needed to work or memorize anything because, hey, with just a few basics in your head you could deduce any formulas or theorems you needed during an exam, right? Heh.

This year I’m one of the tutors for the Master on Game Programming at the U-Tad. The subject I’m teaching this course is Game Architecture: Game Objects, Main Loop and Timing, Reading & Saving, etc. This is the Master’s debut year, so while I believe the course is going great (and students seem to agree so far), some bits and pieces are not ideal and will need improvement for the following years.

One of them is, unsurprisingly, math.

Read more...

07 Mar 2012, 03:37

Unity3D 3.5 mobile is free…

..Until April 8th. It normally costs around $800, so get it even if you don’t have immediate plans to use it.

07 Mar 2012, 03:18

Metro and JavaScript
On Facebook I wrote a bunch of thoughts on the fact that Windows 8 treats JavaScript as a first-class citizen for native Metro apps. It was triggered by thisand a few other related reads on WinJS. In general, there is value in having a single language available for all your needs and platforms even if it’s not 100% portable (look at C/C++). JavaScript is the most widely available language today and, while ugly, the popularity of runtimes like NodeJS and the myriad HTML5 mobile app wrappers like PhoneGap prove that it is viable.

Read more...

04 Feb 2012, 02:45

Facebook IPO and Mobile Social Games

Facebook’s IPO has been announced, and this means lots of details on Facebook financials have become public. The most interesting bits for social game developers (in VERY broad terms):

  • Almost all revenue from Facebook Credits is generated by games.
  • Zynga makes up 80% of the total Facebook Credits revenue.
  • In broad numbers, on Facebook, Zynga has MAU equal to 1.5x all other game devs combined. But Zynga’s FB Credits revenue is 4x. That’s an idea of how much better Zynga is at getting players to pay.
  • Most of Facebook’s revenues come form advertising.
  • Facebook mobile gaming is in its infancy.
  • Half of Facebook users use the site via mobile, and this percentage is growing very quickly, but Facebook does not monetize them with games nor advertising.

Read more...

08 Oct 2011, 02:00

Stage3D Vertex Buffer formats

If you played with the Stage3D spinning cube sample I linked in the previous post, you will notice one thing: the vertex colors in the vertex buffer are given as 3 floats (red, green and blue). This is rather wasteful in most cases because color components often vary between 0.0 and 1.0, and it’s more efficient to specify vertex colors (including alpha) as a single 32-bit value. For example, in hexadecimal notation, 0xFF800040 would mean alpha of 1.0 (0xFF), blue 0.5 (0x80), green 0 (0x00) and red 0.25 (0x40).

If you look in the Stage3D docs, you will find the constant Context3DVertexBufferFormat.BYTES_4 to use in the call to Context3D.setVertexBufferAt(). But if you naively just change the vertex buffer array to turn each vertex color’s set of 3 components into a single hex value, make dataPerVertex = 4 instead of 6, and use BYTES_4 for va1, then you will find that the colors are coming out wrong. Why? Because the function VertexBuffer3D.uploadFromVector() always stores the values from the Vector in floating point format. Of course! This is the most common situation for the components of the vertex positions, normals, texture coordinates and such. But we need our BYTES_4 color value to be stored verbatim as a 32-bit uint.

Vector. and uploadFromVector() do not give you control over the byte format of value. How do you solve this?

Read more...

29 Sep 2011, 21:50

Fun with HTML5
I have been playing around with HTML5, Canvas and WebGL. Not a lot to show for it, but at least I forced myself to write a bit again. Check it out here if you’re curious, and good luck reaching a score of 150 on Lesson 5! By the way, for some reason Firefox has started to run Lesson 5 rather slow in both my PCs. I’m pretty sure it used to be a rock solid 60 fps back when I wrote the game, but at some point either upgrading past Firefox 5, or upgrading to Windows 7, has made it slow.

Read more...

24 Sep 2011, 12:25

Hello world again
I may be getting interested in writing stuff again with more depth and detail, appropriate (even if small) audience, and with clearer ownership than social networks provide. Twitter is cool as a sort of RSS aggregator; Facebook has become intrusive, annoying and just generally inadequate for anything but on-the-fly photo and YouTube sharing; and Google+ has flatlined. In preparation for more writing, I have added a WordPress blog to my site, because my old blog system was fun to write but boring to maintain and extend.

Read more...

30 Jun 2011, 22:53

Google+

Catch me there: https://plus.google.com/109393462510769944302/

12 May 2011, 12:44

Relinuxed
Time for that old laptop to receive Ubuntu 11.04! Er… Apparently, the graphics card is too old to run the fancy new Unity UI. Ah well, in any case, it’s a good idea to have a working Linux machine. Then, the same problem as before. And I hate myself for not detailing precisely what I did to speed up the HDD. I need to fix this ASAP because the system has started doing massive checks to update packages and the machine is completely unusable.

Read more...