Creating the Sense of Time in PHP Games

One common obstacle facing many first-time PHP game developers is the concept of how time passes in their web-based game. With desktop / mobile applications, time can continuously run via a timer mechanism because it is always running on the device. PHP works in the disconnected world of the Internet. When a request comes into the server, it fires off the request to the PHP program for parsing, parses ...

Populating Multiple Drop-downs Dynamically

First off I want to say that there are multiple ways of doing something like this. Below is two ways (and I mention a third) to dynamically populate one drop down using the selection of another drop down (aka chaining drop-downs). One way we will see uses a pure JavaScript implementation and another is using a combination of JavaScript and a server-side language (here we are demonstrating PHP). After we ...

5 Quick and Easy Refactoring Tips

You wouldn't believe how many programming questions I run across, on a daily basis, asking for help with programs that contain repetition, duplication and enough spaghetti code to feed half of Italy. Often times the person asking the question has a particular problem but they don't know exactly where the problem originates. So they plop down a bunch of code and say "It is somewhere in there... I think". Usually ...

Stash Data Away in Controls With the Tag Property Using VB.NET

One of the most underutilized properties of any control is a property called "tag". What does it do? Does it cure world hunger? Does it save the planet from annihilation? I would probably say no on both counts, but it does have a bit of a mystique that beginners may not be fully aware of. In design mode of Visual Studio if you select a control, a button or text ...

Cleaning Industry Code: Where to Start on this Awful Mess!

Congratulations on your new job! You are the master of the coding universe and you are going to show everyone that you are the ultimate truth. The first day of your new job and you stroll into the office, strutting with your shimmering Starbucks mug, trendy new clothes and carrying your new laptop that could whip anybody. You sit down and fire up the PC and login for the first ...

Function Pointer Basics in C++

Beginners to C++ programming find the concept of pointers foreign to them. Pointers, and code that manipulates pointers (aka pointer arithmetic), can even be daunting to some of the most seasoned programmers. Pointers in C++ account for a fair share of bugs in programs due to the lack of understanding. So why even use them? Well, besides being the most problematic, they are also some of the most powerful features ...