Flash Game: Bounce

Here’s another one of my game assignments that I never got around to post the complete version. Bounce, which is built upon billiard ball physics.

Get Adobe Flash player

Move your mouse to control the blue thing (I’m not sure what to call it) and use it to knock the spawned red balls into the green goals on each side of the screen. Score as much as you can before the timer runs out. Very simple game play, as the main focus was to get something done using some form of physics simulation. Sometimes the balls might get stuck near the blue thing and glitch the game. If that happens just move your mouse around and it will resolve itself.

Flash Game: Forced Fields

Previously I blogged about an incomplete prototype for my game assignment here. It has long since been completed, just that I didn’t have time to update it here. So here it is, the completed game with levels.

Get Adobe Flash player

This is a turn-based two player game. Each player takes control of either the green or pink circular thing on the screen. During your turn, use the arrow keys to move around and adjust your position. Take note of the meter below the screen which displays your movement points. When it runs out, you can’t move anymore. After you’re satisfied with your position or ran out of movement points, press the spacebar to aim you entity. Left and right arrow keys to turn, up and down to adjust the power. The higher the power, the higher your projectile’s velocity.

The blue and orange circles are force fields, which will affect the way your projectiles move. Blue attracts, red repels. Oh and the green and pink meter on the top of the screen are your HP. Kill your opponent to win. Have fun!

Roguelike Development: Infiltrate

Wow. My last post was a year ago.

Well after playing several roguelikes over my one month holiday (alongside my proper work of course), I’ve decided to get my hands dirty and see what I can do. Roguelikes are essentially RPG games with no graphics, thus giving all focus to game play. Having said that, I still like my games to be aesthetically pleasing to the eyes, so I had a go on font creation as well…but that’s another story. With graphics out of the way, I jumped into designing the game play and came out with this idea as the result. You are an agent sent on a mission to investigate an underground research facility that has supposedly been infected with some kind of deadly virus, turning its inhabitants into zombies and various mutated organisms. The goal of the game is simple:

  • Infiltrate the underground research facility.
  • Recover the research data and research outcome.
  • Eliminate everything in your way.

Which brings me to my current position: one week into development. I’ve pulled together a FreeType2 and OpenGL powered engine, partially based on the architecture of all of my previous works (which are mostly abandoned *cough*). Well this project turned out to be much cleaner and elegant, probably due to its turned based nature. Basically the game loop pauses and doesn’t do anything until the user performs an action (key press in most cases), which it then processes and re-renders the screen. The screen is just a large array containing the character and color info represented by each grid cell. In other words, an OpenGL powered console.

So far, I have been able to implement a significant amount of basic features. A main menu, text fields and buttons, a scrolling map, and map representation, just to name a few. Also, binding to Lua, which is really great. No need to worry about map generation for the time being. Nothing much, just a room with doors opening out to nothing.

The main menu.

The main menu.



The player in a room.

The player in a room.

I really have to make a habit of writing about my development progress. I’ll try to remember to post another update next week.

Flash Game Experiment: Bounce

Here’s an experiment for my Game Physics assignment: colliding balls!! You control the blue thing with your mouse. For now, its just a test for the collision between the balls. It’s just a work in progress, so there’s nothing much to it at the moment.

Get Adobe Flash player

And here’s a link to the full sized version.

Flash Game: Pathogen

Here’s a game I made quite some time ago. Use the left and right arrow keys to change direction, up and down keys to move further or nearer to the core. You control the blue cell spinning around the core, and your goal is to protect the core from waves of enemies. Collide against the enemies to destroy them.

Get Adobe Flash player

Do note that this was originally intended for commercialization, therefore the ad space. Have fun!

Game Update: Forced Fields

Yesterday I posted the prototype for a Flash game I made, Forced Fields. Well here’s the updated version, with a new map and HUD. I’ve also added glowing effects to the force fields to make it look nicer.

Get Adobe Flash player

Try hitting your opponents in more creative ways instead of moving next to him and shooting him directly, which completely takes the fun out of the game. And anyway, have fun!

Small Flash Game: Forced Fields

Here’s the prototype of a small Flash game for my school assignment. It’s a two player game, an the goal is to hit your opponent. The blue and orange circles are force fields; the blue ones pull your bullet towards them while the red ones push it away. Try to aim with the correct angle and power. You get to move a bit at the beginning of your turn, to avoid enemy fire.

Get Adobe Flash player


At the beginning of your turn, you get to move you character (there’s no meter to indicate how much you can move yet, but will be added soon). After you’re satisfied with your position, press space to enter aiming mode. Use the arrow keys to adjust your power and angle, and press space again to shoot.

The one shown here is re-sized to fit into the post. Click here for the full-sized version.

P.S.: I can’t actually beat it yet. Looks like some level design work needs to be done.

Starlight Engine Progress Update

This post is kinda late….about 6 months late since I started working on my tile based game engine, codenamed Starlight Engine. Anyway, I’m gonna post a quick run through of my current progress, for my own reference in the future.

First a little details about the engine. The engine uses a stack based data structure, where screens are stored in the stack. Screens are basically everything you see in the engine, menus for example. Supposedly I’m currently viewing the main menu, and I pushed the start game button which will take me to the game screen. What happens is that the game screen is pushed to the top of the stack, and the engine updates it and stops updating the screen under it, which is the main menu. If I decided that I wanted to return to the main menu, the engine simply pops the top most screen from the stack, and renders the screen under it. This allows for a more simple way of handling screen transitions, of which I had various problematic encounters with in previous projects. The engine keeps a reference to all of the screens present in the game, and passing the references to classes that request for it.

For this implementation, the screens are updated from top to bottom of the stack, whereas rendering is done from bottom to top. This allow screens to only cover part of the window, while allowing stuff under it to show through. An example is shown below, with a message box only covering part of the screen.

A message box obscuring only part of the screen.

A central texture manager class is created to manage the textures that will be used throughout the game. The TextureManager class loads all textures during startup, and passes out references to classes that require them during runtime. This implementation is to ensure that the textures are loaded only once, and it is also better to reduce disk access later in the game as texture files could end up with a pretty large size.

I also successfully implemented my own text renderer into the engine, which uses bitmap fonts generated by AngelCode’s BMFont tool. This is the first time I’ve ever worked with bitmap fonts, and is quite a challenging experience. The fonts could be limited to wrap within an arbitrary amount of pixels, and can also be aligned left, right and center. Unfortunately, there are a few downsides of using this implementation. The fonts get distorted when scaled, and also adding in a new set of fonts is quite cumbersome.

Text could be aligned and set to wrap within a boundary.

So far, the most important GUI component needed for the game is a button. Creating a MouseListener class is relatively trivial as compared to adding font support. The buttons currently used in the engine are texture mapped quads, with the coordinates hard coded. This should be updated in future revisions.

The main menu, with four buttons. Note that the buttons are actually texture mapped quads.

For the character creation screen, the player will get to insert a name for their character, and therefore I have created a TextInput component. This was also easy, as I already have the font renderer at my disposal. Perhaps with this I could implement a debug console if the need arises.

The character creation screen. Here, the player can insert a name and customize his character.

And finally, after a few days of hair pulling I finally managed to put together basic tile support for the engine. It is currently in its early stages and quite useless, but it should get better after a few days. The tilesets I use are taken from this awesome site. The tiles are originally intended for use with RPG Maker, and therefore I also created a simple tool to expand the tilesets to tiles usable in my engine. Oh and also, I’m using Tiled as my map editor, as it seems to be the most recently updated map editor I could find. I would create my own editor if time allows…maybe after I graduate.

A very primitive tile engine.

And that should be it for now. I’ll update here after I have significant progress to show next time.