Block Breaker: breaking blocks & pathfinding

July 13, 2007 at 5:49 pm | In Game idea's | No Comments

Breaking away blocks now actually works! I had to implement some pathfinding to pull it off: I’ve used vertices as nodes and edge lengths as path costs, to find the block with the smallest enclosing, from a given start and end vertex (the intersection points). It does the job quite nicely now:

Block Breaker

I’ve ported this game to C++, using Haaf’s Game Engine, partly because it ran too slow in Python (after quite a bit of shooting around, of course), and partly because I needed a solid debugger for further progress. The whole project is now quite a bit past it’s prototyping stage anyway: I know what kinds of issues I need to solve, and I know how I can solve most of them:

  • removing any leftover edges in the old shape - a few comparisons between the two blocks should tell which edges have become obsolete
  • making some other edges border edges - again, just a few comparisons
  • making sure the new block doesn’t have it’s edges inverted - in some cases, new blocks have inverted edges, and I don’t know yet how I’ll solve this
  • determining when a loose path should become part of the new block - this one is more tricky, but I think comparing angles between edges should suffice
  • determining the surface of the new block - tricky, I think I’m going to triangulate the shape and take the sum of the surfaces of the resulting triangles
  • determining the center of the new block - again, tricky, but triangulating the shape and taking the average center should do the job
  • and finally, some debugging here and here…

Back in action!

July 1, 2007 at 12:17 am | In Game development, Game idea's, Programming | 4 Comments

Game-development update

After a long blogging silence I’m back into blogging. The past few months I’ve been working on a game-design project, together with 3 fellow students. I was responsible for the programming. I’ve used Python and the Panda 3D engine, and I’m quite surprized by how fast I could get stuff up and running. I’ll surely be using Python more from now on. As for the game, I got a scriptable system up and running within a few weeks, to make life easier for the level-designers. In the end, it turned out to be quite usefull, and adding new game entities was a piece of cake.

De Mensies

Of course, no project goes by without trouble. The collision system was somewhat stubborn to work with at first, and once I found my way around it, it turned out not to be 100% solid: sometimes, objects would fall out of the collision hull, and not even at too high speeds. I also was too optimistic in my planning, as polishing and bugfixing always take more time than you’d like.

Since one of my teammates continues to work on this game, I won’t put up a download. Right now, it only contains 2 levels anyway.

De Mensies

Let the prototyping begin!

I’ve also started prototyping some small game idea’s of mine. My dedication span is too short for projects like Tar!, it seems, so this is how I’m trying to train myself to finish things: taking on small, fun projects and working them out into playable games. If one of these turns out to be really fun, then I’ll take the time to polish it into a fully fledged game.

I’ve got a small list of game idea’s that sound interesting, at least to me, so I can choose which one looks most promising - and doable. Right now, I’m working on something that I call Block Breaker for now. It’s a sort of asteroids top-down shooter, but rather than firing shots at asteroids and decreasing their life, you fire cracks in them to fragment them into smaller pieces. Small pieces become unstable and will eventually vaporize, but you shouldn’t collide with the large blocks, obviously.

Currently, I can fire cracks into blocks, but I haven’t completely figured out how to create fragment pieces when a crack crosses some existing cracks. Test-phace screenshot:

Block Breaker

That’s all for now. Seeya! :)

« Previous Page

Blog at WordPress.com. | Theme: Pool by Borja Fernandez.
Entries and comments feeds.