I Made a Synth Keyboard

Just for fun, I made my own synthesizer keyboard app for the iPad and iPhone. It’s all homebrew stuff. I created my own oscillator and ADSR envelope routines and just rely on the OS for audio sample callbacks. It can play back any of the following waves: sine, square, triangle, sawtooth, pulse, and noise. If you’re familiar with old-school game and computer systems, like the NES and C64, you’ll recognize some of these sounds.

I’ve previously demoed the synth music player, which uses tracked files for note playback. This is the first time I’ve hooked up the synth code to a UI system so that you can play music directly.

This keyboard runs on iPhone and iPad. Here are a couple of screenshots.

iPhone:

Photo Apr 23, 11 07 17 PM

iPad:
Photo Apr 23, 23 06 09

And here’s a demo of me playing with the app on the iPad:

The Hobbit: An Unexpected Level of Realism

Bilbo Baggins with another hobbit

I saw The Hobbit earlier today, so here are my quick thoughts on it.

I watched the 3D version at 48 frames per second. The high frame rate was amazing. In my opinion, this is the future of film.

Yes, in the initial few minutes I was worried that it looked too much like a “soap opera” and not like a traditional film. However, a short while later I let go and really got into it.

The high frame rate meant that the image was crisp and clear. There was no motion blur. It made it feel more real and immersive. Many moments felt like a play. It felt like I was peering into a real live event from my seat. I’ve never seen high def look so good.

I can understand how people are railing against this because it really does feel strange to watch film this way, but I think it’s the direction we should be moving. Being used to 24fps is just a cultural artifact. People generally don’t like change, so it may be hard to move them towards higher frame rates. In my opinion, once you let go, it really works as an experience.

Regarding the story itself, I won’t say too much other than I enjoyed it. Even though the film was nearly three hours long, it was paced just right. There wasn’t a single time I wanted to look at my watch or thought about wanting it to end soon. In fact, I wanted it to go for as long as possible. It was very immersive.

I read the book over 20 years ago as a child, so I didn’t remember the story. I will say that where they chose to end the film worked. My fears that it wouldn’t have a proper story arc were allayed. It felt like it had a beginning, a middle, and an ending. It did leave you wanting more, so it works.

I recommend that people with an open mind who want to see the future of cinema, see this film in 3D at a high frame rate. Let yourself be lost in the film and the realism.

lil todo vee two

logo173x173

I’m working v2 of lil todo, the to-do list app I wrote for Windows Phone 7 last year.

I wrote lil todo for two reasons:

  1. Provide myself with a good to-do app on Windows Phone. Most of the to-do list apps I tried were utter crap.
  2. Learn how to write Windows Phone apps using Silverlight.

Because it was my first attempt at Silverlight and my focus was to get an app up and running, it wasn’t designed very well. It’s not horrible, but the model code isn’t very portable and contains a lot of things specific to Silverlight.

After writing the app, I realized I really wanted a Windows, Mac, and iOS version so I could access it from my other devices. Unfortunately, the design made it hard to port, which leads me to v2…

To the cloud! (And more)

Now it’s time for v2 and I have a lot of ideas already. Here are my goals for v2:

  1. Move to the cloud. A lot of users complained that they couldn’t sync their data in v1.
  2. Support more platforms. It’s almost 2013; let’s support Windows RT, Mac, iOS, and … command line.
  3. Keep the core model code portable. I’ll write it in C++ this time to make it easier to keep it platform-agnostic.
  4. Write the absolute best-looking to-do app on Windows RT. Most Windows RT apps I’ve seen so far are generic and ugly—no taste. Let’s see if I can do better.
  5. Support live tiles on Windows Phone and WinRT. A lot of users requested this feature in v1.
  6. Add notifications. This is another missing v1 feature.

Command Line?

I’m serious about the command-line interface. I’ve always thought that the best way to ensure that you don’t write too specifically for one platform is to intentionally design your app to handle a text-based mode. If you can handle that as you are designing for a modern UI, your business logic code should be fairly platform-agnostic.

My first prototype, which is partially working already, will be written in Ruby. Ruby’s a great language for rapid prototyping, although I’ve never really used it for that. My plan is to hash out the overall design using Ruby and via a command-line interface. Everything will be done using CLI and will save to temporary storage (maybe not SkyDrive or Dropbox yet). However, the concepts should be absolutely the same as the final product, which I will write in C++ and overlay with a platform-specific UI (i.e. XAML stuff on Windows RT/Windows Phone, and Cocoa stuff on Mac/iOS).

Watch this space for updates during the holidays!

grinch-cindy-lou-who

Latest game engine updates

I’ve been busy working on the game engine. My focus lately has been to actually work on the gameplay itself as opposed to just refactoring everything over and over again. The best way to make sure I get a game done (and not just the tech) is to actually work on one.

Draw!!

Here’s the first thing I put together. It’s a simple little game where you control a little cowboy dude. The goal is simple: avoid being shot by the computer player and try to shoot him. Once in a while a little power up will appear. If you grab it, you can shoot a little bit faster and via a spread shot. This was done way back in October of this year.

The art and music were all done by me. The sound effects were re-used from Doom. The game engine is all mine. That includes the renderer (yeah, nothing fancy) and the audio (pseudo-8 bit noise).

Beat ’em up AI attempt

Next up is a first attempt at some beat ’em up AI. It’s really bad. The animation state machine is pretty choppy as well. It just looks really ugly. However, one thing that I thought worked out well were the fake leaves falling off the trees. This was done in November.

Decent AI

Now this is more like it. I took a look at how Streets of Rage 2 does AI and figured out a few things:

  1. Enemies go through various states. They’re often just standing far away, standing close up, or transitioning between the two states.
  2. Enemies walk a lot slower than the player. This allows the player to catch up to them or run away. If the enemies walk at the same speed as the player, it makes for a bad experience.
  3. Enemies never turn their back on the player. They’re always facing them. This is even more important when the enemy is backing away as it looks more natural if they do not turn.
  4. Only a few enemies at a time should ever attack the player. The rest of the time, they should stand back at a distance. It helps to randomize their position when standing far away so that it looks natural.

After learning these rules, I came up with this: