John Citizen - post mortem

General — mcgrew @ 11:53 pm

The aftermath

So, John Citizen has been released for about a week on the internet. It is currently, at the time of writing this post, sitting on the frontpage of Newgrounds. It has 88,000 plays, 3,700 votes and and average score of 3.80. There are 200 reviews, which are quite mixed. This is by far the most success I’ve had on Newgrounds.

When I first uploaded it on NG it emerged from the unrated games with a rating of around 3.7. I watched excitingly during the day as it rose to above 4 and then plateued at around 3.8. This got the game Daily second and frontpaged, which caused me great excitement.

Uploading to Kongregate gave me a score of about 3.7 and approx 1,500 views at the time of writing. I only uploaded it last night though, so the results from Kongregate may improve.

If we look to the rest of the internet, the game is widespread and is doing quite well. I did not add a tracker to the game to see how many plays it has recieved. Looking back now I wish that I did, but I guesstimate this number to be around 700,000+

However, the game isn’t perfect and I know it. Some of the reviews I’ve had have said the game was bland, graphically poor and not that fun. I do have to agree somewhat with the first two comments, but I don’t agree with the last one. I had fun making it and I have fun playing it.

The beginning

John Citizen started as an idea around 12 months ago to create a platformer that had a physics engine integrated and that would be a core part of the gameplay.

I had been experimenting with several physics engines at the time and decided to work with Box2D as it was fast, easy to use and versatile.

The first thing to do was to get the basic platform elements in place. I had a character that could run and jump. I spent a lot of time playing around with this to get the character’s feel right. That was done by changing variables for gravity, horizontal acceleration of the player and air resistance.

Then it was time to add a weapons system and the ability to shoot. Again, a lot of time was spent getting this feeling right - by changing the force exerted by the weapon’s shot and the masses of the objects available.

The next step was to create a level editor. The level editor I made for John Citizen is quite basic but it works. It was relatively easy to add new objects and tiles to the game from the setup that I had.

john_editor_1

After the level editor was created and I could make, save and edit levels, I started working on the graphics and effects. I had some fun working on these - the explosion/motion blur/shake was one of these effects that I’m most proud of. I realise, however, that the graphics of the rest of the game weren’t up to par.

This is because I did the graphics myself and am not the most artistic person. I should have contracted the graphics out to someone but having no budget I did not want to pay for an artists time.

This is probably the biggest regret I have about John Citizen.

The rest of the production time of the game was spent on creating ten levels and doing lots and lots of tweaking.

The sponsorship

After the game was almost finished, I uploaded it to Flash Game License. I reccomend this service to any Flash game developer. As well as the exposure to sponsors, you can recieve valuable feedback from First Impressions and other game developers who view your game (the two perspectives that together give a good view on how your game is going.)

I can’t say that I recieved countless bids after opening the game to sponsorship. But eventually (after a few months) I recieved a bid from maxgames, which I accepted.

A summary

John Citizen, while being (in my opinion) a good game, was not the best that it could have been. This shows in the ratings and reviews that it has received and in the graphical quality of the game.

I wish now that I had spent more time improving on the graphics - of the characters and the environment and also the backgrounds of the levels. I would have loved to create different backgrounds for each location that actually portrayed where John was at the time, but I didn’t have the skill to do so.

But it has been a valuable experience for me and the success I have had (especially on Newgrounds) makes me warm and happy inside.

On a final note, I wanted to point out that the first letter of each place name spells out ‘A.R.M.A.G.E.D.D.O.N’ !! No one had noticed it!

I’ll finish the post with some screenshots from the game.

john_full_3

john_full_2

john_full_4

Cheers!

Mcgrew.

Tile engine + lighting preview

Experiments — mcgrew @ 11:03 pm

A little while ago I posted a preview of a scrolling tile engine that I have been working on.

Well, I’ve improved it a bit since then to include objects and lighting.

(Either JavaScript is not active or you are using an old version of Adobe Flash Player. Please install the newest Flash Player.)

Arrow keys to move, click to shoot

I’m not sure if I am going to continue this and expand it to be a full game, so I’m debating on releasing the source.

The lighting is basically done by sending out rays from a point source. If the ray hits a wall, stop it there. Continue this until you can draw a shape which is the shape of the light sources resultant light. I draw this to a sprite and then draw it to my bitmap, using a gradient fill to fade out the light.

John Citizen released

Games — mcgrew @ 4:27 am

After months of work, I am proud to announce that John Citizen has been released. This game is a physics based platform shooter that uses the Box2D library for some great physics.

It feels extremely good to be able to say that it’s now released, and I am in the process of working on my next game.

Play John Citizen.

I will post a full report on the high and low achievements of the game after it’s been around the web a bit longer.

FPS counter update

Experiments, General — Tags: , , — mcgrew @ 12:57 am

Uhh, this is a little embarrassing but I have to make an apology. The FPS counter that I posted up a little while ago had a rather small error syntactically but a rather major problem semantically. As in it didn’t work - and it ate up memory and slowed the game down.

The problem was caused by myself writing lastTen.slice(…) instead of lastTen.splice(…) resulting in the lastTen array getting much, much bigger and the swf getting much much slower.

So sorry to anyone who may have used the code as a FPS counter and who may have suffered from this. It just shows that programmers (and especially myself) aren’t perfect.

Flash 4k Game competition - and why I’ve given up

General — mcgrew @ 3:33 am

If you haven’t read or heard about it, let me introduce you to the Flash 4k Game competition. It’s a competition in which Flash Developers work towards producing the best game that they can, while limited to a filesize of 4kb. This competition is similiar to the Java4K competition.  

The competition has prizes - $50 for first (plus your choice of some indie games) a $50 Amazon voucher for second place and $25 for recieving the Audience Favourite prize.

Now, as the post title says, I have given up for now. Why?

Making a game in 4kb is dangerously hard.

The size of your .swf is basically cooked up in the following way:  File size of swf = Amount of source code + Media (Embedded graphics, sounds etc.)

I began my journey in this 4kb competition by creating a menu. By no means was it an advanced menu - it catered for three buttons; “Easy”, “Medium” and “Advanced” (which I dynamically made as TextFields.) It assigned listeners to each to listen for mouse clicks, which is what you’d expect from a menu.

Ok, great, everything worked.  Let’s check the filesize. Hm. Okay, what?? Drats! 1.5kb already. This leaves me with 2.5kb for the entire game. Bummer.

Now, I probably didn’t use the most efficient way possible to make this menu but it was the way I’d normally do it. So the realisation I’ve had is that I don’t take any heed of resultant filesize when I code. I take speed into account and I take playability and structure into account but not a worry to how big my game will end up.

It’s not a problem so much nowadays when nearly everyone has broadband internet and will download several MB files in just a few seconds. But it means that without planning and careful considerations I cannot make a game for this competition with the way I currently code and freely use embedded media.

Perhaps I’ll try again - scrapping the outrageously large menu and concentrating on gameplay - but for now I simply have respect for the people who can cram a fully fledged game into 4kb.

Very simple FPS counter

General — mcgrew @ 11:44 pm

Below is the source to a very simple FPS counter that can be used in any AS3 Flash project.

package
{
	import flash.display.Sprite;
	import flash.text.TextField;
	import flash.utils.getTimer;
	import flash.system.System;
	public class FrameRater extends Sprite
	{
		public var frameRate_tf:TextField;
		public var memory_tf:TextField;
		public var lastTen:Array;
		public var lastTime:Number;
		public function FrameRater ()
		{
			frameRate_tf = new TextField();
			frameRate_tf.x = 0;
			frameRate_tf.y = 0;
			frameRate_tf.selectable = false;
			addChild (frameRate_tf);
 
			memory_tf = new TextField();
			memory_tf.x = 0;
			memory_tf.y = 15;
			memory_tf.selectable = false;
			addChild (memory_tf);
 
			lastTen = new Array();
			lastTime = getTimer();
		}
		public function Update ()
		{
			var timeTaken:Number = getTimer() - lastTime;
			lastTime = getTimer();
			lastTen.push (1000/timeTaken);
			var average:Number;
			var sum:Number = 0;
			for (var i in lastTen)
			{
				sum += lastTen[i];
			}
			average = sum/lastTen.length;
			if (lastTen.length > 10)
			{
				lastTen.splice (0,1);
			}
			frameRate_tf.text = ""+Math.round(average)+" FPS";
			memory_tf.text = ""+Math.round(System.totalMemory/1024/1024)+" MB";
		}
	}
}

The FPS counter can be added very easily, and only requires that you call its Update function every frame. An example of its use is below:

package
{
	public class Project
	{
		public var fps:FrameRater;
		public function Project ()
		{
			fps = new FrameRater ();
			addChild (fps);
			addEventListener (Event.ENTER_FRAME,Update);
		}
		public function Update (e:Event)
		{
			fps.Update ();
		}
	}
}

To see an example of the FrameRater in action, visit the previous post: BitmapData scrolling tile engine preview.

Enjoy!

BitmapData scrolling tile engine preview

General — mcgrew @ 11:35 pm

Lately I’ve been procrastinating and putting my main project, John Citizen, aside to make other useful things; such as this tile engine.
(more…)

PHP’s number_format in ActionScript 3.0

General — mcgrew @ 3:45 am

Something that is lacking in ActionScript 3.0 is some sort of number_format function. So I have hacked together a function that is useful to me in my own projects and I thought that I might share it.

This, by all means, is not the most efficient way to do this but it WORKS. If you have seen or have created a more efficient way to do this, please let me know! Cheers.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
public function NumberFormat (num:Number):String
{
	var string:String = "" + num;
	var commas:Array = new Array();
	var i:int;
	for(i = string.length-3; i > 0; i-=3){
		commas.push(i);
	}
	commas.reverse();
	var count:int = 0;
	for(var j in commas){
		var p1:String = string.slice(0,commas[j]+count);
		var p2:String = string.slice(commas[j]+count,string.length);
 
		p1 += ",";
		p1 += p2;
		string = p1;
		count++;
	}
	return string;
}

So an example of how to use this would be:

1
2
ScoreDisplay.text = NumberFormat(12345678);
//Would return 12,345,678

As I said, it’s a very untidy function - but it’s useful.

Box2D example + source

Tutorials — mcgrew @ 6:26 pm

Box2D is a great physics engine that I stand by, and am currently using for my platform shooter. The only problem with it, I find, is that there are few documents/tutorials available for the ActionScript 3.0 port.

Therefore, I present an example that I have made - with commented source code - to hopefully encourage more people to begin making games with Box2D.

(more…)

The first pEngine demo

Experiments — Tags: — mcgrew @ 6:33 pm

What better way to start off this new blog than to showcase a particle engine that I have been working on for a little while?

This engine is called pEngine. It uses bitmapData (of course) to render and is rather fast, while it can contain many particles. 

I will not be releasing the source yet, as it is uncluttered and unorganized and is not very easy to use. The first example that I release is after the break!

(more…)

Next Page »
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.
(c) 2009 Gamersgarden.com | powered by WordPress with Barecity