Selecting a good multiplayer framework

Place for questions and answers for all newcomers and new coders. This is a free for all forum, no question is too stupid and to noob.
Post Reply
Renokun
Posts: 9
Joined: Fri Jan 30, 2015 7:47 am

Selecting a good multiplayer framework

Post by Renokun »

Greetings!

I am new to posting on this forum, but after looking through past posts, this looks to be the perfect place to ask for opinions and information!

Looking to making a simple graphical game project, I am now tasked with finding a networking base that is not overly complex for me, as I am a beginning programmer going on intermediate. I know just enough to get myself into trouble/lost. I have thought about commercial packages, such as Photon and SmartFoxServer (SFS is a personal favorite, but the cost...) but money is an issue and I'd rather code with intent to use what I start with. For free/open source, I have looked into Red Dwarf Server, but I am unable to find any information to help me use it. Lidgren is another one I am examining, but examples seem to be in short supply - I was following a coding tutorial on Youtube and the guy stopped three videos in and I had no idea where to go.

I have recently become aware of HTML5 packages that handle networking, but this is a new frontier for me, and I have no idea how to set up or compile anything, let alone get started with them or connect using a non-web client as most are bundled with. Same issue with Python. Scala and Akka also baffle me. The Isogenic Engine looks very awesome and can handle all I could need, but I cannot afford it at this time, sadly.

My current plan of action is to take a simple MUD system, perhaps in C# or VB as I enjoy .NET's approachability, and modify it into a simple game server. I don't need rapid package sending as this will, at most, be a turn based approach. I will be making a client to connect to the server. This is by no means my final decision on what to do, but about all I can do alone with my current knowledge.

So I throw myself on the ground before the experienced coders and humbly seek advice or suggestions of what direction to go.

If it helps, the main features I am looking for are:
-Data persistence, so player accounts, inventory, etc can be saved and retrieved
-Rooms, more for inviting other players to visit and chat
-Really basic AI
-Preferably implemented in Windows

To everyone who reads this, thank you for your time. I look forward to whatever direction can be offered!
Last edited by Renokun on Sat Jan 31, 2015 5:25 am, edited 1 time in total.
User avatar
Jackolantern
Posts: 10893
Joined: Wed Jul 01, 2009 11:00 pm

Re: Selecting a good multiplayer framework

Post by Jackolantern »

Welcome! :)

Most of the things you have mentioned are really overkill for a MUD. Isogenic is an amazing engine, but it is geared for multiplayer animated games, where players shoot at each other in real-time, etc. It can be used for MMORPGs as well, but still, a MUD can be handled much more simply than that. SFS, Photon and the other are absolutely overkill for a MUD. They are designed for retail-quality MMORPGs.

I would suggest to look into Node.js, Socket.io and MongoDB. Your MUD client could just be a webpage with jQuery to handle the text input/output. Once you understand Javascript, it is quite easy to get up and running. When I first picked-up Node, Socket.io and MongoDB, I played with them for about 3 or 4 days and within a week I had the foundation of a solid MUD server built. The concepts are quite easy and straight-forward. Node.js allows you to use Javascript on the server, but because it is asynchronous, it saves you from having to deal with the multithreading work that makes traditional MUD server development such a pain. Socket.io makes the websockets extremely easy to work with, and provides fallbacks for clients that don't support websockets. MongoDB is a document database (no SQL!) that uses Javascript, giving you a complete Javascript technology stack.

If you wanted to look at a Node.js MUD server, you could take at look at RanvierMUD, which is probably the preeminent node MUD.

If you aren't familiar with Javascript, a great place to learn about it is Codecademy. I am not really sure what to suggest to learn Node.js (I learned it from a book, but you would probably want something more recent). You will also need a web framework for Node, of which ExpressJS is definitely the most popular and the most simple. It is easy enough to learn from the guides they have on their page with a bit of tinkering. So is Socket.io. MongoDB has very nice documentation, and I learned everything I needed from there. However, the constant connecting and querying to Mongo can really clutter your code, so you would probably want an ODM (Object-Document Mapper) such as Mongoose so you can work with your database just like you were working with objects. For the client-side, you will want to probably use jQuery to make all those changes on the website easier. Here is what appears to be a good video tutorial series to learn it.

I know it sounds like a lot, but once you know Javascript, just a few days of playing around with node and the rest will be enough to get you where you need to be to code a MUD from scratch, believe it or not. If you have any more questions, let me know!
The indelible lord of tl;dr
Renokun
Posts: 9
Joined: Fri Jan 30, 2015 7:47 am

Re: Selecting a good multiplayer framework

Post by Renokun »

Thank you for replying!

Oh, I should have specified, the game isn't a MUD exactly. It will be a graphical game that I just need to be able to store data, update objects (such as incrementing values, etc) and all I could come up with was adapting a MUD server for the purpose -- I mostly have experience with MOOs, but I dislike how they keep data and code all in the same database, constantly stored in memory.

I appreciate your advice on where to begin. I will start taking a look at these options. The main block I ran into earlier was getting all of this to run in Windows, as that is my primary platform that I work in, but if push comes to shove, I can get a Linux box set up. This will provide me with a good challenge!

Thank you again! :)
User avatar
Jackolantern
Posts: 10893
Joined: Wed Jul 01, 2009 11:00 pm

Re: Selecting a good multiplayer framework

Post by Jackolantern »

Node has binaries for Windows and most things work just fine with it (everything I have mentioned in my post works great on Windows). You will find a lot of tutorials that make reference to Unix-like shell commands, but they can all be adapted to Windows, often with no change.

The most important aspect of how MUD-like the game is, is whether or not you are going to have animated characters moving around the screen, or if the game will be text-based. Or possibly some combination, or maybe something completely else?

What do you want your client to actually look like and how will it work?

(And if you used to work with MOOs built possibly in C++ or something like that, dealing with low-level multithreading and socket libraries, Node will be a breath of fresh air. You will be able to add features in hours that would have taken you weeks or coding and debugging before)
The indelible lord of tl;dr
Renokun
Posts: 9
Joined: Fri Jan 30, 2015 7:47 am

Re: Selecting a good multiplayer framework

Post by Renokun »

Hello again! Thank you for the continued advice!

I will begin trying to set up everything on Windows. Currently, Node is installed, along with Mongo and, I think, Socket.

The game will be a simple implementation of something I've loved for ages, SimCity. I doubt I'll get it too advanced, but I thought it'd be fun none-the-less. I always adored the original/Micropolis version and thought it'd be fun to try to emulate it, though with rudimentary multiplayer for chatting and, maybe, visiting another's city. I have plans to expand this further in the future. That was one reason I liked Isogenic, I could see a neat city built using it, but I think I want a standalone, non-web client as the end goal. I found a few other HTML5 isometric packages, but I am totally lost when it comes to it, so I saved them for later.

Right now, when I get to the client stage, it is a tossup between using Unity or Game Maker. I like the simplicity of Game Maker, but I have a lot of time in Unity (not to mention purchased assets). But I want to get a solid server foundation up first before I worry what the client will be built in. The simple multiplayer and player data saving was one reason I was leaning toward a simple MUD.
User avatar
Jackolantern
Posts: 10893
Joined: Wed Jul 01, 2009 11:00 pm

Re: Selecting a good multiplayer framework

Post by Jackolantern »

To use Unity or GameMaker with Node.js as the server, you will likely have to drop Socket.io and move to TCP and/or UDP connections in node. Socket.io is really built for HTML5 websockets. But I know node can connect with Unity or GameMaker. Those clients just don't accept the websocket standard as far as I am aware, and they definitely will not support the client-side Socket.io Javascript library.
The indelible lord of tl;dr
Renokun
Posts: 9
Joined: Fri Jan 30, 2015 7:47 am

Re: Selecting a good multiplayer framework

Post by Renokun »

Thanks for the continued suggestions! I am still poking away at the project, but it's slow at the moment. I did get Node.js set up, so I'll begin targeting methods to work with this next!
Post Reply

Return to “Beginner Help and Support”