Get the full commented source code of

HTML5 Suika Watermelon Game

Talking about Users contributions and WordPress.

Yesterday I started my project called Creation of a Flash arcade site using WordPress and today I received a lot of emails from readers that want to run their own WP arcade.

I want to share with you some really useful information sent me by a reader who prefers to remain anonymous.

This post will help you if you want to start building your own WP arcade.

Here we go:

The reasons I chose WordPress are:
– Its free :)
– I am primarily just going to be hosting my own games, so I don’t need anything too fancy and WordPress is as simple or complex as you need it to be.
– Most arcade scripts have a lot of features I simply wouldn’t use and can cause clutter / extra pressure on server.
– Most software specifically geared for Content Managment (CMS) are more complex than I need. WordPress is fairly easy to use.
– There is a vast user base and long established community with support for most things you would need.
– Highly customisable and with a lot of community support for template editing.
– SEO friendly and search engines supposedly ‘like’ WordPress.
– Support for caching and other memory saving stuff.

With regard to caching I was looking into this yesterday and thought you might find this useful. As you know the main eventual aim of any games site is to pull in decent traffic. The downside to this is that any high traffic site is going to eat up CPU and RAM leading to the server being killed and loss of profits due to downtime.

To help prevent this I read that using multiple layers of caching amongst other things dramatically helps. Caching basically means the user is redirected to a static page rather than sending a request to pull the content from the database which can heat things up. The only drawback is that your content becomes less dynamic. So if you want to get into dynamic instant user interaction etc. it may or may not really work out. I’m not sure. If you plan to keep things fairly simple however it will definitely be a massive help.

In summary its like this ranging from least complex to more complex (I’ll include everything even if some may be a bit obvious):

– Try to avoid overcrowded servers. Mainly ones that advertise “unlimited bandwidth / unlimited web space”. The more crowded the server the more vunerable it is to crash from high traffic. If you can afford it a decent VPS is ideal, then later moving up to a Dedicated when necessary. You can visit http://www.webhostingtalk.com where there is a lot of info on hosts and servers.

– Don’t use too many plugins. Each plugin has to be loaded up. Only use what is necessary.

– Make sure to compress images and other media.

– If you’re utilising RSS feeds in any way then Feedburner is supposed to be able to do some caching.

– Edit your template theme to replace unecessary PHP calls with static content. For example the title of the site will rarely change. And some things could easily be replaced with hardcoded direct text links rather than pulling the links info in. The location of your stylesheet for example amongst other things.

– For WordPress use a caching plugin to help lessen the frontend load. Some WordPress plugins include: WP Super Cache, Hyper Cache, 1 Blog Cacher and an upcoming Viper Cache.

– For the server using a PHP accelerator like eAccelerator or xCache is really effective. This most likely won’t be possible on shared hosting. If your host can support it, then there is also a WordPress plugin geared towards communicating with eAccelerator and xCache on the server:
http://neosmart.net/blog/2007/xcache-and-eaccelerator-wp-plugins-updated/

– Litespeed on the server also apparently helps. I do not know much about it. This may be something that many hosts already have on their servers. If not I believe it is not free and may need further looking into. Again probably not something you can request on a shared host.

With all of this it can help the load on the server by quite a large amount and can help to carry to strain of a burst of traffic.

Some extra items that may or may not help:
– Remove unecessary items from the dashboard:
http://wordpress.org/extend/plugins/wordpress-dashboard-editor/

– “The default WordPress install has the option turned off to pre-load all the option settings at once. If you turn it on, you’ll probably drop the queries by a half-dozen or more. Try putting this into your wp-config.php and see what happens:
$wp->load_options = true;” by ck

– htaccess caching (may or may not be necessary after above)

– If you get so much high traffic that you start using multiple servers then WP-Offload plugin apparently redirects to caches on external servers.

– tcp read and write socket memory buffers (really not sure what this is about, maybe something to look into if you’re still suffering after doing all the above)

– MySQL query cache (again something to try after all the above. I read it may slow down things slightly so it may depend on your needs as to if this is beneficial, I would read into it further before trying.

– You can really go the full hog and optomise every aspect of the server and whatever it is using (e.g. Apache etc.). I would reccomend seeking advice before doing so incase of damaging anything and probably as a last resort if the above doesn’t help.

Again a lot of this stuff is mainly for VPS etc. rather than Shared.

I got a lot of this information and the quotes from the comments on:
http://www.codinghorror.com/blog/archives/001105.html

The only thing I’d be worried about is that there are some Digg users who like to ‘test’ WordPress blogs by hammering them since they feel WordPress is easy to bring down.
http://digg.com/programming/Let_s_Bring_Down_…..
Although those seem to usually be isolated vandalism incidents I think (mainly if anyone utters the word “I can now survive high traffic and/or Digg effect” they are signing their death wish. Search for “wordpress digg effect” on Digg).

Never miss an update! Subscribe, and I will bother you by email only when a new game or full source code comes out.