Welcome Guest ( Log In | Register )

[ Big| Medium| Small] -



Post new topic Reply to topic  [ 30 posts ] 
    Princess Amy
  Wed Oct 07, 2015 2:05 pm
User avatar
Staff

Staff Chick
Image


I intend to make some scripts for RPG Maker MV when it comes out. I'll be making a game with them, but I want to also publish them to the community for folks to use. I would appreciate some input and suggestions if you have any.

Basically it is the MV version of Netplay+, although it will be a much more polished, but basic, system. It will be more like a kit than a game - you'll use systems in it however you need to in your game.

I know that this is a big promise to make. As this shall form the basis of my own game though, know that if I fail, my game fails too.

Some caveats:

- There will not be live player sprites on the screen. This is very resource intensive.
- This will not be a full MMORPG system in many people's eyes.
- You will need to be willing to learn a little bit of PHP and Javascript.

This system is based on the proven backbone of Afar, which, like it or not, has been online for the past five years and basically works.

Current planned features
Subject to change

• Login and register system (secure, encrypted)
• Server-stored save file
• SimPvP Combat: play an AI controlled version of any real player
• Co-operative events
• In-game chat, powered by IRC (may not be possible, depending on the engine)
-> if not, general in-game chat
• In-game bulletin boards / forums / messaging system
• Wiki-based online manual within the game
• Social media integration
• NPC renditions of real players: though you won't see a player's movements live, you will still see them roaming the map they are in, and you will be able to interact with them: message them, fight them (sim)
• Auction house system
• Automatic game updates

All of this is doable in RPG Maker XP, with a lot of work. I have the system working. RPG Maker MV however will make it easier, faster, and more secure. It's almost built for online gaming.


Top Top
Profile      
 

    Princess Amy
  Wed Oct 07, 2015 2:32 pm
User avatar
Staff

Staff Chick
Thinking about it, a lot of it is going to end up being tutorial based, not script based. Some concepts, such as co-operative events, require more of an explanation than handing it out ready made (because I'm not here to make your game for you, and every game needs to be different!)

So some of this will take the form of a detailed explanation of how to create and use global switches and variables, and how these can form multiplayer elements.

There is an element of risk with this: some processing will be server-side, some will be client-side. The client-side is hackable. You will not be able to create a truly secure MMORPG with RPG Maker. You can however eliminate a lot of problems and then live with the fact that it will be possible to cheat with some effort, in the same way you can with any RPG Maker game. But not entirely, as a lot of processing is done server-side.


Top Top
Profile      
 

    Desecration
  Mon Oct 19, 2015 2:22 pm
User avatar
Member


Location: Newcastle, England
I think this is a pretty great idea, glad to see somebody else looking into doing this with MV. Especially somebody with so much previous experience in online game development. I'm quite curious as to why you think that having other player sprites on the screen would be too resource intensive? I don't see it being that much of an issue. Also surely you could develop an authoritative server and use that to validate anything the client sends across and reduce the possibility for hacking?

I'll be keeping an eye on this to see how you get on. Good luck with it :)


Top Top
Profile      
 

    Princess Amy
  Mon Oct 19, 2015 8:29 pm
User avatar
Staff

Staff Chick
Thanks.

I could do everything server side, but I feel like at that point it shouldn't use RPG Maker, and I would be making people's games for them.

Player sprites is resource intensive because each individual player has to keep sending and receiving their coordinates, which change very often. The software then has to account for the delay and work out their paths and such.


Top Top
Profile      
 

    Desecration
  Tue Oct 20, 2015 9:49 am
User avatar
Member


Location: Newcastle, England
Yeah that's a fair comment, I guess if somebody really wanted to go to that much trouble to hack something they'd probably figure a way out to do it regardless.

On the topic of player sprites being resource intensive I don't think its that much extra information to send and receive assuming you chose the basic approach of storing a player's X and Y coordinates that would only be an extra 8 bytes to send and receive per player (not accounting for any buffer data). This wouldn't need to be sent every frame either, it would only need to be sent when the position is updated. As for calculating paths that might be a little bit more resource intense as you say but I'm not sure it would be significant.


Top Top
Profile      
 

    Marked
  Tue Oct 20, 2015 11:29 pm
User avatar
Member

L1 Slime
Desecration wrote:
On the topic of player sprites being resource intensive I don't think its that much extra information to send and receive assuming you chose the basic approach of storing a player's X and Y coordinates that would only be an extra 8 bytes to send and receive per player (not accounting for any buffer data). This wouldn't need to be sent every frame either, it would only need to be sent when the position is updated. As for calculating paths that might be a little bit more resource intense as you say but I'm not sure it would be significant.

It certainly isn't about the size of the data being sent/received, it's about how resource intensive it is to send and receive each time. I think you're right in that it needs to be triggered when something changes. Because the other option is to send a request and receive a return basically every second, and that would be extremely resource intensive, especially if more and more users are active on the screen.

Since hearing that MV will JS and be portable to HTML5, I have been thinking about creating a system similar to this as well. Not so much a dev kit for distribution, but as a personal project. My original thinking is for the game to run in the browser through HTML5 where it can use a local connection to a MySQL database. The trouble with remote DB connections is that they are slow, especially on a shared server. But the thing with browser based games is that you have download it each time. I think most of these types of games just have users download the files locally, then connect to a datasource?

I'm also thinking that web sockets could be utilized for sending and receiving data. Pusher (https://pusher.com/) can be used for free to a certain limit, so that would be good for testing.

_________________
Image


Top Top
Profile      
 

    Desecration
  Wed Oct 21, 2015 9:39 am
User avatar
Member


Location: Newcastle, England
I mean sending and receiving packets isn't particularly resource intensive, at least not from what I've seen in my (limited) networking experience. There would definitely be ways to optimize the data sent and received, this is a topic that has been pretty heavily covered over the years so there are a lot of techniques that could be used to maximize efficiency. Assuming that there is a maximum number of players per map you could in theory know the absolute most data being handled for players and then work out the other performance issues from there.

I think the issue with using a local database is that it leaves it open to manipulation far more easily than a remote one, it would also be a significant overhead for each player to have to download the game database. Remote connections may not be the fastest but this again is something that can be optimized, having the server handle saving/loading to/from the database would be one way to minimize problems. As far as my understanding goes most games of this nature use a centralized database that the server is connected to and issue commands to it from the that, rather than from the client.

Web sockets would definitely be required although which specific library being used would depend totally on which suits the needs of the system architecture best.


Top Top
Profile      
 

    Princess Amy
  Wed Oct 21, 2015 9:47 am
User avatar
Staff

Staff Chick
The issue I have is that all my plans thus far have been based on Ajax, not sockets. It would mean building a separate server system just to run player coordinates. That poses a few problems - one of them being from a game maker's perspective: many web hosts out there won't allow that type of server to be run - but will allow Ajax and HTML5 games. (It's a grey area.) That adds costs.

Ajax is a state based system. You send a request to the server and get a response back, and build your game's state from there. (That's basically what I do in Afar, but I hadn't learned how to Ajax at that point).

Player coordinates however require the server to act on its own, without the client requesting things - the server sees that a player has moved and sends out its coordinates to all players. That would require a different system to the PHP/Ajax based one I've been using unfortunately.

But maybe that's a hint that I'm using the wrong system!


Top Top
Profile      
 

    Desecration
  Wed Oct 21, 2015 9:54 am
User avatar
Member


Location: Newcastle, England
Yeah I may have been slightly off when I was reading the first post, I had assumed that sockets would be used and there'd be a constant stream of data between client and server rather than state based events triggering data transfer. I see what you mean with the web hosts having issue with that type of server running, fortunately you can rent an Amazon EC2 box for very little cost which would be more than capable of running something like this without issue. (EC2 boxes being my first suggestion because I've used them in the past, there are many more services that provide the same capabilities)

Are you planning on doing this development as part of a community project Wyatt or are you planning on keeping it as a personal project? I'd be quite interested to see if something like this could be developed in true open-source fashion by the community.


Top Top
Profile      
 

    Princess Amy
  Wed Oct 21, 2015 10:09 pm
User avatar
Staff

Staff Chick
I am making a game, and then will release each bit to the public as soon as that bit is working.

A lot of it will be tutorial/explanation rather than plug and play though.


Top Top
Profile      
 

    Marked
  Thu Oct 22, 2015 1:59 am
User avatar
Member

L1 Slime
I hope you keep us updated in this topic. We are both going to attempt to do the same thing, perhaps down the track there is room to collaborate. I am an experienced web developer and have built applications with web sockets before, but I'm not sure what to expect with MV and how easy it's going to be achieve what we're trying to achieve. I am currently researching the best frameworks to utilize for this. I have already found a nice little tutorial on multi-player games using websockets to update coordinates and keeping resources low. Now just gotta wait 'till release day :biggrin:

_________________
Image


Top Top
Profile      
 

    Princess Amy
  Thu Oct 22, 2015 11:36 am
User avatar
Staff

Staff Chick
Just to be a little vague and over the top, HTML5/JS is the engine that RuneScape is now played in. Everything is possible.


Top Top
Profile      
 

    Marked
  Sat Oct 24, 2015 12:58 am
User avatar
Member

L1 Slime
Yeah, I don't think we should get bogged down in the suitably of JS/HTML5 for games. Especially a 2D RPG. I've just a look inside MV and the JS and I'm slightly excited, mainly because it's basically an advanced front-end website, the whole thing. To me that means flexibility, and I'm already familiar with this sort of code. I'm uploading now to my server to see if the HTML5 app runs :biggrin: But it's 340MB without adding anything.

EDIT: here's my HTML5 MV test http://gdunlimited.net/mvtest/

_________________
Image


Top Top
Profile      
 

    Princess Amy
  Sat Oct 24, 2015 9:50 am
User avatar
Staff

Staff Chick
218mb of that is graphics - easily replaced. Another 175mb is audio - again, easily replaced.


Top Top
Profile      
 

    Inukinator
  Sat Oct 24, 2015 11:24 am
Member

L1 Slime
I was thinking, a way to make this work is to use php to generate a json file from mysql queries, and then display them in plain text, which the client then reads, and have another php file that recieve post data from javascript which then is used to post the data in the mysql table.


Top Top
Profile      
 

    Princess Amy
  Sat Oct 24, 2015 10:50 pm
User avatar
Staff

Staff Chick
That's essentially what Ajax does - it's a way of javascript sending a request to a PHP file with GET or POST variables and then getting plain text back.

The way I have set it up, you call a function like:

var x = ajax('action', 'PARAMETERS');

and x is then set to what the server sends back, in plain text.

For example an action might be "get_player_name".

var player_name = ajax('get_player_name', 'player_id=4');

and player_name would be set to whatever http://url/action.php?action=get_player_name&player_id=4 would return.

Everything is then based on this simple system. File server end you have a file called action.php which looks like this loosely:

// action.php

switch($_GET['action'])
{
case 'get_player_name':
$user_id = clean($_GET['player_id'], 'int'); // YOU MUST CLEAN ALL $_GET DATA BEFORE USING
// IF YOU DO NOT KNOW HOW OR WHY, YOU NEED TO READ UP ON PHP SECURITY
// I WILL PROVIDE SOME TUTORIALS
$return_string = get_player_name($user_id);
echo $return_string;
break;
case 'other_action':
break;
}


Top Top
Profile      
 

    Princess Amy
  Sun Oct 25, 2015 10:07 am
User avatar
Staff

Staff Chick
Taken from rm web:

Quote:
Perhaps this question just shows a failure of my limited imagination, but what functionality does going multiplayer add if the other players aren't updated and interacted with in real time? What is the purpose of having them in-game at all if interactions are "ghosted"?


There's tons you can do multiplayer without necessarily seeing the other players live. Some functions I plan to create:

Trading

- Player to player trading: you send them a request, they send it back with their offer, you accept or decline
- Global auction house (similar to Grand Exchange in RuneScape or Black Lion Trading Company in Guild Wars)

Communication

- Chat
- Private messaging and other communication

Co-operatively created world

- Enemy unit sizes and town occupation based on what the average player is doing
- Quests open up if people are generally "winning" against certain monster groupings
- Gates and battle objectives that requre a set number of global wins to break through (say 1,000 people need to beat x monster)

Simulation

- Player vs Simulated Player battles (you fight an AI, but the AI gets the player's stats and traits from the global database)
- NPCs that are based on actual players and discuss their actions and achievements in an NPCey kind of context

Leaderboards

- Player stats compared against one another
- Competitions

Multi-user dungeons

Just because you can't see the other player live doesn't mean they can't co-operate with you in a dungeon. This will be a tough one to work out, mind, but I think it can be done.

Guilds/Groups

- Multi-user guilds and groups with their own leaderboards, chat systems, goals and guild houses


Top Top
Profile      
 

    Marked
  Sun Oct 25, 2015 12:05 pm
User avatar
Member

L1 Slime
So you don't plan to show other players updated in real time?

_________________
Image


Top Top
Profile      
 

    Inukinator
  Sun Oct 25, 2015 7:00 pm
Member

L1 Slime
A way to do the mud element, without seeing eachother live, is to make it so when one has completed a quest, another quest is opened for another player? or shared items, and when one door is opened in the party, that exact door is opened for everyone else!


Top Top
Profile      
 

    Princess Amy
  Mon Oct 26, 2015 8:05 am
User avatar
Staff

Staff Chick
Makes sense. Would be quite easy to do, too - having events and switches that aren't local, but aren't global either - but are unique to a party or guild.


Top Top
Profile      
 

    Princess Amy
  Wed Oct 28, 2015 1:05 am
User avatar
Staff

Staff Chick
Progress: you can now login (with a hard coded user and pass - haven't made text boxes yet!).

Can't do anything cool once logged in, mind.

Image

(Basically a function that sends a username and encrypted password, and returns "success" or "failure". Sets up a session on the server.).


Top Top
Profile      
 

    Princess Amy
  Wed Oct 28, 2015 12:35 pm
User avatar
Staff

Staff Chick
Error codes!

Bit of an update. You can now log in, and do other stuff on the server.

Provided you're logged in, every time you do an action it updates your last action time. It uses this to decide if you are still logged in or not.

Thus we have some error codes now.

1: not a user
You're not trying to log in, and you've not got a user associated with your IP - no session open

2: not logged in
You're not flagged as logged in: this means you've either never logged in, or have specifically logged out

3: timeout
It's been five minutes or more since your last action. You've drifted offline.

4: user didn't exist
You tried to log in to an undefined username

5: incorrect password
Tried to log in with the wrong password


Now that we have the concept of being online, I can work on an online users list.

Update: online players list

Imagine it graphical.

Image


Top Top
Profile      
 

    Guilink
  Thu Nov 05, 2015 11:53 pm
Member

L1 Slime
Nice! Very good! I will follow this project. Count me in for testing :biggrin:

Good luck


Top Top
Profile      
 

    Princess Amy
  Fri Nov 06, 2015 10:19 am
User avatar
Staff

Staff Chick
Thanks.

I'm actually having more difficulty than I thought abstracting the things I've done for my game out for public release, but I'll do my best. At present I still don't have the basic system I wanted up as I don't have the time I'd hoped I'd have to do it in.


Top Top
Profile      
 

    Marked
  Wed Nov 11, 2015 12:04 am
User avatar
Member

L1 Slime
I can imagine. I've been writing my own, and I don't think I'll ever be able to create a distributable package for it. I'm not sure what the solution, but the biggest problem that I see is storing member data such as accounts. For my own system, I'm linking the game directly into my forum and authenticating users that way. But I think it may be nearly unusable to distribute something that relies on a MySQL database, but few dev's may have access to one, or won't know how to set one up. Although, that's probably the best route and could be achieved by a step-by-step guide. Another solution is making the whole thing standalone and use some form of HTML5 database... I'm not familiar with those, but if you can store the DB on the server then that's probably the easier thing in terms of a distributable system.

_________________
Image


Top Top
Profile      
 

    Princess Amy
  Fri Nov 13, 2015 8:15 am
User avatar
Staff

Staff Chick
That's basically the system Old Afar used - I figured that using a prebuilt login/register system would be better, and forums come with those already set up and tested. This time around I'm making my own, but there's no reason I couldn't have just gone with the forum method again, in fact it would probably be better for a few reasons, such as the other features you get, having a forum set up for dev communication, and also having a part of your game online if anything goes wrong.


Top Top
Profile      
 

    Xilef
  Fri Nov 13, 2015 2:35 pm
User avatar
Staff

Staff Chick

Location: UK
Marked wrote:
the biggest problem that I see is storing member data such as accounts

From a security standpoint, that is the biggest problem 100% definitely.

Amy, you want to avoid storing user accounts at all costs. If you can, make it so the user has to login via Twitter/Facebook/Google/whatever and this dev kit lets the developers select the service they want to use.

Maybe have phpBB as a hidden option, but you should be discouraging devs from storing anything. Prebuilt by someone else is always better as it moves the security problems away from you and onto some other chump to deal with!

Tying those accounts to game-data can be done in whatever way you want after that. If you're going to go with MySQL or an HTML5 database (basically a file on a webserver) you don't want to be constantly uploading/downloading as that will chew up bandwidth. You need to package the changes up and send them when something significant occurs (change scene, battle start, closed menu after changing equipment).

The most ideal system would be an Amazon S3 service as the bandwidth consumption will be what you pay for, rather than paying for a fixed bandwidth that gets killed in under a month.


Top Top
Profile      
 

    Dan Sipe
  Thu Dec 03, 2015 9:25 am
Member

L1 Slime

Location: York, PA
can i have a copy of this dev kit i want to toy around with it .....
thx amy i sent you info on http://forums.rpgmakerweb.com/ with my contact info :)
hope you can read it ...


Top Top
Profile      
 

    Princess Amy
  Fri Dec 04, 2015 11:07 pm
User avatar
Staff

Staff Chick
Unfortunately I don't really have anything releasable, other than this script:

viewtopic.php?f=11&t=78833


Top Top
Profile      
 

    Marked
  Tue Feb 09, 2016 11:21 am
User avatar
Member

L1 Slime
I finally found some time to work on mine. You can find the blog about it here where I'll be posting updates: http://www.gdunlimited.net/games/gdu-mmo-project/blog

Image

Any multi-player functionality is possible in RMMV. And it's actually very simple using websockets. You simply create events with data, and listen for those events. Since we're using websockets, triggers are pushed to all other player's browsers and you can run whatever logic in real time.

So far I have achieved user authentication where any number of players can move around a map together in real-time. And any number of players can join. Every time a member logs in, he'll show up as a new player on every other player's map. Keep an eye out on the blog if you're interested :)

_________________
Image


Top Top
Profile      
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 30 posts ] 


Who is online

Users browsing this forum: No users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

cron
We are an independent, not-for-profit game making community.
Homepage
Board Index
About Us
Downloadable Games
Free Browser Games
Games in Development
RPG Maker Support
Game Maker Support
Construct 2 Support
HBGames the eZine
Advanced RPG Maker
Site Announcements
Powered by phpBB © phpBB Group