Pages

Showing posts with label Summer. Show all posts
Showing posts with label Summer. Show all posts

Tuesday, August 17, 2010

Level 1 Boss Fight!

Well, August has been very long, hot, and busy but I finally managed to finish the boss fight for Level 1! Here are some of the screenshots that I've managed to take (gotta learn how to capture videos really soon!):



Level 1 is almost done - all it needs are just a bit of polishing and of course, the other big thing in my list - Collidable Terrains!

Cheers,
Jim

Tuesday, July 20, 2010

Goal: 60 FPS

It's been a tough week. I was barely able to keep up with my schedule and the goal of having 60 FPS is not making it any easier. Our Sunday hike at Garibaldi Lake took a toll on my body - and now, I am playing through the pain. Nevertheless, after cutting back my sleeping hours to around 3 to 5 hours, I have managed to keep up with my schedule, still maintain the 60 FPS goal that I want to achieve, and most importantly, hike and bike around Vancouver! Anyway, so how do you go about keeping a high and consistent frame rate? Well, I keep the following guidelines in mind when designing our game:

1. Do not allocate a lot of things in your main game loop - especially during the draw routine
2. Try to reuse your sprite allocations as much as you can. I've implemented a sprite factory which maintains a sprite pool that can reuse sprite allocations. This ensures that dynanic memory allocations during the game loop are kept to a minimum.
3. Cache complex mathematical results.
4. Rely on O(n)-based algorithms only as a last resort. Choose O(logN) or if possible, O(1). For example, using a hash table is a lot better than using an array when you need to search for an item as it cab give you O(1) when using a very good hashing function.
5. If you have to use linear-based algorithms, sorting the array will usually yield better performance if doing search.
6. Remember the trade-off - memory vs performance - you can gain performance improvement by sacrificing some memory.
7. Do not try to reinvent the wheel. Check if the framework that you are using already supports what you are trying to do. The guys who built the framework that you are using spent a lot of time working on it and what they did is probably better than how you will be doing it.
8. Keep the texture size in check. It usually boils down to using a texture size that is a power of 2 (e.g. 512x512).

Hmm.. I guess that's my list for now - I might add some more if I learn something :)

Cheers,
Jim

Wednesday, July 14, 2010

I can now see it on the screen!

One thing that's really good about the summer is that the number of things that you can do outside of your house exponentially increases. The days are longer, the nights are warmer, the reality shows are in full swing, and well, it just gives you a perfect excuse to not stay home, sit in front of your mac, and do programming! If you live in Vancouver like me, you'll know how many dark, rainy, and cold months we've had to endure before we get to this point - and so whenever we get a chance for a sunny and warm day, we get out as much as we can!

I love the summer but sometimes, I worry that I enjoy it too much that I will have to move my X1 milestone after the summer! But nevertheless, we're still on track and despite the wonderful BBQ, mountain trips, biking trips, and waterpark slides that we've done over the week, I still managed to complete some key of the tasks that I needed for that week and all it took was to move my sleeping time to 2:30 in the morning :). Anyway, here's a small video of what I've managed to accomplish so far. The background still needs some rework since I think it looks very messy! I will try to reduce the doodles to make it look cleaner. Today, I'll probably try to make the ship move using the accelerometer and touch... but after do my biking exercise around science world :)

Jim