Jump to content

  • Log In with Google      Sign In   
  • Create Account


Basic question making a singleplayer game multiplayer


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 Mhez   Members   -  Reputation: 108

Like
0Likes
Like

Posted 28 August 2012 - 12:29 PM

Hi!

Well I just started studying some programming languages and I have some projects in mind, I don't want to start with a big thing, just something simple and fun, but in the future I would like to make some multi player projects.

So, I want to know if it is possible to make a single player game, and then turning it to online multi player once I have experience programming. If so, which are the recommended programming languages for doing it (I want to make a 2d online game, something like Don't Starve but kind of a mmorpg)

Also, I would like to know is it is possible to make a hack&slash game like old 2d Zeldas but multiplayer, I know almost everything is possible knowing how to do it, but I haven't seen a lot of quality online games like that, so I wonder if it is just not possible or too difficult.

Thanks! Sorry for my English Posted Image

Edited by Mhez, 28 August 2012 - 04:49 PM.


Sponsor:

#2 0BZEN   Crossbones+   -  Reputation: 2002

Like
0Likes
Like

Posted 29 August 2012 - 05:45 AM

You can make most single player games multiplayer, however you have to be really careful how you approach your single player game structure. It is far easier to turn a multiplayer game into a single player game that vice-versa (think Left 4 Dead, that kind of stuff).

For example, how would you approach a player picking up something in the world, in the context of a multiplayer game. After all, you could have two players wanting to pick it up.

You can start with a server-client approach, which is by far the safest (versus peer-to-peer, where each player does whatever it wants). The server manages every objects (creation, destruction, updates, interactions), clients are basically just remote terminals that send requests to the server (request_pickup(health_pickup), request_pickpocket(jim_bob), ...). Think of it as a M.U.D., but not using console inputs ("walk_left", "walk_right", "pickup health", "eat rope"), but the game itself and player controls. It however requires you to structure your game accordingly.

Objects communicate with each other via messages (jim_bob->send_message(health_pickup, REQUEST_PICKUP), health_pickup->send_message(jim_bob, GIVE_HEALTH, 25)). That makes it easier to interact in a multiplayer environment.

Secondly, it gives you an opportunity to abstract the network layer (bascially 'simulate' how a real network would behave like). You can introduce random latency in your message delivery (put messages in a holding queue). You wouldn't want to do such a messaging system with out of order delivery, or considering packet loss though, so you can start with the assumption that messages will only get delayed arbitrarily, which is what TCP will give you.

The rest would be fighting problems inherent to networked games. In a gameplay perspective, it's mostly latency. You may want to look into lag compensation, client-side prediciton to reduce the impact of variable latency on the player interactivity. But packet loss, packets out of order, packet duplications, connectivity, all that jazz can be dealt with at the lower layer, outside the domain of the game management layer.

Edited by papalazaru, 29 August 2012 - 06:37 AM.

Everything is better with Metal.


#3 Mhez   Members   -  Reputation: 108

Like
0Likes
Like

Posted 29 August 2012 - 07:33 AM

Ok, got it thanks for your answer !

#4 Rasterman   Members   -  Reputation: 206

Like
0Likes
Like

Posted 11 September 2012 - 10:11 PM

You can make any game multiplayer given enough time and talent. I dreaded dragging my 6 year old 150k line codebase (3rd game in the series) multiplayer as it was littered with rands, physics in the drawing code, and some other big no nos, but in the end it only took about 6 weeks to do it and was easier than I had anticipated.

Since it sounds like you are starting out I would do the most simple single player game that will meet your desire.

#5 zfvesoljc   Members   -  Reputation: 429

Like
0Likes
Like

Posted 18 September 2012 - 07:49 AM

  • treat a singleplayer game as a multiplayer game with only 1 player.
  • if going with client/server approach, imagine server and client object running from two different processes/machines
  • as mentioned above, turning a single playergame can be done, but it's a PITA... I wouldn't do it again...





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS