Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Tile-Based Top-Down Games? New user needing guidance..

Discussion in 'Scripting' started by MooseTrap, Mar 8, 2010.

  1. MooseTrap

    MooseTrap

    Joined:
    Mar 6, 2010
    Posts:
    3
    Hi all,

    I'm just getting started with Unity and with JavaScript, and was wondering what would be the way to implement a tile based game, from a top down perspective?

    I've got a couple of very roughly formed ideas in my head of how this might work, but was wondering if someone could point me in the right direction? I've searched the forums and the web but can't seem to find the relevant information.

    Thank you in advance, looking forward to getting my head around Unity and Scripting!
     
  2. greg767

    greg767

    Joined:
    Nov 6, 2009
    Posts:
    113
    Hi MooseTrap,

    I'd suggest that you put down those roughly formed ideas without fear, because otherwise noone will know what you expect as an answer.
    So please be more specific!

    Greg
     
  3. MooseTrap

    MooseTrap

    Joined:
    Mar 6, 2010
    Posts:
    3
    Sorry about that!

    What I was thinking was storing the grid in an array, with a 1 or 0 value for each square, telling the game where to place a block? would this work? I'm still learning Javascript so I'm not sure of even the pseudocode for this. Just wanted to have an idea of what to aim for to then have a go and repost here for feedback.

    Cheers :)
     
  4. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    This is a project that's a top-down tile-based game.

    --Eric
     
  5. MooseTrap

    MooseTrap

    Joined:
    Mar 6, 2010
    Posts:
    3
    Thanks Eric! Checking it out now! :D
     
  6. XYX

    XYX

    Joined:
    Feb 23, 2010
    Posts:
    22
    i think arrays would work pretty well (but youd have to use the draw method for each item in the array right?)

    i used that method with the love2d engine to recreate a sega columns clone

    also theres a grid movement script here http://www.unifycommunity.com/wiki/index.php?title=GridMove (set it to vertical for what you want)