This is topic I want to make a client-server MMORPG in forum Books, Films, Food and Culture at Hatrack River Forum.


To visit this topic, use this URL:
http://www.hatrack.com/ubb/main/ultimatebb.php?ubb=get_topic;f=2;t=053652

Posted by Blayne Bradley (Member # 8565) on :
 
I'm in a 15 week telecommunications and web programming class this semester and our final project will be to make a multiplayer game, (chess connect4, othello) but I'm thinking if I start early enough with my lap partner we could probly make an MMO the only issues are I'm not sure where or how to start and what would be possible by 2 people in a 14 week period period give or take extensions.


My ambition: d20 based mmorpg with FF3/SNES sprites.

We'll be given a pretty good example on how the network protocols work so we'll know how to make a client-server program using Linux so the online part and the databasing part I understand and know somewhat how to do (postgres ftw) But I'm not sure how to go about in C++ to make a graphically pleasing game (even if it only encompasses moving around a room).

Here's a picture:

http://upload.wikimedia.org/wikipedia/en/c/cc/FFVITown.PNG
 
Posted by fugu13 (Member # 2859) on :
 
No, you can't make an mmorpg. You could make an online multiplayer (just try for 2 to start with) game, though it will be very clunky. You'll almost certainly want to make the mechanics much, much, much simpler than d20 (possibly just subsetting d20).

Are you required to use C++? You could almost certainly be more productive in another programming language, even if you had to learn it, too. For instance, pygame ( http://www.pygame.org/ ) is a very easy-to-use set of libraries for making games. It is well documented, and people routinely make simple games in it in under a week (indeed, there's a regular contest to do so). Whichever language you use, you'll probably use a platform based around the SDL ( http://en.wikipedia.org/wiki/Simple_DirectMedia_Layer ), unless you go windows-only and use DirectX
 
Posted by TomDavidson (Member # 124) on :
 
Blayne, learn to walk. There's no shame in it.
 
Posted by Blayne Bradley (Member # 8565) on :
 
I think I may be required to use C++ for the project, or a language that can be compiled and executed on a Linux server.

But yes by MMO I meant more like 2-3 people, the point of OOP is that once the foundations are done more functionality can be added later nu?

Also, I'm somewhat certain C++ is industry standard, if i can show "hey here's this game I made as my final project in College" as part of my portfolio it'll look good.
 
Posted by fugu13 (Member # 2859) on :
 
Learn that MMO does not mean 2-3 people, it means massive numbers of people.

And no, that is not the point of OOP. The point of OOP is (depending on who you talk to) the separation of internal functioning and external contract. There is nothing about OOP that will make it so a game built for two to three people can be easily expanded to thousands, hundreds, or even dozens.

A MMORPG requires architectural decisions that reflect the capabilities it will need to have from day one. MMORPG code bases are not just outgrowths of small online multiplayer game code bases.
 
Posted by fugu13 (Member # 2859) on :
 
It depends on what sort of game we're talking about, but many MMORPGs use a scripting language to define most of their functionality, and Python is one of the most common ones used. Another common language is Lua.

Sure, a lot of the core is written in C++, but a lot of the stuff most important to how the game works isn't. There's room for lots of different sorts of programmers.

A game company is going to be far more interested in you having made a good game than in you having made a good game using a particular language. Use languages that help you make the best games in a given situation.
 
Posted by Blayne Bradley (Member # 8565) on :
 
yes but for now, I'll double check with my professor but I'm 67% certain that I need to make it in C++ as my final.
 
Posted by King of Men (Member # 6684) on :
 
Did you post this over at Gamedev yet? It is really a classic of its kind, I feel convinced you'd be rated up for it. It's too rare these days that we get a proper "How do I make an MMROPG" thread in 'For Beginners'.

Look, any project where your 'only problem' is that you "don't know where to start" is too ambitious. Go make a networked Tetris clone, or something.
 
Posted by King of Men (Member # 6684) on :
 
quote:
Originally posted by fugu13:
Learn that MMO does not mean 2-3 people, it means massive numbers of people.

While this is true, I don't see any objection to Blayne making an ORPG, dropping both Massively and Multiplayer, for his class project. Apart of course from the fact that, as he says, he doesn't know where to start.

Although actually, how about the old code from your project last year, with the online chess? If it was working well enough that you passed, it must at least have some working client-server code in it.
 
Posted by fugu13 (Member # 2859) on :
 
The game is required to be multiplayer, but he does need to drop the 'massively' to have a semblance of reality.
 
Posted by Noemon (Member # 1115) on :
 
Maybe the first "m" in the thread's title stands for "minimally".
 
Posted by MrSquicky (Member # 1802) on :
 
First off, Tom's right. Blayne, you can't handle this. Even if you were a good programmer, at your level you wouldn't be able to.

Also, the purpose of this assignment is to get you to focus on and fully understand principles and techiniques of networking applications that will be transferrable to many different contexts. Focusing on different aspects is going to largely defeat this purpose.

---

Second:
quote:
The point of OOP is (depending on who you talk to) the separation of internal functioning and external contract. There is nothing about OOP that will make it so a game built for two to three people can be easily expanded to thousands, hundreds, or even dozens.
Scalability has always been one of the main benefits of OOP. Blayne got that one right.
 
Posted by fugu13 (Member # 2859) on :
 
Scalability is almost entirely orthogonal to OOP.
 
Posted by King of Men (Member # 6684) on :
 
Hum. I think you may be speaking of different kinds of scaling. OOP has no effect on the number of users you can have at any one time. But it's a reasonably effective approach in allowing you to add additional features. No?
 
Posted by fugu13 (Member # 2859) on :
 
Ah, I see. Here's my basic outline of position:

OOP is no more scalable in ability to add new features than any other well-structured approach to programming.

OOP is not of any particular benefit in scaling performance-wise.

Typical OOP approaches can cause significant problems when attempting to scale maximally in many areas (graphics, high communication overhead algorithms, et cetera), such that any OO code written for lower usage will have had to be rewritten nearly entirely from scratch to meet performance needs (and there's no reason it would have to stay OO).
 
Posted by MrSquicky (Member # 1802) on :
 
Properly designed OOP makes increasing the number of users on a system easier than many other alternatives, however, I was talking more about the second definition.
 
Posted by fugu13 (Member # 2859) on :
 
Many other alternatives, sure, but there are alternatives that are just as good (and sometimes work out better), such as functional, share-nothing, data-copying architectures.
 
Posted by Sterling (Member # 8096) on :
 
The sort of online games that used to be played on BBSs are much more within the realm of possibility. It's hard enough to do a single-person RPG in only fifteen weeks.
 
Posted by fugu13 (Member # 2859) on :
 
People have made single-person RPGs in one week during pyweek and other game development sprints [Wink] . They're usually not very long, but they're perfectly reasonable games.

Higher-level language with solid libraries for sprites and other interaction mean a programmer can focus on the mechanics of the game and pay less attention to the low level details.
 
Posted by scifibum (Member # 7625) on :
 
I'm gonna guess that the point of Blayne's assignment is not game mechanics, though. (Not that anyone said otherwise.) I think he is probably supposed to focus on how to maintain game state, keep users interface up to date, and handle inputs from more than one user. (And I probably just made myself look stupid since I've never built a multi player game.)
 
Posted by King of Men (Member # 6684) on :
 
A text-based and turn-based MUD might be a more reasonable project. But if it's web programming, I think you're thinking in the wrong direction anyway. How about a nice turn-based strategy game, with web browsers as clients? Then you don't have to mess about with any client code and can just go for game logic, game state, and presentation.
 
Posted by Sterling (Member # 8096) on :
 
quote:
Originally posted by fugu13:
People have made single-person RPGs in one week during pyweek and other game development sprints [Wink] . They're usually not very long, but they're perfectly reasonable games.

Higher-level language with solid libraries for sprites and other interaction mean a programmer can focus on the mechanics of the game and pay less attention to the low level details.

Well, yeah, and you can whip out a Neverwinter Nights module in a couple of days... But how many mechanics do you borrow before it becomes a question whether it's "your" game?
 
Posted by HollowEarth (Member # 2586) on :
 
Uh, since the this isn't a game making class, the game you choose to make is likely totally irrelevant. So you should choose something that that has enough to stress the network parts some (since you know, thats what the class is about) and that you otherwise can hit out of the park.

How awesome and fun to play it is are not things you should be concerned with unless they will be part of the grade. You need to have some focus on what's important, and steer clear of distractions. Frankly, if you have a full schedule of classes 14 weeks isn't a lot of time, when presumably you'll be learning new things relevant to this project as you move through the 14 weeks.

Also, WTF are you considering extension for now. You have more than enough time. You should be focusing on being done early and not thinking about things that you might need an extension for. If you think you'll need an extension to complete a project, don't choose that. That should be obvious, but apparently it's not to you.
 
Posted by fugu13 (Member # 2859) on :
 
Sterling: I'm not talking about borrowing the whole game engine, just using libraries that handle sprite draws/redraws and arrangement of the onscreen rendering, let you put callbacks on user input, that sort of thing. Physics, for instance, is left up to you.
 
Posted by Nighthawk (Member # 4176) on :
 
I think everyone else has covered this, but I find it necessary to mention that I have been a programmer for over twenty years and I have tried to write an MMORPG in the past. And it is a *monumental* undertaking.

I suggest you find something more down to Earth that both shows your programming ability and complies with the course requirements set forth. Do not over-engineer this as it will cause you more problems; the more complex the system, the more issues you're going to have with it. And issues, whatever they may be, are frowned upon by teachers.

Also, part of what they are trying to teach you subliminally is to follow the specifications of the task and do not over-engineer it unnecessarily. Do what you are told; nothing more.
 
Posted by Primal Curve (Member # 3587) on :
 
Blayne, why don't you scale back your ambitions for the class and start working on your MMORPG as a side project? I'm sure a lot of what you learn while creating the MMORPG in your spare time (and let's be honest, you've got a lot to learn) will translate well into future programming and networking classes and any designs you might have on becoming a professional game developer/programmer.

Trust me, I've too often been the victim of my own ambition for school projects. Sometimes it pays to just do the minimum required to get a good grade so that you have time to finish it. And really, this would cut into your own gaming time considerably.
 
Posted by Blayne Bradley (Member # 8565) on :
 
quote:
Originally posted by HollowEarth:
Uh, since the this isn't a game making class, the game you choose to make is likely totally irrelevant. So you should choose something that that has enough to stress the network parts some (since you know, thats what the class is about) and that you otherwise can hit out of the park.

How awesome and fun to play it is are not things you should be concerned with unless they will be part of the grade. You need to have some focus on what's important, and steer clear of distractions. Frankly, if you have a full schedule of classes 14 weeks isn't a lot of time, when presumably you'll be learning new things relevant to this project as you move through the 14 weeks.

Also, WTF are you considering extension for now. You have more than enough time. You should be focusing on being done early and not thinking about things that you might need an extension for. If you think you'll need an extension to complete a project, don't choose that. That should be obvious, but apparently it's not to you.

At the JAC CompSci deptartment it is unofficial policy that final projects are usually given a few extra weeks for completion as there is a few "months" after the final due date before the final grades are submitted to the provincial and federal governments.

Depending on the project scope its not uncommon for large final projects to be given plenty of leeway.

but anyways my final goals for a ORPG is simply 2 FF6 sprites, 1 room/town and the ability for 2 people on two different computers to control their repestive characters in relation to each other and walk around and see each other walk around.

With everything done in such a way that I can add on more functionality either (if time) as part of the project or (not time) afterwards as a side thingymajiggy.
 
Posted by fugu13 (Member # 2859) on :
 
Okay, Blayne, that's a doable goal.

I would suggest starting by defining your interactions in terms of contracts and state machines for each of the interactable 'entities' in your world: what information will be given, what constraints are there on the reaction to that information, what will the reactions be, and what information will be sent out as part of them.

Given a sufficiently strong model, this should not take very long. Just remember to keep state at the server, only take communications from clients as to what actions they want to take, validate those actions as legal, then push the new state of the world out to the clients.

You'll want to use tutorials like this one on how to use the SDL for sprites: http://cone3d.gamedev.net/cgi-bin/index.pl?page=tutorials/gfxsdl/index
 
Posted by Blayne Bradley (Member # 8565) on :
 
I picked up a new C++ book and a book on OpenGL (4th edtion superbible) I don't expect to apply OpenGL to it though I've been told its not hard to learn.

Looking through SDL in my spare time.

quote:

Did you mean to post this in your ORPG thread?

Which C++ did you pick up? The OpenGL book is a good read; the basics aren't too awful, though using it efficiently can be fairly complicated.

Good to hear you're reading up on the SDL.

Yes [Smile]

I picked up Sams Teach Yourself C++ in in One Hour a day.6th edition.

Im trying to mimic its font [Smile]
 
Posted by King of Men (Member # 6684) on :
 
Have you got any project milestones? Have you started, for example, on getting a basic input-response loop set up?
 
Posted by Sterling (Member # 8096) on :
 
quote:
Originally posted by fugu13:
Sterling: I'm not talking about borrowing the whole game engine, just using libraries that handle sprite draws/redraws and arrangement of the onscreen rendering, let you put callbacks on user input, that sort of thing. Physics, for instance, is left up to you.

I suppose with sprite and sound effects libraries to work with, a simple pre-arranged "rules" system for things like combat, and so forth, and *very* simple maps, it could be done. Assuming one didn't have to work on anything else for a week.

My own experience was that making an RPG from scratch was far more time-consuming than I expected. But then, I was making my own graphics.

And there are, no doubt, many better programmers than I.
 
Posted by fugu13 (Member # 2859) on :
 
Sterling: you can take a look at previous entrants in pyweek here: http://www.pyweek.org/. I think there're one or two RPGs that have been made, but it is mostly other sorts of games. Every single one was made in just one week, though.
 
Posted by Blayne Bradley (Member # 8565) on :
 
quote:
Originally posted by King of Men:
Have you got any project milestones? Have you started, for example, on getting a basic input-response loop set up?

I am reading through the SDL tutorials first before I come up with Milestones, I am also trying to pitch this to my assumed lab partner.

Once a few preliminary things are settled then I'll set milestones.
 
Posted by Blayne Bradley (Member # 8565) on :
 
Yatta! I got SDL successfully installed on my IDE!

Now to get it on Linux.

SDL woot!
 
Posted by Blayne Bradley (Member # 8565) on :
 
Nooooooo!

Damnit, i cant put SDL on my Linux account I lack the proper permissions, the good news is my professor will install it, the other bad news he said that about MySQL Sockets and hasn't finished that yet [Frown]
 
Posted by fugu13 (Member # 2859) on :
 
You should be able to do a local install of the SDL, then just point your linker at it.
 
Posted by Blayne Bradley (Member # 8565) on :
 
Don't know how to do that.
 
Posted by King of Men (Member # 6684) on :
 
Then learn. Makefiles are not magic.
 
Posted by fugu13 (Member # 2859) on :
 
KoM: you're telling me the One True Makefile isn't magic [Wink] ?

But yeah, Blayne, you need to learn how to do this sort of thing. Here's a hint to get you started: figure out what options ./configure for the SDL takes.
 
Posted by Blayne Bradley (Member # 8565) on :
 
--prefix=path?
 
Posted by fugu13 (Member # 2859) on :
 
Yes, that'll let you install it locally.
 
Posted by Blayne Bradley (Member # 8565) on :
 
But will it work right? if I use make/gcc to compile my code will it properly use the SDL headers?
 
Posted by Bokonon (Member # 480) on :
 
Ummm, why don't you try and find out for yourself?

-Bok
 
Posted by fugu13 (Member # 2859) on :
 
And maybe read the build scripts of some projects you've compiled that let you specify library locations.
 
Posted by Blayne Bradley (Member # 8565) on :
 
I haven't done any yet using Linux.
 
Posted by King of Men (Member # 6684) on :
 
A week ago, I heard my supervisor give this very wise advice to our new undergraduate: "Don't show me the code you've written and ask me if it looks all right; run the code and demonstrate that it works. You can't break the machine."

Run the dang script, Blayne. You can't break anything.

Now, this week, I discovered a very nice Leaky Abstraction in the RooFit library that's standard issue in HEP for doing log-likelihood fits to data. It turns out that if you ask for a binned dataset and don't specify the number of bins, the default number of bins in each variable is used. Which is one hundred. And if you carelessly put in four dimensions in such a request, the code will merrily try to allocate five arrays of size 100^4 = 10^8, for a total of something like 2 gigabytes of RAM requested. Causing the entire operating system to freeze up. On a computer that's on the other side of the country. Making it necessary to call your supervisor and humbly ask him to reboot it, since he's over there for a conference. And then to sit on the phone with you and reboot every so often while you do binary search through the code to find the offending line, because on the surface your code looks entirely innocuous and you have to dive quite deep into the library to find the offending memory allocation. Leading us to suspect a hardware problem in the drive my data was stored on.

But yeah, anyway. Run the code, don't sit about asking questions. The worst that can happen is that they make you reboot the computer personally.
 
Posted by fugu13 (Member # 2859) on :
 
You have computers with so little memory that asking them for 2 Gigs causes them to freeze up [Wink] ?

For that matter, it should just cause it to have a memory allocation problem . . . maybe it was actually managing to allocate, but the implementation has a high runtime computational complexity in data structure size?
 
Posted by King of Men (Member # 6684) on :
 
It's an old computer, suitable for grad students to bang about on. The symptoms were thus: ssh clients freeze, no response to keyboard inputs. The monitor, according to my supervisor, shows 'no input'. Other people are unable to log in to the computer. Running within a debugger has the same problems.

The precise mechanism of this eludes me, but I'm fairly convinced it was the allocation request.

Edit: Besides, 512 megabytes ought to be enough for anyone!

(The advantage of the intertubes is that, when an hour later you think of what you should have said, you can go back and insert it into the conversation. [Big Grin] )

[ September 17, 2008, 08:06 PM: Message edited by: King of Men ]
 
Posted by Blayne Bradley (Member # 8565) on :
 
quote:
Originally posted by King of Men:
It's an old computer, suitable for grad students to bang about on. The symptoms were thus: ssh clients freeze, no response to keyboard inputs. The monitor, according to my supervisor, shows 'no input'. Other people are unable to log in to the computer. Running within a debugger has the same problems.

The precise mechanism of this eludes me, but I'm fairly convinced it was the allocation request.

That happens whenever someone's script runs an infinite loop (my teacher is working on a script to kill that process before it kills the server)
 
Posted by TomDavidson (Member # 124) on :
 
quote:
my teacher is working on a script to kill that process before it kills the server
Since I can't imagine you guys need direct hardware access for any reason, why can't he just give you all your own separate instances and thus avoid a server crash in those situations?
 
Posted by Blayne Bradley (Member # 8565) on :
 
no clue. As far as I know there's 1 computer and we all have accounts that we log into remotely.
 
Posted by TomDavidson (Member # 124) on :
 
Yes. That's actually what I'm talking about. There are ways for him to configure that computer which would make it much harder for one of you to crash the entire thing.
 
Posted by King of Men (Member # 6684) on :
 
quote:
Originally posted by Blayne Bradley:
That happens whenever someone's script runs an infinite loop (my teacher is working on a script to kill that process before it kills the server)

I am not talking about a slowdown, here. An infinite loop would not freeze all ssh instances to the point of being unable to accept Ctrl-C to kill the process. I've seen a heavy-duty fit slow things down to where it would take thirty seconds to get around to your input, but this takes it to the next level.
 
Posted by Blayne Bradley (Member # 8565) on :
 
I am not talking about a slow down either, its the exact same, cant ctrl c, cant ctrl z, server essentially is crashed.
 
Posted by fugu13 (Member # 2859) on :
 
Yeah, it is pretty easy to configure any modern operating system (usually in several different ways) to prevent one user from interfering with the operations of the other users to the point of exclusion.

KoM: I have a hypothesis. It managed to allocate with virtual memory, but there was such a huge amount of swap it thrashed the hard drive completely, and anything that wanted to page out was screwed, so everything froze once it attempted to allocate even a little memory. That would pretty thoroughly explain your symptoms.
 


Copyright © 2008 Hatrack River Enterprises Inc. All rights reserved.
Reproduction in whole or in part without permission is prohibited.


Powered by Infopop Corporation
UBB.classic™ 6.7.2