Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Looking for groups or discussion on scripting/designing a game on a broader level

Discussion in 'Scripting' started by davidwalmsley, Nov 3, 2014.

  1. davidwalmsley

    davidwalmsley

    Joined:
    Jul 9, 2012
    Posts:
    1
    I've been working with unity for a few years now. So far I've managed to work out everything I have needed to get accomplished using the engine, whether it be from YouTube tutorials or posting on UnityAnswers. When I first set out learning to create games (specifically coding) I heard it was like putting together an airplane, you have to have a bunch of little pieces that work together, then you put all those together parts. I have had a great deal of success putting together the parts and finding the resources that explain how to make any parts I need but I am having a great deal more trouble finding resources that talk about putting all those parts together to make the airplane.

    I know enough about the Unity Engine and coding for it now to where I can cobble all the parts together, but as I continue to work at it I keep getting the feeling that I might not doing in the most efficient and safe ways. I am starting to write systems that the further I go the more time consuming and difficult it will be to go back and change. I was wondering if there were any groups or forums out there that specifically discuss different ways to go about handling some of the larger overall game functions and their pro and cons.

    For example:

    I am attempting to make an RPG that will have several scenes that will have lots of information and variables that are not bound to one specific scene. I am wanting to create a database for lots of instances of classes such as items, spells, abilities, and enemies. I decided t to create a static class that stored various instances of non static classes. In UnityAnswers discussing something else I was told to never use static variables and classes because I didn't understand them well enough. Beyond that they aren't instances I have to admit I don't, but I don't really know how to do it a different way to keep the database ... for lack of a better term static. I never got an explanation of why this system is a bad idea or why I should never EVER use static classes and variables. It would be nice to have a forum where these things could be explained and / or a different solution could be discussed.

    Another example would be with the general organization of my scripts. I have a movement script that handles all the user input for moving around and interacting with objects. I also have a combat script that handles all movement for the combat side of things and attacks and whatnot. I want to get the combat script set up to where I few different that operate together, one for basic movement, one for physical attacks, one for magic attacks, and one for dashing evading etc. Is it more functional to have all of that in one script? It would be messy and hard to navigate but does having different scripts bouncing off each other slow down performance enough to make a difference? Is it better to assign components to each script connecting them or should I just use SendMessage()? Should I handle all user input in a single script and them send the information from the one source to all the other scripts that use user input?

    I know there's not a single answer or single way to go about doing doing it, but I'm trying to find somewhere to discuss the benefits different routes offer, and maybe some warnings about some routes that will prevent some game breaking bug from making me have to start all over. If anyone can point me in the right direction or let know where I can find discussions stuff like this here on these forums (I haven't found any as of yet) I would be extremely grateful. Thanks for taking the time to read.
     
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,840
    Yes, the Scripting forum is the right place for all questions of this sort.
     
    Gigiwoo likes this.
  3. RJ-MacReady

    RJ-MacReady

    Joined:
    Jun 14, 2013
    Posts:
    1,718
    It's really hard to digest an essay and respond concisely. So, hop over to the scripting section and ask one question at a time. ;-)