The Daily Click ::. Forums ::. Klik Coding Help ::. Problems with map editors tile set!
 

Post Reply  Post Oekaki 
 

Posted By Message

tenne



Registered
  25/06/2009
Points
  10
6th July, 2009 at 21:30:48 -

Hi,

I'm using this open source map editor: http://www.create-games.com/download.asp?id=7727

My problem is that I cannot use any other size of tileset because if I do, then program saves it wrong. It replaces objects from some other position of active picture...

Help me! My head is going to explode...(6h trying to get it out why cannot use BIIIIG tileset)

Thank you!

 
n/a

Spitznagl

Cabinetmaker

Registered
  06/12/2008
Points
  4260

The SpinsterVIP MemberHas Donated, Thank You!Picture Me This Round 29 Winner!Picture Me This Round 31 Winner!Picture Me This Round 36 Winner!
6th July, 2009 at 22:29:35 -

It has to be a limitation.

I suggest you make your own level editor since this one isn't the best. Zephni must have improved it since, but in this state, lots of things aren't well thought. Why save a value from 0 to 10? Because the values can be either 1 or 2 digits long, he needed to use delimiters. So to store a coordinate, 3 to 5 digits are needed. If you save hexadecimal numbers, with a fixed 2 digit value (0 to F), you can use a 16x16 tilset(256 tiles). Use one more digit to indicate the tile angle and wheter or not it is flipped, and you won't need to have rotated clones of your tiles anymore. Then 256 unique tiles should be enough.

Btw, how many tiles have you tried?

 
...

tenne



Registered
  25/06/2009
Points
  10
6th July, 2009 at 23:03:12 -


Originally Posted by Spitznagl
It has to be a limitation.

I suggest you make your own level editor since this one isn't the best. Zephni must have improved it since, but in this state, lots of things aren't well thought. Why save a value from 0 to 10? Because the values can be either 1 or 2 digits long, he needed to use delimiters. So to store a coordinate, 3 to 5 digits are needed. If you save hexadecimal numbers, with a fixed 2 digit value (0 to F), you can use a 16x16 tilset(256 tiles). Use one more digit to indicate the tile angle and wheter or not it is flipped, and you won't need to have rotated clones of your tiles anymore. Then 256 unique tiles should be enough.

Btw, how many tiles have you tried?



Hmm, that makes sense... Do you have better open source example of level editor or some links how to make my own level editor?

I tried to use about 30 tiles but tiles positions seems to be a problem... If position is "over something" it just replaces it with something else... Example if I have "rock" left side of active picture(active picture size is 552 x 216, and tile size is 24 x 24) and "water" is right side of the active picture. I want to make level and I draw rocks and water and save, when I load map: rocks are drawn correctly but water is replaced with rocks or something else whats is left side of active picture tileset.

 
n/a

Spitznagl

Cabinetmaker

Registered
  06/12/2008
Points
  4260

The SpinsterVIP MemberHas Donated, Thank You!Picture Me This Round 29 Winner!Picture Me This Round 31 Winner!Picture Me This Round 36 Winner!
6th July, 2009 at 23:25:23 -

My level editor is currently under a transition to support infinite tiles per square. That means no fixed data for every layer, so no useless data saved. I deleted the original working file, so once I make it work again, I'll sent it to you.

Give me like 4-6 weeks though, cause I'm curently doing animation work for someone.

For the time being, why not PM Zephni?

 
...

[DELETED]

Likes to put dots on paper

Registered
  08/12/2008
Points
  118

MushroomVIP MemberARGH Sign
7th July, 2009 at 04:10:05 -

It just sounds like problems trying to change someone else's code to suit your needs, where you should just build it custom for your own needs using that code as example and you won't have as many problems. Also, seems to sound like a positioning problem.

EDIT: Sorry, I just thought about it for a second and is the tileset an active picture object? If it's given a set size then I think it will squish the image if you make a tileset larger than allowed and mess up your positions/co-ordinates.

Edited by [DELETED]

 
n/a

tenne



Registered
  25/06/2009
Points
  10
7th July, 2009 at 09:57:33 -


Originally Posted by jthongbai
It just sounds like problems trying to change someone else's code to suit your needs, where you should just build it custom for your own needs using that code as example and you won't have as many problems. Also, seems to sound like a positioning problem.

EDIT: Sorry, I just thought about it for a second and is the tileset an active picture object? If it's given a set size then I think it will squish the image if you make a tileset larger than allowed and mess up your positions/co-ordinates.



I posted to zephni and he explained why it doesn't work: "The problem with the old one is (i think) that its selecting the tile from the left of the whole screen rather than where the screen is currently poositiond.. That might not make sence but, its all fixed in the new one."

 
n/a

[DELETED]

Likes to put dots on paper

Registered
  08/12/2008
Points
  118

MushroomVIP MemberARGH Sign
8th July, 2009 at 03:44:51 -

Yes, that's what the problem sounded like.

 
n/a

Zephni

My other cars a Balrog

Registered
  17/10/2007
Points
  4019

Has Donated, Thank You!VIP MemberSonic Speed
8th July, 2009 at 10:06:25 -

Hey guys!

Yeah il be honest that editor was a explosion of poor programming.
I just uploaded an editor which was a couple of backups ago so you might be ableto learn a couple of things from that.. Alough (not because your not clever, but because i do things weird) the saving and loading is a lil complicated to understand.

Thats because it doesnt just save the whole map, it saves where it knows a tile/object/tile propertie is, and then only loads them blocks. Therefore it can load massive levels in just a ouple of seconds.. That might not make to much sence but i wrote a artical on it.

um.. yeah take a look.

I didnt understand what someone said about delimiters, because... personaly i find delimiters are the best way to parse data.
ESPESIALY objects. like this: 'object - NPC - bob.png - thisluascript.lua'

Maybe i got you wrong.. anyway. Im tired

 
dont make me divide by zero...

Spitznagl

Cabinetmaker

Registered
  06/12/2008
Points
  4260

The SpinsterVIP MemberHas Donated, Thank You!Picture Me This Round 29 Winner!Picture Me This Round 31 Winner!Picture Me This Round 36 Winner!
8th July, 2009 at 11:28:54 -

Using delimiters to separate the X & Y coords seems useless. Mabe they can be used when you've got many tiles in one position, altough if the stored data has a fixed number of digits, you don't really need them either. I just use mid$() to split the stings.

Your way works too, but it's all about the file size.

 
...
   

Post Reply



 



Advertisement

Worth A Click