Jahed Ahmed

Browser MMORPG Update #1

Small progress update on that multiplayer game I started.

MMORPG Preview

Added:

The main progress point was finally getting collision detection to work. The problem was Phaser's TiledMap needs a layer specified for collision detection on maps that have multiple layers.

1
this.map.setCollision(103, true, this.collisionLayer);

It wasn't immediately obvious and took me hours to debug but hey that's Javascript. This also explains why the collision detection did work on my previous project which only had one layer..

Adding NPCs required a small refactor. The code base is still a mess as I add more features and become more familiar with Phaser's design.

Cheating

One thing that's been worrying me throughout this project is how easy it is to cheat. Like how people submit "9999999999" highscores on Flash games, it's just as easy in this game to do whatever you want. Currently the only thing you can do is walk around, in which case you could fire up the web browser console, set a breakpoint and increase your player's speed to zoom passed everything.

How does server-side validation work in this case? Thresholds I'd assume. So if a player update moves more than it could from its previous update, you either cap or ignore the update. The downside is that it would cause jitter if there's any slow or lost updates.

Now that I've actually thought about it, other multiplayer games probably do the same thing or something similar so I guess it's not a bad solution. I'm sure as I add more features, there'll be other, more complicated means of abuse. Fun.

Related Tags