Tag Archives: blog

Even though our main objective remains making money, we also love to write interesting posts and make all our work open source. Some people told us they liked our work and wanted to support it by making donations.

We don't expect being able to live from donations, but they could help a lot to cover the ongoing costs that we have like server (svn, git, build server, etc), hosting (blog). They would even help us invest in other stuff like paying for art, sounds, or other interesting stuff that would help us improve our games and our chances in creating a successful game studio.

If you are interested in helping us by making a donation we added a Paypal donation button on the sidebar, we will be forever grateful and will continue trying to provide interesting content and useful tools for other developers.

Special thanks to Jens Hohmuth (@void256) the author of nifty-gui who insisted that we put up a way to make donations and immediately after that made the first donation.

Some people told us that our games where hard to find on the blog so we are working on making finding them easier. In order to do that, we first created a new button Games to let you find our games easily. It should be on the right sidebar, do you like it?

Also, as we have a lot of games right now, updating the Games page manually is quite annoying. To improve that, we created a basic WordPress plug-in named wp-games-gallery which creates a simple gallery of games based on each game page meta data. So now, each time we create a new game page, the games list should be updated properly.

Following our Games as Applets series, we want to talk about the Wordrpess Page Template we are using in order to deploy our games as Java Applets inside the Blog.

WordPress Custom Fields

When creating a new blog post or page, the creator can add metadata using WordPress Custom Fields, to be processed later by the PHP templates associated. In our case, we are using the following custom fields:

applet_height - height of the applet.

applet_width - width of the applet.

applet_screenshot - URL to a screenshot of the game

jnlp_url - URL to the JNLP for launching the game.

WordPress Page Templates

After adding metadata to our posts or pages, we need to make a WordPress Page Template in order to process it. In our case, we created a PHP template for our games deployed as Java Applets using the structure explained in our last post about Games as Applets. Our games template looks like this file.

Note: I didn't want to put all the PHP file code directly in the post because it is too large.

Once the page template is created, if we want to add a new page for a game, we only have to select it from the templates list and voilá.

Conclusion

Using WordPress Page Templates and Custom Fields, we can reduce the information of the game's page to game's related information only, and move all common logic and information between game pages to the page template.

This is how it looks to edit a game page:

Note: there is no applet tag or javascript in the page.

Also, if we modify the page template, we have all game pages updated, that could be really useful if you need to fix a bug or make an improvement to the page but could be a problem in case we introduce a new bug.

One problem not resolved yet is if you want to change the WordPress Theme, you will have to migrate the page template. I don't know exactly if you can create a page template theme independent.

Now, we have a page for each game showing a screenshot, the game's description and links to play it as an applet or via webstart. This is the page where we would add any content about the game like videos, faq, reviews, comments, etc.

One objective of this change was to make applets more friendly letting you see information about the game before interrupting you with the applet loading and also a friendlier message when you don't have the correct version of the java plugin for your browser.

If you click on the play as applet link, a new page is displayed showing an image of the game and the game's instructions, you can load the applet by clicking on the image.