Results 1 to 4 of 4
  1. #1
    Alkor is offline Member
    Join Date
    Feb 2012
    Posts
    39
    Rep Power
    0

    Default Game "Grid" idea need suggestions...

    Well, im making a game, and need some suggestions, my game is a basic rpg but i need a way of placing(npcs, buildings, etc.).
    I was thinking of making like a grid where i could place things at certain locations like(4242,4242) and I could do same for ground texture like grass at (503.535).

    Im looking for ways of doing this...not code,
    Thanks for suggestions!

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,097
    Rep Power
    20

    Default Re: Game "Grid" idea need suggestions...

    You might want to think in terms of tiles, at least for the texture and smaller objects (those that fit in a single tile). A TIle will therefore have a texture type and a list of things that it contains. That way you can draw these quite quickly by passing over the tile array. Note you will want to (eventually) know what the neighbouring textures are in order to smooth the transition between textures at a tiles edge. Gamedev.net used to have some good articles on this. Look back in the archives on there.

    For larger objects that span more than a single tile you'll do another pass and overlay them. Later on you might want to consider a z-position for these things so you can tell whether something is above a character (eg a trees canopy), so you'd do a few passes like:
    Draw background (textures and small objects).
    Draw z = 1, which covers boulders, tree trunks, characters.
    Draw z=2, tree canopy, single story building roof, second story of building.
    etc.

    Of course the trick then is to only redraw bits that have changed, otherwise you're drawing the whole image time and again, which would be time-consuming.

    Anyway, as always on these things, start small. Don't try and do the z-coordinate bit until you have a fully functioning non-covering map.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  3. #3
    Alkor is offline Member
    Join Date
    Feb 2012
    Posts
    39
    Rep Power
    0

    Default Re: Game "Grid" idea need suggestions...

    Prefect that's what i was looking for just couldn't find the right name for it!

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,097
    Rep Power
    20

    Default Re: Game "Grid" idea need suggestions...

    Gamedev.net is always a good place to look for these sorts of things.
    They may not necessarily be in the language you are writing in, but the concepts can help a great deal.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Similar Threads

  1. Replies: 4
    Last Post: 02-03-2012, 01:55 PM
  2. Replies: 1
    Last Post: 02-01-2012, 08:37 PM
  3. Replies: 1
    Last Post: 09-30-2011, 01:28 PM
  4. Replies: 2
    Last Post: 08-05-2010, 04:49 AM
  5. Replies: 1
    Last Post: 10-20-2008, 07:35 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •