Search Unity

[2D] Some beginner questions to a tilemap-based RPG

Discussion in 'Getting Started' started by Jaycey, Feb 5, 2021.

  1. Jaycey

    Jaycey

    Joined:
    Feb 5, 2021
    Posts:
    4
    Hi there,

    I recently started to get myself more around unity & game development. I have a deep Developer-background, so coding in any language is nothing new to me.

    The past days I wrote a tiny, little top-down RPG, using some free sprites/tiles/animations from the asset store. Yet it is very basic and simplistic, but works. For my next step, I'm planning to create a huge map with many enemy-spawns, quests, NPC's etc... Therefor I have several questions:

    1. When I design my map in the scene-editor, will Unity load the whole map into the RAM? In case of a huge map this could be extremely expensive.
    2. Coding-question: Is it considered best practise to have some kind of "manager"-class? Means a central script where global constants and (static) methods are provided, and general ingame-events are handled?
    Would such a class be responsible for (re)spawning npcs/monsters?
    3. I want to generalise as much as possible; e.g. I want to program basic actions on all interactable objects in the game. My approach (at least in Java) would be to build a chain of inheritance out of interfaces and (abstract) classes, is this also the "Unity-way"?
    4. Could you refer to similar open-source projects (e.g. on Github) I could checkout and learn from?

    Thanks in advance :)