Showing posts with label server. Show all posts
Showing posts with label server. Show all posts

Sunday, August 31, 2014

Various bugfixes

  • Vampiric spells no longer freeze the client
  • Characters which somehow manage to get stuck in walls on mapchange or login will get moved to a nearby open position
  • Multi-hit spells now retain their multi-hit property on logout
  • Tailored items now have icons

Friday, August 29, 2014

New Websocket implementation

My server is online with a new websocket implementation by java-websocket by TooTallNate. I hope that this will work better for all the people which could not connect. Please try again and comment to tell me about your experience.

Replacing my WS implementation was surprisingly painless. I ran into some problems with my duplicate login prevention, but worked them out eventually. I had to sacrifice my stack for pure TCP sockets, but considering that I haven't regression-tested that code in ages, that's maybe for the better.

On an unrelated note: It's true. You can't put a server online without having it attacked immediately. I already have some IPs from China and Russia trying to brute-force my SSH root password. Good luck with that. It's randomly-generated and far too long to brute-force, especially over the net.

Thursday, August 28, 2014

Some problems fixed... or not.

Some people commented on my last post that they have problems logging in. Thank you very much for that. I now changed the server to:

1. terminate the old connection instead of the new one when the same account logs in twice
2. terminate connections when they don't responds to pings in a while

However, I am quite sure that this only fixed the symptom, not the actual problem, which seems to be a bug in my websocket implementation. I am thinking about trashing that hacky thing and replace it with a tried and true implementation  like this.

Tuesday, August 26, 2014

It's online!

I rented a small virtual machine, installed my server on it and uploaded my javascript client. Except for some small initial issues it now runs great. At least as long as I am the only one who is playing.

It is now available at wizardmmo.com. But before I start to promote it, I need to take care of some things from my todo list.

Tuesday, July 29, 2014

Mining System implemented

I implemented the mining system. I also made the first mining map, an NPC which sells the mining spells, and two Foni's, one giving mining hints and one telling a bit more about herself. I am not that happy with the iron ore item sprite, though. It looks like shit. No, it literally does. Just look at it:


But otherwise, I am quite happy with this feature. It works just like I designed it. Sensing and prospecting isn't implemented yet, but probing and mining works just as intended and I think hunting for ore is really fun... at least compared to the "click on ore, watch progress bar" resource gathering systems of most MMORPGs. Now I just need something which can actually be done with the ore. Currently it's just vendor trash, and not even a particularly lucrative kind.






Monday, June 30, 2014

AoE overhaul

I spent the whole Sunday with overhauling the code for AoE attacks. It is now much more extensible for different attack patterns than just points and circles. I also implemented attacks which target a ground location instead of a specific opponent, which works both for mobs and for players.

However, the procedural spell generation system doesn't create any spells with that feature yet. Both kinds of AoE attacks are now visualized by the client during their preparation-time, so players can dodge attacks more intuitively.

Wednesday, June 18, 2014

My shell is not complicated!

To get the current HP of a boss monster, you just have to use one simple, easy to remember, command:

/shell user.getMapInstance().getMobs().stream().filter(function(mob) { return mob.getName() == "Boss" }).findFirst().get().getHp();

...

I might need to work on this.

Saturday, April 26, 2014

Shutdown procedure



Until now there was no proper way to shut down the server. The only way was to kill the JVM process, which didn't save any characters. I finally solved this by adding a proper shutdown-command which properly disconnects and saves all the characters, terminates all the map instances and properly finishes up all the other stuff which happens in the background. I also wrote a server-sided javascript which can be executed from the shell and shuts down the server after a countdown. This utilizes a new admin-broadcast feature I also implemented.

I mostly did the script as a PoC for server-sided scripts started from the console. This might come in really handy for special events managed by GMs.

Wednesday, April 9, 2014

MongoDB authentication

I used to run MongoDB authentication-less. I used to rely on a firewall to shield MongoDB against outside access and only allow access from within the server-network like early MongoDB guides suggested, but I know that my skills as a sysadmin are limited. So I decided to enabled user accounts and authentication for MongoDB and add support for authentication to the gameserver. Better safe than sorry.

Sunday, April 6, 2014

Password changing


I replaced the "Logout" button in the control bar with a new button "Menu". This button opens a popup menu with lots of links. "Logout" does the same thing the old logout button did. "Settings" opens a new window which allows the user to change their password.

The other options are links which will lead to various web-applications I still need to set up.

Thursday, March 27, 2014

Crafting interface implemented

I added support for crafting. NPCs can now display a crafting window. They can freely define how many slots to display and where to display them. The item script can also define a handler-function which receives the items the player dragged into the window. Each slot can define a "tag" which says which items can go there. Items can now have one or more such tags which define the crafting use they have.

The Java part of the engine does the ground-work of validating that the users input is legal (tags match the slots, user actually has the items).

The scripted function is then responsible for checking if the combination is a valid recipe, remove the items and give the player a new item. This function could also be implemented as a Java class. When I develop a more complex crafting system, I might opt to do so.

Java 8

I updated to Java8 and experimented with some of its new features. I coverted the admin command handlers to use the new lambda feature, and it really improves the code. The new Nashorn Javascript engine gave me some problems because some scripts no longer worked the way they used to, but I think I solved all the issues (wrote a Q&A on stackoverflow about it).

Tuesday, March 18, 2014

Statistics

Last week I worked on ways to obtain some usage statistics.

The server now accumulates statistics about how much network traffic is sent and received for each message type. I added a command /traffic to access this information from within the game. This should tell me where I need to optimize my protocol. So far it seems like move-messages and map-layout messages are the traffic users number 1 and 2.

Both leave some room for optimization. The move-messages send the coordinates in ascii-encoded floating point numbers with a precision much higher than needed. Two decimal places should be more than enough. And the map information is basically the whole JSON data as it comes from Tiled. That's a lot information the user is not meant to see. It can and should be redacted.

But I need real usage data by real players to say for sure where optimization is needed most.

Another method to generate statistics are web-reports. I created a system to regularly export data as JSONP files and save them somewhere. A website can then use javascript to import this data and output it in a presentable way. Currently I have a list of current players and a list of active maps with player count. The JSONP technique makes the data available to anyone. This is intentional; I would like to see what the community can come up with to beautify my data.

I am thinking about archiving these reports in the database too. That would give me access to historical data.

Monday, March 3, 2014

Visible equipment

I made it possible for an object to consist of multiple sprites and to set these from the server. This in turn enabled me to implement visible equipment. When a player puts on and takes off equipment, this is now visible on their sprite.

Currently this only works with hats and staffs because I only have sprites for these yet. But that's just a matter of creating the content. The next step will be to allow differently colored equipment.

Saturday, February 22, 2014

Password hashing updated

I improved the security of the password hashing system. As a side-effect all my old character-accounts are now invalid, so I had to delete them from the database. I could have done it in a backward-compatible way and retain the characters, but why bother when I don't have a production server yet.

Thursday, December 26, 2013

Effect areas

I added a new feature: Status Effect areas.

These provide buffs (or debuffs) to anyone standing in them. This feature will make positioning in combat even more important and diversify the game experiences on different maps.


Thursday, November 28, 2013

Got rid of multiple characters per account

I got rid of accounts. Each character now has its own password.

Why did I do this?

1. this simplifies lots of things in the code like banning, permission handling etc.
2. It makes it easier to do registration during the tutorial, because now there is only one name the player needs to make up.
3. I don't expect that many players will create more than one character, because there isn't much reason to do so in my game system.
4. There is no way to stop people from making more than one account anyway, so they are no appropriate method to tell natural persons apart.


The next thing will be to allow players to start the tutorial with an unregistred character. The player will choose a password when the tutorial is over.

Sunday, October 27, 2013

Barrier Tutorial

I added a barrier tutorial to the tutorial map.

The player has to walk through a course without taking any non-shield damage.

This required two new scripting abilities: Map areas which trigger scripts and attacks which trigger scripts. Both of these new abilities will likely come in handy in the future.

Saturday, October 26, 2013

Balancing through testing

To test my formulas I created a little program to auto-generate mobs with average stats from level 5 to 100. I want to avoid this in the final version (or do I?), but for now it is a nice balancing tool.

This really helped me to file off some edges and balance my procedural barrier generation algorithm. Next one are healing spells.

Thursday, August 15, 2013

Barriers

This is a feature I first decided to take off my roadmap to alpha, but I realized that it's a too important part of my game concept, so I started implementing it.

A barrier is a buff which works like a HP buffer for a special element. When it is cast on another player, all damage with that element will eat away the HP value of the barrier before reducing the actual HP of the players. The HP buffer of the barrier decays naturally during the lifetime of the shield.

Currently there is only a provisorical implementation - every player starts out with a 100HP fire shield which loses 1 HP per second. But I am going to make barriers spells. Each player-character can have one barrier active at a time, but it doesn't need to be on oneself, so a player can make the tactical decision to protect another partymember instead of oneself.

There will be two kinds of barriers. Long-time wards which decay slowly but need a long time to cast, and quick counterspells which are cast very quickly but also decays rapidly. The first kind is used as a precaution when wandering dangerous areas, while the latter is cast when you notice someone attacks you to prevent the damage.