Created: 11/18/2016 3:06:08 PM
Updated: 11/19/2016 7:45:40 AM

Game Programmer

Joined: 10/1/2018
Thread Replies: 9
Thread Followers: 63
Category

Game Client

In the studio downtime, I did some playing and research on Game Clients and different ways that this can be obtained. Two issues I've seen with create this in Unity is not that it's impossible or even hard, is Updating the game, and people idling in the game and possibly slowing down the servers on them idling and chatting.

I did a lot of experimenting, and came up with what I believe to be a decent solution. I am opening this thread to discuss my findings and open discussions for everyone else for input.

My research has led me to the following. Unity is capable of parsing command line arguments being passed to it. So what does this mean? This means that we can start up a Unity Application and pass it an argument, and start a specific game with specific rules, maps, players, etc.

Since we can do this, we can create a desktop application, separate from the game itself, to handle a lot of the stuff we are trying to cram into the game that isn't related to game play. We can also have a separate server dedicated to just handling the client itself. This application itself can handle user authentication, real time chat, notifications, a store for users to purchase items, leader boards, matchmaking... The possibilities are endless.

In this application, once the user has successfully completed all pre-match tasks, we can have the application start the unity application up with an argument with a unique game id. The game can then connect to the game server and download all applicable game data. It can download the maps, players, and rules to the Unity instance and everyone can load in and complete the game, all using that id.

Onto the more technical details. I accomplished this task using Node.JS myself. I have a Koa.js api server that handles log in and real time chat with sockets. I also have a desktop application using HTML and JavaScript wrapped in Electron for the client side. This is of course far from complete but I accomplished the basics. (User Authentication, chat, starting a unity game with a unique UUID.v4). This would be just as easy to complete in C# using WPF or Winforms and using an ASP.NET backend.

Now for discussion purposes, I want to hear everyone's ideas.

Do we think that using such an application for a client is a good idea or not? Do we think this would save us some troubles in the long run? Do we think this will be a more scale-able option in the long run?

Being that our developers are C# and the website is created using C#, Should this application be built using C# for desktop and server side? Is opening the scope on an app like this to use HTML and JS a good idea?




Game Client  - Anthony Michelizzi
GameProgrammer  - Anthony Michelizzi


Awards: Has had another status other then active. Acquired more then 120 objective in the role 7 Has over 312 created items for the team. Member modified their profiles. Filling in a signature on your profile. Attendant 3 meeting or more in 6 month period. Served more then 9 months on team. Created 10 agendas or more in 3 month period.

Created: 11/19/2016 7:45:40 AM
Updated: 8/26/2022 8:00:31 PM

Game Programmer

Joined: 2/4/2017
Member Replies 748
Member Follows 126
@Anthony ok sounds like a loan for now I would like to focus on the PC we will port it right after we get a working prototype for the PC working. For now I'm going to add you to the agenda for the next sprint since this iwos in relation to that task.

Thanks,
James Fleming



Thanks,
James Fleming 
Facebook
Discord

Awards: Has had another status other then active. Acquired more then 120 objective in the role 7 Has over 312 created items for the team. Member modified their profiles. Filling in a signature on your profile. Attendant 3 meeting or more in 6 month period. Served more then 9 months on team. Created 10 agendas or more in 3 month period.
Created: 11/18/2016 11:46:55 PM
Updated: 10/13/2018 3:04:51 AM

Game Programmer

Joined: 10/1/2018
Member Replies 197
Member Follows 63
I can make up whatever we need. I get off at midnight tonight which is in about 2 hours. And I have the next 9 days off. Also one more notable point is that should the game be a console game and not just PC/Linux/Mac we will still need some sort of ingame gui for the console stuff. So depending on the entire scope and whether or not the console will have limited up anyways since they handle their own chat this may not be relevant


Reply:   - Anthony Michelizzi
GameProgrammer  - Anthony Michelizzi

Awards: Has had another status other then active. Acquired more then 120 objective in the role 7 Has over 312 created items for the team. Member modified their profiles. Filling in a signature on your profile. Attendant 3 meeting or more in 6 month period. Served more then 9 months on team. Created 10 agendas or more in 3 month period.
Created: 11/18/2016 11:42:36 PM
Updated: 8/26/2022 8:00:31 PM

Game Programmer

Joined: 2/4/2017
Member Replies 748
Member Follows 126
Ok so can we flow chart this out and attach it to the agenda using the dia flow chart application?  You can make an agenda for this or let me add you to the agenda for server client that in the sprint queue right now and we can work on it together come the 28th.

I can see the usefulness of 1 and 2 but I think we should map it out for 3 to make sure its coded right from the get go.

The reason for splitting the chat, interface, and game server up is for scaling after we have more then one game going on the server.  This will allow us to have three dedicated server if needed separate from each other for performance needs.

Thanks,
James Fleming



Thanks,
James Fleming 
Facebook
Discord

Awards: Has had another status other then active. Acquired more then 120 objective in the role 7 Has over 312 created items for the team. Member modified their profiles. Filling in a signature on your profile. Attendant 3 meeting or more in 6 month period. Served more then 9 months on team. Created 10 agendas or more in 3 month period.
Created: 11/18/2016 10:19:29 PM
Updated: 10/13/2018 3:04:51 AM

Game Programmer

Joined: 10/1/2018
Member Replies 197
Member Follows 63
I looked into this for a couple reasons.

1. Cost. If I wanted to make a multiplayer game myself, due to cost restraints I would start out using something like unitys networking. These solutions limit you to a specific number of concurrent users. So keeping them in a client instead of in game is cost effective.

2. Updating the game. I couldn't find a good solution to upgrading the game to a newer version if it was patched as of this point. So having a client that can modify the games files and download updates made that easier, it also kept someone from running the whole game AND trying to update their game which I felt would allow a few more lower resource systems in the loop.

3. Server communication. The servers can still be split up no matter what. That's not an issue. But making the login server talk to this server and that server and all of them link together and every step keep passing information back and forth seemed a little inefficient. My setup allowed a simple solution to this since the servers also don't have to maintain a connection to each other or communicate in anyway. The client saves all information in the database and the game server loads from the database. So I felt for my personal use this was an easier way to do things. This may not be the case for us.


Reply:   - Anthony Michelizzi
GameProgrammer  - Anthony Michelizzi

Awards: Has had another status other then active. Acquired more then 120 objective in the role 7 Has over 312 created items for the team. Member modified their profiles. Filling in a signature on your profile. Attendant 3 meeting or more in 6 month period. Served more then 9 months on team. Created 10 agendas or more in 3 month period.
Created: 11/18/2016 10:07:01 PM
Updated: 8/26/2022 8:00:31 PM

Game Programmer

Joined: 2/4/2017
Member Replies 748
Member Follows 126
Thinking about this a bit more the only time I can really see this as a reason would be for an update client so we can update the game when need be because the client can not override its own files.  We do this with the Member Collaboration Utility right now.

Thanks,
James Fleming



Thanks,
James Fleming 
Facebook
Discord

Awards: Has had another status other then active. Acquired more then 120 objective in the role 7 Has over 312 created items for the team. Member modified their profiles. Filling in a signature on your profile. Attendant 3 meeting or more in 6 month period. Served more then 9 months on team. Created 10 agendas or more in 3 month period.
Created: 11/18/2016 9:39:34 PM
Updated: 8/26/2022 8:00:31 PM

Game Programmer

Joined: 2/4/2017
Member Replies 748
Member Follows 126
I understand what your saying the next question would be would this be simpler then having it as one application that just loads its in the same client?  Technically speak what reason would we have to split them "Pre Game" vs "Game"?  To me we would have to manage two code base and make sure they talk to each other.  Which granted after its set up wont be hard but is their a logical reason to do it like League of Legend?  To my understanding they do this because of some coding issue in language is what I heard but I'm not sure.

Thanks,
James Fleming



Thanks,
James Fleming 
Facebook
Discord

Awards: Has had another status other then active. Acquired more then 120 objective in the role 7 Has over 312 created items for the team. Member modified their profiles. Filling in a signature on your profile. Attendant 3 meeting or more in 6 month period. Served more then 9 months on team. Created 10 agendas or more in 3 month period.
Created: 11/18/2016 8:11:59 PM
Updated: 10/13/2018 3:04:51 AM

Game Programmer

Joined: 10/1/2018
Member Replies 197
Member Follows 63
Here is the initial unity code I had worked out to get the game id passed via command line in unity.

https://github.com/cynical89/unity-client/blob/master/Assets/scripts/startArgs.cs

Here is how I started the game from inside the JavaScript application.

https://github.com/cynical89/game-lobby-client/blob/master/javascript/startGame.js


Reply:   - Anthony Michelizzi
GameProgrammer  - Anthony Michelizzi

Awards: Has had another status other then active. Acquired more then 120 objective in the role 7 Has over 312 created items for the team. Member modified their profiles. Filling in a signature on your profile. Attendant 3 meeting or more in 6 month period. Served more then 9 months on team. Created 10 agendas or more in 3 month period.
Created: 11/18/2016 7:47:05 PM
Updated: 10/13/2018 3:04:51 AM

Game Programmer

Joined: 10/1/2018
Member Replies 197
Member Follows 63
I agree that everything should also be in C#. This saves us from having divided developers. We can have C# devs that work on all code related to the game, client, and server. To explain the command line interface a little more... we are just going to run the game itself like we are trying to run it from a command line, from the client. So say after matchmaking, the client program will save the players, what teams they are on, and their preferences in the sql database along with a unique game is. Then, we start the game, The program will call to open game.exe --args-game 12345 where 12345 is the unique game id the players just created in the matchmaking lobby. Then the game will load up as normal reading the game id we passed it and it will immediately grab all essential data from the sql database that's needed to start the game. So overall no one will notice any command line interface because that will all be in the background. A good example of this set up is league of legends.


Reply:   - Anthony Michelizzi
GameProgrammer  - Anthony Michelizzi

Awards: Has had another status other then active. Acquired more then 120 objective in the role 7 Has over 312 created items for the team. Member modified their profiles. Filling in a signature on your profile. Attendant 3 meeting or more in 6 month period. Served more then 9 months on team. Created 10 agendas or more in 3 month period.
Created: 11/18/2016 7:12:02 PM
Updated: 8/26/2022 8:00:31 PM

Game Programmer

Joined: 2/4/2017
Member Replies 748
Member Follows 126
@Anthony

I think we should have the server and all supported code in C#.NET or Mono as possible.  This will allow us to have one code base that is easy for all programmers to modify in the future and we don't have to have any special ability from anyone to make changes.

In TFS you will now see a Server.Game, Server.Chat, and Server.Interface I split these up to run as separate service so that we can run them from different server if need be in the future for scaling.

The server will run from our main server so I'm not sure what functionality we will have by using a command line on the application.  Can you explain that a bit more please.

Thanks,
James Fleming



Thanks,
James Fleming 
Facebook
Discord

Awards: Has had another status other then active. Acquired more then 120 objective in the role 7 Has over 312 created items for the team. Member modified their profiles. Filling in a signature on your profile. Attendant 3 meeting or more in 6 month period. Served more then 9 months on team. Created 10 agendas or more in 3 month period.

×
MEMBER
login
SERVICES
Animator Artist 2d Artist 3d Audio Engineer Game Creation Game Producer Graphic Designer Marketing Package Asset Programmer Story & Asset Writer Tutorial Video Production
ARTICLE CATEGORY
Services