Jump to content
  • entries
    62
  • comments
    464
  • views
    86,876

Things that go 'boom' in the night


supercat

521 views

This version adds explosions when monsters are hit by falling rocks or rubies. I'm not really happy with it, but figured I'd let CC2 users play with it. There are a surprising number of different ways a rock can hit a monster, and I don't yet have special handling for most of them, so things can get a little strange.

 

Setting difficulty to B/A allows the game to be single-stepped via the fire button. This makes it possible to see what's happening with monster and rock movements as well as with explosions. Watching the details closely will reveal a lot about how the game actually works. Even though things seem to move smoothly, the game uses a character-based display kernel and all action takes place with character cells. To move a monster smoothly to the right, I have defined characters for "Monster exit right" and "Monster enter from left". Using character-set animation, the monster will move smoothly from left to right without my having to worry about handling the individual steps.

 

This works out extremely nicely for most things, but collision handling becomes surprisingly tricky. If a monster is leaving a square and a falling rock is immediately above it ready to enter, should that register a collision? Yes. What if the monster is entering a square with the rock above? That too should register a collision. But what if there are rocks over both squares? Presently, the game registers two collisions. To see this, dig down under the lower-left clock monster and leave when it's facing upward. Get out of the way of the emerging clock monsters and you'll see a monster get double-splatted.

 

If anyone plays with the demo and has any ideas for improving explosion logic, I'd be glad to hear them.

0 Comments


Recommended Comments

There are no comments to display.

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...