Archive for November, 2008


OpenGL?

The deeper I dig into the rendering side of my iPhone game, the more it looks like I’m going to have to write the rendering site of things in OpenGL. I was trying to get away with using the library’s high-level rendering tools, but the more I try to force my game into those systems, the messier it’s becoming.

I’m finding this all very frustrating. Because I have a games background (not a Windows or Mac OS applications background), I’m used to dealing with 2D graphics at a fairly low level. That is, “draw this texture on this polygon at this location”, or “apply this colouring to these vertices”. So while I think lots of the high-level stuff that Apple provides is really cool (e.g. CoreAnimation), it’s also not really filling the role I need it to for what I’m doing.

I’m not sure any of this is making sense, but I’m having a bit of a “stupid” day. I feel like nothing’s working today and I just can’t quite wrap my head around things. It’s frustrating. Thankfully the week is almost over and hopefully I’ll be able to approach things with a clear head next week.

The good news is that I fixed all my gameplay bugs this morning, so the game plays as it should. Now the biggest issues with the game are all about animation, rendering, and performance.

Owen


Finally, Some Design Stuff

So after many many technical posts, I’ll finally talk about some design stuff again. Hooray!

Yesterday I mentioned that I had finally been able to run my game on my actual iPod Touch. This was very exciting. However, it also immediately showed me a bunch of problems with my assumptions about how the user would interact with the game. Upon running the game I discovered several things:

  • The user’s finger gets in the way. Damn fingers! Be more transparent! Seriously, this was something I hadn’t considered. In the simulator, you use a cursor to interact with the virtual iPhone. This does not adequately replicate the experience of having to touch the screen. The problem is that all of the little UI things I had done to help the player see what the effect of his/her move would be are obscured by a finger. I need to find another way to handle this. My plan right now is to use a double-tap to play. Tapping once would activate the little UI elements that show the player what they’re doing. Tapping again would execute the move. I’ll see how well it works in practice.
  • The timing is very different. The way I’m doing animations right now is *not* the proper way to do them on the iPhone, but it was the fastest way I could hack them in. On the simulator it all runs fine, but it seems to cause odd interaction problems on the hardware. Things like, events won’t fire until an animation calls its callback. I’m not really sure what’s going on. Maybe I’m just not updating the View enough. I’ll have to figure that out.
  • I introduced a lot of bugs when I refactored the code. I was expecting this, so I’m not too concerned about it at this point. I’ll be attempting to fix those bugs today.

The good thing about running it on the hardware was that I discovered that the play pieces are big enough to interact with. I was getting worried that the touchable areas would be too small to properly interact with, but it seems fine so far.

Now that my server issues seem to be resolved (for now, anyway) I can actually get some work done on the game today.

Owen


F1x0r3d!

The problem has been fixed! Please feel free to visit the site from wherever you want now. I once again apologise to anyone who got affected by this. I’m still not sure how someone got into my site. I’ve updated WordPress to the latest version in case it was a WP vulnerability. However, there’s always a chance it was a vulnerability on another site on the same server as mine…in which case there’s not much I can do.

Luckily I have a friend who used to work in web security and so he was able to help me track down what was causing the problem and to fix it.

I was going to post some details on the latest developments in my iPhone game, but I’m exhausted from chasing this hacker issue down all day. For now, let me just say this: I finally got developer approval from Apple, so I was finally able to hook my iPod Touch up to the computer and run my prototype on the hardware itself. Hooray! More on this tomorrow.

Owen


H4x0r3d!

If you’re reading this from inside Google Reader, please DO NOT click on any of the story titles until further notice. It appears that sometime last night my site was hacked. If you arrive at the site from the google.com domain, then you will be redirected to a malicious virus site.

I am about to take the blog completely offline to try to work this out. Please do not visit the site from any Google tools until I have this resolved. I’ll post again once I have everything working again.

My apologies for the inconvenience.

Owen


One Small Step for my Game…

This afternoon I finally got the code from stage 1 of my code refactoring running on the iPhone simulator! At this stage I’ve split up the underlying data structures into a much more friendly system. The code design is much cleaner now. In the prototype I basically had one giant class that did everything. It was a complete mess to work with. Now I’ve broken that giant class up into several smaller classes that can properly handle encapsulating their own data. Classes make requests to each other for information and to have work done. It feels good. The other good thing is that now none of the core logic that drives the game is platform dependent. The core classes no longer know anything about rendering or displaying information. That core logic classes should be able to copy between platforms with only a file rename. It’s exciting that it works.

The next step is a little bit more tricky. I want to competely rewrite how all the searching algorithms work in the game. Because I’m writing a puzzle game that involves matching things, I run a lot of searches across the board every time the user interacts with the play area. In the prototype I was doing this the fatest way to code things, which is inefficient performance-wise, and results in some really messy ways of storing data. That’s stage 2, which I’m going to start on now.

Sorry the posts have been fairly technical lately. I’ll be getting back into more design stuff once this code refactoring is complete. But given that I’m spending all my time coding right now, it makes sense that the posts be about that.

To all of the Americans who read the blog, congratulations on your new President! It was an exciting election to watch, even from all the way up here in Canada.

Owen