Thread: tiles

  1. #1
    Registered User
    Join Date
    Dec 2001


    i got a tilebased map from a 2d-array
    the thing is, should i put my character in the array aswell so i can detect collisions etc. this is my first time i'm using a tile based map. if you didnt get understand me just ask and i'll try to explain further.
    thanks i advance

  2. #2
    I lurk
    Join Date
    Aug 2002
    I'd say no. Just have your 'character' as a seperate entity, so you can draw him over the map, then redraw that portion of the map later and your character in a new position.

    Create a class with an x,y and your image for the character, and compare the x,y of the character to the map.

  3. #3
    Registered User fry's Avatar
    Join Date
    Mar 2002
    I will second that.
    As Eibro said, just create a class for your character, and then test the x and y position with your map array. You dont want to be editing the map array all the time.
    IDE: Dev C++ 5
    Lib: Allegro
    OS: Windows 2000

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Hexagonal vs square tiles
    By OnionKnight in forum Game Programming
    Replies: 2
    Last Post: 04-26-2007, 08:46 PM
  2. text on 2d tiles in DirectX?
    By Quantum1024 in forum Game Programming
    Replies: 4
    Last Post: 04-26-2006, 11:40 PM
  3. Splitting an image into tiles
    By cboard_member in forum Game Programming
    Replies: 5
    Last Post: 02-22-2006, 02:29 PM
  4. Looking for tiles and sounds
    By ~Kyo~ in forum Projects and Job Recruitment
    Replies: 3
    Last Post: 11-13-2004, 05:32 PM
  5. Tiles
    By JoshG in forum Game Programming
    Replies: 18
    Last Post: 06-05-2002, 08:39 AM