One thing that is initially overlooked in game design is handling menus and levels within the user interface. However, we know that it’s always going to be, and is, a crucial part to any successful game, as it helps provide the user with an extra level of control and eases general flow. It’s just a case then of finding the code to do it.
This tutorial will cover a simple technique for handling state management with enums or “enumerated types“. If you have used state management or even just enums in C# before, then this will all feel very familiar to you. There are however some very subtle differences between the markup of the two languages. Continue reading Handling Game State Management in C++
Allowing a developer to access a visitor’s browsing history is a huge security risk, that’s why it’s not possible. If you own a website that runs PHP with MySQL and handles sessions then this could be done by tracking IP addresses, user agents and so on to associate a browsing pattern with a particular person. This however can be pretty inaccurate, plus it’s only limited to your own website.
The URL fragment anchor (or accelerator, ID link or jump point) can be used to relocate the visitor to a specific part of a page. This is done by giving an element an ID then linking to it with a hash symbol (# or number/pound sign) like so:
PHP sessions are great for dealing with log in systems, tracking user activity, and allowing them to save data as they move around your site, like a shopping cart. Writing up what you need to run it though can be a bit painful, so that’s what lead me onto creating a custom session handling class in PHP. Continue reading Custom PHP Session Class
One service that I had used a while back was AddThis social bookmarks. I really liked its ease of use, support for a huge range of social networks and bookmarking sites, and most importantly it had great tools for analytics.
Back in September of last year, Jim Greer of Kongregate.com posted an article in the forums about a new badge data service served in JSON. This was great news for developers, we could finally grab data from our user accounts without having to do a web scrape on our user page.
However, this forum post seems to be the only official documentation on what is a very interesting data feed, so it is with this reason that I decided to create this beginner’s tutorial on how to use it. Continue reading Parsing the Kongregate Badge Feed with PHP
The web has so many useful services now, many offering their own API that you can draw data from and create your own mashups with. Websites like Twitter, Facebook, Flickr, and Kongregate are just a few.
Their data output is most commonly formatted in RSS (for feed readers), and JSON (a lighter form than XML used a lot for AJAX). In this post I’ll show you how to use the cURL library to collect data from any public web page. Continue reading How to Fetch Page Content Using PHP
This tutorial will provide you with a very basic script to start using this great tool and covers what you need to get started.
Continue reading Beginner’s Guide to Google AJAX Feed API
Continue reading Using jQuery To Create Parallax Scrolling Backgrounds
When opening new windows from your web page that link to external files, a common practice is to open them in a new window as not to deter the user from your site.
One method to do this in the past was to use
target="_blank" that tells the browser to open the link’s
href attribute in a new window. This, however, is deprecated in the Strict Doctype of W3C web standards so we should be trying to avoid using it whenever we can, and in this post I’ll show you exactly how it’s done.
Continue reading Open Windows in HTML with Standards Compliance