ONline-Game programming - need advice.

Questions regarding game mechanics and graphic programming should go here.

Moderators: Darobat, RecursiveS, Dante Shamest, Bugdude, Wizard

ONline-Game programming - need advice.

Postby wakish » Thu Aug 17, 2006 5:06 am

I need some advice or help or guidance on how to go about making online-games..
I'm trying to google for it, but i haven't yet come across something (like a free tutorial) to get me started from scratch..(assuming i know programming).
There are many stuffs in making real games, but not on "online-game"..

Can anyone help me in this regard, please?
Thanks!
User avatar
wakish
 
Posts: 98
Joined: Thu Sep 29, 2005 5:30 pm
Location: Mauritius

Postby MXP » Thu Aug 17, 2006 6:48 am

What questions do you have?
Need information on a function I've posted? Chances are it's at the MSDN.
MXP
 
Posts: 6506
Joined: Mon Sep 22, 2003 5:27 pm

Postby wakish » Thu Aug 17, 2006 6:55 am

well, first of all, i would like to know where and how to start...
I'm still googling..but still not yet come across any tutorial who really guides and explains that about online-games.. :(

Note By:
=> I'm trying to focus on Browser Text-Based online-games..
User avatar
wakish
 
Posts: 98
Joined: Thu Sep 29, 2005 5:30 pm
Location: Mauritius

Postby Wizard » Thu Aug 17, 2006 1:12 pm

That's really, REALLY vague, so you get an equally vague answer :p

1) Find a server that supports some kind of server side coding
2) learn whatever language that may happen to be
3) some kind of sql server would also be nice
4) design everything as if it were not an online game, except that most of the storage is actually done on a different server
5) write the code

Got any specific questions, or will that do?
User avatar
Wizard
Site Admin
 
Posts: 3226
Joined: Mon Sep 22, 2003 4:52 pm
Location: ON, CA

Postby wakish » Fri Aug 18, 2006 3:13 am

@wizard:
My question was very vague because i'm new to "GAME PROGRAMMING" and specially to online-game programming since these two have each there own world..and i was expecting some guidance as where and how i should start..
Hence i don't see how i should be specific when i don't even know the surface or structure of this new horizon!!

Anywayz, seems like i have knocked at the wrong door this time!!

Regards!
User avatar
wakish
 
Posts: 98
Joined: Thu Sep 29, 2005 5:30 pm
Location: Mauritius

Postby Wizard » Fri Aug 18, 2006 11:05 am

Oh, not the wrong door at all, it's just going to take longer to get to the root of what you need than you're hoping. Asking how to start in a genre is beyond vague, it's downright impossible to answer. "How do I write a business application" is just as impossible to answer, until you get "what business, and what application?" Just as "how do I write a video game" needs to start with "what kind of game, and how will it be played?"

The first thing you always need is a top level design. You've said "browser based" and that's a good start. Fill in my other questions (about server side scripting and SQL server, or if you even need some permanent storage) and try to come up with others that are obvious:
people interacting in real time? turn based? don't necessarily interact at all but do compete against each other for points?

I don't know what you mean about online game being a different world from offline gaming. Alot of online games started out as standalone, and were enhanced to get some of their data from a different server, so they're not so different at all. At the least, the logic flow is often the same, even if a lot of the specifics change.
You could learn to use flash or AJAX and keep everything client side, except for a regular update of information from other players.

There are literally hundreds if not more sites devoted to starting in game programming. If you really want to plow right in, I recommend http://www.gamedev.net. Do a search for "online gaming" and you'll find more than one article devoted to the problems of, introductions to, and general joys of said search.

Just one more caveat, if I may. You seem to have this "if I could just see how to start, I could do it" mentality. There's a really big problem in that, mostly because I know 3 game designers personally, not counting myself, and not a one of us starts in the same way. Could just be me and my weirdo friends, who knows.
However, games aren't like business aplications, where the logic has already been laid out by decades of by-hand improvements. You need to make a lot of mistakes before you find a way of thinking about the entire process that works for you. And as new technologies come along, those processes are going to change.

I didn't mean to sound so putoffish, but as I said, you really
User avatar
Wizard
Site Admin
 
Posts: 3226
Joined: Mon Sep 22, 2003 4:52 pm
Location: ON, CA

Postby wakish » Sat Aug 19, 2006 8:11 am

HI wizard.. just read your msg..yeah, glad to see i'm not at the wrong door. ;)

First of all, could you please try to explain what you meant by this:
Wizard wrote:You seem to have this "if I could just see how to start, I could do it" mentality. There's a really big problem in that

I have not well understood what you wanted to point.. I'm taking it positively, don;t worry :)

OK, i have tried to grasp your "questions"..
So, here is what i have understood:
1) Need a programming language to code - this can be anything...like Java or C++?
2) Need a server-side scripting languages - will PHP and MySQL be good here?
3) Need a hosting server - i have found a free such hosting services like http://www.janhost.com/
4) Browser interface - Html,css..etc..

Did i get the plan ok till now before i ask more questions?

Note:
For the hosting service, this is just for my testing purposes right now ;)
I'm aware that to run an online-game this is NOT good!

Thanks for time and help,
wakish
User avatar
wakish
 
Posts: 98
Joined: Thu Sep 29, 2005 5:30 pm
Location: Mauritius

Postby t i l e x » Sat Aug 19, 2006 10:56 am

In the worst case scenario, you can use your computer as the host if you only plan to play your game with friends.
User avatar
t i l e x
 
Posts: 3604
Joined: Wed Dec 03, 2003 3:59 pm
Location: Québec (Canada)

Postby Emery » Sat Aug 19, 2006 5:40 pm

1) Need a programming language to code - this can be anything...like Java or C++?

It could be about anything but would change the game entirely. If it was a Java applet you could play it in a browser but that's a poor choice especially for a game. Look at runescape. It could be C++ but that wouldn't be for a browser based text game. For that you'd have to find a host that allows exes (I don't know of any). Most likely you'll use PHP.

2) Need a server-side scripting languages - will PHP and MySQL be good here?
This is the same as question one. If it's browser based then your programming language will actually be a scripting language and of course you need a database too, MySQL is the industry standard.

3) Need a hosting server - i have found a free such hosting services like http://www.janhost.com/
It's nearly impossible to find a free host that supports PHP and MySQL. You would in fact be better off running your own server, developing on that, then you upload to a high speed pay-server for final releases. This is what most web developers do. You don't want to have to FTP a file every time you make a change to do the same thing as compiling in C++. You just save it and refresh the page in your browser. You can do this when you're running your own Apache server. If it's just a text based game though your connection at home should be more than you need and you won't have to pay for any hosting.

4) Browser interface - Html,css..etc..
Server side scripts output the markup. Yeah you have to do designing too.

Did you mention a browser based game just because you thought it would be easier? It might be overall easier than a C++ game if you have experience with both, but if you've never done web developing you will have to learn it all from the ground up.

If you ask me the best internet based game to begin with would be a telnet based MUD. The client is just telnet so you only have to make a server, and it teaches you how to manage many clients and all the concepts of a game without a lot of the busy work.
--~~~~
User avatar
Emery
 
Posts: 4313
Joined: Sat Mar 19, 2005 9:16 am

Postby Jimbo » Mon Aug 21, 2006 6:25 am

wakish wrote:2) ...

PHP and MySQL will work, but if you have some freedom, do shop around. this page has a chart comparing several server-side scripting languages (ok, just CGI, PHP, ASP, and JSP). I don't know how they ran the test, but it was the first page I found that had a comparison. I'd heard JSP was faster than PHP somewhere else, but couldn't remember where.
User avatar
Jimbo
 
Posts: 601
Joined: Thu Sep 25, 2003 6:48 pm
Location: Seattle

Postby Emery » Mon Aug 21, 2006 7:51 am

IMO, PHP will be the easiest if you are a C++ programmer since it's like 90% C++ with some Perl thrown in and a huge standard library. Not to mention that it's more commonly supported by hosts than any of the alternatives. There's a lot of stuff about PHP that I can't stand (namely the lack of namespaces), but I still think it kills JSP, ASP, and Perl (I can't stand all of the intrinsic stuff in Perl instead of just standard functions).
--~~~~
User avatar
Emery
 
Posts: 4313
Joined: Sat Mar 19, 2005 9:16 am

Postby wakish » Mon Aug 21, 2006 10:04 am

Hello everyone..
First of all, i want to say a big THANKS to all the people who have put some light in my "dark tunnel"..specially to Jimbo and RITZ..

@RITZ:
-I choose "browser text-based" game, since i like the idea of designing web-pages..etc and i have a special feeling for these types of online game
- http://www.janhost.com/ do support both PHP and MySQL, is it?..have a look ;)
- Yeah, i'm more used to C/C++.. but also some Java(which i'm trying to learn more these days) and i have hovered over PHP too and it seems nice at first glance.. ;) (and this start is definetly going to start from here)


@Jimbo:
- Thanks alot for sharing that link man!
- So, basically, all these are possible only with just a combination of PHP/MySQL?

In general:
- When you do such a game, i will have to code the game (perhaps in PHP), it's database (MySQL) and the web-interface(Html, css, php..) sepately and then i will have to do a kind of connection between these..rit?
- Besides, i know there is a WHOLE LOT of work and research to do for this purpose..but as it goes, everything should have a start from somewhere ;) (and this start is definetly going to be from here..)

Keep the help coming people..

My heart-felt thanks,
wakish
User avatar
wakish
 
Posts: 98
Joined: Thu Sep 29, 2005 5:30 pm
Location: Mauritius

Postby Emery » Mon Aug 21, 2006 10:24 am

Websites don't usually work like that. The markup is not seperate from the scripts, it may be semi-seperated on the server with templates, but scripts actually output the resulting markup. When you request viewtopic.php in phpBB here it gets the t variable from the URL for the topic id, grabs the topic information from the MySQL databased with that id, and outputs the information correctly using the template files by reading them in and replacing sections. It's all about text parsing with web development.

About the host, it doesn't matter, it's still a better idea to have your own server so you don't have to FTP every single time you want to test a change. Imagine if with C++ you had to FTP upload every file you ever changed before you could compile it and see your errors. With your own server you just resave the file and refresh the page in your browser. Plus I bet there is a hidden catch to that offer.
--~~~~
User avatar
Emery
 
Posts: 4313
Joined: Sat Mar 19, 2005 9:16 am

Postby Wizard » Mon Aug 21, 2006 12:35 pm

The catch is that they hit you with "clean text-based advertisements" on every page.

This sounds like a good place to learn a bit of lingo. Look up "model view controller"
It's basically a setup whereby you keep your data, your data manipulation, and the display all seperate. Generally a bad idea for games because of overhead, but a web based text game seems like an excellent usage of it. Most forums (including phpBB like this one) use this setup.
It's especially easy because, instead of trying to interweave logic and display, you build the logic and display in seperate modules. This lets you change the way things are displayed (like adding extra features like a Quick Reply box ;) ) without changing code.

Anywho, these technical details are to help you determine what your game should and should not be capable of doing. You need to use that understanding to start fleshing out details of your game, specifically how data and code will interact, that sort of thing.
User avatar
Wizard
Site Admin
 
Posts: 3226
Joined: Mon Sep 22, 2003 4:52 pm
Location: ON, CA

Postby Emery » Mon Aug 21, 2006 12:42 pm

Smarty is a decent template engine.
--~~~~
User avatar
Emery
 
Posts: 4313
Joined: Sat Mar 19, 2005 9:16 am


Return to Games and Graphics

Who is online

Users browsing this forum: Google [Bot] and 1 guest