How do I set my game up to run server side?

0 favourites
  • 7 posts
From the Asset Store
Full game Construct 2 and Construct 3 to post on Google Play
  • Hi guys,

    As someone with no knowledge and understanding on programming and networking, I am grateful to scirra and the community here for helping and giving me the opportunity step into the world of something I have always loved. I would like to increase my knowledge and understanding on the various approaches to games out there. I do hope that some of you with knowledge in this will be able to help shed some light on this. This is what I would like to create.

    1: I want my to store all my game events and variables on a server.

    2: The player can't play the game offline, as all the code is on the server.

    3: At the start of the game, it will ask the player to enter a name. After that, every time the player achieves a new high score, it will will save the score onto the server next to the name so that it can be easily accessed.

    What are the things that I will need to look into and learn to be able to implement this into my game?

    Thanks you for any insight and advice on this.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 1. You can't store ALL your game events nor variables on the server, there must be some interaction on the client side which involves variables and events, Even a server side game would contain no more than 5% of the game code running on the server i would guess...

    2. Yes, you can check the internet connection, to prevent the user playing by cache or downloading the game locally. Technically everything is on the server, but it must be send to the client and therefore become clientside.

    3. This is a basic task and i suggest you start here, don't focus on your game running on server side until you have a better understanding what that really means. To get started here, you'll need to setup a way for your game to contact the server and send the player's name and high score. Once the score is received i suggest you save it into a file that is plain text, csv, json or xml (don't bother with a database for this). Also if you don't already know a server side language such as php, that is probably the best place to start.

  • IndieKiwi, thank you for that info.

    For 1 and 2, the main reason is because I would seem to be the most secure in terms of not allowing players to hack or manipulate the results. So I would store all the variables in the server making it harder to manipulate, but leave the game codes on the client side because even if they can read all the code, they won't be able to manipulate the results since the variables are on the server?

    Does that mean that to implement server side games, I will need to learn a programming language, such as the php that you mentioned? Is this something very complex, or perhaps there are templates out there and we can study the basic to modify and implement the templates to work for our game?

  • You should be able to get away with using templates with highscores. But doing the other stuff with templates can make you vulnerable if you don't know what is going on.

    Serverside doesn't mean it is not hackable. I remember hearing this notion in the days of Runescape; because it is server sided, it can't be hacked. But this is not true at all..

  • IndieKiwi, thank you. I see, so it is important to get a good basic understanding of php to be able to implement and understand how it can be exploited.

    Does how hard it is to hack serverside games, depend more on the security used by the server company, or more on how we code and implement the games on the server?

  • The server host should use the latest stable versions of software and have security features enabled, so if you choose a reliable host, there isn't too much else you can do with shared hosting.

    Your implementation would be the most important part, but NOTHING is unhackable and a focus on being unhackable for indie game development without a very good reason would be a blackhole for time, especially with limited resources.

    For example if you pick up 10 gold coins and store this on the server by sending a packet. The user could 1. keep sending the packet over and over. 2. modify the gold coin value to be 1000000000 and send it.

    Also hosting a game on the server with a reasonable audience won't be cheap.

    good luck

  • IndieKiwi, thanks! That's really informative. Haha it's a plan for a game down the road, but it is nice to start learning and understand. It might help me avoid many mistakes, like maybe implementing this if it really isn't that feasible. Again, thanks for sharing! Appreciate it!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)