Home » Community » Forums » » Game Programming Genesis Part VIII : Basic Tile Engines
  Intel sponsors gamedev.net search:   
[Control Panel] [Register] [Bookmarks] [Who's Online] [Active Topics] [Stats] [FAQ] [Search]

Add Forum to Favorites |  Send Topic To a Friend | View Forum FAQ | Track this topic


 Last Thread Next Thread 
 Game Programming Genesis Part VIII : Basic Tile Engines
Post Reply 
only one word: great!
i'm a rookie, and startet to prog a little tile-based game some time ago. as the project grew and turned into an SNES-like RPG, i had a lot of probs, but these days are gone! praise god..errr Mr. Farrel, i mean *g*!

 User Rating: 1015    Report this Post to a Moderator | Link

Hello,

First off, thank you for the Article, you did a great job, I look forward to disecting it more.

I do have a question for you... What does the testmap.dat look like or how do you view it or make it?

Cheers,
Thankful

 User Rating: 1015    Report this Post to a Moderator | Link

I really enjoyed this article. Keep up the good work. There is a typo on the last page in the link to the zip file. It should be tile.zip . Anyway looking forward to many more articles.

dron1

 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

You are definitely doing great work with these articles; they are by far the most helpful I've seen! I definitely look forward to the next one! (perhaps more information about the scripting engine you've been referring to? )

-- Rabid Child

 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Thanks a lot guys! I e-mailed Myopic about the broken link so hopefully that will get fixed, but for now, the link in the sidebar does work, even though the link in the article body is broken. So you can still get the source from there.

quote:

What does the testmap.dat look like or how do you view it or make it?



In tile.zip there's a file called Test Map.cpp. If you look in there, it's just very simple code that comes up with a random map. This is easy because there are so few tiles in the example, heh. You should be able to tell everything you need about the file structure by looking at the code which writes the file, or the code which reads the file for that matter. You can't really view the file in a user-friendly manner since it's binary and not text, but if you really want to, you can open it with a hex editor (just drag and drop it into Visual C++ if nothing else).

In your actual games, map files would be generated by using a map editor, which you'll probably have to write, unless you can find one out there that uses the same sort of file structure you'd like to implement. Map editors are not hard to write, because you can use a lot of the same code as is used for your tile engine to display maps as they're being created. At the bare minimum, what you need to add is some way to select a tile from your tileset, and then add copies of that tile to the map.

There are lots of extra things you can put in though. For instance, you will probably have objects that are made up of multiple tiles (unless you're simply using tiles of variable size), so a very convenient thing to add is either a tool that plots an entire object on the map at once, or a default program option that places the rest of an object's tiles when you place one of them.

Another thing to add is a method of linking scripts to the map. You might want to be able to select a scripting tool, then click on the map somewhere, and get a prompt asking you for a script ID number or name. When you type one in, that script is 'linked' to the map, and will be triggered whenever the character steps on that spot, or searches that spot, however you need to do it.

If you're going to have multiple layers, obviously you'll need some way to specify which layer you're plotting tiles on. A common way to do this is to implement a Photoshop-like layer system, where you can select which layers are visible and which one is active. Another way to go is to set each tile a default layer, so that when you drop it onto your map, the editor knows which layer to place it on. Or you can use a combination of different methods. My map editor for Terran, for example, has that last thing I mentioned, the default layer technique, for ease of use... but it also has separate windows for viewing each of the three layers individually, so I can place tiles outside of their default layers, or edit things manually if I need to.

These are just some ideas for map editors -- I'm sure you can come up with more. Obviously the features you will need are dependent on what data you'll be storing in the map file, but hopefully this gives you some ideas.

Thanks again for the comments!

-Ironblayde
 Aeon Software

Down with Tiberia!!

 User Rating: 1020   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Yes your articles area really great I scanned over them. But as I am wishing to devlop a tiling engine for OGL I have read your tiling article. It has been of great help to me thanks ( even tough im writing OGL code I used to write DX code and the theory is the same ) ! I will devlop my tile engine after I finish writing my GUI class. After that I guess comes the map editor/maker. That should be hard as I have never programmed any "window" app. I program small games in DX and OGL but they do not use documents/buttons/toolbars. But Ill have a look into MFC I guess. Thanks again for the articles.

WHO DO THEY
THINK THEY'RE
FOOLING : YOU ?



GARAL website

 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Anyone can tell me where to download the tiles.zip?



 User Rating: 1015    Report this Post to a Moderator | Link

Try the link again. There shouldn't have been an s.

 User Rating: 2088   |  Rate This User  Send Private MessageView ProfileView Journal Report this Post to a Moderator | Link

This artical is great for people looking for info on RPG design infact this series is the only RPG design series i have ever found! Good Job!

 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

i need help. i must be stupid but i'm getting the: nexpected end of file while looking for precompiled header directive - error.

 User Rating: 1015    Report this Post to a Moderator | Link

i've fixed my above problem^^^ and arose another... now i'm getting these three errors:

Tile Engine Demo.cpp(30) : error C2146: syntax error : missing ';' before identifier 'lpdd7'

Tile Engine Demo.cpp(30) : error C2501: 'LPDIRECTDRAW7' : missing storage-class or type specifiers

Tile Engine Demo.cpp(30) : fatal error C1004: unexpected end of file found

 User Rating: 1015    Report this Post to a Moderator | Link

All times are ET (US)

Post Reply
 Last Thread Next Thread 
Forum Rules:
You may not post new threads
You may post replies
You may not edit your posts
You may not use HTML in your posts
Jump To:
Administrative Options: