Saturday, January 27, 2018

Younger
readers may not fully appreciate how much the internet has changed over the
years. When I started using the internet in the nineties it was done with a
device called a modem which plugged into your phone line meaning that when you
were connecting to the internet you were making a phone call to your internet
service provider. The modem I originally had was a 28000 baud modem which means
it was able to send and receive 28000 bits or 0.028 megabits which is roughly
3k per second under optimal conditions. This is really slow so video was not
really something that you would have on a website. Even images were really slow
where with large images you could actually see the image being loaded. This is
why vector based animation systems actually made sense and why Future Splash
was pretty impressive for its time. Instead of sending the bits that make up
the image, vector systems would just send the points and edges that make up the
shapes. For simple shapes, like those in early internet animations, this was
significantly less information than the bitmap representation of the image so
could be transmitted much faster.

Future
Splash was competing with a technology that Macromedia was pushing called
Shockwave which was acquired by Macromedia when they purchased MacroMind for
their Director game making software. Macromedia acquired Future Wave, the
company that was behind Future Splash, so they could add the vector animation
tool to their shockwave platform. This is the reason why Flash binary files
have the swf extension which stands for ShockWave Flash.

When Java
arrived on the scene Java applets (note that Java and JavaScript are not the
same thing) were still thought to be the future of interactive web pages.
Browsers were being shipped already loaded with Java while Flash required a
plug-in program be downloaded and installed into your browser. The Java craze
was so strong that even Macromedia had an optional Java version of their Flash
player. I was hired to see if it would be possible to have a Flash game where
the animation was handled by the Java-based Flash player and game logic would
be written in Java. This proved to be clumsier than expected and pure Java
solutions were chosen for the project.

While I
think Java could have taken control of the browser, this ultimately failed due
to a conflict between Microsoft and then Java-owner Sun Microsystems. Sun
wanted Java to be a standard that would work the same on all browsers while
Microsoft wanted to be able to make Windows the operating system of the
internet and added extensions to the internet explorer version of Java that
made it work better on Windows due to the ability to access Microsoft APIs such
as Direct X. A court battle ensued, Java on the browser stagnated, and
alternatives for Java started being looked for.

This is
roughly the time that ActionScript was added to Flash. While not the greatest
scripting language, this made the product useful for games and other
interactive web content and ultimately replaced Java as the go-to technology
for interactive web sites. I started
using Flash and wrote the original Flash Game Development book that this book
is based on and everything was good with the exception of the occasional exploit,
too many sites having intro movies created in Flash, and many extremely
annoying interactive ads which happened to be written in Flash though would
have also existed in any other alternative had there been an alternative with a
large enough market share.

Flash was
still a very strong standard when Adobe bought out Macromedia. Unfortunately
for Adobe, things were about to change thanks to a fruity company releasing a
phone a couple of years later. While saying that iPhone not supporting Flash
was the cause of its demise is not the full story, it was certainly a big factor. The idea of plug-in
for browsers was starting to be looked on as a negative factor as plug-ins were
increasingly the target that hackers used to attack browsers.

The
ultimate nail, in my opinion, was the release of HTML5 and the Canvas API (which if I recall correctly was an API designed by Apple for their browser). This
allowed for web developers to do everything that Flash could do right within
the browser knowing that all users with a browser could run the program.
Granted, the HTML5 apps were slower and larger than the equivalent Flash files,
but they worked without any plug-ins.

Flash was
not just used for creating web pages, but was still a popular tool for
animation studios. With the death of Flash on the browser rapidly approaching
Adobe decided to handle the death of Flash by renaming the tool Animate which
reflects the target audience for the tool. To help support browser developers,
Adobe did introduce the HTML5 stage which allows the creation of HTML5 projects
that convert Flash vector objects and animations in to JavaScript using the
Create.js library. The ActionScript code is not currently converted to
JavaScript so any interactive code must be written in JavaScript using
Create.js library calls.

So while Flash is dead, Animate is not and can
be used as a tool for the creation of HTML5 animated content. For people who
have used the Flash development tools, things have not changed that much and
you will quickly find your way around the tool. For those not familiar with the
tool, there are several built-in tutorials and a decent manual that can be
downloaded.

Saturday, January 20, 2018

The first
exposure I had to Flash was when I encountered some FutureSplash animations in
the mid-nineties. This was interesting technology at the time as back then most
people were using telephone lines and modems to get internet pages so having
streaming animated video was simply mind boggling. Back in those days,
streaming video was small thumbnails and generally didn’t work well. In “The Road to Animate” we will look at this
history as well as my personal history with the technology.

One of the biggest
draws of using Flash, now Animate, was animation. Before you can animate
something, however, you first need to draw it. “Drawing Things Out” covers the
basics of the drawing functionality that comes with Animate. “Symbolizing
things” explores Animates’ symbol and library which is vital to making objects
move. “The Key to Animation” explores Animates’ keyframe animation system which
really is the reason that you would want to use Animate over writing an HTML5
game purely in JavaScript, even when using a library such as Create.js.

We conclude
this chapter with “Script Soup” which takes a look at how scripting is involved
in the game making process. This is a rough exposure to ECMAScript,
ActionScrpt, and JavaScript with a general overview of the Create.js library.

Personal
notes

After
finishing my Bachelor degree and looking back at my site I realized that there
was a lot on my site worth saving. I was not sure what route to take but
essentially knew that I had to at least attempt to salvage some of the games.
Finding my old book on Flash and deciding to undertake this book project, which
is now a two-book project and I suspect additional volumes may be added in the
future (possibly for StageGL, Kotlin, and Web Assembly). The reason I decided
to break the book into two separate books was simply that after playing around
with Adobe Animate CC, I was disappointed with what the tool has to offer and
found that most of my work was being done editing Create.js code. You do not
need an expensive tool to do that which is why I broke this book in half. With
that said, most of the material in this book is still applicable to people who
want to go the pure Create.js route so if you have no plans on getting Adobe
Animate CC, you can still benefit from reading this (especially now that it is
being freely posted on my Blog).

Saturday, January 13, 2018

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

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.

About Me

I am a programmer who can program in a large variety of programming
languages (including some Assembly Language) but am currently focused
on interactive web development which means my current focus is on Flash
and JavaScript. When I am not programming for clients, I am working on my
game site.