Tile array

Post: #1
Hey all. I am a C++ newbie, and am working on a Rogue-Like (yeah, I know it's not original Annoyed ), and I would like help as to how to set up arrays for ASCII tile system. I am using Dev-C++ and Allegro library, and have the menu system ect. set up, I don't know much about arrays and how to set up a tile engine for this.
Quote this message in a reply
Posts: 1,199
Joined: 2004.10
Post: #2
You need to plan out ( best on paper ) what your tiles will represent. E.g., are you dealing with a fixed, say, 100x100 grid? or are you dealing with a continuous environment, with a subset being displayed at any given moment? Or something else...

I would assume that you're dealing with window into a continuous environment, so you'd need some sort of model-view-controller type design, where you'd have a data source ( your world ) and a controller which would feed sets of tiles from the world into a view-store of finite size ( say, 20x20 ).

You'll need, in most likelyhood, some sort of class to represent a given tile, with requisite assignment operators and the like. You'll also need logic to determine where the view is in world space, to feed particular tiles to your view.

And so on. E.g., you *need* to plan out exactly what the system is supposed to do, long before you write any code.

Finally, I'd never heard of Dev-C++ so I googled. It's a windows dev environment, right? People here are working on Macs -- generally speaking OS X -- and will be able to give you platform specific help in that direction. So, while we'll be happy to help you with you design issues and so on ( maybe there will be some Allegro folks here, too ) but we won't be able to help you with Dev-C++ specifics or windows platform specifics. You might want to join a windows forum for those questions.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  memcpy(stuct array pointer struct array point) unknown 22 16,071 Sep 29, 2005 03:16 PM
Last Post: unknown