KEEN – App #5 Launched

KEEN – Animated GIF (App Icon)There’s a memory in my mind of an old video game. This was decades ago, so I don’t remember all the details. Yet, a line of digitized speech is fairly distinct. It went something like this… “Stand By For Course Correction!” I’m thinking it was a Commodore 64 game. Maybe it’s Apollo 18. The game was fairly tedious, as it attempts to recreate the piloting of a moon mission. The game isn’t as important as the idea of adjusting course. If you’re going the wrong way, a slight adjustment could fix the problem.

After venturing back into the land of App Development, I realized that my 10-Year Plan was not moving in the right direction. My games under performed. I wasn’t expecting a sales miracle, but I was expecting somewhat better results. Additionally, there was a big difference in iOS app sales versus Mac app sales. I was having more success with the Mac. That was surprising!

I started wondering if I was doing this wrong. While I enjoy making video games, competing with the best game developers in the world isn’t strategically sound. They have lots of money and lots of people. Instead, I had to play on my strengths. I’ve been professionally creating websites for almost 25 years. Perhaps the idea of creating apps is sound, but maybe the focus should be on development and productivity. It’s still an uncertainty, as I’m not sure what the ultimate direction will be, but I figured I’d fly this way for a while. That’s why I launched “KEEN” – the Key Environment app. It’s an app for web developers.

In JavaScript programming, there’s a “keydown” event. The problem is that any key press triggers this event. Press the “A” key, that’s a keydown event. Press the “Z” key, that’s also a keydown event. How can you tell the difference? If you want something specific to occur, based on a specific key press, then additional code is necessary. That’s why “KeyCodes” are significant. If you want to add “WASD” or arrow-based keyboard controls to your HTML5 game, then you could do the following…

1
2
3
4
5
6
7
8
9
10
11
12
13
14
window.addEventListener("keydown", move);
 
function move(e){
 if (e.keyCode == "38" || e.keyCode == "87") {
  direction = "up";
 } else if (e.keyCode == "40" || e.keyCode == "83") {
  direction = "down";
 } else if (e.keyCode == "37" || e.keyCode == "65" ) {
  direction = "left";
 } else if (e.keyCode == "39" || e.keyCode == "68") {
  direction = "right";
 }
 console.log(e.keyCode + " = " + direction);
}

The above code is a typical 4-way directional control setup – up, down, left and right. This simple little bit of JavaScript code is a great way to get started with web-based game development. However, web development is seldom so straightforward.

Unfortunately, “KeyCodes” are deprecated. That means it’s not longer the recommended method for detecting key events. Instead, the new “key” property is recommended. Using e.key would return the key pressed in a less cryptic manner. Press the “a” key, the string returned is “a”. Press the capital “A” key, a capital “A” is returned. That is why the new method is preferred. Although, for special keys, an exact string is specified. (As an example, “ArrowUp” represents the up arrow key.) That’s why “KEEN” is still useful. The results for the “keyCode” and “key” properties are displayed.

I wouldn’t call KEEN a full-blown course correction into web development apps though. It’s more like a probe. That’s why the app was launched as a free app. It’s a way to test the market. I also felt like launching something. I hadn’t launched an app since the Revisions update. It really broke the momentum. I tried working on a more complicated app, but I kept hitting technical problems and getting frustrated. I felt like launching something “easy”. That’s a dangerous word in web development, as even the most simple of ideas could be quite complicated to create. But fortunately, “KEEN” was an easy project. It was a great test of the Tumult Hype and Wrapping combo. Apple approved the app without any trouble.