LeaderboardExample Code Updated to MySQLi

I updated the LeaderboardExample PHP code to replace the MySQL methods with MySQLi methods. The MySQL methods are no longer supported in the latest versions of PHP, which caused warning and error messages to display in the generated JSON file containing the score data.  This caused the Leaderboard page to fail to display.  Many of the MySQLi methods are the same, except they take the connection object as a parameter. Other methods like error, results, and fetch array use the exact same parameters, so the change was just simply adding the letter ‘i’.

The .htaccess file has now been checked into the repository, which didn’t appear to be checked in before.  This file converts the TopScoresAllJSON.php file to the JSON extension, which is consumed by the DisplayScores.html file to display the scores for all of the games.

This code is currently being used in a few of my games such as Fifty Flags.  It gives an example Unity project, which shows how to use the leaderboard methods.  It also shows how to retrieve scores to be displayed in the game.  A MySQL script is provided, to setup the initial score tables.  PHP files are provided, which are called by the game code to add new scores and return the leaderboard values.  The game identifier must be a unique integer for each game.  The unique key must be generated and inserted into both the game code and on the PHP server code.

Download LeaderboardExample Code

See the LeaderboardExample project on my GitHub – https://github.com/gatechgrad/LeaderboardExample



SSL Certificate for levidsmith.com

Last night I purchased an SSL certificate for levidsmith.com, so my site can now be accessed via https.  It may take a while for search engines to update the links in their engines to use the https URLs.  It was a little more than $100 to have a certificate issued for 2 years.

I’m very familiar with CSRs (certificate signing requests) and installing signed certificates for web servers.  The price for my web certificate was fairly steep, but it did automate the signing and installation process.  Next time I may shop around and see if I can get a better deal.  It’s a fairly simple process, but for public websites you’re pretty much forced to use one of the root certification authorities (registrars) that are defined in the Windows certificate store (Internet Explorer, Opera, Chrome) or the FireFox certificate store.  I highly recommend looking through your certificate store, and removing any trusted root certificates that are questionable (such as CNNIC or the Hong Kong Post Office).

You can see the Windows certificate store by entering certmgr.msc in the run box.  Then open the Trusted Root Certification Authorities folder and select Certificates.  The FireFox certificate store can be found in the Privacy and Security settings under Certificates.

Windows Certificate Store

One thing that I had to fix, was updating the site URLs in WordPress under Settings > General.  There were a few other URLs in my functions.php file that had to be updated to use https.  My wiki also no longer worked, so I had to remove one outdated .htaccess file in the wiki directory, and I had to rearrange the rules in the main .htaccess file for my site.

It would be nice if my site automatically did a HTTP 301 redirection when using http, but from what I’ve read the optimal solution is to make a change at the web server configuration level, which I don’t have access.  I may try to do a mod_rewrite change to redirect to https, but I’m just happy that it’s working right now.  Clicking any of the links on my site will automatically transfer to the SSL encryption version.

After doing some research, I found that creating a few mod_rewrite rules is the correct way to do a 301 redirect for the secured version of the site if direct access to the web server configuration files is not available.

This may not make a huge difference since I’m not running a site with financial transactions (buy or selling), but it will add a bit of extra protection whenever logging into WordPress or MediaWiki, especially when logging in using public WiFi.  Having the SSL certificate also displays a lock next to the address in most browsers, and eliminates any browser notifications that my site is unsecure.

I found one more problem with my site.  All of the embedded images still use http:// instead of https://.  This causes a problem, because most browsers will show your site an insecure, if any of the images are not using https.  I found a site that gives the appropriate command to use to update all WordPress images to use https.  I had been doing this manually with a search and replace, but with so many pages, it would take a considerable amount of time to change them all.

UPDATE wp_posts SET `post_content` = REPLACE (`post_content`, src=”http://www.your-site.com, src=”https://www.your-site.com);

Five Years of Ludum Dare

Updated April 13, 2018

This is a compilation video of all of the Ludum Dare games that I’ve created over the past five years. I started with Ludum Dare 26 in April 2013, and I’ve completed 15 straight compo entries since. The video shows gameplay highlights (post-compo version in some cases) along with a portion of the time lapse development.

My thoughts on each of the games.

Amish Brothers – This was my first Unity game and first Ludum Dare.  I made the game about the Amish after hearing about their minimalist lifestyle.

Bomb Squad – This was a more action packed game.  I was able to experiment with the Unity physics engine.  Exploding bombs seemed to go well with the 10 seconds theme.

Tex Oneman (One Gunman) – I wanted to make an educational game.  The gameplay was inspired by the old Number Munchers game.

Archaeology – I wanted to have a game which used heat maps, but it really didn’t turn out how I wanted.  I also experimented with modifying terrains in real time.  The idea for appraising treasure found came from the Pawn Stars show.

Dream World – This was my attempt at making a spooky game.  It was inspired by Little Nemo the Dream Master for the NES, which is where the idea of making it to the bed originated.  It was my first game to use Taron Verve Painter, and my first Stencyl Ludum Dare game.

TV World – A side scrolling shooter inspired by games like R-Type.  The objective was to fight your way through each of the television channels.

Expand-O-Ray – The idea for this game came from the Revenge from Mars pinball machine that had the Big-O-Beam ray that made chickens grow huge.  The game had many references to Georgia Tech, such as the SkilesBot and 1885.  I eventually got the gun attached to the robot’s hand in a post-compo version.

Monster Hotel – A game inspired by the gameplay of Lemmings, but with a monster theme.  Using a minor scale for the music gave it a more creepy feeling.

Mutant Veggie Arena – A first person shooter with a sci-fi theme using mutant vegetables.  This was my first 3D game that used 2D billboarded sprites for the characters.

ShapeQuest – This game started as a Godot engine game, but switched to GameMaker after things weren’t working correctly.  The enemy shape faces were inspired by the profiles in Punch-Out!!.  Some of the enemy movements and attacks were inspired by the Legend of Zelda.

Ancient Adventure – Another game inspired by the Legend of Zelda, but created in 3D with an overhead view.  A lot of issues with the original version were fixed in the post-compo version.

Free the Frog – This was my attempt at making a game with Frogger gameplay in 3D.  The controls differed from my other games, since when a move button was pressed it would set the target square and then pull the player’s character to the destination.  This was also my first time using Blender’s cell fracture plugin.

World Fighter, the Cosmic Warrior – A game inspired by the gameplay of Final Fight.  The movement of the planet and moons were inspired by an enemy in an old RPG, but I can’t remember which one.

Slowbot – I really wanted to give a feeling of running out of power, which was the theme for that Ludum Dare.  The speed, headlight, and motor sound were all affected by how much power the robot has.

Irwin McSpenders – I had the idea for a tax accountant game for years, but I just never made it.  The player’s score would be based on the amount of money and dependents the player collected.  I used real deductible and tax bracket values, which took a considerable amount of time.