|
Post by therealmethuselah on Nov 20, 2005 12:13:51 GMT -5
mapTutorial.zip (2.72KB)This will show you how to convert your tiles into a simple Sprite Based Font, and load a variable from an external file to draw your Room. The sprite will look something like this For this tutorial we are making the first 16x16 tile 'A', then 'B', and so on, we only have 7 characters in our font here, but you could make all 127 ASCII characters in your graphic. Using GameMaker 6+'s built in font_add_sprite function we load the graphic as a font. Then we load the map variable from the external file using execute_file('mapMap.txt'); { // mapMap.txt // # is a Carriage Return (Next Line) map='BBBAAAAAAAAAAAAA#BB...(shortened for length) } Used in conjunction with my previous External Resources Tutorial and a little room_add() functions, you could make ALL of your resources including Rooms external, making your .exe file super small, and allowing you to change ANYTHING on the fly; this will make Patches, Sequals and the like incredibly easy to send out. For SPAWN points of enemies, and also objects you could make another map File and have the game load that after the mapMap.txt file. If you needed multi-layered maps you could add more variables to the map file and have them loaded one after the other... for this I suggest you make your sprite 17 pixels high so that the bottom pixel is transparent, this way you can have overlapping tiles... Goodluck with your Games!
|
|