CODE / 10 NOV 2016

How to make MMO's in RPG Maker MV

    Game_Player.prototype.moveStraight = function (direction) {, direction);

        $gamePlayer._playerData.x = this.x;
        $gamePlayer._playerData.y = this.y;
        $gamePlayer._playerData.direction = direction;

        $gameMap._pusherMap._MapChannel.trigger("client-move-player", {
            x: this.x,
            y: this.y,
            direction: direction,
            member_id: $gamePlayer._playerData.member_id

Ez. The simplest code in the world. Sends the player's x, y and direction to all other users playing the game. Those other player's games receive the data in real-time, and move the event that represents the moving player. Doesn't get any easier does it?


Mark M

No tags.


Mark M - 5 months ago


You must login to comment.

More posts by Mark M