Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


tile based rpg

This topic is 6197 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hello everyone, i have a question for any visual basic game programmers...i want to make a game in visual basic (rpg) using 2d tiles. i have figured out some of the stuff with BitBlt and how to use that, but i dont understand how to create a tile-"map" with this. any ideas? thanks a bunch. vic

Share this post

Link to post
Share on other sites
first off, i would recommend learning DirectDraw7, as it is faster than BitBlt. but, the structure of your maps would be the same so:
your map will basically be a 2D array (or a few 2D arrays if you want layers) of integers, where each integer is the index of a tile graphic. you also need to have your tiles somewhere (i would put them all in one long thin bitmap) and some way of tracking which tile has what coordinates in the bitmap. for example:

Public Type TileType
Index as Integer
Left as Long
Right as Long
Top as Long
Bottom as Long
End Type

then, make an array (or collection, whatever) of these TileType structures, and fill them in with the proper info (load from a file maybe?). when you need to draw your map, you look up each tile index in the map array, find the right coordinates from the TileType array, and BitBlt/DDrawBlt from the bitmap to the form. there are a lot of customizations and optimizations you will want to do, but that is the guts of it.
there is a web site devoted to VB RPG programming, called The Blackhole, it is pretty good as it focuses on VB RPGs. unfortunately, lately i have had trouble connecting to the site, i don''t know if they have server problems or what. but, keep trying, sometimes it is there.

--- krez (krezisback@aol.com)

Share this post

Link to post
Share on other sites
Thanks krez, that was really helpful. I now have a pretty good idea of what i should do. i think i have the blackhole in my favourites somewhere, will try to connect.

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!