Hamumu Games, Inc. Hamumu Games, Inc.
 - Home - Games - Blog - Halloween - About - 
  Ker-Blam 09:14 PM -- Mon April 28, 2008  

Little update on the 'Gate today. Items are now destructible! It was a little bit complex for various reasons. First, items have never had 'health' in this engine, so I had to find a way to cram that in without breaking my existing map. That wasn't really a requirement, since I've hardly done anything on the map, but I always hate to trash things. Lucky for me, that turned out to be easy once I discovered how I load and save maps (discover is the right word - that code hasn't been touched in 8 years!).

Secondly, there was a bigger issue, which is that items only occupy a single tile of space. They're an element of the map. That would be okay if they were all tile-sized, but of course they are often quite huge, like my trash dumpsters. They could of course be arbitrarily sized, treated like monsters in that regard, and kept in a list, but that means a whole lot more collision checks, and I am already increasing the number of bullets that will be bumping into things at once, not to mention other stuff like the scrolling world that just slow this game down more than previous ones made with this engine. So bad idea to do that. Instead, I did something used in a lot of the previous games - added invisible blocks that can be placed to make items get in your way over a wider area. But this time, that's not enough - you need to be able to shoot those inviso-blocks and have it harm the main item, and when the main item is destroyed, all its associated inviso-blocks need to die with it, or you'd have strange invisible obstacles left over. So I made a whole system of invisible blocks with a direction, so you place items on the map, then inviso blocks around them that point to the item. They feed the damage done to them onto the item, and when it's destroyed, they go with it.

So anyway, it all works! You can destroy items now, but there are no explosions or anything, they just vanish. Yay?
13 commentsBack to top!
Copyright 2021-2023, Hamumu Games Inc.