• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
SoulRyder

Turn Based Mobile game

6 posts in this topic

Hello,

 

I am working on a game created in Unity3D and I am familiar with programming for games, but I have never really worked on network functionality for any kind of multiplayer before. And I would like to have some advice how to start with this. I am the only programmer in our team, and even though most programming problems I always see as a challenge, to be honest working with networking always seems a bit more difficult and scary to me.

 

The multiplayer functionality of the game works somehow similar to Wordfeud or Draw Something. A turn based game where you can challenge friends or random players to play a game with you. Everytime someone makes his/her move, confirm it, and then the other player makes his/her move etc.

 

Now I was first looking into network engines like Photon, but someone told me I would be better off, and alot cheaper if I just work with databases. But I am wondering if you have alot of players on those databases, wouldnt you still need some sort of big server where all players can connect to?

 

I have some experience with databases concerning webdesign, but nothing in the field of games. So what I am looking for is some tips sending me in the right direction into creating a turn based game for android and ios in unity3D

 

Thanks alot in advance!

 

Alexander

 

0

Share this post


Link to post
Share on other sites
For a turn based game, you need three things:

1) A way to store the state of the game between turns.
2) A way for a client to see the current state and provide new state.
3) A way to tell the "waiting" player that it's now "their turn."

The first one is typically solved with a database -- MySQL, Redis, Oracle, even flat files on disk could work. The database is talked to by your game server, which knows how to enforce rules and protect the data against bad actors on the internet.

The second one is typically solved with an application server. For a shooter game, you'll have a custom game server with high packet rates. For a turn-based game, you can use a web server using HTTP GET/POST.

The third one is tricky, and depends on the speed of the game. You can use HTTP long-polling (COMET) if you want quick notifications to online players, at the cost of higher load. You can use web sockets if you have a modern browser. You can use occasional polling by the client application if a slower response is OK, but that will still generate load based on the number of online players, not based on the number of turns. You can use another notification mechanism, like SMS messages or email. Or, finally, you could use regular old-school sockets if your client and your server has this ability (websockets are similar to this.)
1

Share this post


Link to post
Share on other sites
For #3 above, I'd recommend a combination of COMET for those who are currently online, along with an intermittent low-cost poll (perhaps hourly) for those who are offline.

Now I was first looking into network engines like Photon, but someone told me I would be better off, and alot cheaper if I just work with databases. But I am wondering if you have alot of players on those databases, wouldnt you still need some sort of big server where all players can connect to?

This part is a business decision.

Photon is free(*) up to 100 concurrent users (* as long as you meet the other conditions like <$10K/month). SO if it helps you out right now it may be worth it. 100 concurrent users can equate to thousands of daily active users. If you hit thousands of daily users hopefully you will have enough revenue to cover the $99 indie cost.

If your goal is a learning experiment to figure out how the technology works then by all means roll your own. If you are looking for an inexpensive middleware solution, Photon is a fairly reasonable choice.
0

Share this post


Link to post
Share on other sites

I looked into this a little (not using Unity, but I don't think that makes much difference), and I decided my best bet would be to use either GameCenter for simplicity and just accept that an Android port will be not possible, or to use a Backend-As-A-Service provider.

 

I found this article fairly useful http://www.raywenderlich.com/20482/how-to-choose-the-best-backend-provider-for-your-ios-app-parse-vs-stackmob-vs-appcelerator-cloud-and-more which tallied well with my impression that Parse looks like the best of the bunch. I haven't started any implementation yet though so can't comment on what it's actually like.

 

My decision to use BAAS providers was influenced by my inexperience in implementing code for, or even setting up any sort of back-end. Sounds like you have more experience than me in that regard, so not necessarily the right choice for you.

Edited by C0lumbo
1

Share this post


Link to post
Share on other sites

If you are working on an indie mobile title like wordfeud then you do not need your own server.   You can go with a cloud soulution.  I too have used Parse and managed to get a simple words with friends clone working in a couple of hours.  I am currently working on a turn based scorched earth / worms type game for a client and so far it hasn't let me down.

There are many others besides Parse some of whom advertise in the banner at the top of this very website.  Most of these services use schemaless databases and also if you don't like the service you can usually drop your data into a CSV and upload it to an alternative service with no fuss.

0

Share this post


Link to post
Share on other sites

Personally i would just use a solid webhost that serves JSON (writing a python, php or asp.net script for this is extremely easy) data and send notifications using GCM and APNs when it is the players turn. (The app can then just pull state updates from the webserver)

0

Share this post


Link to post
Share on other sites

Wow thanks alot for all the replys! Im definitly helped with this and will look into all options and find out which option works best for me! :D

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0