Speak and Shout

Tuesday, November 28, 2006

Asteroids, part 4

I've been creating increasingly complicated code to handle timed game events and multiple event loops. This has prompted me to look at Pygame Extended, which has a few nice classes (Director, Reactor, Ticker, Scene) to handle these sorts of things. Unfortunately, the author has tied them in to the OpenGL portions of the library as well, making it hard to reuse. I think I'm going to extract the portions I need (or at least the ideas) for my own game.

Labels: , , ,

Tuesday, November 21, 2006

Asteroids, part 3

I've got explosions working now for the asteroids. The ship now breaks apart when it hits an asteroid and regenerates properly (i.e. waits for a break in the asteroids before regenerating so you don't instantly die). I also found a site with the original sounds from the Asteroids arcade game, so the sound is much better now.

At work, we had our boring 2 hr. team meeting on Monday afternoon, so I used the time to make some quick calculations on remaining features to add. I estimate about 14 hours remaining before completion, including the code cleanup and documentation.

My dad is coming to visit for a few weeks starting at Thanksgiving, so I expect things to slow down a lot over that time period. However, I still may be able to get it into the stores before Christmas. :-)

Labels:

Friday, November 17, 2006

Asteroids, part 2

Collision detection now works. Sound is partially done. pygame.Sound.play() works on any available channel ... unfortunately, when the game loop runs every 20-30 ms, playing one sound consumes all available channels and sounds like crap. I have to figure out how to make one sound play until finished on one channel ... it's not as simple as it, uh, sounds.

Labels:

Thursday, November 16, 2006

Asteroids with Pygame

Remarkably, my Asteroids project is coming along. It's a big kick to see things happening on the screen. All the engine code is there now, so it's pretty straightforward to add the individual pieces.

The collision detection works, but it's a little flakey. It works most of the time for detecting ship-to-asteroid hits, but it doesn't work at all for the small shot-to-asteroid hits. I'm spending a lot of CPU time on detecting collisions, so I will either have to optimize the code or use Psyco on the final product.

I think I may eventually write an article on the making of this game. There aren't enough good (read: advanced) PyGame tutorials out on the web, and I would imagine I would get a lot of hits from interested programmers.

UPDATE: See the final game. Source code included.

Labels:

Thursday, November 09, 2006

NFS: Porsche Unleashed

I bought this a while back as part of the World of Need for Speed. I never really heard about it before, but it is definitely underrated -- Porsche Unleashed is the best of the Need for Speed series.

Three things about it make it awesome. First is the Autobahn course, which is a straight highway course with plenty of interchanges, tunnels and traffic (oh, and bad weather too). It is unique among all of the NFS courses I've seen ... it has a set of toll booths that you blast through while an angry voice yells over the loudspeaker, and a bullet train that passes by on one section of the freeway. Very slick.

Secondly, I really like the physics model which is the best of all the NFS games. The cars handle much more realistically than any of the other NFS games (especially Hot Pursuit 2, which feels like a cartoon in comparison). Your car also takes body damage, so simply smashing it up against a guardrail or other cars will most likely lose you a race. The driving experience feels much better as a whole.

Lastly, the Factory Driver option is also not found in any other NFS game, and it's my favorite part of the game. You start out as a Junior Test Driver for Porsche and work your way up through the ranks by passing various slalom, rally, and delivery assignments. One of my enjoyable (yet frustrating) assignments was to take a new Porsche through an obstacle course as part of a car commercial. The memorable part was taking the car through a 180-degree turn, driving in reverse up to the next set of cones, pulling another 180, and then going through a slalom before finally finishing with a 360 turn. Argh! Oh, and did I mention that you have to do it with a manual transmission? Try driving in reverse with the keyboard. I lost count how many times I tried it before finishing.

I've thought about getting NFS: Most Wanted or NFS: Underground, but all the user reviews I've read say that the physics are getting worse not better. I feel a little funny recommending a game first released six years ago, but there it is.

Wednesday, November 08, 2006

Alayna

My friend Steven was emailing me the other day, saying that he was eager to know my thoughts about being a dad.

Well, my first thought is that Alayna is a beautiful child, and I'm SO grateful she was born without any issues. Now I think both Doris and I were ready as possible for whatever God had in mind, but that was a huge relief.

I guess the other thing that strikes me is that being a dad at this point involves serving this little kid who is entirely dependent. If she cries, Doris or I have to figure out what it is and fix it. The communication is really really basic. It's not until you're up at 4:00 a.m. with a kid who's been crying for an hour with an unknown problem that you realize how basic it is. It's challenged my idea of love and serving this little girl who just says "I need you, dad."