Saturday, January 13, 2018

HTML5 Games using Animate CC Overview

A long time ago, back in 2003-2006, I wrote a virtual book for Blazing Games which covered the creation of ten Flash games. When we closed down Blazing Games in September of 2014 the IP rights to the games on the site went to me, including the Flash Game Development book. With browsers moving away from Java (right now the Java games won’t work) and Flash (in 2020 support for Flash will cease), all these older games need to be moved to HTML5 which uses JavaScript. Browsers are also starting to support Web Assembly, which may be a book on it’s own depending on how well received this book and the follow up HTML Games using Create.js are received. When I say HTML5 I am talking about the combination of HTML, CSS and JavaScript which happens to be the common usage.

As Flash is dying or dead (depending on when you read this), games created for it need to be ported to another language so I decided that it would be a good idea to revisit the 10 games that made up the book and port them to HTML5. Five of them (NIM, Nightmare Maze, Video Poker, Pent Up Anger, and String Along) were ported taking advantage of Animate CC to port them to HTML5. The other five games in the book will be covered in a second book HTML5 Games using Create.js which can be developed without purchasing any additional tools for your computer. This book will cover Bomb-NIM, Cribbage Square, 3D Tic-Tac-Toe, Lights Out, and “Dragon and the Sword”.

Chapter 1: Introduction – An overview of the book, and what you are reading right now. I am skipping a bunch of less-revevant sections of this chapter.

Chapter 2:Flash is Dead! Long Live Animate – Quick look at the history of Flash, how the new Animate CC is a replacement for Flash, and what Create.js has to do with all of this when creating JavaScript games using Animate CC.

Chapter 3: Procedural JavaScript – A very quick course on the procedural programming aspects of JavaScript with a brief look at how it compares to ActionScript.

Chapter 4: NIM – We finally get to our first game, which is a variant of NIM. This game tries to do as much as possible with Animate and as little as possible with JavaScript.

Chapter 5: Objects in JavaScript – we get into the object oriented nature of JavaScript which will be used for creating our own objects and a library that can be shared between similar games.

Chapter 6: Nightmare Maze – The game that became the first episode of my 46 part One of those Weeks game is created as we look at adventure games.

Chapter 7: Card Classes – Creating code to be shared between multiple games is a common activity so this will be demonstrated by creating a card class.

Chapter 8: Video Poker – The Card class that was created in the previous chapter is used to create a virtual Video Poker machine.

Chapter 9: Pent Up Anger – Making base game of Pent Up Anger

Chapter 10: Pent Up AI – How to create artificial players for a game is demonstrated by adding computer opponents to the Pent Up Anger game.

Chapter 11 String Along – Arcade games are demonstrated using a variant of the classic snake game.

Chapter 12: Conclusion – A summary of what was covered and a look at the second book in this series.

Saturday, January 6, 2018

Calendar NIM Review

Normally I like to have a postmortem or a making of article about the games that I have just released, but the nature of my Calendar NIM game makes an explanation of the twelve months a bit more appropriate. Each image represents a game that I am hoping to release during the year, though it is subject to change. The games chosen are not the only games that I will be releasing, but are simply the ones I am positive that I can finish though are subject to change and unexpected delays. Still these games are pretty certain. For those of you who haven't looked at my Calendar NIM game, it is located at http://spelchan.com/games/y2018/calendarNim.php



January is a 2018 New Years image that was released by LMoonlight for free and is used to represent the Calendar NIM game itself.

February is Video Poker, which was a game that I created for my original Flash Game Development book which is in the process of being re-written for HTML5 development which will start being posted on this blog next week. This game has already been completed so this is a guaranteed release.

March is when I release my Easter game which is the egg generator. While this was really low on the vote, the generator is used in two other easter games so I am going to port the generator first. This will be challenging as the masking technique I used is  not supported in Create.js so I will need to come up with a different approach. As this game is not going to be released until the end of the month, I will probably take the opportunity to release my NIM game as a bonus.

April 1st is Easter so my April Fool games will have to wait until next year. The thirteenth of April is on a Friday so the original version of thirteen squared spikes will be the choice for that month. This game has already been completed so it is a guaranteed release.

May 25th is towel day so it makes sense to release Towels for Earth. I am not sure why this game is so high on the voting chart but this is the most appropriate day to re-release the game. I have not done any work on it at all but it is not a difficult game (it was created in a game jam after all) so this shouldn’t be a problem. As this is late in the month, I may also release Pent Up Anger which I have already finished.

June is really subject to change but I am planning on porting Fleet to C++ and using emscripten to convert it to asm.js or to web assembly. I started playing around with emscripten for my 2600 emulator project but pretty much have gone the Kotlin route with that project so this would be a good project.

July is another month with a Friday the Thirteenth in it so the Thirteen Spikes Unlimited (TSU) port would possibly be ideal. The current version of TSU was written in HAXE and compiled to Flash as there were issues with the JavaScript compilation. I will see if things have changed with that and if so this is simply re-compiling the project. If not, I have the core of Thirteen Squared Spikes to use as the base of this so it should be a very quick port.

August has String Along set up as it’s game which has already been completed so is guaranteed.

September is Coffee Quest which will be a WebGL game. As with Fleet, I will likely port this game to C++ and use emscripten to convert to web assembly and Asm.js. The construction set will not be part of this, but the extra maps may be. At the moment I am thinking of going weekly for september releasing a new map each week. This is just speculation at the moment with a final decision on what I will do to be made in September.

October is Nightmare Maze which happens to be the first episode of One of those Weeks. It is being referred to as Nightmare Maze as it is part of my book. I have big plans for One of those Weeks so there will be additional news about the project later this year (I hope).

Let’s face it. Coffee Quest was a very simple game, with the series only really starting to take of with the release of the second game in the series. This is why November will be Coffee Quest 2. It will be built on top of the Coffee Quest code base so will be in whatever language Coffee Quest ends up being released in. Again, I may release the extra maps every week but that is not certain yet.

Finally, also likely using the Coffee Quest engine, will be the high-def version of Santa’s Snowball. Higher resolution, better graphics, better sound, and 360 degree movement with an automap will make this Christmas game what I wish it was in 2017.

There may be additional surprises throughout the year, hopefully one involving One of those Weeks, but even without the extra releases I don’t think the year is too bad.