Sunday, June 27, 2010

Completed and Current Games

Games finished lately:

- Kanockers (requires flashgamelicense.com membership to view): An intense puzzle game that uses turrets. Set up turrets to get the ball into the goal. A cross between billiards and a tower defense game.
- Shadow Survival (requires flashgamelicense.com membership to view): Survival shooter with epic boss fights. Also includes a free-mode. High scores enabled.

Games under construction and due to be finished within a week:

- Murkzen: Scrolling shooter. Cross between an avoider game and a generic space shooter. Themed around a murky swamp and zen like thinking.

Long term projects:

- Pit Fighters: Intense MMO that pits your fighter against a human or A.I. controlled opponent.

Thursday, May 20, 2010

Egad! Squared

I needed a break from working on quality content today so I threw together a sequel for Egad! Egad! Squared boasts all the excitement that a horizontal line is able to bring! People were getting insane Egad! scores. Wonder if the same thing will happen with Egad! Squared. Play it here.

Tuesday, May 18, 2010

Experiments in Traffic Generation

I haven't written a serious blog post since my last tutorial and figured it was about time. Recently I have tried a few tools/programs to increase the traffic to Ointment Games. Following is a short list of the tools I have tried:

Traffic Exchanges
+ Smiley Traffic (http://www.smileytraffic.com): Netted me a few hits with poor conversion rates - helped my bounce rate go through the roof;
+ Hot-Hitz (http://www.hot-hits.us): Same as above - although had a lot of free credits which I am still using;
+ Farm Traffic (http://www.farmtraffic.com): I only signed up for the FreeTrafficBar credits.
+ About 10 other traffic exchanges after I realised something (see my tricks for using traffic exchanges).

Advertising Exchanges
+ Instant Traffic Domination (http://www.instanttrafficdomination.com): Netted me no ad impressions despite having an approved ad and plenty of credits;
+ Instant Buzz (http://www.instantbuzz.com): Avoid it like the plague. Didn't even bother installing the toolbar after I read that the toolbar had a trojan embedded in it;
+ AdsVert.com (http://www.adsvert.com): Netted me over 10,000 ad impressions with a CTR that made me abandon the program (approx. 0.001%);
+ Insane Hits For You (http://insanehitsforyou.com): Damn these guys do some serious spamming. It is too early for me to comment on how many hits they have sent me so far. I will reserve judgement until I write a follow up article.
+ FreeTrafficBar: Forget the URL, just sign up at Farm Traffic and get the free credits. Don't install their Traffic Bar software and submit your text ad. You've got nothing to lose - I think you get around 10,000 free ad impressions for signing up at Farm Traffic.

Software
+ Website Submitter: A semi-automatic submission tool that assists you submit your site to a few thousand web directories. I really like this tool. I'm only about halfway through the submission list but intend finishing the submissions after I get the next game out of the way.

Tricks for Using Traffic Exchanges
If you just want to increase your Alexa rank and are not concerned with the quality of traffic it is better to find traffic exchanges that offer free credits for signing up. Most of them will require you to surf a minimum amount of sites. Because most of the traffic exchanges that offer free credits for joining have an auto surf feature use that to surf your minimum amount of sites to get the credits, assign the credits to your site and then never visit the traffic exchange again. There are so many traffic exchanges that offer as many as 25,000 (or more credits for joining - the average is around 5,000-10,000).

While traffic exchanges might be good to get your Alexa rank up and the traffic looks good on paper. You won't make much money from advertising revenue. I actually noticed my Adsense revenue go down because I wasn't engaging visitors. They were just visiting for the auto surf timer's duration to get their credit.

In Summary
I will end up writing a follow up article to this. It is too early to say with some of the other programs I tried and haven't listed. I have noticed an increase in my traffic. I have also had to do some redesigning to lower my bounce rate. I refuse to pay money for any of these programs. The only paid advertising I do is a very small daily budget allocation for AdWords which seems to bring in a little traffic. I will see how these free systems pan out and write the follow up after I finish the game I am currently working on - I need to pay the bills!

Sunday, May 9, 2010

CHAT!

Found a decent chat applet today at www.99chats.com. Ointment Games now has chat! It opens in a popup window so the chat shouldn't get in the way of gaming. You can check it out here. Alternatively you can sign in through the login bar at the top of the page at Ointment Games. Enjoy!

New Game


Because we haven't updated the game catalogue recently I figured it might be a good idea to show what we are currently working on. An untitled shooter that takes place in a land of shadows. So far we have implemented an upgrade system and the basic monsters. We have animated our first boss but we haven't got him fighting as yet.

Our Egad! experiment proved one thing to us. You need to focus on game quality and look for sponsorship in order to produce an income as a Flash game developer. You can't throw together any old piece of rubbish, upload it to Mochi Media and expect to get wealthy.

In other news, we have finally got around to implementing the rating section for each game. Now anyone can rate each game. Added a few more games today, will continue to keep adding them over the next few days - it takes time because we like to play them before we upload them. Next up is the chat system, we are thinking of just getting something off the shelf. Not sure if we want to open it to members only or not either. This post will be updated when we implement it.

Wednesday, April 28, 2010

Egad!!!!!

Ointment Games just submitted its first game to Mochi Media. A basic movement/avoidance game called Egad. You can play it here. There is a cheat for the game - if you right click to bring the Flash menu up before a bar then left click somewhere to the right of the bar you will jump it. It does not make it much easier but it will help get you through the quick sections!

This game was created as an experiment more than anything. We wanted to test the "Mochi Media waters".

Monday, April 26, 2010

Listing MySQL Over Multiple Pages in PHP

The Problem
You have a whole heap of items that you want to display from a database. The problem is you have way too many to post on a single page. You need page numbers that allow the user to browse through pages of database records. Following is a tutorial on how to accomplish this using PHP. This tutorial has been written with the understanding that the reader has some knowledge of PHP and how it interacts with MySQL and very good knowledge of HTML – also that you know how to populate your database with data. If you don’t want to read through the tutorial you can skip straight though to the source code which is downloadable here.

The Solution
You have used a database backend to insert your data. You can output the records but the problem is you have a couple of thousand records and it loads all of them into a single page causing information overload. You want to show only 50 entries per page (which is a lot still in my opinion - it doesn’t have to be 50, but it seems like a nice round number). While this solution may not be the most elegant solution, it works and only requires PHP and MySQL. In order to solve this problem we need the following files:

+ Page 1 of our record display – first_page.php;

+ A file to pull the data out of the database and display it – get_data.inc;

+ Some PHP to display the page numbers as links – page_numbers.inc;

+ A single page that acts as page 2 onward – next_page.php;

first_page.php
Let’s start with the easiest page first; page 1 of our records which we will call ‘first_page.php’. It is assumed that your web host allows you to treat .php files as .html files and will load .php files as if they are html, this will allow us to use html and PHP in the same file! Examine the following code. It is the actual code for this page that sits in php tags within the body tags. Examine the comments in (note: I have not put the header in, just what is between the body and php tags).


Simple! Well, most of the work is done externally so this page doesn’t have much to it. Next we will look at our get_data.inc file, which is where it does get sort of tricky.

get_data.inc
Our first real PHP. This is the file that gets the data from the database and displays it. We will work with a hypothetical database called ‘products’ in this tutorial. Our products database has a table called ‘toys’. Records in the ‘toys’ table that we want to display are ‘product_id’, ‘toy_name’ and ‘toy_cost’. So we need to open the ‘products’ database, go to the ‘toys’ table and retrieve the records ‘product_id’, ‘toy_name’ and ‘toy_cost’. Our query (as PHP and including database connection code) will look like this:


Normally I would recommend splitting the database connection section into a separate script. Now we need to know what page we are on so we know what we need to display. Page 1 is not a problem because we set the page number in the PHP that is embedded into the html. The rest of the pages will have their page numbers set from the page_numbers.inc file. We will explain how the value is actually passed when we get to that file. For now we will just tell you how it will be obtained:


We will only need to know the page number if it is not page 1, so this becomes:

Now from that we can work out what page we are on so we can now do a little math to work out which records we want to show. What we need now is:

+ A variable to hold the amount of records we want to display per page

+ A variable that holds a value that is worked out by multiplying the page number by the amount of records per page. This way we know what record in the table to start from.

So to this ‘if’ statement (and prior) we need to add the following:

Great! Now we can display some records. We won’t do anything fancy, that will be up to you. We will display them in a simple fashion. Like this:

‘product_id’ | ‘ toy_name’ | ‘ toy_cost’

We will put 2 line break tags after each record to space them out a bit as well. Our display code will look like this:

Now we need to put it all together! Note: you will need PHP tags at the start and end.

page_numbers.inc
The hard part is over, now we need a loop to display the page numbers for the amount of pages we will need. However, we need to do a little more math first. To work out how many pages we need we have to divide the total number of records by the amount of records we want to show on each page. Finally we need to round this number off so we don’t end up with a decimal. Check out the following code. Pay close attention to the comments (note: code will need to be wrapped in PHP tags):

That’s all we need for that page. Next up is the last page that acts as every page after page 1. It is very similar to page 1.

next_page.php
Instead of assigning the page number within the actual PHP file, it gets it from the counter link in the previous file as it is passed to the page.

That is it! The code is not optimal; I can spot ways to fix it up in a few places. I am leaving it as it is so you can fix it up and optimise it for yourself. This is so you can apply your own knowledge to it and get a better understanding of how the code works. Here is a hint for one section of code that can be optimised: We don’t actually need first_page.php! Instead of copy/pasting out of the tutorial go here to download the full code.