C++ Learning Community Forum
September 09, 2010, 07:50:40 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Hello. Smiley
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: My Idea  (Read 706 times)
cloudncali
Jr. Nerd
***
Posts: 45


View Profile WWW
« on: October 06, 2007, 02:11:30 AM »

OK this is my solution to a problem i have had

I have always wanted to make something multi player on line, nothing huge just something other people could play together.

Problem: my mom and Dad both refuse me to me to run a server in my house at all, plus that would be a crappy connection. I cant afford to pay for a decated server.

Solution: Use Perl/CGI off a web server to act as the server, use a java interface for the game, the CGI will do most of the server stuff AND communicate with the mySQL database, the communications will be via sockets.
so yeah just use my free web host(100webspace.com) to run the server script
here is a digram to show how this might work


sound like a good(or possible) idea?

Edit: oh and the reason i am using this instead of a serverlet or JSP is because i have had horable luck connecting to a mysql database with java
« Last Edit: October 06, 2007, 04:33:09 AM by cloudncali » Logged

draco
Geek
*****
Posts: 137


View Profile
« Reply #1 on: October 06, 2007, 05:55:19 AM »

Sounds like it'd be terribly slow... especially with 100webspace.
Logged
ih8censorship
Megalomaniac!!!
Administrator
C++ guru
*****
Posts: 1241



View Profile
« Reply #2 on: October 06, 2007, 06:10:39 AM »

Hm, well http sessions are kind of funny, they aren't as open of a connection as say a games server (unless you can keep the connection alive on the server without having it time out) so you'd have to make up some sort of cookie to handle session data. Then you'd have to work in something so cheating and data corruption would be harder, like with some say sha1 or md5 hashing of some sort. It would be interesting to know what sort of games could be powered by a generic web server, even if just a proof of concept thing Smiley

If your wanting to communicate to mysql via php, there are modules designed for that you know Smiley (well if they are installed...)
Logged

PC==perfect_companion

Knowledge cannot come packaged and predigested; it must be chewed over carefully before swallowed.

What have you tried?
C-Man
Does anyone even read this ?
Global Moderator
Dr. of C++ology
*****
Posts: 988



View Profile WWW
« Reply #3 on: October 06, 2007, 09:55:44 AM »

i'd go with peer to peer in this case, you couldn't really run your script in a loop or do much communication with sockets as only http ports are open and scripts have a timeout length (it gets killed after a certain ammount of time running) and yeah it sounds horribly slow
Logged

FrozenKnight
Extends without bound
Global Moderator
Dr. of C++ology
*****
Posts: 556


Do it yourself it's the only way to learn.


View Profile
« Reply #4 on: November 27, 2007, 09:30:20 PM »

it depends on your game but i would assume that a perl run server would be so slow and laggy no one would want to play it. you might want to find out your parents reasons they don't want to run a server. you may be able to find a loop hole.
Logged


Imagine the impossible, then make it happen.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!