Mittwoch, 16. Mai 2012

Roadmap updated


While I ported the client from Metro to HTML5 I  lost track of my roadmap. I implemented some features which were planned for much later milestones (like some steps into the direction of inventory and item management) while forgetting about things which are much more important in the intermediate future. Time to get my priorities straight again.

Milestone 6 (growth):
  • Flexible GUI infrastructure
  • Character system
  • EXP gain and leveling
  • Increasing base attributes
  • Combat mechanics
  • Mana points, mana regen and mana use 
  • Spellbook
Milestone 7 (opposition)
  • Monster database
  • Monster AI
  • Spawn areas on maps
  • Character death and respawning
Milestone 8 (wealth):
  • Items and Inventory
  • Player trading
  • Shops
Milestone 9 (adventuring):
  • NPC interaction
  • Scripting
Milestone 10 (security):
  • Permission management
  • Database logging of
    • Logins
    • Administrative actions
    • Usage statistics
  • Logins
  • Brute force protection
 Milestone 11 (eye candy)
  • Animated sprites
  • Animated tiles
  • Particle effects

Rest of Milestone 6

  • Move hit points to game system
  • add mana points, mana regen and mana use
  • Store spell palette in the database
  • communicate spell palette to the client
  • drag&drop spell palette to hotkey bar
  • save hotkey assignment server-sided
  • monster database storing monster stata
  • monster ai implemented using strategy pattern (movement strategy and attack strategy)
...

fuck those monsters - that stuff goes to another milestone.

Dienstag, 15. Mai 2012

Exp progress in status window

I added progress bars for exp to the status window. In order to do so, I "objectified" the progress bars, so I can reuse them for other things.

Samstag, 12. Mai 2012

Window managing


I created a simple window managing system. A button bar in the upper right corner can be used to show and hide windows. Every window got a header bar with a close button which hides the window.

Freitag, 11. Mai 2012

Status window


This is the new status window. Unfortunately it isn't updated in real-time yet. The server only sends an update on login. But when I teach the server to do so, the client will be able to handle it. Whenever something changes, the server sends an update which only contains whatever changed.

Thanks to jQuery, it is drag-able across the canvas. I also used jQuery to make some other parts of the client code more readable.

Dienstag, 24. April 2012

Can jQuery help me?

I am currently checking out jQuery to see what the hype is all about and if I can use it to make the client work better.

Features I could use:
  • Selectors - I already thought about an own alias function for the annoyingly verbose document.getElementById.
  • Position for centering divs properly. Also maybe for some other things.
  • Tabs - I already have an implementation of a tabbed container for the chat, but maybe I could make it better with JQuery.
  • Drag & Drop - For inventory handling and putting spells into the quick bar
  • Sortable for inventory handling (maybe)
  • Resizable GUI windows

Freitag, 20. April 2012

Game system software architecture

Before I start with Milestone 6, which is about the implementation of a game system, I decided to do some refactoring first.

To allow quick and easy changes to my game system, all logic related to it should be concentrated at one place: A GameSystem class which implements all the game rules. All the provisoric existing logic needs to be removed and replaced with calls to this class. The game system does of course need the system-specific stats of all the participants like mobs and players. Storing this data in the existing objects would be a violation of the principle to isolate the game system. So every participant now gets a gameSystemDelegate object with all the game system specific data which is received from the GameSystem during construction and is passed to every call to GameSystem instead of the original object.

To allow easy replacement of the game system, I decided to follow the principle of dependency injection and the strategy pattern. GameSystem as well as the delegates GameSystemPlayer and GameSystemMob are only interfaces. The implementing class Wizardwar is only referenced in the main class, where it is used for a global GameSystem object referenced everywhere else. The implementations of the delegates, WizardwarPlayer and WizardwarMob, are only referenced in Wizardwar.

That way I could create an entirely new game system, and the only place in the engine code where I need to make a change is the line gameSystem = new Wizardwar() in the Main class.

About the wizardwar package itself: I intend the delegates to be "dumb" data holders with all members set to public. All game logic should be contained in the Wizardwar class.