The Daily Click ::. Forums ::. Klik Coding Help ::. Level Editor, how?
 

Post Reply  Post Oekaki 
 

Posted By Message

Diefox

Possibly Insane

Registered
  23/02/2003
Points
  3481

VIP MemberGOTM -SEPTEMBER 2009 - 2nd place!GOTW WINNER APRIL 2010!
23rd October, 2006 at 12:45:15 -

well, i need to know, how to make a lvl editor in MMF and dont know where to start.

heres what i know about level editors and how i want mine to work:

it would be something simple, i make a set of 16px sized tiles on my 640x480 screen and each tile would have a kind of ID.
like this:

tile: y20, x3. obstacle=yes, object=grass

and so on for all the other tiles.

my doubt is: how to set this? how to make the tags, how to make MMF read and load my txt, i want it to recognize the tags, if the object is set at "grass" it will create a object called grass.
i know i have to use fast loop in the beggining of the level but thats the only info i got.

hope you guys can help me out, thanks in advance ^^

 
__________
amandapps.com

David Newton (DavidN)

Invisible

Registered
  27/10/2002
Points
  8322

Honored Admin Alumnus
23rd October, 2006 at 13:33:49 -

To break it down into steps:

For editing a level, you would need a cursor that could place down active objects, with the properties of these objects stored in their flags or alterable values, and so on.

To save a file, you would use the INI object, or an XML object, or really anything of your choice, to get this information into an external file. This would be done by fastlooping through every active that you had placed and reading its properties, then writing these into the file in a manner that you can retrieve later.

Similarly, to load it back up again, you would have to loop to get these values from the file, make up an active that has the properties translated back into how you're storing them internally, then place it at the right point in the level.

This has an example of how it can be done - you could ask its author about it.

http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Number=19331&page=1#Post19331

 
http://www.davidn.co.nr - Games, music, living in America

Werbad



Registered
  18/09/2002
Points
  235
23rd October, 2006 at 13:38:24 -

An array is probably the best for storing this kind of data

 
n/a

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
23rd October, 2006 at 23:58:46 -

I'd use a list object or something and use different ASCII characters for different tiles, like "A" is a wall, "B" is an enemy, "C" is the player etc. Arrays use so much memory, just for empty blocks. But in the other hand, arrays are much easier to use

 
n/a

Bibin

At least 9001

Registered
  01/07/2005
Points
  308

Silver Cup WinnerGOTW Winner!Has Donated, Thank You!VIP Member
24th October, 2006 at 01:02:32 -

Yes, that's what I did for mine. Nyah it is, but protected. It demonstrates that Axel's concept works. No complaining about the lack of fastloop, I made this on a new computer that had no internet that I forgot to put fastloop on when I made it:

http://bibinson.sitesled.com/SDP!.zip

EDIT
Nevermind, it's unprotected.
http://create-games.com/download.asp?id=6458

Image Edited by the Author.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click