A Miner Adventure
I had accumulated a decent number of bug fixes so I figured I'd post an update. The changes include:
- Added elevator call buttons to adventure mode (where the red key is)
- Fixed a glitch with giving credit for wins in rescue mode.
- Fixed a problem with water mode that'd cause you to somtimes get an instant win.
- Added a warning message to career mode notifying players that you won't get credit for finding hidden gems in multiplayer games.
- Added some checking to reduce the amount of "Adventure game saved." messages you'll see.
- Fixed a bug where the enter key wouldn't set focus to the chat input.
- Fixed a bug where remote players would get a black screen when joining a game.
- Fixed a bug where the winner in free-for-all rescue games wasn't getting credit.
I've gotten a bit of work done. I'm trying to focus on adding elements that'll make it easier to create content. Making a new dungeon is more than making a map. I need to create the tileset for it and new mob icons for enemies. I may have to add new enemy AI. There may be new gameplay elements (ex: pressure switches on the floor) that I have to add.
Here's a video of some new enemy AI: http://www.youtube.com/watch?v=FSXVzpvnpyA
There are a lot of little details I've gotten done, but still a lot left to work on.
Completed (in part, at least):
- Due to what I can only assume is a BYOND bug, I converted the HUD to use images instead of screen objects.
- Added music and sound effects
- Made enemies drop powerups that restore health/mana.
- Made stats factor into combat
- Added death animations for enemies (or static death states in the absence of an animation).
- Made enemies respawn
- Populated starting areas with NPCs.
- Enemies with more intelligent AI.
- Create starting areas for druids and knights.
- Create quests.
- Finish planning character ability sets and figure out at what level each ability is learned.
- Add a title screen, saving/loading, character creation, etc.
- Make interface to manage key bindings, inventory, and quests.
Chowder sent me some code to handle the arrow keys better. I don't get a lot of feedback about the libraries so I'm not sure what changes people would like to see, but if they're sending me code then maybe it's something they'd like to see added.
The code makes the left and right arrow keys "cancel" each other out. If you press left, then right, you'll move right. But if you keep holding the left arrow when you release the right arrow, you'll move left again. I didn't want to include this initially, but for a sidescroller I think this is how 99% of people will want it to work (for general pixel movement, it's not necessarily the case). This will be included in the next update.
I've been working on the pathfinding stuff again. There are really two parts to pathfinding: finding the path and following it. Initially I tried two approaches to path following:
1. Given the list of turfs that is the path, remove each turf from the list as you enter it. The first turf in the list is the turf you should move towards next.
2. Given the list of turfs that is the path, find where in the path you are but don't remove anything from the list. The next turf in the list (after your current position) is the turf you should move towards next.
The second method worked better if the mob missed a jump. When you miss the jump you might revert to an earlier place in the path. If you remove turfs from the list as you go, after you fall you'll have to find the path again. The current version on the hub uses the second method, but now I'm leaning towards the first. I'm not sure what I'll end up with.
I wanted to write an article about creating more advanced enemy AI using the sidescroller library. My work on Tiny Heroes is giving me a lot of ideas and material for this, I just need to finalize the changes to pathfinding and polish these examples up a bit.
Pixel Movement Optimization Article
Yesterday I posted an article about how to optimize how a project uses my Pixel Movement library. It's similar to the optimization demo that comes with the library but it has expanded explanations.