A Tree by the Sea

Oops, I rhymed.

This here is the draft screenie for the first scene of LoveHateGame. Everything inside the non-gray area is the player’s viewport (it’s a little photoshop trick I learned from my former artist officemates).

The gameplay is now slightly different than the last post. I’ll explain it later after I make the 2nd scene.

Still I’m a little bit worried about the number of sprites this scene might animate considering most of the things here are alive — the trees, the grass, the sea breeze, the sea, the sky and most specially the people. I want this scene to feel alive because this might be one of the few scenes the player will interact with. Everything in this scene must be enough for the player to feel the whole game.

1st Sketch, A lot of wasted space below the horizon

I was trying to get a grip of the grass overlooking the sea concept. I would have taken the easy way and silhouetted the art style but this would make the world dull and sad. I also wanted to make the player feel like a distance observer for the player hence the long road leading to the tree, but with this I’ll have to draw the avatar and other people smaller and that might be a problem.

The tree will be an integral part of the game and would reflect the player’s progress. As time goes the tree will shed until it withers.

Love/Hate 1st draft

I had this idea about a 3d game where the player tries to rescue a girl confined in a box. Did my initial sketches in Flash and all of it were crap. I couldn’t imagine good enough gameplay or athmosphere for it to be compelling.

So I scrapped the idea and worked on something a little mainstream: a generic platform game with a twist (like all of them do). The twist is that the player doesn’t directly control the avatar. Throughout the game you or the avatar will converse and “understand” each other.

I’m not exactly sure where this is headed but I am going to stick to a few guidelines:

1. Stay away from puzzles. The game shouldn’t be something you have to solve.

2. Control the scope. I have limited resources so I have to keep things manageable.

3. No pixel art. Not this time. 🙂

Hmm, this looks familiar

From screenies

After taking a crack at it I created my heroine. A little girl wearing a big red shirt. The red and black reminds me of the girls from  Abandon and The Path, haven’t played both of them though.

Jollibug now with parallax

My friend is making a game called Jollibug. He made it during the Global Game Jam. It isn’t about a certain fastfood mascot — although I personally believe otherwise. He forced me at gunpoint to upload some updates of his game in my blog.

Any resemblance is coincidental

He said he put some parallaxing on the layered backgrounds now. He also made  a totally original menu screen because his game didn’t have any!!! WTF!

Things that are on the works:

  • Animate menuscreen
  • Add warnings or signals on where the enemies come from
  • Sound (sounds halfass right now)
  • Add more corporate advertising
  • Game over screen looks like it was made by a jologs
  • Audience animation states

I think making parody games is for those who don’t have creativity but have an immature sense of humor.

How to use flashvars in as3

I use flashvars heavily to create customizable swfs. After some time I got tired of copy pasting my code and found this:

function getFlashVars():Object {
return Object(LoaderInfo(this.loaderInfo).parameters);

I only need to call this method (which returns an object) and chain it with the flashvar I want. This only works on timeline code though.

Here’s how I use it:

strXMLPath = getFlashVars().xmlPath || "slideshow.xml";

The || is for error handling. If I can’t get the flashvar:xmlPath, I created a default file slideshow.xml to show default data.

How to use dynamic fonts on html using AS3

Most designers find themselves worrying about cross-browser compatibility. Most of the time, they have to work with a limited choice of fonts.

What if you want to do something flashy, like this: http://us.blizzard.com/en-us/company/

Notice the gradient and the drop shadow in the “Company” header. It’s done in flash. And since it’s Blizzard, I assume it runs under a CMS so it’s dynamic. You can change “Company” to “Kompanya” just as easily.


1. Design whatever wonderful dynamic text you want in flash.

2. Make sure you embed the characters you want included in the font.

3. Assuming your instance name is “textMC”. Put this in the main timeline:


var params:Object = LoaderInfo(this.root.loaderInfo).parameters;
var _text:String = String(params["content"]);
var _orientation:String = String(params["align"]);

var myTextFormat:TextFormat = new TextFormat();
if(_orientation == "center"){
myTextFormat.align = TextFormatAlign.CENTER; //align center
}else if(_orientation == "right"){
myTextFormat.align = TextFormatAlign.RIGHT; //align right
myTextFormat.align = TextFormatAlign.LEFT; //default alignment is left

textMC.text = _text;


4. In your embed code, specify “content” and “align” in the params. “content” contains your content. If you want to set the alignment set “align” to “center” or “right”. The text aligns to the left by default. Ex:

content="This is the content"

Call setTextFormat() only after you set the text. Flash needs to know the content first, before it can properly format the textfield.

Biomodd Game Post Mortem

Original design sketch.

I was trying to stay away from writing a post mortem for this game because I don’t want to accept that it’s over. Multiplatform support, multiplayer networking, a 3 (occasionally 2, but usually 1) man development team and a very short project deadline; this was clearly one of the most challenging projects I ever did. It was also the most fun. From the all nighter brain storming session with Jeryll, Angelo‘s wonderful design inputs, game design arguments with Lomel (ex. Should Maria Makiling have a “Wrath” meter that allows her to nuke the whole place?); the whole creative process justified the reason why I chose to make games: it’s way more fun than just playing them.

However, coming from a software engineer’s perspective the project piled up with mistake after mistake that the game would have come out mediocre at best. And it did, actually. The game wasn’t there during the first opening night and it was barely enjoyable when it came out in the second.

What Went Wrong?

Choosing the wrong guns

During the initial planning, I was the only game programmer present, and a very inexperienced one at that. Multiplatform? That leaves GameMaker out. Multiplayer? Hmm, Java has nice networking features. Graphics requirements.. ok there’s no way we can render something that intensive in Flash. I chose Flash and Java anyway for the main reason that Flash is actually more multiplatform than Java, and Java will handle Flash’s networking. I was in the middle of creating my game engine in Flash when I posted this..

That’s right, I can’t make the animations smooth enough for an enjoyable game experience. So I went back to Java. I chose an old Java game framework called JGame and Sun’s Project Darkstar Server. Both frameworks looked easy enough. I put aside JGame since it was the least challenging and began working on the Server Side.

Bad choice number 1. It was too late when I realize that JGame wasn’t a good choice programming wise because it hardly implements any OOP, and there were already two programmers sharing and modifying the same java code file. Plus it became a headache just trying to locate java functions inside a 1000 plus line single file source code.

Bad choice number 2. Choosing to work on the network servers before even creating a working game. I thought that if I finish the hardest part, then everything would be smooth sailing from there. What I didn’t saw, was the possibility that I just might not pull off that hardest part. Blinded by my inexperience and my pride to do something only few developers even attempt to do, I marched on; with the rest of the Biomodd guys not seeing the semblance of a game coming out from my computer screen.

This was a case when a rapid prototype would have benefited the project greatly. More people could have played the game even if it was still on beta. Playtesting and balancing would have been done based on their inputs. And more buzz would have been generated about the game.

Lacking the right tools

Remember Java’s “write once, run anywhere” credo, well, I never realized how much of a fantasy that was until I tried running the server and the client on Ubuntu. I never anticipated the screensize not automatically adjusting plus the sound not working on Linux. Add the extra work of uploading the necessary .jars and you have yourself a big problem that would’ve been easily solved if I used multiple Virtual Machines on my laptop.

I was also using Vista x64 which much to my disappointment, being the fanboy that I am, crashed every time my development processes took 100% of the memory.

Jeryl in the lab

What Went Right?

Changing Horses in Midstream

And having the courage to do so. I have been ignoring Slick2D up until 3 weeks before the Manila exhibit. I realized I can’t go on with JGame and if I continue trying to make it work the code is going to be worse and worse. Slick was actually pretty easy to jump into and I recoded the whole game in just 2 days. The transition was painless I even added some extra holes in it for the networking layer.

The code base itself became more stable and extensible that it just took me a little more than an hour to add the 2-player and Twitter features.


A lot of the features originally stated in the game design didn’t make it to the final game (or at least the game that was played in the exhibit). My inadequacies in programming skills prevented me from creating a stable networking layer. Hardware issues made receiving data streams from environment sensors a difficult task. The way we intended to represent Maria Makiling seemed impractical considering our lack of artistic skills. We also have to let go of the much debated Wrath issue of Maria Makiling. It looked as if the features that made the game fun on paper weren’t going to be part of the actual software.

Then, 2 weeks before the end of the exhibit, I made some of the few good decisions I made in this project.

  1. Put the game source on code sharing.
  2. Dropped the networking layer altogether.
  3. Made a single machine 2 player game.
  4. Connected the game to twitter.

First, I shared the game in Google Code. This way the game can finally declare itself open-source. (Well, not really that open, outsiders only have read privileges). It didn’t actually contribute anything development-wise, but putting it up there made the project “immortal”. The installation may be dismantled, its parts distributed or recycled, but the software and the source will always remain in the clouds free for anyone to check out – and/or laugh at. (Which reminds me, I might need to clean up the code a bit for those who are allergic to duct-tape coding).

Second, I made the painful decision to let go of the highly unstable networking code. It was becoming a monster and working on it ate a lot of valuable dev time that should have been spent on improving the gameplay. Throughout the project, the multiplayer feature took the highest priority; the game cannot be the game if it wasn’t multiplayer, the game design hinges on that. Also, call it programmer’s ego, but the thought of giving up on the coolest thing you have ever coded simply didn’t enter my thoughts during that time.

It was after taking a few days off that it finally hit me. There simply isn’t enough time to pull off what I’ve been trying to do. And it wasn’t that I was giving up on my code, I simply saw a different way to write it. The networking layer needs to be taken down, but that doesn’t mean the game had to change. In fact, releasing it on single player for the exhibit was already shameful in my part.

The game should only be played with other people. So I settled with the easiest option: make it 2 player. With only a few days left on the exhibit, I thought it was too late.

Lastly, there’s “the game tweets” decision. Originally, Tina, the electronics ninja, setup some sensors to connect to the internet and visualize the state of the installation. The game was supposed to hook to that as well, creating a unique interaction that fuses everything in Biomodd together. Sadly, because I was too focused on unimportant stuff (curse you, networking and parallel programming!) I didn’t give much attention on this until it was too late. I was trying my hardest to get pachube feeds to the game when I thought, “It’s going to take a lot of time to set this up. And I still don’t have any idea how to interpret the data into the game aside from changing the background. Maybe if the sensors just tweet me stuff they want to happen to the game…”

So I connected the game to twitter and the possibilities of the tweeting interaction began pouring as I code it. The game tweets, players tweet the game. And since I know that the game was only going to be played within the PCs of Biomodd, I can get away with this easily. It won’t flood Twitter’s bandwidth, players feel Makiling in the context of the game and the installation and there’s certainly the “Whoah, this has never been done before” factor.


The project is definitely my most challenging yet. I don’t want to conclude.


Biomodd[LBA2] website: http://www.biomodd.net/
Google Code Project Repository: http://code.google.com/p/biomoddgame/
Maria Makiling’s Twitter account: http://twitter.com/maria_makiling

It is what is. 🙂

Specifying -vm option in Eclipse

I recently had the trouble of having multiple Eclipse installs in the system. And since I didn’t have web connection then, the whole installation had to be done offline.

I was coding with Project Darkstar using the Darkstar Maven Plugin. I installed the M2Eclipse plugin for better mvn integration. When I restarted the ide, I got this wierd warning:
The Maven Integration requires that Eclipse be running in a JDK, because a number of Maven core plugins are using jars from the JDK.

Please make sure the -vm options in eclipse.ini is pointing to a JDK and verify that Installed JREs are also using JDK installs.

Wierd. I checked my Installed JREs (Windows>Preferences>Java>Installed JREs) and I was using a JDK. I checked my eclipse.ini and added on the first line:

-vm "C:Program Files (x86)Javajdk1.6.0_06bin"
Didn’t work, and so lacking net access, I proceeded to ignore the warning. My only problem was that the javadoc for jdk classes where lacking. And when you autocomplete method calls, parameters were replaced with “arg0, arg1.. “. No big deal. I could just manually locate the javadocs and point my jdk to them.
A while ago, I decided I had enough of the startup warning and took matters to the java forums. Turns out my -vm command in eclipse.ini was being silently ignored because apparently it wasn’t the right syntax. It should be:
C:Program Files (x86)Javajdk1.6.0_06bin

With the newline and without the quotes. Yup, one of those quirks worth posting a blog for.
Finally, I can start my Eclipse in peace.

Remember that AI game you were working on?

Back when I was still in school, a professor advised us to createa code repository. Sure you might find your old programs stupid and badly written but within those old crappy code you might find something of value. Come to think of it, this is one of the reasons why I made this blog.

While working on the Biomodd game, I stumbled upon an old project of mine. It was a java based simulation platform for implementing bot behavior. I started coding it a few weeks after graduation fresh from my immune algorithms thesis. The algorithm bit of the thesis was interesting but I was more curious at how I can extend the system so that I can easily swap algorithms without changing much of the code. I didn’t know it then but I was actually trying to design a framework. Like most of my “ventures”, I eventually had to freeze the project after I dug into “flocking algorithms” and totally messed up the physics part. I was at my hometown with no internet and no physics or math book so I had to rely on stock knowledge for pretty much everything.

My OOP and design pattern skills were limited but the code came in handy when I was studying for an IT-certificate course (don’t ask J). We were required to present a game that utilizes OOP concepts. I revived the project, added a few sprites, simplified the movement algorithms (to a simple linear Point A to Point B movement), added a few if-else conditions then presented the “game” to our class the next day.

It was almost a year since I last touched the code and had to download JCreator in order to open the project file. Going back to JCreator after my experience with NetBeans and Eclipse made me wonder at how simple my programming needs were back in college. No code-complete, no SVNs, no build or debug tools, no refactoring.

Everything was so simple. I looked over my code and saw stupid OOP mistakes. Bad use of inheritance here, bloated classes there. I searched for the movement logic and, thanks to the code comments of my old self, easily found it and toyed with it once more.

I guess maybe I need to create a google code account or something, just to have something to put all the past codes/garbage in. Ok I’ll do that, as soon as I have broadband access.