Jump to content

Writing MMORTS advice needed


Runey
 Share

Recommended Posts

I've been out of the programming world for a long time and would like to dip my toes back in. I've had an idea for a MMORTS game for quite some time. Something like Evony, Game of War, Dragons of Atlantis but a little bit different. Initially I was thinking of using MEAN stack but the more I look into things the more I think I need something else. Looking at game engines like pixi.js just has my head spinning right now and I would really appreciate a nudge in the right direction. i.e. whether elements of MEAN are the right way to go, what would I remove from MEAN and what would I replace it with.

Some of the elements of a MMORTS that are important are a really good chat system with the ability for world chat, alliance chat, whisper / private chat, and custom chat rooms. My preference is to use a hexagon tile map that can easily be 1000 x 1000 tiles (or bigger) with the ability to scroll through that quickly and smoothly. 

Thanks in advance for any advice you can give.

EDIT: sorry forgot to add that it will obviously be browser based but the ability to convert to a native iOS / Android app in the future would be extra nice.

Link to comment
Share on other sites

Ask yourself more about how you want to structure your application, rather than following a MEAN stack or deviating from it.

How do you want to structure your data? Does Mongo fit with how you want it structured? Do you even want a database backing it? Does something like rethinkDB with first-class support for data streaming make more sense in terms of how you want data delivered to your app? Pick a DB based on your type of data, unless you have a particular proficiency, whereby your choice becomes will be more productive with a well-known DB that doesn't really fit or learning a new DB that fits well.

Express is a generalist framework to help structure your app, it won't help you with a specific MMORTS game, but I'm not sure anything off-the-shelf will. Pick Express, Hapi, Koa etc etc based on which one has an api that most resonates with how you want to write your game.

Angular? Yeah, this is the only part I'd say stay clear of. Ng1 is dead, it'll be supported for a while but it's served its time and its outdated now. Angular 2, Vue, React or any other popular front-end tech would suit you well if you want a menu heavy interface for your game, something that would fit well being in DOM, something like React or Vue (or maybe even something lighter like Preact or Inferno) would probably be a safer bet than a framework like Ember or NG2, simply because they afford you more wiggle-room and an MMORTS is not the typical web-app most of these techs were designed to create (not that any of them can not fit for you, just that what you're doing isn't their typical market).

If you do go DOM for your interface (no reason not too, makes perfect sense) then you might want to back that with a lightning fast rendering engine, something like Pixi would be a great fit I think.

If you've been a way from programming for a while then you'll probably have a fair amount to catch up on. Look at using Babel and a module system (my pref is Browserify but Webpack is very popular too) and modularise your code as much as possible. Use many small small modules, but, on a larger scale a chat system is very much an add-on, call it a feature or an epic, it could (and probably should) run in a different way to the rest of your app with your front-end simply consuming routes. Try to modularise and split things up and then think about a glue layer that ties these pieces together, not an easy task, but good luck!

Link to comment
Share on other sites

Data handling is probably one of the most critical factors. My prior experience is primarily with MySQL. The general idea of this is to learn something new and drag myself (possibly kicking and screaming) back into the coding world. Being able to send data back and forth quickly and efficiently is crucial. I'm so used to using MySQL databases I'm not even sure what non-database options there would be for something like this. RethinkDB looks promising and it seems to scale better than MongoDB or CouchDB. Found an article of moving from SQL to NoSQL (specifically RethinkDB) here https://www.airpair.com/rethinkdb/posts/moving-from-sql-to-rethinkdb. Quite liking the look of how things are done in RethinkDB. Not set in stone yet but RethinkDB is looking like the front runner.

Being able to render everything quickly is the next most critical factor I believe. Pixi is my front runner. Game engines like Phaser look great but I haven't found one that is really aimed at the type of game I'm wanting to write. So I think I'll end up constrained by their limitations. Unless I stumble across another option I think Pixi will win out on this front.

I was already looking at Angular 2 and Ember but have not looked at React, Vue, Preact, or Inferno yet. This is starting to look like it may be the most difficult choice. I've got lots and lots to look at o.O Still I'd rather spend the time now rather than get half way through and find out I have to change and start again.

I hadn't even started considering module systems LOL I'll add them to the list of things to look at :)

Thank you so much for your input. It has been very helpful.

Link to comment
Share on other sites

React (and react-likes Preact, Inferno etc) all favour functional programming techniques and have taken the JS world by storm, Vue is newer and builds on a lot of this but takes a slightly different angle. It can be quite a paradigm shift, but, if you're after learning something new then learning how and why React does things will be an eye opener, particularly if you have experience with MVC and classical languages.

Angular 2 is new and still has some rough edges, little indication at this stage if it will be a success but, once you've waited for all that JS to load (which can take a while, there is a ton of it!) the render performance is still generally excellent. It's not a clean migration path from Angular 1 though and introduces even more concepts to learn, thankfully some of these are more generic than Angular 1 concepts so if you learn it, then ditch it, you'll still be able to take some learning with you to whatever comes next.

Seriously have a look at modules and npm, there are great tools out there now to give you access to commonJS in the browser. The browser module spec is coming which is basically commonJS, the style employed by node, browser 'native' modules are a little way off (despite hopes they would make it this year) but its worth learning and tools like Browserify, Webpack and Rollup can give you access to them today.

The ability to say "oh, I need to flatten an array, lets just include a module" i.e.

import {flatten} from 'lodash'

rather having to write a flatten function yourself is amazing sauce, plus, all these amazing techs you're looking to learn and leverage pretty much require it these days, or, at least, they greatly encourage it.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...