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

How hard will this be with Unity?

Discussion in '2D' started by Rasmenar, Jul 12, 2014.

  1. Rasmenar

    Rasmenar

    Joined:
    Feb 22, 2014
    Posts:
    4
    Currently, I am creating a top-down view 2d sandbox game, with survival, fantasy/adventure, and creative construction elements. Or, trying to. I have a majority of the concept work done, and now I am starting on actual design. I am by no means new to programming, but I am brand new to the Unity engine.

    One of the biggest goals of the game is this - you will be able to generate random maps. The game will feature a Tile system for map generation (my current plan was to have 1 tile equal 1 unit equal 32 pixels). I've got a list of rules for tile generation ready to convert into code once I've learned more about the engine.

    My question is this... How much am I going to have to fight with Unity to make my map generator? Is it possible to use a script to populate a scene with objects? As somebody who's got in about maybe 5 hours with the engine, how steep of a learning curve am I going to have trying to pull this off with unity?

    I've already figured out how to get Unity to display top-down mode, made a character that can move, and made a few basic sample tiles, but before I go any farther with development I'd like to know how much of a struggle I am going to be in for developing my game, and whether or not I should just code it from the ground up or use Unity engine. I have a good feeling that Unity will save me boatloads of time, but as I have no experience with it I can't be sure. If it's not going to save me any effort, I'm just going to drop it and code the game entirely from scratch.
     
  2. Pyrian

    Pyrian

    Joined:
    Mar 27, 2014
    Posts:
    301
    Are you aiming for a multi-platform release? If so, I'd stick with Unity, so you can publish to a bunch of platforms. If it's just for one platform, though, you're not getting much use out of the engine.

    That being said, it's not like it's going to be a struggle to get it working in Unity. Populating a tiled map by script is not a problem at all. (Seemless tile joins can be, though...)
     
  3. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,398
    Yes, I do this frequently. You could save time/effort by getting an already-existing tile solution. Such as, I dunno, SpriteTile. ;) (Self-promotion aside, it's actually a serious suggestion since it focuses on procedural generation as much as it does on manual creation.)

    Aside from all the stuff that Unity does for you so you don't have to program it from scratch.... It's pretty much a no-brainer that I'd use Unity for a game on one platform, and in fact have done so in the past.

    --Eric
     
  4. Pyrian

    Pyrian

    Joined:
    Mar 27, 2014
    Posts:
    301
    The vast bulk of which he's not really using.
     
  5. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,398
    "top-down view 2d sandbox game, with survival, fantasy/adventure, and creative construction elements."

    Sounds like it would use a substantial amount of engine features. For sure I would not program an engine for that from scratch if I didn't have to.

    --Eric
     
  6. Pyrian

    Pyrian

    Joined:
    Mar 27, 2014
    Posts:
    301
    "Top-down view 2d" is supported by the engine - and any SDK worth mentioning. Everything else... He's coding from scratch.
     
  7. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,398
    How would it be different from if he used 3D models instead of 2D? Nearly all of the same engine features would be used in both cases. I think you're significantly underestimating the work that's involved in the game and how much Unity is doing. (Workflow being probably top of the list.)

    --Eric
     
  8. Rasmenar

    Rasmenar

    Joined:
    Feb 22, 2014
    Posts:
    4
    @Eric5h5 - Good to know that it's been regularly done. Now, here's my question - I plan on having maps that are up to 20k by 20k total tiles - Does unity support having that many loaded at once, or am I going to have to set up a sort of "chunk loading" system?
     
  9. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,398
    That would be 400 million tiles, so it's unlikely to be a good idea to have that many at once. Even with SpriteTile, which is one of the most efficient methods you could use, you're looking at ~3GB of RAM for the entire map.

    --Eric
     
  10. Rasmenar

    Rasmenar

    Joined:
    Feb 22, 2014
    Posts:
    4
    Does SpriteTile feature a system that allows only tiles within a certain range of the player to be loaded/unloaded? If so I'm sold already, if not I'm still heavily considering it... it's nice that you're including the source code as well.
     
  11. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,398
    It has a pooling system so only enough GameObjects are created as necessary, although that's not the same as the tile data. It has functions for loading/saving levels dynamically which you could use, but perhaps functions for loading/saving chunks would be a good addition that could potentially be a more streamlined solution for huge maps.

    --Eric