Search Unity

New.. a few questions

Discussion in 'Getting Started' started by mc3, Apr 3, 2016.

  1. mc3

    mc3

    Joined:
    Mar 27, 2016
    Posts:
    19
    New to game design but have 15+ years designing databases & websites. Currently teaching myself Unity and Blender.

    I read the sticky & reviewed several tutorials. The first one (ball rolling) already answered a lot of my questions. I have a very specific idea for a strategy style game that revolves around a fairly typical model - base building, fighting with different troops attacking PvE targets and eventually bringing in PvP/multiplayer aspects to the gameplay.

    I see it will be smart to start with a goal of having a single player version to release first... adding
    the networking/PvP/teamplay aspects once the initial issues are worked out.

    Even if the multiplayer angle is hidden on the first release, I want to have a clear road map for the game. One place I started to look into more detail is the database, where it is located and how that works. I saw in reading that Unity can also play a role in this.

    How would I take game scores & put this on a site a leaderboard, such as a page that lists the top ranked players?

    If you want to do something like this, would you host the game database externally?

    Then what is a popular front end to run the game site with?

    Been building a lot of sites on the WordPress platform but I searched the forum and not much seemed to come up related to that. I figure there is another way that is more common. Are a lot of the game sites custom coded? I can handle that as well if need be. I want to make the games site relevant in ways that will encourage players to visit it often.

    Just trying to figure out ways to make my two worlds play well together.
     
    Last edited: Apr 5, 2016
  2. Collin__Patrick

    Collin__Patrick

    Joined:
    May 20, 2015
    Posts:
    188
    I don't know much about this kind of stuff but I think that you may want to look into XML or other external tools.
     
  3. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    For online data storage, yeah, you need a database. See this wiki page for example explaining how to store & use online high scores.

    Or you could consider something like Amazon Web Services, which are accessible from Unity.

    Consider looking through the Asset Store, which has lots of products related to this (including some free stuff like this one).
     
  4. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,205
    I would start by investigating existing backend solutions provided through companies like PlayFab or GameSparks. They are basically designed to handle authentication, data storage with scripting, leaderboards, etc for online games.

    https://playfab.com/
    http://www.gamesparks.com/
     
  5. tedthebug

    tedthebug

    Joined:
    May 6, 2015
    Posts:
    2,570
    If you are hosting the game on other sites like gamejolt etc they probably have leaderboards & api's you can use to hook your game into them
     
  6. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    Have you used either of these services? I'm generally more of a roll-it-myself kind of developer, but a very quick perusal of these services looks pretty impressive. Maybe it would be worth hitching my cart to their horse in this case.

    My chief concern might be: are they economical (both in terms of integration time, and ongoing costs) for small devs?
     
  7. mc3

    mc3

    Joined:
    Mar 27, 2016
    Posts:
    19
    I just started to look into the services mentioned there. Gamesparks for instance mentioned leaderboards based on millions of players that can update in real time. Sounds very nice.

    I'm with you on the preference to handle it myself. Still, I am going to review everything in detail before moving forward with any plans. This is going to help me assign more detailed structure to the planning process.

    I see with the variety of platforms to choose from as well, that adds more detail to it all. For instance - how to handle purchases from different app stores to the game currency is a consideration that had crossed my mind when I even started to consider targeting more than 1 in an initial release. Playfabs video on how to setup the game economy was interesting.

    Also .. Checked out the plugin you linked to in the asset store, looks promising.

    Thanks everyone for helping me get the ball rolling here.
     
    Last edited: Apr 5, 2016
    JoeStrout likes this.
  8. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    Cool, please report back with your findings. I think a lot of people would find them useful.
     
  9. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,205
    I started learning GameSparks at one point but the project I needed it for fell through. From time to time various backend solutions get discussed in General Discussion and GameSparks ends up getting recommended by @Meltdown. He'd be the one to ask if you needed more information.

    PlayFab's core features are free. They only charge if you need premium support and partner marketplaces (which I'm inclined to believe means third party server add-ons).

    GameSparks has a 100,000 MAU (monthly active user) buffer for indie (team of 3 or less) and student developers. Any MAUs above that number are $0.02 per month per MAU. Basically you have to be successful before they'll charge you.

    https://www.gamesparks.com/indie-student-programme-faq/
     
    mc3 and JoeStrout like this.
  10. ababab5

    ababab5

    Joined:
    Apr 15, 2014
    Posts:
    508
  11. mc3

    mc3

    Joined:
    Mar 27, 2016
    Posts:
    19
    The last few days have been filled with so much information. Working my way through the tutorials, they are pretty amazing and I have learned a lot. Learning about the different types of colliders was interesting today in the space shooter tutorial.

    I was wondering - with all the platform choices, how do you know when you are going to be pushing the limit as far as processors go when targeting mobile platforms? They mentioned that mesh colliders took up more resources which is why you might use one of the others for mobile. Just curious how do you know when to make choices like this, or know when to balance this out. Is this just something you have to watch for while testing?

    I am sure I will have a lot more feedback as I progress, I have been taking a lot of notes and made some good decisions regarding the project today.
     
  12. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    Yes, you don't have to worry about mobile as much as was necessary a few years ago; mobile devices are pretty decent gaming platforms in their own right. And by the time you actually finish any game you start today, they're going to be better yet! :) So, my advice is to just get on with making a cool game. You can always optimize it later after testing.
     
  13. mc3

    mc3

    Joined:
    Mar 27, 2016
    Posts:
    19
    I started looking into making a first test project of my own today and have a few questions about variables and persistency.

    First, where do I put the global variables? Say, the start score of 0 and initial amount of credits of 100. In the Space Shooter demo, part 3.2 it looks for this game, similar variables get set in a GameController function. Is there anywhere that talks more about the basic game structure and how to set variables let me know.

    Some mobile games I checked out remained active after I uninstalled and reinstalled them. I didn't have to start over.. some of the gameplay information was stored on a server. At some point, I would want to work that feature in. Is that behavior complicated by using multiple platforms?
     
  14. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    If they're truly global, then you can store them in static fields. The declaration itself can contain the initial value. For example:
    Code (CSharp):
    1. public static class Globals {
    2.     static int score = 0;
    3.     static int credits = 100;
    4. }
    ...and then you just access these anywhere as Globals.score, Globals.credits, etc. Of course there are various reasons why global variables are considered harmful, but as a beginner you should probably ignore that and just get the job done in whatever way seems simplest to you.

    I'll just point out an alternative, which is to use a singleton object. In the standard Unity version of this pattern, it's an object in the scene, so you can inspect and tweak its public fields right there in the editor.

    Well, no, not really. If you're going to be storing data on a server, the server doesn't care what platform the client is running on... and neither does the client code, as long as you're using some portable communication method like WWW.

    However, this seems like putting the cart way ahead of the horse, to me.
     
    mc3 likes this.
  15. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    The behaviour is complicated. But multiple platforms doesn't complicate it further. But leave this for much, much later.
     
    mc3 likes this.
  16. mc3

    mc3

    Joined:
    Mar 27, 2016
    Posts:
    19
    Both interesting links. After checking that out I saw the video in your signature. It is interesting what you say about your game but also about the space program as well. Im from that area in FL where it was really a huge part of life. Modeling orbits and other factors your building into your game is very cool stuff.

    Referencing what you said, I read about the singleton object and understand now more about how the game/platform is going to treat the code written. This is different than what I am used to in web-based / stateless environments. When I had access to global variables (through Coldfusion) I was pretty happy about that at one point : )

    Going to avoid complexity at the moment, thus I think the example you provided is how I am going to start. This is good, I like that there is more than one way to approach the situation.
    I revisited the page referencing how to setup server side high scores and realize that more or less, that is the information I need to get started here. What I am interested in keeping in order is usernames. Say people start a new game on different platforms, I am going to make sure that everyone has to choose a unique name. From there, synch certain settings relating to their gameplay. This will hopefully help streamline things as I move towards adding the multiplayer layer to the game and as well, give me a way to get more familiar with this.

    Just trying to plan my approach carefully. Both what would be a way to get the ball rolling ( first initial release ) to what a full powered version of the game would look like. What I can hide for now and places it can grow. Working in from a few angles. I am focusing on tutorials that aren't specific to the style of game I want to make. Another level, reading extensively on the site. I have written 8 pages of docs as I structure the game concepts. I am also (hand) sketching the master ui as I think out the idea.

    Backing up from the project a little further, I am trying to look at the bigger picture. The game characters and story line. In the past I have also produced a documentary surfing film ( including a majority of the soundtrack being custom produced ) and written a book. So I am also looking this from other angles - why someone would want to play the game, what story are they participating in. It is going to take some time there and is something that will develop as the process moves forward. I just am trying to think about this a lot in order to keep the game fun and exciting, while still having a background story that plays out and an overall feeling of the bigger picture / in writing maybe what you would refer to as foreshadowing.

    I am sure I will be posting more questions soon enough.
     
    Last edited: Apr 14, 2016
    JoeStrout likes this.