You must be logged in to do that.

Map

Map
void Map(string mapname)

Documentation

This function loads a map. If you are using maps in your game, which is not strictly neccesary, this function is essential.

VERGE 3 format .MAP files are currently only created by MapEd 3.

Upon execution of this function, all code execution halts completely, never to be returned, and starts anew in the map's own vc's starting function. For a more in-depth discussion of the correlation between system-vc and map-vc, please view [this section].

Example Usage

//Example 1
/////////////////////////////////////////////

// this loads the map named "test.map" 
// located in the base verge directory.

map( "test.map" ); 



//Example 2
/////////////////////////////////////////////

// This demonstrate's map()'s ability to 
// stop all  functionality under it.

void grue_is_awesome() {
	map( "test.map" );
	exit( "GRUE SUXS!!!!" );
}

void autoexec() {
	grue_is_awesome();  
}

// When this program is executed, 
// as long as ./test.map exists, you will 
// load that map fine, and the program will 
// never exit with the "GRUE SUXS!!!!" 
// message.  This is because map() halts the
// function it was called in, and starts off anew in
// the map-vc.

Talkback

Post a new comment?

Talkback #2 written by Overkill on 2010-06-23.

TheCycoONE: That'd be nice. The problem is, I don't think there ever was a format description written, and I don't feel up to it right now. The readily available source code should be enough information though if you were to write your own tools around this format.
Feel free to peruse Verge's source code on github and write a spec from that if you want. More specifically check out this and this.

Talkback #1 written by TheCycoONE on 2010-06-21.

I know that .MAP files are ugly binaries but the format should be described somewhere in this documentation and linked to here. It would allow easier hand tweaking of maps and the creation of alternate map editors.

Post a new comment?

Doc Nav

Your docs
View All Docs

If you log in, you can edit the documentation, or create your own documents and tutorials!

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.