Jump to content
  • Advertisement
Sign in to follow this  
DuroMentis

Network Ideas?

This topic is 4012 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello everyone, let me start by saying I'm a complete noob with networks, and I just wanted to ask a few questions on them. Alright so I had an idea for a game ( I dont want to say I'm making the game because I'm not sure if I ever will,this thread is strictly hypothetical), the concept is basically like The Sims Online, with a few twists, but those details aren't important. So I was thinking about it, and was wondering how I would afford all of the servers needed (once again if this ever did happen), which resulted with a question. Would this be possible at all: So, the player has a house, as do all players. Each player can navigate to other players' houses, and community areas. So I got to thinking on it, would it be possible to have the player host resident and community areas off their own computers? For example: Player 1 makes a house. This house is hosted by Player 1's computer. Player 1 can set the max amount of Players that He/She will allow to visit the house. Same with community areas. This is basically like an FPS for example. You can join a server. If the server is full you'll be denied. So is this possible? Or would every player have to open the ports on their firewalls? I'm assuming they would, but is there some alternative for this, some easier way? I highly doubt some one with minimum knowledge with computers would want to open ports if they fully understood the "risks". Any suggestions would be nice, again this is just for the sake of learning. However if it is at all infact possible, who knows? Time will tell. Thanks in advance!-Hayden

Share this post


Link to post
Share on other sites
Advertisement
Well, you're in luck.

A framework is being tested that will allow for just that, with almost no in-depth programming required.

It's in alpha, and currently in closed testing, but keep an eye on it. Once available, it'll make all of what you want possible.

Without any in-depth experience however, you'll have hard-time approaching such a project.

Share this post


Link to post
Share on other sites
Quote:
Original post by DuroMentis
This is basically like an FPS for example. You can join a server. If the server is full you'll be denied. So is this possible? Or would every player have to open the ports on their firewalls? I'm assuming they would, but is there some alternative for this, some easier way?


There's a good chance your average firewall will need ports opened -- they're meant to be paranoid. However, if they're software firewalls, they'll probably prompt the user if they want to open said port when your application tries to open a connection.

NAT routers are a bit of a different story. Many of them offer UPnP, which is designed to allow applications to request their router forward some ports to them. I know Azureus has an implementation of a UPnP client, and it's open source (even if it is Java) if you want to inspect source code...

There's another way for both: If you've got a 3rd party doing the matchmaking (i.e. your own servers), which basically involves convincing both clients that they're the ones doing the connecting. This can be blocked by a good, industrial quality firewall, but I don't believe they're intercepted by most home user hardware. Sadly, I forget what to google for this.

Share this post


Link to post
Share on other sites
Number one rule in networked games; NEVER TRUST A CLIENT. If you give each person the ability to run their part of the game on their own computer it means they can do what ever they want. It would be trivial to hack the game to give them the ability to buy anything they wanted, do anything that was possible in the game.

There is really no reason to allow them to run their own server for their house.

theTroll

Share this post


Link to post
Share on other sites
Well it's really no differen than how battle.net works (Diablo in particular)
Everyone can host their own games, with their locally saved characters, but they are all going to be modified cheaters.

On the other side, there are server-stored characters.. Where everything runs on the server for 'security'.

Which to be honest, i'm not sure is the case here, because the network connection of the host does matter.
Don't know what they are doing, but a server-char host definitly relies on the hosters network connection as well.

Reading my post, i realize i was not very helpful.
Sorry.

Share this post


Link to post
Share on other sites
Actually:

1) The players are saved on the server
2) Upon login the house/family is loaded
3) The player plays etc...

4) The player logs off
5) The game counts the objects and calculates their total value + cash currency avaliable.
6) The game increases this value with x wages * days(by time played) + a static moneytree value calculated on minutes played.
7) The game compares the value at load to the new total value.

If the client has more value than he is supposed to have, it is deducted in form of cash.
Failing that, new objects are forcibly removed and the player is saved.

Most likely i'd check it 'per square', with a max of 2-3 objects, not per-object, most important thing would be to ensure that no future client-exploits were developed, buffer overflows etc..


----------
Client side
----------
When a client connects to a host, the house-data etc is transmitted to the client, the client verifies that all objects are within their intended parameters (in the case of build hacks) and disconnects if an anomaly is found.

If people were to cheat with the 'happiness and desires', it could pretty much be ignored unless there was a ranking system involved.
It really just affects personal 'fun and challenge', no real effect on other players beyond statistics.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!