Updates in grid and mobs

About time we break the long silence. For quite some time now there has been nothing worth reporting, but quietly behind the scenes we have been still somewhat active. Now that summer vacation is here we have more time to really get back to coding OH again. In the last week or so we’ve been committing multiple updates mainly considering grid and mobs. Grid has been optimized and some of the old bugs fixed. Mob waypoint system has been completely renewed to make the mobs more lively and also, more importantly, reduce their waypoint spam so as not to overflow packet queues and leave more time for i/o thread to consume the waypoint packets.

I made a small demonstration of the new mob waypoint system and uploaded it on youtube:

Barrage of commits

Over the course of last few days we’ve done lots of testing and refining of the new composition, and I believe I’ve now addressed most of the issues that emerged after implementation of new core. I’d really appreciate some feedback either on our forums or #OpenHeroes channel on IRCnet.

New I/O core release

Today I committed a major update on our public repository. Thanks to certain people testing the old I/O core in practice on a multiplayer server with dozens of concurrent clients, it became clear(which I had anticipated all the time) that it would not be able to handle more than maybe 5-10 concurrent players let alone the heavy load of massively multiplayer online game.

This update will not be relevant to those of you who only use OH to run single player localhost servers, because you wont really notice any difference. But to those of you interested in running multiplayer servers – this update should provide you with significant performance improvement.

PS: Since this new I/O core is still in beta stage, I’m waiting for reports on how well it performs in practice. I have only done limited testing on it, so you might still run in to some problems. I would appreciate if you could drop by on our forums and post some kind of feedback.

NPC spawning continued

This time populating VV with NPCs. Getting closer to playable emulator.

EDIT: I have now committed the NPC spawning command in repository. The command goes as follows: !npc:#id:$name
The NPC will spawn to your location. This example will spawn a smith NPC: !npc:10:My Smith

Project status update and clearing some misconceptions

First of all I’d like to start by (once again) saying out loud that we do not work for/in collaboration with any private server groups out there. This is independent nonprofit open source project, and as such we don’t have the same goals nor interests as some ps groups out there.

That being said, lets take a look at what we are working on. It has been some time since our last significant update, or any update at all for that matter, but we are still very much working on the projects towards our ultimate goal: to get playable server base out there with all major game play features implemented.

Over the last few months we have slowly been working on properly implementing support for equipments and inventory. Once complete the system will include features such as:

  • SQL connection pool for multiple concurrent database connections
  • Server side item cache to hold object instances of recently invoked items in memory. With some 50k+ items it would be too memory intensive to constantly hold all items with their attributes in memory. Then again given the high demand of item invocation it would also be too slow to fetch each item from database every time. Item cache will reduce both memory usage and database overhead by temporarily holding recently used items in a (configurable) fixed size FIFO list
  • Calculating character stats based on equipped items
  • Saving and retrieving character equipments and inventory to/from database
  • Server side recognition for when full set is worn. We are using hashes for set items to determine what type of set they belong to. In MH there are 4 types of sets(+3~12 sets, necky sets, ultimate sets and fame sets) each with their own rules making it somewhat challenging to determine if a full set is worn. Thanks to our hash codes tho we were able to eliminate overhead of large conditional code blocks with their high cyclomatic complexity
  • Equipment relay in multiplayer to show all players in game what equipments you have on you. This would include both, the items initially worn upon reaching broadcasting range and real time relay of equipment shifts

  • Once we are done with this we will also release full database of items in exported sql database as well as xml file. At the same time we will move on to exclude data packs from our repository and instead make seperate downloads for them. This is due the fact that the items xml file alone is some 70MB in size and need not be in source code repository.

    SQL Error 1045

    It would seem like quite many people bump into this problem while installing/using OH. After looking into this, it seems like this problem is caused by MySQL configurations rather than our code. Possible solutions for this problem are to make sure that you:

    1) Reset root password: Resetting MySQL password
    2) Grant permissions to root account for localhost connections
    3) Make new account with localhost permissions and permission to the database you use for OH, and use that account instead of root.
    4) Make sure that which ever SQL user you’re using actually has a password. A user without password might cause Java SQL driver to fail authentication.

    Item spawning

    Tho items are far from being fully implemented on server side, I thought I’d commit preliminary support a little bit early. I’m sure many of you are eager to get to play around with all kinds of different sets in game, so go and update your local copy of the files to latest in repo and you will have the ability to spawn items.

    Built in chat commands currently:

    !item:#id – spawns an item on ground next to your location. Item ID in MH are always 9 digits long(in example kiji j weapon: 281000001).
    !heal:hp:mana:stamina – hp/mana/stamina bar go up to designated values
    !announce:message – GM announce where your message appears in big pink letters on top of the screen

    What works with items:
    Can spawn item [x]
    Can equip item [x]
    Can unequip item [x]
    Can delete item from inventory [x]
    EDIT: Can quick swap items if already equipped
    EDIT: Can move items in inventory

    What doesn’t work(yet):
    Cannot quick equip an item if item already in that slot(must manually unequip first)
    Cannot quick swap items in inventory between 2 slots
    Cannot drop items on ground
    Server does not calculate stats according to equipped items
    No database functions in regarding items
    No equipment relay for multiplayer(others cannot see what you are wearing)

    Have fun playing around with items and post screenshots of your pimped up characters on screenshot section of our forums ^^

    Preview of equipments in OH

    Finally after being sidetracked to multiplayer, I’m back to working on implementing equipments/inventory. It is huge amount of work and requires quite a bit of changes to be completely implemented. Here’s a small preview tho in the preliminary support of spawning/equipping items. Also notice the new chat GM commands :)