Sign in to follow this  
Orteil

Browser-based MMORPG

Recommended Posts

Orteil    103
Hello everybody, I'm from France and I want to study art and become a game-designer.

I know there are loads of people around here who are all like "hey I'm gonna make the best MMORPG ever just tell me where I can download an MMORPG-maker" but I hope I'm not like those.
Well here we go : I want to create an MMORPG, playable in the browser, using PHP and MySQL and stuffs. I can learn a language quite fast, I can code in HTML, CSS, javascript and I used to make games in Basic. Now I'm learning PHP and MySQL and I don't know where I should start if I want to make a simple MMORPG... Can you please give me some hints ?
My game will be about a heroic-fantasy world (yes I know, that's so original) with a map with tiles, an inventory, and buildings built by players themselves (they'll need skills and wood/stone/whatever) - of course if that's a bit more than I can swallow I'll make something easier. The "special feeling" that'll make it cool is the graphics : I'm pretty skilled at Photoshop (you can look at my work here - I did it for an MMORPG where I'm only a player, and it has been implemented ^^) - BTW if anyone needs some game designer (not 3D) I can do it (if I can earn a few bucks it sure would be better !).

Share this post


Link to post
Share on other sites
Oguz286    100
What I would recommend is learning the basics of Object Oriented Programming (OOP). It's all about building large applications which consists of small block or objects. Let me give you a small example:

Let's say you have a few objects; Game, Database, Player etc.

The Game-object holds methods that control the game-logic. The Database-object containts methods to communicate with the database and the Player-object has all the information about the player(s).

I hope this tutorial will give you a better idea of what OOP is:

http://www.sitepoint.com/article/php-paging-result-sets

Now if you're wondering why you should bother building an OOP-framework for a game, the answer is simple. Because you're building with buildingblocks, it will be much simpler to add functionality, to maintain the code and to understand how it works. The buildingblocks are classes (which PHP supports) which contain everything that the object needs.

When you have the essential buildingblocks (classes) ready you can then make another class which starts the game and organizes the flow of the program. Now it may sound really complicated, but when you understand OOP you'll realize that it's perfectly suited for a MMORPG-application.

Conclusion: I think it would be best if you learn some OOP and build your application class by class. If you're not familiar with OOP it will be a bit more difficult when you start out, but once you know how to use it well, it will make your life so much easier ;)

Good luck!

Share this post


Link to post
Share on other sites
Zahlman    1682
Quote:
Original post by Orteil
Hello everybody, I'm from France and I want to study art and become a game-designer.


Lots of people seem to want to become a game designer, or at least think they do. Game design isn't really what most people think it is, though.

Quote:
I know there are loads of people around here who are all like "hey I'm gonna make the best MMORPG ever just tell me where I can download an MMORPG-maker" but I hope I'm not like those.


Well, you're not posting in Help Wanted, so that's a start...

Quote:
Well here we go : I want to create an MMORPG, playable in the browser, using PHP and MySQL and stuffs. I can learn a language quite fast, I can code in HTML, CSS, javascript and I used to make games in Basic. Now I'm learning PHP and MySQL and I don't know where I should start if I want to make a simple MMORPG... Can you please give me some hints ?


None of these technologies are really appropriate or relevant to MMORPG creation, except MySQL. If they were, you could find an example of an existing MMORPG using them ;) But consider, for example: what's the most advanced javascript usage you've seen on a webpage before? Now, compare that to what an MMORPG does on the client side - rendering 3D graphics at >30 FPS. See the mismatch? :) javascript and PHP are really mostly intended for minor manipulations of HTML, and HTML and CSS in turn don't even really count as programming languages - you can't *calculate* anything with HTML; it just describes how to present text. (Hint: it stands for HyperText *Markup* Language).

Quote:
My game will be about a heroic-fantasy world (yes I know, that's so original) with a map with tiles, an inventory, and buildings built by players themselves (they'll need skills and wood/stone/whatever)


In addition to being sarcastically "so original", this doesn't really describe anything. Of course you would need those things at least - I think you underestimate, by several orders of magnitude, just how many things would need to be decided for an MMORPG. You've barely described enough to *start* working on a *single-player* desktop game, hoping to work it out as you go along.

Hint: MMORPG stands for Massively Multiplayer Online Role Playing Game.

Putting something Online adds a whole other degree of complexity to something. Learn how to make something that works on one computer first.

Making something Multiplayer adds a whole other degree of complexity to something. Learn how to make something that works for one player first.

Making something Massive obviously is harder than not doing so ;) And it tends to interact badly with the Online idea, too. There are huge amounts of technological research that go into making these systems work.

Put bluntly: MMORPGs are developed by teams of tens to hundreds of people, funded by tens of millions of dollars, over a period best measured in years. This is why it's impossible not to be "like those other MMORPG-maker wannabes", except by giving up the idea entirely. To make it manageable by one person - even one of the most talented in the world - requires cutting the scale down so much that it can't possibly be called an MMORPG any more.

Quote:
of course if that's a bit more than I can swallow I'll make something easier. The "special feeling" that'll make it cool is the graphics : I'm pretty skilled at Photoshop (you can look at my work here - I did it for an MMORPG where I'm only a player, and it has been implemented ^^)


There is plenty of demand in the industry for artists, you know. If you have talent as an artist, there is no reason you should feel the need to prove yourself as either a programmer or a designer. Almost everyone is really good at something - noone's really good at everything.

Quote:
- BTW if anyone needs some game designer (not 3D) I can do it (if I can earn a few bucks it sure would be better !).


What do you mean "not 3D"? Graphics have hardly anything to do with the game design. Game design is about "what happens" in varying circumstances while playing the game.

Share this post


Link to post
Share on other sites
Talus057    127
Quote:
Original post by Zahlman
Quote:
Original post by Orteil
Hello everybody, I'm from France and I want to study art and become a game-designer.


Lots of people seem to want to become a game designer, or at least think they do. Game design isn't really what most people think it is, though.

Quote:
I know there are loads of people around here who are all like "hey I'm gonna make the best MMORPG ever just tell me where I can download an MMORPG-maker" but I hope I'm not like those.


Well, you're not posting in Help Wanted, so that's a start...

Quote:
Well here we go : I want to create an MMORPG, playable in the browser, using PHP and MySQL and stuffs. I can learn a language quite fast, I can code in HTML, CSS, javascript and I used to make games in Basic. Now I'm learning PHP and MySQL and I don't know where I should start if I want to make a simple MMORPG... Can you please give me some hints ?


None of these technologies are really appropriate or relevant to MMORPG creation, except MySQL. If they were, you could find an example of an existing MMORPG using them ;) But consider, for example: what's the most advanced javascript usage you've seen on a webpage before? Now, compare that to what an MMORPG does on the client side - rendering 3D graphics at >30 FPS. See the mismatch? :) javascript and PHP are really mostly intended for minor manipulations of HTML, and HTML and CSS in turn don't even really count as programming languages - you can't *calculate* anything with HTML; it just describes how to present text. (Hint: it stands for HyperText *Markup* Language).

Quote:
My game will be about a heroic-fantasy world (yes I know, that's so original) with a map with tiles, an inventory, and buildings built by players themselves (they'll need skills and wood/stone/whatever)


In addition to being sarcastically "so original", this doesn't really describe anything. Of course you would need those things at least - I think you underestimate, by several orders of magnitude, just how many things would need to be decided for an MMORPG. You've barely described enough to *start* working on a *single-player* desktop game, hoping to work it out as you go along.

Hint: MMORPG stands for Massively Multiplayer Online Role Playing Game.

Putting something Online adds a whole other degree of complexity to something. Learn how to make something that works on one computer first.

Making something Multiplayer adds a whole other degree of complexity to something. Learn how to make something that works for one player first.

Making something Massive obviously is harder than not doing so ;) And it tends to interact badly with the Online idea, too. There are huge amounts of technological research that go into making these systems work.

Put bluntly: MMORPGs are developed by teams of tens to hundreds of people, funded by tens of millions of dollars, over a period best measured in years. This is why it's impossible not to be "like those other MMORPG-maker wannabes", except by giving up the idea entirely. To make it manageable by one person - even one of the most talented in the world - requires cutting the scale down so much that it can't possibly be called an MMORPG any more.

Quote:
of course if that's a bit more than I can swallow I'll make something easier. The "special feeling" that'll make it cool is the graphics : I'm pretty skilled at Photoshop (you can look at my work here - I did it for an MMORPG where I'm only a player, and it has been implemented ^^)


There is plenty of demand in the industry for artists, you know. If you have talent as an artist, there is no reason you should feel the need to prove yourself as either a programmer or a designer. Almost everyone is really good at something - noone's really good at everything.

Quote:
- BTW if anyone needs some game designer (not 3D) I can do it (if I can earn a few bucks it sure would be better !).


What do you mean "not 3D"? Graphics have hardly anything to do with the game design. Game design is about "what happens" in varying circumstances while playing the game.


Could you maybe chill out? Youre being far more sarcastic and rude than you have to be. If you are sick of answering questions then please dont answer them because being rude isnt helping anybody.

Share this post


Link to post
Share on other sites
Zahlman    1682
Quote:
Original post by Talus057
Could you maybe chill out?


I am perfectly chilled out.

Quote:
Youre being far more sarcastic


I have said nothing sarcastic.

Quote:
and rude than you have to be.


I am not being rude. I am being blunt; there is a difference. I do not wish to waste the OP's time by imagining a slight hope for what is actually impossible.

Quote:
If you are sick of answering questions


I am certainly not sick of answering questions; I do tire of seeing certain questions on occasion, but I do leave things alone when I don't feel up to the task of an accurate reply.

Quote:
then please dont answer them because being rude isnt helping anybody.


I don't like to "pull rank", but my rating - established gradually over my years as a member of the forums - seems to indicate that a majority of people find me helpful and not rude.

Share this post


Link to post
Share on other sites
Hi Orteil,

I fear that Zahlman was right when he meant that PHP, HTML, MySQL and javascript would not work for an MMORPG (althought I thought about trying smaller games with this).

Anyway there is still Java (saying this amoung C++ gurus I should maybe duck and run) but for browser games Java is great (and not only for browser games). Its an completly object orientated programming language and, for my opinion, easy to learn with "quick" results (basics).

Because I have no expieriences in the professional business I just can repeat what I heard that often: concentrate on one field (in your case may arts) and if you are a pro there you can still get in another field (eg programming).

That does not mean your idea of a MMORPG in a browser died, just concentrate on arts (and why not design, its your idea, who should better know what should happen in the world than you). All I want to say is: think through the design, write down your ideas to share it with others and look for programmers willing to give you a small overwiew during the production of your game.

Also the hints of development from Zalman are a good idea (as far as I can say as an unpro). Start with creating the world on one computer for one player, then 2 players on one computer and then the network code.


Well, that is what I think.

Just because I am interested, how detailed are your ideas yet, our lets say your vision?

Share this post


Link to post
Share on other sites
pulpfist    528
Dont forget that Gamedev is the only place in the world where everyone started with C++ and everyone will come down on you if you dont recommend starting with Python.

Speaking of Python. Python could get you quite far in a persue to make a MORPG.
Since you are familiar with javascript, you might also consider using Java which has some nice features for browser based applications

Share this post


Link to post
Share on other sites
Harry Hunt    542
The main problem is that you're going to need a way to hold state on the server, and I'm not talking about a database because if you track the player positions in a DB and query it at regular intervals, you'll run into performance problems very quickly.
The way PHP or Python is normally used on the web isn't very suitable for that because they usually operate in a stateless kind of fashion.
What will actually work though is Java servlets.

Another problem is that with a javascript/AJAX kind of aproach, you're pretty much restricted to using the HTTP protocol which has a huge overhead over plain TCP/IP and it's also a connection-less protocol which means you'll waste a lot of time with TCP handshakes.

I think a combination that may actually work is Comet (HTTP-streaming) and Servlets (or really any kind of stateful server) but I can assure you that PHP + MySQL won't scale.

Share this post


Link to post
Share on other sites
Orteil, when you get something going I'd love to see you maybe start recruiting a small team in the Help Wanted section or you can also just look there for teammates. As far as game design, I can't help you much with the programming and I am too busy to do any art for you, but I really think you can go through with this if you learn enough.

Share this post


Link to post
Share on other sites
Sorry for the double post. But to be honest, despite YOUR experience it is very hard to make a game, never the less something as difficult as an MMORPG. And to do it by yourself is extremely difficult for even the best of the game designers. So I suggest you start with a smaller project and if you like it then you can build on that. If this isn't your first project or your first game, still an MMO is hard to make

Share this post


Link to post
Share on other sites
eedok    982
I've made a map editor in just javascript(unfortunately it only works in firefox properly), so I don't see how a MORPG wouldn't be feasible as an ajax application. Only problem with using javascript in a browser is it's SLLLOWWW. Plus I've found pygame and flash have less headaches than javascript for most game applications.

Share this post


Link to post
Share on other sites
Rhaythe    145
Quote:
Original post by Harry Hunt
What will actually work though is Java servlets.


Really not a bad idea. An EJB-fueled instance would be an idea, but anything that implements java.io.Serializable that can be written to secondary storage once passivated would be of much more use than a constant hammering of the database.

Share this post


Link to post
Share on other sites
Orteil    103
OK thank you everybody, but I guess you didn't really got my idea.
I meant I just wanted to develop a browser-based MMORPG, so I guess PHP is quite appropriate to this kind of projects. (I'm not a total noob, I know HTML is a markup language Zahlman !) And I can't develop a MMORPG that you need to download a client to play it because I'm on a Mac OS 9 and thus unable to make anything at all in C++ or stuffs like that. (if I could I would have learnt it !)
So the game I want to make is much more like this one ("oh dude ! that's so fr****ng not a game") and it uses PHP, MySQL and does not need Python, Java or Flash. (and why should I start learning Java "since I am familiar with javascript" ? I thought Java was far more difficult than javascript... and I agree with javascript not being useful when you make a MMORPG)

Thank you anyway !

Share this post


Link to post
Share on other sites
TheUnbeliever    963
I wouldn't patronise those who are far more knowledgeable than you in these matters. ;-) Antagonising the crowd does not incite useful responses!

I'm afraid that, in this area, you /are/ pretty much a 'total n00b'. I don't mean this in an offensive manner - everyone's a beginner sometime. For example, of course you can use C++ to develop for Macs. :-) I suggest that you take some of the good advice that has been given in this thread.

Share this post


Link to post
Share on other sites
Orteil    103
I tried to find a free Integrated Development Environment for Mac, but I couldn't find any.

I'll follow the advice made in the first answer then.

Share this post


Link to post
Share on other sites
longjumper    127
It's 2007, OS9 is pretty much non-existant at this point. C++ is also an older language than the languages you are describing using, so what you're saying is kind of backwards. Bear in mind, OS9 is no longer supported, it is not suitable for development, using it is... well, I didn't know anyone still used it.

You will really need get yourself a copy of OSX, which has a free and very powerful IDE. And that's not even advice, that's just the truth.

Share this post


Link to post
Share on other sites
Orteil    103
I know I need a MacOS 9, I've been asking to my father for 5 years or so, but we really haven't got the money. (I'll get a job this summer though)

Also, I admit I'm a "total noob". But I just made the first sketch of my MMORPG here (the dude will move when you click on the buttons on the right - his position is stored in a MySQL database) (yes, you CAN go out of the tiny map but don't get lost) (and everybody can access it at the moment - so the character may move even when you're just refreshing the page)

Share this post


Link to post
Share on other sites
jouley    805
[Just an aside: When posting links, be sure to include the full link, including "http://" or whatever is appropriate. That said, I think this is what Orteil was shooting for.]

Share this post


Link to post
Share on other sites
Promit    13246
MMORPG. The first M means 'massive'. Making an MMORPG, browser based or not, is probably well out of your reach.

Drop the first M, and an MORPG is perfectly feasible. I played this one for a while, developed by Cygnus_X who is or at least was around on GameDev. I would strongly encourage you to go purely text based for the first time around. Graphics are a pain, and doing stuff like moving around is really a good bit of work.

Your actual question was pretty vague, so I'll just start talking. You want to be fairly comfortable with databases, because the database is going to form the heart of all this. You don't need to get too deep into the real major stuff behind databases, because MySQL simply isn't capable of most of the things that real databases do. It's passable for this sort of thing though. (Hint: Do learn and understand foreign keys and foreign key constraints, and make sure to use InnoDB tables, not the mostly useless MyISAM tables.) Database storage can be unintuitive at first, because of the forced structure of tables -- a lot of tricks are very non-obvious. You'll be forced to pick these up as your game grows.

When it comes down to it, your PHP code is simply going to manipulate information in the database and send the results back to the user. So you're going to be doing a lot of queries back and forth, and the actual web side of things is fairly straightforward. (Hint: Read about SQL injections. You don't want to get hit by one. Really.) You'll also want to be able to manage logins properly, either through built in PHP sessions (which I personally hated) or manually through a cookie and the database.

The starting point would be the basic user architecture. Build a page that allows users to log in, see some basic info about themselves (placeholders are fine here), and log out. After that, you'll be able to begin building the actual game.

Oh, and it's really hilarious that you're using System 9. And by hilarious, I mean I really feel sorry that you're forced to use such a useless computer.

Share this post


Link to post
Share on other sites
Zahlman    1682
Quote:
Original post by Orteil
OK thank you everybody, but I guess you didn't really got my idea.
I meant I just wanted to develop a browser-based MMORPG, so I guess PHP is quite appropriate to this kind of projects. (I'm not a total noob, I know HTML is a markup language Zahlman !)


And I'm saying that (a) including markup languages in your listed skillset doesn't impress, if you are going to try to be a programmer; (b) the concept of a MMORPG being browser based simply *doesn't make any sense*, based on the mismatch between the public perception of what happens on screen when you play a MMORPG, versus what is possible in a browser window.

Quote:
And I can't develop a MMORPG that you need to download a client to play it because I'm on a Mac OS 9 and thus unable to make anything at all in C++ or stuffs like that. (if I could I would have learnt it !)


It is perfectly possible to compile and execute C++ code under Mac OS 9. I personally have done it under Mac OS 8.6, even. (Although it would probably be a better idea to get OSX and just use gcc.)

Quote:
So the game I want to make is much more like this one ("oh dude ! that's so fr****ng not a game") and it uses PHP, MySQL and does not need Python, Java or Flash. (and why should I start learning Java "since I am familiar with javascript" ? I thought Java was far more difficult than javascript... and I agree with javascript not being useful when you make a MMORPG)

Thank you anyway !


You can safely ignore that one; Java and javascript are actually nothing to do with each other - it's all the fault of marketing drones.

Share this post


Link to post
Share on other sites
Hodgman    51328
"PHP, HTML, MySQL and javascript would not work for an MMORPG"
"the concept of a MMORPG being browser based simply *doesn't make any sense*"
*cough*
http://games.swirve.com/UTOPIA/
*cough*

I'm actually working on a graphical browser-based "MORTSRPG" using xhtml/css/javascript(client side) and php/mysql/c++(server side) in my spare time (every third weekend). It's a big job, but it is possible.

Theres plenty of non-graphical MMORPGs on the net, like the one I posted above, and theres quite a few MMORTS games that are using google-maps for visualisation, or their own javascript rendering engine (like hyperion does).


If you want to go ahead with this project, I recommend you first make a non-graphical one (like the MMO's hosted at swirve.com), and dont try to make it an MMO, just make an MO ;)

After you've succeeded in making a basic non-graphical MO, then you will have a good grasp on all the technologies you need and will have learned lots of lessons from the mistakes you will have inevitably made, then you can safely move on to actually making a graphical presentation layer for a MORPG in a browser.

Share this post


Link to post
Share on other sites
Charabis    123
When you upgrade, you can grab XCode. I could swear there's an older one that would work on OS 9 called ProjectBuilder, but I could be wrong as to the OS requirement on it.

Share this post


Link to post
Share on other sites
SimonForsman    7642
Quote:
Original post by Hodgman
"PHP, HTML, MySQL and javascript would not work for an MMORPG"
"the concept of a MMORPG being browser based simply *doesn't make any sense*"
*cough*
http://games.swirve.com/UTOPIA/
*cough*

I'm actually working on a graphical browser-based "MORTSRPG" using xhtml/css/javascript(client side) and php/mysql/c++(server side) in my spare time (every third weekend). It's a big job, but it is possible.

Theres plenty of non-graphical MMORPGs on the net, like the one I posted above, and theres quite a few MMORTS games that are using google-maps for visualisation, or their own javascript rendering engine (like hyperion does).


If you want to go ahead with this project, I recommend you first make a non-graphical one (like the MMO's hosted at swirve.com), and dont try to make it an MMO, just make an MO ;)

After you've succeeded in making a basic non-graphical MO, then you will have a good grasp on all the technologies you need and will have learned lots of lessons from the mistakes you will have inevitably made, then you can safely move on to actually making a graphical presentation layer for a MORPG in a browser.


Utopia isn't a mmo in the traditional sense though, it doesn't have any direct interaction between players thus the way it works is closer to traditional play by email games,

It does have a massive number of players though but with only indirect interaction between players and a limited number of actions/day for each player they quite effectivly sidestep the technical problems.

The few web-based games i've seen that have featured direct interaction between players have been unable to support a massive playerbase (simply because of the massive bandwidth overhead required by the HTTP protocol).

Share this post


Link to post
Share on other sites
Zahlman    1682
Quote:
Original post by SimonForsman
Utopia isn't a mmo in the traditional sense though, it doesn't have any direct interaction between players thus the way it works is closer to traditional play by email games


Actually, since you mention it, I recall *several* such games from the late 90s (well, I didn't go to look at Utopia, but I assume I have a fairly good idea now that my memory is jogged :) ). Typically they would be heavily inspired by old BBS games such as Falcon's Eye, Barren Realms Elite etc. But this stuff predates even the common use of the term "MMORPG", even if it technically fulfills the requirements (except maybe the "role-playing" part - well, I don't know; some people get into this stuff more than others...). :s

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this