Putting text on the screen
4/11/2012 7:22 AM

Last night I was to a point where I wanted to put the score text on the screen.  I don't have enemies or collision detection written up yet but I was looking for something small that I could finish up.

Well, after doing some research I was surprised at just how easy it is.

ctx.fillText('Score ', 5, 30); 

That is all there is to it.  Or so I thought.  For some reason, I didn't see  any text.  It was the last thing that I was drawing to the screen so there shouldn't be anything blocking it.  Why wouldn't it show up?

Continue Reading Here...

One third into the 30 day challenge
4/10/2012 7:09 AM

I am now 10 days into the 30 day challenge of creating a game in HTML5.  As I look back at what I knew 10 days ago and what I know now, I am really amazed!  In the past three days I have been working on a simple space shooter.

I realized that I had a number of things to learn and the best way to learn them was to actually create something.  A space shooter seemed like a simple game to incorporate all of the skills needed to create a game.  So I have been figuring out many of these game elements such as:
  • sprite sheets
  • sprite animation
  • canvas layers
  • game loop
  • keyboard input
  • player movement
  • array of lazer movement
  • scrolling background
I still have some things left to learn, such as:

Continue Reading Here...

Visual Studio 11 beta Javascript Intellisense
4/8/2012 8:05 AM

I started creating a small JavaScript game file and I ran into a problem with Visual Studio 11 Beta's JavaScript Intellisense.  When I created the script inside of the webpage the Intellisense didn't have a problem with the DOM id for my canvas element because it was in the same file.  So: 

canvas = document.getElementById('MiniGameCanvas');
ctx = canvas.getContext('2d');

worked just fine because

<canvas id="MiniGameCanvas">

was on the same page.  However the same code inside of a js file did not work.  It makes sense from a logical stand point.  

The webpage has a reference to the JavaScript file but the JavaScript file doesn't know anything about the webpage.  Even thought this makes sense logically, it was a thorn in my side for practical development.  It seemed like there should be a solution, and then I found it.

Continue Reading Here...

A 3d Box with fewer lines of code
4/6/2012 6:58 AM

I have learned that my first 3d Box used a lot more lines of code than it needed to.  So I created a new one just for fun.  The code can be found on the full article.

Continue Reading Here...

Research and a little goofing off
4/5/2012 7:29 AM

Over the past couple of days I have watched many videos on HTML5.  I have also played many HTML5 games as part of some *ahem* research.  I am very impressed by what I have seen.  I would love to say that I now have a clear path to move forward, but I still have some questions.

It seems that using a game engine might be a good idea.  Impact (http://impactjs.com/) looks very nice but do I really want to shell out $99 for something that I may not want to use.  There are other free engines but are they any good?  What type of game am I going to create?  What about my lack of artistic ability?

Continue Reading Here...

Canvas drawing reminds me of the Turtle program
4/2/2012 7:01 PM

I decided to play around with the canvas object and the very small amount that I have learned so far.  I was joking with someone the other day about my lack of artistic ability and the joked back that they could draw a 3d box.  That brought back memories of elementary school and doodeling 3d boxes on book covers.

It also brought back memories of using old apple computers to move around a triangle cursor called the turtle and drawing with it.  We were supposed to only type in one command at a time but I quickly learned that it was much faster to chain commands together things all at once.  The canvas drawing commands remind me of that.  So, feeling very nastalgic, I decided to try to use canvas to draw a 3d box.

Continue Reading Here...

The journey begins
4/1/2012 10:17 AM

After looking around for a good book, I found "HTML5 Games: Creating Fun with HTML5, CSS3, and WebGL", by Jacob Seidelin.  The reviews on Amazon were complimentary and the authors website shows some very impressive work!  Some of his work can be found here: http://www.nihilogic.dk/labs/

Now that I have a good book to work through, I needed a good development environment.  Of course I could just use notepad to create the HTML, JavaScript, and CSS, but that would leave myself open to having simple bugs that my eyes just don't see but the editor does.  I think that I have found exactly what I am looking for!

Continue Reading Here...

Jumping into HTML5 game development with both eyes closed
3/31/2012 7:25 AM

I have been developing software for over 15 years.  I still remember writing peek and poke commands on my C64 when I was a teenager.  For over the last 8 years I have been employed as a .net programmer and I've spent the last 5 years using c#.

I have been spoiled by the abstraction that .net provides from the underlying javascript and xml.  Sure I have to get my hands dirty once in a while, but on a typical web project I write very little actual javascript.  The .net ajax controls do most of the heavy lifting for me.

HTML5 has matured and I have seen many impressive things done with it.  With so many mobile devices and all major browsers  supporting it, it's hard not to take notice.  HTML5 will even have a front row seat in Windows 8 with metro apps.

So what do I know about coding in HTML5?  Well in a word, nothing.

Continue Reading Here...

← Older Posts