Welcome, Guest. Please login or register.
April 25, 2024, 10:00:28 PM

Login with username, password and session length

Search:     Advanced search
we're back, baby
*
Home Help Search Login Register
f13.net  |  f13.net General Forums  |  The Gaming Graveyard  |  Game Design/Development  |  Topic: Building/hosting a web-based MMO 0 Members and 1 Guest are viewing this topic.
Pages: [1] 2 Go Down Print
Author Topic: Building/hosting a web-based MMO  (Read 14089 times)
Samwise
Moderator
Posts: 19222

sentient yeast infection


WWW
on: April 15, 2011, 11:43:22 AM

I'm probably going to regret asking this here, but what the fuck.

So I'm looking at making a web-based MMO as a sort of hobby project.  Not planning to make money with it, so I'm not interested in spending lots of money on it.  I have a bit of web dev experience and am not scared of new technologies, but given the choice of wasting lots of time fucking around with someone else's broken shit and wasting lots of time reinventing wheels, I'll take the wheels.

My current leaning is to write the whole thing in Java with GWT, and host it on AWS with SimpleDB as the database.  If all that stuff works (and works well together), I think it'd meet my needs very nicely; AWS seems to have really nice pricing, and it seems like GWT would let me do lots of fun stuff with the interface without having to become a Javascript whiz.  On the other hand, I have no experience actually coding with GWT, and I'm a little worried that if I code my app around the AWS stuff then I'd have a hard time moving it to another environment (which may or may not ever be an issue).  Does anyone have any horror stories they'd like to share?

My second option would be writing something from the ground up that doesn't depend on anything more than LAMP, which has the benefit of being solidly in my comfort zone and being so generic that I'd have a lot of hosting options.  On the other hand, I might be making things more difficult on myself than I have to, and I'd probably end up with a relatively ugly Urban Dead-esque interface.

Okay, commence shilling for your favorite web technologies.  tongue

"I have not actually recommended many games, and I'll go on the record here saying my track record is probably best in the industry." - schild
Trippy
Administrator
Posts: 23621


Reply #1 on: April 15, 2011, 11:54:43 AM

Oh god not GWT. Debugging that crap is truly a nightmare -- the JavaScript it outputs is in effect obfuscated.

SimpleDB isn't such a good idea either since that ties you to Amazon AWS. Plus you may need to do queries more complicated than that key/value store can easily handle. Why not just use MySQL?
Samwise
Moderator
Posts: 19222

sentient yeast infection


WWW
Reply #2 on: April 15, 2011, 12:39:40 PM

The main attraction of SimpleDB would be not having to worry about setting up a MySQL server in my EC2 environment or whatever and then having one more thing that I'm on the hook for figuring out and maintaining.  I think the other issues are pretty easy to mitigate -- my app's not likely to be using the db for anything other than a simple data store anyway, and it'd be easy to take abstraction precautions to make porting after the fact easy if that were a big concern.  I think.

What sorts of issues have you had with GWT?  From my limited understanding of it, the JS is essentially compiled code (hence obfuscated), but if it works right you never have to look at it.  Does it often not work right?

"I have not actually recommended many games, and I'll go on the record here saying my track record is probably best in the industry." - schild
Trippy
Administrator
Posts: 23621


Reply #3 on: April 15, 2011, 01:18:56 PM

The main attraction of SimpleDB would be not having to worry about setting up a MySQL server in my EC2 environment or whatever and then having one more thing that I'm on the hook for figuring out and maintaining.
MySQL is trivial to setup on a Linux system with a decent package manager, e.g. on Debian/Ubuntu:

sudo apt-get install mysql-server mysql-client

Quote
What sorts of issues have you had with GWT?  From my limited understanding of it, the JS is essentially compiled code (hence obfuscated), but if it works right you never have to look at it.  Does it often not work right?
I've only worked with GWT in the context of adding functionality and fixing problems (or trying to) with somebody else's code. I already knew/know JavaScript so working through GWT was a pain in the ass. E.g. we ran into an issue with something not working right on Safari/Webkit that we could never figure out because the output JS code is virtually mpossible to work with.
Typhon
Terracotta Army
Posts: 2493


Reply #4 on: April 15, 2011, 01:37:37 PM

I fucking hate GWT for developing a straight-up web app.  JSF 2 is much more straight-forward for creating a basic web app.

That said, GWT's event driven model will probably be more suitable for what you are trying to do, where everything is events (and listeners to events) anyway.

You can turn on pretty javascript which makes it somewhat easier to debug.
Samwise
Moderator
Posts: 19222

sentient yeast infection


WWW
Reply #5 on: April 15, 2011, 03:54:56 PM

E.g. we ran into an issue with something not working right on Safari/Webkit that we could never figure out because the output JS code is virtually mpossible to work with.

See, that's precisely what GWT is supposed to prevent you from having to do.  I.e. fiddle with Javascript to fix stupid browser compatibility bugs.  The sense that I'm getting is that it's all lies.

So given that I don't have much interest in messing with any of that shit at all, the best option for me might be to just use straight up HTML forms, which have the benefit of working everywhere.  Correct?

"I have not actually recommended many games, and I'll go on the record here saying my track record is probably best in the industry." - schild
Trippy
Administrator
Posts: 23621


Reply #6 on: April 15, 2011, 03:56:43 PM

Depends on how you want your UI to work.

naum
Terracotta Army
Posts: 4262


WWW
Reply #7 on: April 15, 2011, 04:08:54 PM

I would dump the Java/GWT scheme , or even traditional Apache LAMP stack and go with Node.js -- Javascript server along with socket.io.

Real-time data chunks in/out instead of the page/response paradigm.

"Should the batman kill Joker because it would save more lives?" is a fundamentally different question from "should the batman have a bunch of machineguns that go BATBATBATBATBAT because its totally cool?". ~Goumindong
Samwise
Moderator
Posts: 19222

sentient yeast infection


WWW
Reply #8 on: April 15, 2011, 04:11:12 PM

Depends on how you want your UI to work.

If I were using GWT I'd probably be aiming at something vaguely similar to The West, with different floating windows to manage different gameplay tasks and live updates in response to server events.  But I'm pretty sure I could also make something functional with plain old HTML and reloading the entire page to reflect changes in game state.  (See Urban Dead.)  As long as the core game works and the interface isn't a giant pain in the ass I don't care that much how shiny it is.

I would dump the Java/GWT scheme , or even traditional Apache LAMP stack and go with Node.js -- Javascript server along with socket.io.

Real-time data chunks in/out instead of the page/response paradigm.

Um, what does that get me?

"I have not actually recommended many games, and I'll go on the record here saying my track record is probably best in the industry." - schild
naum
Terracotta Army
Posts: 4262


WWW
Reply #9 on: April 15, 2011, 04:15:45 PM

Depends on how you want your UI to work.

If I were using GWT I'd probably be aiming at something vaguely similar to The West, with different floating windows to manage different gameplay tasks and live updates in response to server events.  But I'm pretty sure I could also make something functional with plain old HTML and reloading the entire page to reflect changes in game state.  (See Urban Dead.)  As long as the core game works and the interface isn't a giant pain in the ass I don't care that much how shiny it is.

I would dump the Java/GWT scheme , or even traditional Apache LAMP stack and go with Node.js -- Javascript server along with socket.io.

Real-time data chunks in/out instead of the page/response paradigm.

Um, what does that get me?

Eliminates the suckiness of Java, replaces it with the power of a functional, higher order language, commonizes client/server libraries…

Better performance without non-essential pieces of the server stack, a framework more suited to socket level IO between client and server, written in a higher level language, using pre-built libraries or simply adding your own…


"Should the batman kill Joker because it would save more lives?" is a fundamentally different question from "should the batman have a bunch of machineguns that go BATBATBATBATBAT because its totally cool?". ~Goumindong
Samwise
Moderator
Posts: 19222

sentient yeast infection


WWW
Reply #10 on: April 15, 2011, 04:27:04 PM

Eliminates the suckiness of Java, replaces it with the power of a functional, higher order language, commonizes client/server libraries…

Better performance without non-essential pieces of the server stack, a framework more suited to socket level IO between client and server, written in a higher level language, using pre-built libraries or simply adding your own…

Is it going to make it easier to create a shiny UI?  If not, it really has nothing to do with replacing GWT, at least for my purposes.

Given that this is a small hobby project I don't think performance is going to be a huge concern.  If it ever got successful enough to be an issue I'd probably want to do a rewrite anyway.

"I have not actually recommended many games, and I'll go on the record here saying my track record is probably best in the industry." - schild
Trippy
Administrator
Posts: 23621


Reply #11 on: April 15, 2011, 05:09:42 PM

I would dump the Java/GWT scheme , or even traditional Apache LAMP stack and go with Node.js -- Javascript server along with socket.io.

Real-time data chunks in/out instead of the page/response paradigm.
Um, what does that get me?
Nothing. But you would be working with the latest server-side fad awesome, for real
Tarami
Terracotta Army
Posts: 1980


Reply #12 on: April 15, 2011, 05:12:32 PM

No, node.js is not what you're looking for. It has nothing to do with UI... it doesn't really have anything to do with anything you asked, but it's the "hotness" this week and will solve all your problems. Even the bad reception on your TV.

/snark

I would recommend using old-fashioned HTML and sprucing it up with jQuery and jQuery UI. It gets you 90% of the way (convenient floaty dialogs, ajax and so on,) removes virtually every cross-browser pain that comes from Javascript and is intuitive to learn and use. If you already know a bit of JS, you can improve your code and UI without having to learn an entire framework. You can just pick up bits here and there as you go.

For backend, use whatever you're comfortable with. I don't think any specific platform is going to make specifically game creation that much easier.

I guess my point is this: if your goal is to make a game and not just wank around with technology, use things you already know or aren't too much out of your way. It's kind of redundant to say, but there's time for productivity and there's time for experimentation and in my experience they rarely mix great (especially in a self-motivated project.)

Yes, I'm a such a bore.

- I'm giving you this one for free.
- Nothing's free in the waterworld.
Samwise
Moderator
Posts: 19222

sentient yeast infection


WWW
Reply #13 on: April 15, 2011, 05:17:59 PM

I guess my point is this: if your goal is to make a game and not just wank around with technology, use things you already know or aren't too much out of your way. It's kind of redundant to say, but there's time for productivity and there's time for experimentation and in my experience they rarely mix great (especially in a self-motivated project.)

No, I'm right there with you.  Hence wanting to ascertain whether any new bit of tech I pick up is actually going to save me time on making something.

I have very minimal JS experience and what I've done with it I've found painful (mostly just ugly little bits of AJAX copied and pasted from tutorials to implement "click here to expand" stuff on wiki pages).  How much am I going to like/hate jQuery?

"I have not actually recommended many games, and I'll go on the record here saying my track record is probably best in the industry." - schild
Trippy
Administrator
Posts: 23621


Reply #14 on: April 15, 2011, 05:21:19 PM

jQuery is nice and it will make a lot of UI stuff a lot easier (with jQuery UI mentioned above) but it is still JavaScript. If you don't like working with it that's still going to be a pain point.
Tarami
Terracotta Army
Posts: 1980


Reply #15 on: April 15, 2011, 05:27:56 PM

Well, as an example, this is jQuery asyncronously loading the response from a page with some querystring parameters into a DIV id'ed "myDiv" every 5 secs (like an updating status window:)

Code:
var myTimer = setInterval(function() { 
    $('#myDiv').load('/mypage.php', { id: 15, junk: 'abc' });
}, 5000);

Trippy is right, though - JS is JS. My experience is however that it's better to be relatively close to barebone JS because the frameworks are really, really leaky and not at all existing in harmony with the DOM. GWT, ZK and their ilk treat JS/HTML as problems and try to solve them using more HTML and more JS. It's, quite frankly, going so-so.

Edit:
Syntax error...
« Last Edit: April 15, 2011, 06:08:39 PM by Tarami »

- I'm giving you this one for free.
- Nothing's free in the waterworld.
Samwise
Moderator
Posts: 19222

sentient yeast infection


WWW
Reply #16 on: April 15, 2011, 05:42:28 PM

Hm.  Seems like it might be worth playing around with.

"I have not actually recommended many games, and I'll go on the record here saying my track record is probably best in the industry." - schild
Lantyssa
Terracotta Army
Posts: 20848


Reply #17 on: April 15, 2011, 07:22:23 PM

I use mostly php/html with javascript to handle events.  Really depends what kind of responses from the server you need though.

Hahahaha!  I'm really good at this!
Margalis
Terracotta Army
Posts: 12335


Reply #18 on: April 15, 2011, 09:08:42 PM

Just learn Javascript. It isn't hard, and you're going to have to know it to really make anything anyway.

vampirehipi23: I would enjoy a book written by a monkey and turned into a movie rather than this.
Viin
Terracotta Army
Posts: 6159


Reply #19 on: April 15, 2011, 09:36:06 PM

How about Flash/Flex? They are pretty friendly and powerful, but won't work on the iPhone!

- Viin
Krakrok
Terracotta Army
Posts: 2189


Reply #20 on: April 15, 2011, 10:11:34 PM

http://www.slideshare.net/amittmahajan/rapidly-building-farmville-how-we-built-and-scaled-a-1-facebook-game-in-5-weeks

Flash <-> Apache/Nginx <-> PHP <-> MemCache <-> MySQL

To scale:
Flash <-> HAProxy <-> Apache/Nginx <-> MemCache <-> MySQL and a CDN to offload static content.

Nginx is suppose to take less RAM than Apache. For any AJAX all you really need is jQuery. Flash compiles to Android and iPhone (theoretically) with little to no changes. The reason you use PHP is that most APIs (like payment processors, offer walls, stats packages, auth APIs, etc.) all support native PHP libraries. And I'm a ASP.NET person.

Hosting services like Slicehost let you roll your own cloud using the above software.


Player.IO looks like it has a pretty cool solution too though:
http://playerio.com/

« Last Edit: April 15, 2011, 10:13:55 PM by Krakrok »
Tarami
Terracotta Army
Posts: 1980


Reply #21 on: April 16, 2011, 04:50:49 AM


- I'm giving you this one for free.
- Nothing's free in the waterworld.
Xanthippe
Terracotta Army
Posts: 4779


Reply #22 on: April 16, 2011, 08:26:22 AM

I hope you're making a zombie game.
Samwise
Moderator
Posts: 19222

sentient yeast infection


WWW
Reply #23 on: April 16, 2011, 01:24:31 PM

I hope you're making a zombie game.

Confirmed.    Once my "design doc" is a little more fleshed out and I'm in a particularly masochistic mood I'll share a link to it.

Player.IO definitely looks worth checking out...

"I have not actually recommended many games, and I'll go on the record here saying my track record is probably best in the industry." - schild
Ironwood
Terracotta Army
Posts: 28240


Reply #24 on: April 16, 2011, 11:36:31 PM

I'm genuinely interested in this and wish to subscribe to your newsletter.

"Mr Soft Owl has Seen Some Shit." - Sun Tzu
Samwise
Moderator
Posts: 19222

sentient yeast infection


WWW
Reply #25 on: April 19, 2011, 06:04:00 PM

Player.IO looks like it provides a pretty good framework for making "instanced" multiplayer web games, but isn't really built for a persistent world sort of thing.  Which is a shame because the integration with Facebook and payment systems would have been handy.

"I have not actually recommended many games, and I'll go on the record here saying my track record is probably best in the industry." - schild
Krakrok
Terracotta Army
Posts: 2189


Reply #26 on: April 19, 2011, 07:50:15 PM

Their BigDB doesn't work for that? Seems like what you would need to do it would be a Server client which connects to their stuff and performs server side actions on the data.


You can probably mix and much which features you want to use out of the API.

MochiMedia has a payment solution too (and a developer fund aka free money):
http://www.mochimedia.com/developers/coins.html


I don't use any of them because I don't like having to rely that much on a third party for the database.
Samwise
Moderator
Posts: 19222

sentient yeast infection


WWW
Reply #27 on: April 20, 2011, 08:19:47 AM

Their BigDB doesn't work for that? Seems like what you would need to do it would be a Server client which connects to their stuff and performs server side actions on the data.

It'd be doable, but I wouldn't really be using their framework.  Basically I'd build a "single player" game that used their database to share data with a bunch of other "single player" game instances.  Which means I couldn't use their built in chat stuff, for example.  And I'd also be concerned that since their database is meant for infrequent and lightweight tasks like saving high scores, it's not going to hold up well if I need to poll it constantly to get information about the game world.

"I have not actually recommended many games, and I'll go on the record here saying my track record is probably best in the industry." - schild
Salamok
Terracotta Army
Posts: 2803


Reply #28 on: April 26, 2011, 08:05:53 PM

Here are my votes:

No on nginx: It is probably a better option than apache if for serving static files but for something more dynamic like a game it isn't worth the extra pain to set up and configure.  

No on node.js: node.js is geared towards developing web services which could be useful in some sort of distributed approach but that doesn't sound like the approach you are going to take.

No on Java: Wrapping things in 50 layers of abstraction might be good for re-usability and maintenance but it generally doesn't lend itself to snappy response times or quick development.  Also for a 1 man crew a KISS imperative approach is going to be the way most likely to get you to a playable state quickly.

Yes on either jQuery/jQuery UI or Flash: This really is a major fork in the road and you will most likely want to use one or the other but not both.  Going with flash means learning actionscript and climbing into bed with adobe but you wont have to learn very much else as almost the entire thing can be done inside flash.  Personally I think jQuery/jQuery UI is a more flexible and desirable skill set for web development in general though, jQuery eliminates many of the browser compatibility issues and makes AJAX extremely simple, plus the UI library has tons of cool snazzy effects.  If this were any other web project but a game i'd toss Flash out on its ass.

Yes on MySQL:  MySQL is free, easy to set up, easy to use, well documented and stable.  There are better choices out there for a professionally developed MMO but you aren't building WoW and MySQL will do what you need it to do.

Yes on the LAMP stack:  If you are already comfy here then there isn't any reason to look elsewhere. If you go the Flash route you won't be doing much of the actual game here anyhow.

edit: If you do go with the LAMP stack I can't recommend using linode enough, for $20 a month you get a pretty nice VPS.  If you are not paranoid about security and are fine with rolling out on someone else's scripted install their stack scripts are nice.  If you are paranoid or do want to do it all yourself the linode library has some of the best step by step guides I have run across.   Also since it is a VPS and not a shared host you can easily go with LEMP, LEPP, LAPP, etc... variations, you lose cpanel but it is a crutch you are most likely better off w/o anyhow.

« Last Edit: April 26, 2011, 08:14:25 PM by Salamok »
tazelbain
Terracotta Army
Posts: 6603

tazelbain


Reply #29 on: April 26, 2011, 08:15:55 PM

Maybe I am reading this wrong but it seems you can go flash without Adobe.  http://flixel.org/

"Me am play gods"
Salamok
Terracotta Army
Posts: 2803


Reply #30 on: April 26, 2011, 08:20:22 PM

Maybe I am reading this wrong but it seems you can go flash without Adobe.  http://flixel.org/

You are still dependent on their player, there are alternatives to that but they are ones that 99.9999% of your users have never heard of, much less have installed.
Samwise
Moderator
Posts: 19222

sentient yeast infection


WWW
Reply #31 on: April 28, 2011, 10:35:58 AM

Yeah, I've pretty much settled on LAMP / JQuery, and some kind of cheap LAMP-ready VPS once I get it to the point of putting it out on the interweb.  Big benefit of doing everything generic-like on the server side is that I can do most of my development locally rather than having to code around some cloud-based thing, and not have to worry about finding hosting until I actually have something playable.

Reckon my next step is to brush up on MySQL, as my experience with it so far has been limited to tweaking existing systems rather than coming up with a  schema and figuring out how to handle concurrency and all that.

"I have not actually recommended many games, and I'll go on the record here saying my track record is probably best in the industry." - schild
Soln
Terracotta Army
Posts: 4737

the opportunity for evil is just delicious


Reply #32 on: June 06, 2011, 04:29:13 PM

any updates?  curious how that set up was working (MySQL+LAMP+JQUERY)
Samwise
Moderator
Posts: 19222

sentient yeast infection


WWW
Reply #33 on: June 07, 2011, 01:39:08 AM

Haven't actually written anything yet, but I am half-assedly poking through documentation.  If anyone has any favorite online tutorials for MySQL I should look at, that'd be swell.  I'm particularly interested in learning about row-level locking semantics, handling/avoiding deadlocks, that kind of thing.

"I have not actually recommended many games, and I'll go on the record here saying my track record is probably best in the industry." - schild
WindupAtheist
Army of One
Posts: 7028

Badicalthon


Reply #34 on: June 08, 2011, 02:47:47 AM

So what's your theme/concept for this?

"You're just a dick who quotes himself in his sig."  --  Schild
"Yeah, it's pretty awesome."  --  Me
Pages: [1] 2 Go Up Print 
f13.net  |  f13.net General Forums  |  The Gaming Graveyard  |  Game Design/Development  |  Topic: Building/hosting a web-based MMO  
Jump to:  

Powered by SMF 1.1.10 | SMF © 2006-2009, Simple Machines LLC