Two questions about writing a mobile game

Started by
2 comments, last by greyi9 9 years, 2 months ago

Question 1: Can most mobile development languages send data to a server serialized in a way that I can translate it into a deque<vector<int>> format quickly or should I be using a different approach to communicate commands and events between threads on my server?

Question 2: Any suggestions on where I should look for outside help for developing mobile graphics for the game? Or is it better to take the time to do this myself?

(See below for context if needed)

Where I am right now: I've made simple single player games on computers and on i-phones, but I have never made anything that connects the two and I am hoping to have a game I am working on currently become a mobile multi-player game in the future. I am writing the game in C++ and I am undecided about what language to use for the mobile side (I am also considering paying outside help for the mobile side since I am pretty useless with graphics...)

My Concerns: I don't know how the mobile apps tend to receive and buffer data or how they send data to a server. Because of this, I am not sure how to structure my input/output streams. Currently, I am using deques of vectors holding integer key values to communicate commands and events between threads. I am using the console to simulate user input from an outside source for debugging.

Advertisement
Q1: All of the mobile devices I've used (iOS, Android, WP8, Metro) let you use sockets, HTTP requests, etc. Standard networking stuff. You can serialize and deserialize your data however you need to. When dealing with multi-platform serialization, pay attention to things like endianness if you're using a binary format.

Q2: I'm not sure if you're talking about making art assets or writing rendering code.

You're asking both a mobile graphics question and a networking question. You might want to split them both up. I very nearly moved your post to one of those forums, then to the other, then figured I'd just leave it in For Beginners. smile.png

For your first question, communications protocols are whatever you define them to be. Most commonly the data is sent with a header that includes both the length of the block and an ID that says how to interpret the block. Attempting to transfer something as you described, deque<vector<int>>, would be terrible for most systems unless you can make all kinds of guarantees about the data that generally are not true. Instead, you would likely include a header that indicates you are transmitting an block of data that needs to be marshalled into a 2D array, and allow the implementation to place it inside whatever collection they want.

For your second question, what are you looking for? Are you looking to hire/contract a pixel artist? Or animators and modelers? Or looking to buy premade assets? Or looking to build a game engine? If an engine, have you considered using existing libraries and engines? (See the Mobile and Console Forum FAQ for a few of those.)

For your concern, they operate effectively the same as any other network game. Your application defines a protocol for messages to be sent. A fun feature of this is that it doesn't matter what client you use as long as it implements the protocol correctly. For example, while you normally play games like League of Legends or World of Warcraft or whatever through their client, technically you can use any program that communicates with their servers and follows the correct communications protocol, sending and receiving the right data at the right time. For those, most of the Network and Multiplayer Forum FAQ answers are related to your question and concern.

@Nypyren: Thanks for the response and advice! I will look up endianness and some other networking tutorials since I don't know much about the "standard networking stuff".

@frob: Thanks for the very thorough response! I agree the beginner section is a good spot for me since I'm pretty new, but if I post again in a month or so I will try to keep my next topic more focused! As for the graphic I had not thought of using an existing engine, but that is probably what I will do. After I brush up on some basic networking (probably youtube tutorials) I'll check out that networking forum. Anyway, huge help, thanks!!

This topic is closed to new replies.

Advertisement