The Daily Click ::. Forums ::. Klik Coding Help ::. Making a Level Editor
 

Post Reply  Post Oekaki 
 

Posted By Message

Paul_James



Registered
  02/07/2002
Points
  1320
21st March, 2007 at 04:51:08 -

Okay this maybe harder than I thought
but im curious about the basics of making a level editor
I understand the concepts and I have a few ideas on exactly how to do it
But im not a hundred percent sure
Like for example would i be using any extensions (Mmf 1.5)

 
Its not enough,I need more
Not enough to satisify
I said I dont want it, I just need it.
To believe, to feel, to know I'm alive.

Knuckle deep beneath the borderlines.
This may hurt a little but its something you'll get used to.
Relax. Slip Away...

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
21st March, 2007 at 08:03:04 -

No, you shouldn't need any extensions to make one. The easiest way is to use a two-dimensional array, which you use to store all the level data in. Then, to load everything, you use a fastloop to loop through the array and create all objects and stuff.

 
n/a

jpSoul



Registered
  25/10/2003
Points
  1714
21st March, 2007 at 10:42:34 -

to save the position of several identical objects you can do:
pick "your object" at random => save x and y position, destroy object

you need to use counters to make a different name of key for each x and y positions, it will be for example: 1x, 1y for the first object, 2x, 2y for the 2nd...
the best way to understant how an editor works is to download a tutorial, i'm sure that there are many articles about editors

 
n/a

Paul_James



Registered
  02/07/2002
Points
  1320
21st March, 2007 at 10:53:42 -

well i started working on it - using just my mind and I have a pretty basic one working
however Im stuck on the loading
Im not a hundred percent how im going to load each tile individuallly - anythoughts???

 
Its not enough,I need more
Not enough to satisify
I said I dont want it, I just need it.
To believe, to feel, to know I'm alive.

Knuckle deep beneath the borderlines.
This may hurt a little but its something you'll get used to.
Relax. Slip Away...

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
21st March, 2007 at 14:24:55 -

Fastloops. Here, assuming you're using a tile-based system and a two-dimensional numerical array, where each number in the array represents a different kind of tile:

* Run this event once
- Start loop "Load Y" [Y dimension] times

* On loop "Load Y"
- Start loop "Load X" [X dimension] times

* On loop "Load X"
* ValueAtXY( "Array", LoopIndex("Load X"), LoopIndex("Load Y")) == 1
- Create "Active" at (0,0)
- Active: Set X position to LoopIndex("Load X") * [Tile width]
- Active: Set Y position to LoopIndex("Load Y") * [Tile height]

Then, just duplicate the last event to make different kinds of tiles. For example, 1 could be a grass tile, 2 could be a house, 3 could be an enemy, etcetera.

 
n/a

Paul_James



Registered
  02/07/2002
Points
  1320
21st March, 2007 at 14:52:09 -

u think u could post an example out of this?
i mean every friggin tutorial or engine that is out there about this has some extension for some reason i cant open (even after dling the extension)


 
Its not enough,I need more
Not enough to satisify
I said I dont want it, I just need it.
To believe, to feel, to know I'm alive.

Knuckle deep beneath the borderlines.
This may hurt a little but its something you'll get used to.
Relax. Slip Away...

DaVince

This fool just HAD to have a custom rating

Registered
  04/09/2004
Points
  7998

Game of the Week WinnerClickzine StaffHas Donated, Thank You!Cardboard BoxDos Rules!
21st March, 2007 at 16:42:43 -

Then they probably use the old fastloop extension, which WAS required because a long time ago fastloops weren't built into MMF.

Get kfcloop.cox and copy it to the usual folders.

Besides that, he just gave you an example on how to do it.

 
Old member (~2004-2007).

Paul_James



Registered
  02/07/2002
Points
  1320
21st March, 2007 at 17:12:27 -

no no no
like phizzy's tutorial pack which features a level editor - string.cox - which i know is string parser 1 object - i have string parser 2 - but it wont let me - i even downloaded like 5 string.cox put it in every folder imaginable and yet no dice

another person needed iniplus.cox - i got the extension (even though it doesnt work for mmf just there for porting) no dice with that either

however, i got the jist of it down but axel told me to do is not working at all, ive been searching all over dc and i got a couple ideas

 
Its not enough,I need more
Not enough to satisify
I said I dont want it, I just need it.
To believe, to feel, to know I'm alive.

Knuckle deep beneath the borderlines.
This may hurt a little but its something you'll get used to.
Relax. Slip Away...

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
21st March, 2007 at 17:19:23 -

Okay, fine. I'll make an example file. Later though, I'm tired -_-

MMF 1.5, was it?

 
n/a

Bibin

At least 9001

Registered
  01/07/2005
Points
  308

Silver Cup WinnerGOTW Winner!Has Donated, Thank You!VIP Member
21st March, 2007 at 17:34:10 -

I'd point you to Super Duper Person but sitesled deleted it.

 
n/a

Paul_James



Registered
  02/07/2002
Points
  1320
21st March, 2007 at 17:55:04 -

yes axel mmf 1.5
i followed ur code exactly to the core and it didnt work???

 
Its not enough,I need more
Not enough to satisify
I said I dont want it, I just need it.
To believe, to feel, to know I'm alive.

Knuckle deep beneath the borderlines.
This may hurt a little but its something you'll get used to.
Relax. Slip Away...

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
22nd March, 2007 at 09:38:23 -

It depends on how the rest of your editor works.

Here:

http://suisai.sitesled.com/leveleditor.cca

Didn't take me more than two minutes

 
n/a

Paul_James



Registered
  02/07/2002
Points
  1320
22nd March, 2007 at 12:27:08 -

sweet thanks
hmmm

i followed ur events exactly
but its on the same frame - for example - press load button and all the objects should come up

ill keep hacking away at it


 
Its not enough,I need more
Not enough to satisify
I said I dont want it, I just need it.
To believe, to feel, to know I'm alive.

Knuckle deep beneath the borderlines.
This may hurt a little but its something you'll get used to.
Relax. Slip Away...

Paul_James



Registered
  02/07/2002
Points
  1320
22nd March, 2007 at 13:17:55 -

argg man
i used ur thing
and guess what im still haven problems

does that mean ur engine only works with one tile?
i have 11 tiles so far
just testing things out and yet nothing man nothing

 
Its not enough,I need more
Not enough to satisify
I said I dont want it, I just need it.
To believe, to feel, to know I'm alive.

Knuckle deep beneath the borderlines.
This may hurt a little but its something you'll get used to.
Relax. Slip Away...

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
22nd March, 2007 at 14:10:07 -

No, you can make it work with many kinds of tiles. Just copy this event (frame 2, line 3):

* On loop "Load X"
* ValueAtXY( "Array", LoopIndex( "Load X" ), LoopIndex( "Load Y" ) ) == 1
- Create Active at (0,0)
- Active: Set X position to LoopIndex( "Load X" ) * 32
- Active: Set Y position to LoopIndex( "Load Y" ) * 32

And do something like:

* On loop "Load X"
* ValueAtXY( "Array", LoopIndex( "Load X" ), LoopIndex( "Load Y" ) ) == 2
- Create Another_Active at (0,0)
- Another_Active: Set X position to LoopIndex( "Load X" ) * 32
- Another_Active: Set Y position to LoopIndex( "Load Y" ) * 32

And so on.

Image Edited by the Author.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click