Helping the World with KnowledgePosts RSS Comments RSS

Archive for the Tag 'map maker'

Flash Isometric Map Maker - Oasis

This is a flash isometric map maker I made almost 2 years ago while I was still quite a noob, so the programming might suck a little although it is quite advance. Due to lack of planning, the functions are all over the place so even I am confused after not looking at it for such a long time. Everything is self-learned by the way :)

It was uploaded before, but the server went down along with all the data, so I am reuploading it now. I uploaded it because I figured if it just sat in my hard disk it would just err…. sit there. So, if I upload it maybe someone interested in it can learn something from it or make good use of it. (That is if you figure it out somehow) Please post any comments if you do :D

If you understand the concepts of this map maker, you could probably make a better one yourself because you will learn what is possible with flash.

I will upload a demo later, too lazy now.

  • Actionscript 2
  • Flash 8
  • Isometric
  • Saving and loading map using XML and PHP into text files
  • OOP

Some documentation I attempt to write:

Introduction

Everything is contained in the “world instance” sitting in the stage. The movie clip name is called worldMC and it’s functions are in gameWorld.as. If you understand OOP in flash, this means that the constructor in gameWorld.as which is gameWorld() would run as soon as the flash is loaded. Okay, the init() function runs as well, but I don’t remember where did I call it.

The engine is able to read and generate XML and since flash alone cannot write files, PHP is used to save it to the hard disk. You could save it to a database if you know PHP. Oh and by the way if you need a hosting with PHP and MySQL, I can provide it.

The engine draws the isometric map using lines and fills that is inbuilt in flash. You then apply the “texture” AKA map objects onto it. These objects are in .swf formats within the texture.zip.

Installation

Just extract everything into a folder then open the html file to view it. Extract textures.zip into the same folder as well unless you want to put it in a separate folder and modify the path to load from it. I did not include the php files to save it, maybe later.

XML generation and loading

The current XML format is not very human-friendly or valid. If you change the format of the XML generated, you must also change the way it is loaded, which is the load_map function.
XML generation function - generateMapXML(map) in map_maker.as
XML loading function - load_map(url) in map.as

The text commands

This is basically the /load, /save and /texture commands. The function that deals with this is the command(msg:String) function found in map_maker.as line 57.

  1. /load <xml_file_name> would load the file into the map
  2. /save <xml_file_name> would save it if you are running php on the server(mapper.php is the file that does the writing of the xml file to the hard disk).
  3. /texture <swf_file_name> would load the swf “texture” as your current texture. To apply that texture, select a tile by clicking on it and click on apply texture.

Map Size

The map size is controlled by mapInit() function in map.as

Download

Download >> Oasis - Flash Isometric Map Maker (Downloaded 230 times)

It is recommended that you bookmark this page for further reference or updates.

No responses yet