The Daily Click ::. Forums ::. Klik Coding Help ::. Level maker
 

Post Reply  Post Oekaki 
 

Posted By Message

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
26th December, 2008 at 02:44:24 -

FRAKKANAGRAPNAFRAJJAKRAPOLAMOLAFROLAJARGAFROOBLE. In case you can't tell, I'm rather frustrated.

Would anyone be so kind as to help me? I'm trying to make a level maker in Splotches, and nothing is working the way I want it to. I've always hated INI's. >____________O Keeping track of everything and recording it is getting my head all jumbled up, and somewhere along the line it stops working, even with only one object. NARG! I've got 36+ different types of objects. I want to record in the INI where they are created in my level creator. I tried using the string parser, but apparently I don't know how because it's not working. It all makes logical sense, but doesn't create the object in the level reader. NARG!

>:|

 

  		
  		

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
26th December, 2008 at 13:19:28 -

Sweet. So what are you asking us for?

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

RedEnchilada

formerly RedEchidna

Registered
  01/08/2008
Points
  301

VIP MemberWii OwnerThe Cake is a LiePicture Me This Round 24 Winner!
26th December, 2008 at 13:57:09 -

Help with his level creator.

Make sure everything's grid-based. Then, if you're using a XxX grid on a AxB screen with 3 objects and a backdrop, just use the following.

-Button "Save" pressed:

--INI Object: Set file to AppDir$ + EditText(Edit Box)
--Invisible Detector Object: Set Value A to 0
--Fast Loop Object: Start loop #0 (A/X) * (B/X) times

-On loop 0:
--Invisible Detector Object: Set X position to Value A(Invisible Detector Object) * X Mod A
--Invisible Detector Object: Set Y position to Value A(Invisible Detector Object) / A * X
--INI Object: Set item to Str$(Value A(Invisible Detector Object))
--INI Object: Set value to 0

-On loop 0:
+Invisible Detector Object is overlapping a backdrop:
--INI Object: Set value to 1

-On loop 0:
+Invisible Detector Object is overlapping Object A:
--INI Object: Set value to 2

-On loop 0:
+Invisible Detector Object is overlapping Object B:
--INI Object: Set value to 3

-On loop 0:
+Invisible Detector Object is overlapping Object C:
--INI Object: Set value to 4

-On loop 0:
--Invisible Detector Object: Add 1 to Value A


That's how I do it, anyways. That's not copy-paste friendly, mind. You'll have to recreate the actions yourself. It also doesn't explain loading, which I'll get back to you on soon.

 
http://www.youtube.com/watch?v=WYrSD35vHo4
woooooooooooooooooaah maaaaaaaaaaaaaaaaaaaaan

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
26th December, 2008 at 16:41:06 -

You're probably going to have to explain that a bit more. Want to tell me what the Mod thing is? I think I have an idea, but I'm pretty sure it's not in TGF1. I kind of see where it's going, but my Christmas break brain isn't working right.

Edited by OMC

 

  		
  		

Hernan



Registered
  04/03/2003
Points
  707

VIP Member
26th December, 2008 at 16:48:43 -

"mod" is a mathematical operator. Even TGF1 had it. It's VERY useful.
Mod returns the remainder after a division. Example: 5 mod 2=1. An example in terms of a level editor: suppose you have a grid that's 100 spaces wide and 100 spaces high and you want to loop through the whole field (so you loop 10000 times). To get the Y index in a quick way you'd take loopindex/100. To take the X index you take loopindex mod 100. I didn't read what Frostbitten RedEchidna wrote actually, but i'm pretty sure he means something like that.

Oh! I just noticed something. Look at Assault Andy's sig and see if you understand that

Edited by Hernan

 
This space is for rent

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
26th December, 2008 at 17:00:37 -

Oh dear. Math on a holiday. I understand mod, but I don't even want to try to understand Andy's sig. It must be because I just woke up or something, because I just can't seem to understand how that setup works. O_o I'm sure I would understand it better if someone explained it a bit. It also doesn't help that X is used twice instead of X and Y. O_o

Normally my patience with problems is larger, but my history with INI's kind of cut it short this time. I'm really not all that frustrated, I just kind of gave up and asked for help sooner than usual, because I know I eventually will be frustrated.

Edited by OMC

 

  		
  		

RedEnchilada

formerly RedEchidna

Registered
  01/08/2008
Points
  301

VIP MemberWii OwnerThe Cake is a LiePicture Me This Round 24 Winner!
26th December, 2008 at 22:47:57 -

Yeah, my head hurt too making it. I'll see if I can whip up an example.

 
http://www.youtube.com/watch?v=WYrSD35vHo4
woooooooooooooooooaah maaaaaaaaaaaaaaaaaaaaan

[DELETED]

Likes to put dots on paper

Registered
  08/12/2008
Points
  118

MushroomVIP MemberARGH Sign
4th January, 2009 at 01:35:29 -

I know this is a little old, but using an array for levels is one hundred times better than trying to save and load a created level from an INI file.

 
n/a

Ricky

loves Left For Dead 2

Registered
  28/12/2006
Points
  4175

Has Donated, Thank You!Game of the Week WinnerVIP MemberWii OwnerHero of TimeGOTM Winner! - November 2009I am an April Fool
4th January, 2009 at 02:20:35 -


Originally Posted by jthongbai
I know this is a little old, but using an array for levels is one hundred times better than trying to save and load a created level from an INI file.



I disagree, 100%. ini++ is much more flexible than the array object, supports built in compression, + you don't have to waist 32 bits on every tile you don't use.

Edited by Ricky

 
-

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
4th January, 2009 at 02:33:40 -

TGF1 does not support arrays anyway.

I still haven't tackled the level maker yet, I need to... >_O

 

  		
  		

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
24th January, 2009 at 20:14:36 -

Still haven't made it yet. :|

DC Mail me if you're bored and know how to make a level maker with tools available in TGF1.

I can't understand why INI's hate me so much. The events make logical sense...

 

  		
  		
   

Post Reply



 



Advertisement

Worth A Click