Made a Game for GameJam

So last month I participated in a 48-hour game jam in my University. I was in a team of 5 people. The theme of the game jam was “You are villain”.

We discussed about the theme and decided that we should make it simple yet fun.

We wanted to create something that everyone can relate with. And what better game than the classic Pacman. We thought let us give our players the ability to control the ghosts. It sounded nice but how to go about it? Which ghost should we let the player control? Instead of picking one of the ghosts we picked all.

Yes, you read that right all of the ghosts could be controlled by the player.

But now it begs the question of how to control all of them? Let the user switch between them through buttons? That was one solution but we went nuts and let the player control all the ghosts simultaneously. Yep, we were going to let the player manipulate all the ghosts from a single controller.

We used Xbox controller and use left thumbstick, right thumbstick, directional pad and 4-buttons(A, X, B, Y) to control the ghosts. And another controller to control the player. So essential we made it a 2-player game with one person controlling the pacman and the second person controlling all 4 ghosts.

We were sure that people were going to go crazy figuring out the controls of the game.

Since Halloween was approaching we opted to give our game a thematic look. I created a pixel art characters as you can see below.

We made our pacman Van Helsing lookalike, hence PacVan (our title for the game). Our 4 ghosts were Werewolf, Zombie, Dracula and Ghost (yeah.. simple one).

Each of us designed one level, so in total we got 5 playable levels. The current game is simple and you can get it from here and play.

There are many features like Portal travel, Selective passing, Hide behind Grass, Time trial, etc. We have loads of ideas that can be incorporated in the game and we may implement them in the game some other time.

We got many compliments from players who played the game. It was pretty fun to watch them figuring out the controls and miss the PacVan by moving the wrong ghost.

In conclusion, people who were playing as ghosts won more times than people who played PacVan, despite the obvious fumbling with controls.

It was a great experience for me and I’d love to be part of such events in future as well.

Setting Up Development Environment for LMMS: QtCreator

This guide is for the new developers who want to begin developing for LMMS.

This tutorial assumes that you have already built/compiled LMMS on your system(presumed Linux but the steps could be applied for other OS albeit not as it is), and if not please follow the guide: Compiling LMMS

We will work with QtCreator and learn how to setup our Development Environment. Download the QtCreator from the official website.

Once you have installed QtCreator, we are ready to move forward.

  1. Launch QtCreator.
  2. Click on File>Open File or Project.
  3. Now browse to your ‘lmms’ directory and select on the file ‘CMakeLists.txt’, eg: /home/username/lmms/CMakeLists.txt
  4. A dialog box may appear asking you to specify the build directory, in here specify the folder ‘build’ in your ‘lmms’ directory that was created while compiling LMMS, eg: /home/username/lmms/build
  5. The Project will open, and if not it may ask for the executable file which you can specify as written below.
  6. Open ‘Options’ under Tools in the Menu Bar.
  7. In this dialog box, select ‘Build & Run’, where you can specify the build directory once again if you haven’t already done so.
  8. Under CMake tab, browse for the executable. Enter the path for the executable: /home/username/lmms/target/bin/lmms.

Once the project is opened and linked, you can build and run the project as you please.

Happy Development.

Creating Our First WordPress Plugin

So you finally decided to create your own plugin. But don’t know where to start?
Well in that case I can only say-

“Welcome Aboard’ 🙂

If you have searched on the Internet for plugin development, like I did, you would certainly be over-whelmed with so many tutorials and guides. And you can’t decide which one is better. Let me tell you, all of them are good and useful but certainly not the best. What?! Yes, you read that right. Nothing’s ever perfect, there’s always a need for improvement. Its the law of development.

Before you say anything, this tutorial falls in that same category. What I’ll teach you today is just the basic stuff to get you started in this field of WordPress plugin development.
Anyway, let’s begin with our tutorial. But first, let’s get the definition out of the way.

Plugin: In computing, a plug-in (or plugin) is a software component that adds a specific feature to an existing software application. When an application supports plug-ins, it enables customization.
(Source- Wikipedia)

To write a plugin for WordPress we must follow some guidelines that WordPress has provided. You can read about them here.
Ok! Here’s what we are going to do, we’ll create a plugin named ‘demo’ in this tutorial that will display the content ‘Hello! This is my first Plugin’ in any page or post that we want.

First let’s create a folder named ‘demo’ in our WordPress plugin directory. And then we create a file named ‘demo.php’ in it.
After creating it, we open that file in any text-editor and write the following code.

/* Plugin Name: demo
Plugin URI:
Description: A demo plugin.
Version: 1.0
Author: Gurjot Singh
Author URI:
License: GPL2

We’ll save the file. You can write anything you want. But this information is very essential if we want our plugin to display in the Plugins section in our WordPress.

Now we can see our plugin listed among all other plugins. Yey! 🙂

Okay, moving on to the next part, we’ll create a simple HTML text in another PHP file.

We’ll now open a new document and write the following code:

function myfn() {
$html=' Hello! This is my first Plugin ';

We’ll save this file as ‘function.php’ in our same demo directory.
We now have this function which contains html text but how do we display this text in our page?
To do this we must include this function.php file in our main ‘demo.php’ plugin file by adding the following code:

include ("function.php");

Even if we’ve included our ‘myfn()’ function in our demo.php we can’t display it as such. And we don’t even know where to display the text.

In order to do that we create a shortcode that we insert in any page or post to display our plugin’s content. To create our own shortcode we write the following in our demo.php file:

if ( !is_admin() )
add_shortcode('mydemo', 'myfn');

This creates a shortcode [mydemo] for our function myfn() that displays the text.
Now the complete demo.php file looks as follows:

/* Plugin Name: demo
Plugin URI:
Description: A demo plugin.
Version: 1.0
Author: Gurjot Singh
Author URI:
License: GPL2
include ("function.php");
if ( !is_admin() )
add_shortcode('mydemo', 'myfn');


Ok so its time to activate our plugin.
After activating it we can insert our shortcode ‘[mydemo]’ in any page or post we want.

And now we’ll see our ‘Hello! This is my first Plugin’ text in that page or post.

That’s it Folks! We have successfully created our very own first plugin. CHEERS! 😀
If you are having some trouble then don’t hesitate to ask.
And do read WordPress codex for plugin development.
Writing a Plugin
Plugin API
Plugin Resources
These are very important.
Post your comments below and I’ll see you (text-ly) next time. 😛 Till then Keep Developing!