How to make an “educational” Math game

Dudes, I am not an educator. I taught some classes, yes, but I don’t have formal education on educating. I don’t claim to be an expert on teaching kids.

But I am, to a certain extent, a gamer. But nope, I’m not hardcore. Just a gamer.

My Personal Sad Story

Here’s my personal sad story:

I grew up in a house without a single videogame console. We have shops in the neighborhood where you can play playstation games at 20pesos/hr. My allowance can only let me play a few times per month. I played Mortal Kombat II with friends. The nearest coin op arcade is 4 hours away. And even if it existed next door, I don’t think I could have afforded that either.

My parents think those kind of games are bad for kids and so they kept us away from it. They however bought us a PC. See, they agree that not all games are bad. Games that run on the PC are good. For starters, it taught me how to use the computer (the tool of the futuuure!). I became comfortable in the command line, MS-DOS era. As for the actual games, the games my parents let us play on the PC really were educational.

They bought us two kinds of games. The ones that were meant to be educational, (“Let’s Learn Math”, “Spelling Bee” stuff) vs the regular pc games. Guess which ones I played more and made more impact on my learning.

I played action games, I learn spatial thinking. I played Lucas Arts adventure games, I learned how to read and understand context. I played Civ, I learn about the forms of government long before we discuss it in class.

With the help of emulators I was able to play console games and realize that my parents were wrong on the educational games are exclusively for the PC part. The rest, they were spot on.

Still, I don't know what these are. 😦

Presenting: Educational Games

Fast forward to the present and I read crap like this: Numvaders Press Release

Problem: Filipinos (and implied, the world) think that games are too addictive and this is a bad thing.

Solution: Make a game that is still addictive, but this time makes you learn how to do basic math. A good thing.

Simple counter-argument: Why break a great game like Space Invaders so you can shove your stupid arithmetic homework into an iPhone owning kid?

Follow up counter-argument: Who plays this kind of games?

It’s not only Numvaders. I have seen a lot of these games, coming mostly from the Philippine academia, claiming to be all about edumacating. They seem to think that any software with cartoony graphics is a video game. They have the shallow notion that a kid is more likely to solve a math problem if it is in comic sans and the background is a picture of Disneyland. Yes, this kind of approach to teaching works Sesame Street style but that’s not using the real power of video games and doesn’t contribute anything to the gaming image.

How to make an educational Math game

But how, you ask, will I make a game about Math?

Dudes, let’s take a Space Invaders style game. Let’s say we want kids to know about the four basic arithmetic operations. Most of the arithmetic is already there. You have killing aliens = subtraction. You accumulate points = addition. You have combo multipliers = multiplication. Umm, you can implement division by having special gameplay mechanics, for example, 1/3 of the invaders attack at a time. The whole time the player is blasting aliens, his maths is working. Somewhere between levels the player is thinking: “If the hiscore is 2850pts and I’m at 2400pts how many more level 1 invader should I shoot if a level 1 invader is 50pts a piece?”

Math is represented everywhere in games, you don’t have to try very hard.


Pictured: Math teaching tool

You can make it slightly didactic by adding quests like “Get 5 shots on invaders worth 250pts”. The trick is don’t make the player feel like he/she is doing homework.


Stop making games look bad by trying to make it look good. Also, stop trying to get rich on video games, because then you’ll be doing it wrong.

Open and Free

UI draft: Pretentious Art Deco Style

Yessir, I spawned yet another open-source hobby project. Here are the codes:

In terms of technology and innovation, this project is nothing special. There are a lot of other games like it, the concept isn’t new. I try to keep the code as easy to maintain as possible but that’s the norm. So why am I doing this? Well, why not?

I Have Nothing to Lose

Once I met a team of student developers who made an award winning game. I asked them about the future of the game, whether they want to share the codes or not, and they said, citing commercial and business reasons, no.

Are you planning to sell the game? Nope, it’s available to play on my website.

Am you using proprietary algorithms as the secret sauce on your business plan to world domination (ala Google)? Nope.

Is there something in your code that will directly lead to you losing anything? Umm, someone could use it to make a game exactly like mine and then pass it off as their own… Aaand? Can they steal design instincts? Or marketing? Do they have all the other skills you (or your team) have that made the game successful? Nope.

Then why aren’t your sharing your code?

The Philippines isn’t exactly a hotbed of game development right now. It’s a country where formal game education and training isn’t a big priority and we are only restricting ourselves by being selfish to one another.

And Have Stuff to Gain

As far as I know, the challenges in making persistent web games isn’t very documented. Trying to learn this stuff from scratch isn’t an enjoyable experience and most people are put off by it. I always believed that the web is the future of gaming and the more accessible we make it the easier that transition will be. By putting this very standard project in front of everybody I hope I’m inspiring more developers to try this social web gaming thing.

When you are open, other people tend to be open too. I’m not the best programmer. I only have a year of “professional game development experience”. There are a lot of things I don’t know. By making this opensource, I subject myself to other developer’s scrutiny. I’m hoping someone would declare my code crap then proceed to tell me why. Worst will be if no one cares about this project.

And as my hidden agenda: having a github account makes it easy for employers to evaluate my work. And people who interview me without bothering to check for my online projects, while not exactly a deal-breaker, is a bad sign.


Filipino game developers should really try sharing their magic tricks. No one will benefit from a community who keeps secrets from one another.

I know that there is a lot more to this open source thing than just pushing to a public code repository, but it’s a start.

Forge Story, The Next Chapter

As promised, I am going to start updating Forge Story once the LD judging is over.

I was supposed to keep working on it on a local server the weeks prior, but I keep getting sidetracked with personal (read: unemployment) issues. And I’m afraid I’ll be sidetracked even more as my not-receiving-a-salary status worsens.


How I went from being promoted one day to resignation 2 months later is a story for another time

I almost considered giving up on this project if it weren’t for 1) the peer reviews the game got on LD and 2) the cool user generated art that piled up in my server.

Why Make A Game ON Facebook?

While the finished game is, to put it kindly, raw for game standards, the comments and the low play rate it received seems to suggest that the majority of  indie developers doesn’t like the idea of social network games.

Challenge, accepted! I am going to work on this game some more using garage indie resources and methods and prove to the community that the social network platform is perfectly workable and is a very exciting place to work on. I have decided to keep the development of the game  as open as possible with hopes that others can learn or get inspired by it. Seeing that I am already planning on making this guide.

User Generated Joy

Most of my past efforts consisted of me making games for myself. And Forge Story would have been the same if it weren’t for this:

Pixel art from my social network

People, mostly my friends, are using the game to create awesome stuff. This never happened before! Wonder what it would be like if I let them animate their creations or turn them into quest items or pokemons. This is the question that keeps me awake at night  and I can’t let my codes rot any longer!!

What will become of Forge Story?

It will be opensource and all possible aspects of its development will be public. This means features and roadmaps will be shared. The game is also being built on top of RPGAutomata (for the battle and animation system) so RPGAutomata will still be active as well.

And of course, there’s an ulterior motive: making a Facebook game will at least keep me relevant while I’m looking for my next job.




By making this post public, I am making myself accountable for making this game so played it will crash my webhost.

Like the app page here


Forge Story: A #LD48 Post Mortem

Spamming soon, on a wall near you

I made a Facebook game in under 48 hours.

What’s the game about?

The theme for this quarter’s Ludum Dare was “It’s Dangerous to Go Alone, Take This”. So I immediately thought that it would be perfect for a facebook or social network game.

The original vision was a trading game between players. They can create items and sell them. Players aren’t allowed to use their own items. They should buy them from their friends. When players create an item, they give it a price which gets deducted to his coins. This way, players will have real investment on the items they make. When a player buys an item, its creator gets paid.

But players can also get items for free. Creators can publish their items as wall posts, and players who click through that link get the item for free. The creator still gets paid (by the system, for being a viral channel 😉 ).

I originally planned on a battle system, Go Aloning!, so that the items will be more than decorative but I ran out of time.

I wanted to explore the gift giving and wall spamming mechanic of facebook games. If people share a personalized wall post, would his friends respond positively?

What went wrong?

My work desk

Software Crisis – I wasn’t really planning on making a facebook game, until the last minute. (Ok, maybe I did, but I wasn’t decided until I knew the theme). So most of the tools I used were downloaded as I needed it. I had to download XAMPP and SQLYog and had to look for my day job projects which was tucked away in my backup drive.

On the morning before the theme was announced, I discovered that it was my Photoshop trial’s final instance. The backup plan was to create procedural art, which is also fun.

Hardware Poverty –  I made this on a netbook. 1.6Ghz processor and 2GB of RAM and all my browser tabs and IDEs == frequent freezes. Also, my internet connection was a very unreliable Sun Broadband USB dongle. Disconnections and freezes were frequent. My brain took it as an opportunity to freeze as well.

Inaccurate Task Estimates – I still suffer from this. But I feel I’m getting better at it now. The more projects I make, failed or not, the easier it gets to guess my capabilities and limitations. That’s why I had to let go the battle system. Either that or miss the deadline.

What went right?

Simplified Concept – the game looked simple on paper. It required a simple database backend. And doesn’t require me to draw assets (no Photoshop needed).

wireframes is GDD for gangstahs

more wireframes

my database tables, just waiting to get hacked

Worked on a familiar platform – I make facebook games for a living. This means I’m not exactly a noob when it comes to making this sort of stuff.

One of the risks I was anticipating was the development to production deployment. My typical day job project takes careful setup in syncing the development and production servers. I didn’t have time for that, so I just made sure the folders, urls, database names are configurable and hoped that my local server was exactly like my webhost’s. It worked flawlessly — the webs didn’t notice I swapped servers.

What now?

The game is far from finished. But the vision is doable and seems like a good learning exercise for me. I’m keeping the app active and updates will come as soon as the judging is over. If anyone is interested in following the development of a true indie social network game, like this page:

Oh and here’s a timelapse video:


A Poor Person’s Guide to Making a Facebook Game: A Intro

Dudes, here’s the thing. When I was first starting out on this Facebook game making business I had no idea how complicated things would get. It’s like no one told me about this side of flash programming. You can’t just google and forum lurk your way into wisdom. You have to go deep, like 5+ sub links deep. Is it because most social games are run by companies who don’t want to share their secret sauces? Yes, maybe. Companies are evil like that.

Not me. I’m a friend. And I want to share what I learned. Partly because I’m a good person and don’t want other people to suffer like I did, but mostly because I want to get other (read: smarter than me) people’s feedback. Disclaimer: I haven’t made a successful facebook game (yet) and some of the things I’ll write about are things I didn’t do but totally should have.

Making a social game is different from making ordinary for-flash-portal games. Way different. For a typical flash game to be profitable, it has to be distributed to as many portals as possible. So it is common wisdom that you should put everything on a single .swf file, otherwise the portal people are going to hate your guts for making their lives miserable. Try to do that for your social game, cram 250+ animations of houses and racially diverse avatar skins and “save this cute lost puppy” dialog popups and you have yourself a slightly less heavy MMO client. And look, databases! And server queries! And user metrics! And Facebook credits!

It’s more like making web apps really. You provide them a service: you free them from boredom. The customers/players pay you to keep tabs of the data they generated from your app/game. This is similarities are uncanny for spreadsheet style games.

This is my linkedIn if my contacts have really cool job titles. My real linkedIn sucks.

So I think I will be writing about how to make games as apps. And here is a list of random topics I might write about:

  • Optimizing loading time
  • Dynamic asset loading
  • Efficient asset pipelines
  • Vector caching
  • Continuous integration
  • Transacting with real money
  • Connecting to social graphs and APIs
  • Virtual spaces
  • Logging user metrics

Btw, I use flash (as3) and php because I don’t know other languages.

Opensource what?

This week I officially got a raise for the first time in my corporate life. Yey!

All the chicken joy I ate for the last 6 months was worth it

With it came a few papers to sign and one of them was a patents and intellectual property agreement. I understand that companies need to protect their assets (I signed the standard NDA a few months back) but 2 particular clauses caught me uneasy.

3. The Employee shall promptly furnish the Company a complete record of any and all inventions, patents and improvements, whether patentable or not, which he solely or jointly may conceive, make, or first disclose during the period of his/her employment by the Company.

Does this mean I can’t just make other games and release it? Do I have to tell the Company every single time? Wait, it has to be conceived or made or first disclosed during the period of my employment. But what exactly is a “period of employment”. I asked the Admin about this and they defined “period of employment” = paid work hours. Fair enough, other companies like to define it as the day you got hired to the day they fired you.

4. The Employee agrees to and hereby grants and assign to the Company or its nominee the Employee’s entire right, title, and interest in and to inventions, patents and improvements that relate in any way to the actual or anticipated business or activities of the Company or its Affiliates, or that are anticipated by or result from any task or work for or on behalf of the Company together with any and all domestic and foreign patent rights in such inventions and improvements. To aid the Company or its nominee in securing full benefit and protection thereof, the Employees agrees promptly to do all lawful acts reasonably requested, at any time during and after the employment by the Company, without the additional compensation but at the Company’s expense.

I work for a social (read: Facebook) gaming  company. Does this mean the Company owns my Facebook game(s)? Does this cover all online/web based games? The scope of this clause is too big to be unambiguous so, again, I asked for clarification. This time they told me to STFU.

No, not really.

Actually, they told me that it’s specific to the games we are making. So if the Company is making a game about Cows and Aliens don’t make a Carabaos and Zombies rip off. If they can recognize their game in mine it’s officially theirs. Fair enough.

I signed the damn agreement already. Admin didn’t offer a rewording of the contract to reflect the clearer definitions. That’s ok. From the discussion, I understood that they are merely trying to protect the company’s assets and aren’t after my badly coded, unfinished crap. Besides, I’m not really litigious.

While we were discussing this, our HR girl asked me why I’m being too thorough on this.

“Do you have projects on the side?”

“Yes, I have plenty.”

“Oh. Then you must be earning a lot from these projects”

“Nope. Not a single centavo.”

“What? Why do it then?”

“Umm.. because I want to?”

Sextinction Art Update


I joined the Global Game Jam and made a sex game called Sextinction. It features some of the improvements I made on RPGAutomata (aka my RPG Engine). I spent majority of the weekend getting a pretty kewl dialog tree system up and running. The game turned out crappy.

It was crap because of two things: bad graphics and bad writing. Really, in a game where there’s no ‘fun’ gameplay the worse that could happen is if it had graphics made in 30 minutes and the story less than that –which says a lot at how dynamic my dialog code works btw.


The art is so bad it's worse than the writing.

The style is all over the place. The pixel art characters clash with the crayon drawn background. The font style is bland. The NPC characters are almost invisible.


Srsly. This is so derivative.

Straight lines make everything look rigid and manly. But the uneven shades makes the office look worn and used. I also limited the view to be smaller than the canvas so everything will fit without having to pan the camera. The text is no longer in the way. The overall look might remind people of  photo negatives– those people are voyeurs.

If U R in it, CH side by side

.. is a lame riddle I learned as a child. Oh look:


Is this even Catholic?

New updates to that RPG engine I’m making includes dynamically changing the tilesets and adding mouse controls. So I decided to make a game that features it. This game is about Catholics and their churches. It isn’t ready yet, hence the screenshot.

The code repo is right here: RPGAutomata . Follow it, if that’s your thing.

#LD19 Post Mortem (Very Lonely in a Spaceship)

I spent roughly 2 days of my life last weekend to participate in the most daring quest of the Ludum, #19’s theme being “Discovery”.

There are many reasons developers go to jams, I usually do it for the freedom but this time was different for me. Fresh from my Tron 3D experience the night before, I wanted to learn how to do all the neony stuff I saw, and given that the whole week I was studying rendering techniques I jammed for the learning opportunity.

Things That Are Bad

Unclear scope

While this isn’t my first jam experience, I still did a rookie mistake of trying to make too many things happen. I basically worked a couple of hours trying to make the game render in different screen sizes! Although experience worked for me when I used some code out of the box (like using PBE’s logging interface to create my own command line).

Too many distractions

I played CityVille too much. 🙂 (The fact that I’m using my girlfriend’s company issued laptop, which meant her bugging me to check if her crops haven’t withered yet, didn’t help either)

"Come let us ruin his productivity!"

Plus 2 Christmas parties on Saturday and a hangover half Sunday. (Look at the brightside, I actually have a social life!)

Lack of motivation to finish

The moment I knew how to make the glowing text thingy — bloom effect, for those in the know — I knew I was done. That was the thing I sat out to do and now I can’t find any motivation to do anything more.

Things I Should Have Done

Commit to goals before doing anything

If I should do a jam game the way I do a day-job project, I would set out to write the main goals — stories if you are an Agile freak– that I should accomplish during the course of the jam. Having the goals written down makes it easy for me to pace myself and map out the game’s direction. Writing a design doc is a waste of time, but writing bullet points isn’t. Here’s what I should have written:

  • Learn how to make things glow
  • Learn how to do those radar blips
  • Create dynamic captain’s logs

I usually let the design grow organically but it really helps to have a direction. I played CaptainForever again and I must say, I was unconsciously or consciously leaning towards that.


I learned a lot of technical stuff during the jam so..  it’s all good. I might finish the game in the future or I may not, but I’ll certainly reuse some of the things I did for this game.

Play Here