10 Event Map Editor - EXAMPLE

Post your own tutorials, guides and demos.

Post » Tue Aug 26, 2008 7:33 pm

This is a very simple, 10 step map editor I whipped up to demonstrate how to make one. It allows you to place two different types of bricks(easily expanded) and a spawn-point, and also save/load your maps and test them out in editor! <!-- s:) -->:)<!-- s:) -->

Instructions:
LEFT CLICK - Place green brick
RIGHT CLICK - Place red brick -- same functionally as green brick, but added for variety and to demonstrate creating objects by name.
MIDDLE CLICK - Place a spawn-poin for your man to start at.
SAVE BUTTON - Save your creation
LOAD BUTTON - Load your creation
TEST BUTTON - Test your creation
CLEAR BUTTON - Clear the map of all bricks and spawn-points
MAP NAME EDIT BOX - The box next to the clear button. Be sure to put in the filename of your map for loading and saving -- don't include file extension or path.

Just a note, the man is simply controlled with the default platform controls, so that doesn't require explanation. Also, the CAP is fully commented, so it should be pretty easy to comprehend. Let me know what you all think. <!-- s:) -->:)<!-- s:) -->

UPDATED 2/22/2013 - Added new link
Map editor examplelinkman20042013-02-22 20:30:54
Moderator
B
98
S
37
G
19
Posts: 1,584
Reputation: 17,817

Post » Tue Aug 26, 2008 7:46 pm

Very nice :) A great demonstration of looping in construct and good example overall!
B
4
S
2
G
5
Posts: 641
Reputation: 3,011

Post » Tue Aug 26, 2008 8:52 pm

Fantastic example. Well commented, and the for-each is a very elegant way to do the loading! Top stuff :)
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,544

Post » Wed Aug 27, 2008 1:36 am

Very educational. Excellent example, linkman :D
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Wed Aug 27, 2008 3:07 am

Thanks for the comments, everybody! Glad to see that everybody thinks it works well. :) I've been fleshing it out some, and it can now make maps of whatever size you want. I'll probably post that up at some point.
Moderator
B
98
S
37
G
19
Posts: 1,584
Reputation: 17,817

Post » Wed Nov 05, 2008 3:25 pm

Great and very useful examlple. Can you upload the version with variable map size?
B
53
S
14
G
10
Posts: 282
Reputation: 7,578

Post » Wed Nov 05, 2008 4:03 pm

[quote="tecbug":2i5qxlju]Great and very useful examlple. Can you upload the version with variable map size?[/quote:2i5qxlju]

Thanks. Glad you liked it. :) That version actually evolved into the map editor in my game, which is actually far to complex and uncommented for an example. I'll modify the one posted here later and post it up.
Moderator
B
98
S
37
G
19
Posts: 1,584
Reputation: 17,817

Post » Sat Nov 08, 2008 1:11 am

Very good example. I always wanted to do a level editor for my project, but was way too lazy to get started. Maybe this will help.
B
21
S
6
G
10
Posts: 1,024
Reputation: 7,445

Post » Fri Feb 22, 2013 4:17 pm

Sounds like exactly what I need. But ummm.... I know im gonna get blasted for being a newb.... where is the file?
B
4
Posts: 5
Reputation: 785

Post » Fri Feb 22, 2013 8:30 pm

I had to descend to the depths of Hell and claw my way back out, but I managed to retrieve it:

Map editor example

I can't make any guarantees that it still works, but there it is.

Here's a link to the old forum -- forum uploads didn't transfer when the forums changed, but you should be able to grab most of them there. For future reference, I'd suggest going going there before resurrecting 5 year old threads.

I hope this helps you out. :)
Moderator
B
98
S
37
G
19
Posts: 1,584
Reputation: 17,817

Next

Return to Your tutorials & example files

Who is online

Users browsing this forum: No registered users and 0 guests