KS Level Composer

  • 47 Replies
  • 46394 Views
*

Offline AClockworkLemon

  • 708
  • 2
  • -Inactive-
    • View Profile
Re: KS Level Composer
« Reply #15 on: September 23, 2009, 08:52:54 »
need a bit of clarification, If I make a screen then put in some shift settings in the world.ini file, If I copy and paste the screen, It will also copy the shift settings, and alter the x,y values?
I'm not dead. Not entirely. And yes, I'm embarrassed by most of the posts I made here.
:hiddenstar: - From Pumpkinbot

*

Offline xoft

  • 16
  • 0
    • View Profile
Re: KS Level Composer
« Reply #16 on: September 23, 2009, 09:15:09 »
Right now it should take all screen's parameters in World.ini and copy them to the new room exactly the same as they were.

*

Offline xoft

  • 16
  • 0
    • View Profile
Re: KS Level Composer
« Reply #17 on: September 23, 2009, 09:23:45 »
[...]
 1) I have no idea how to start to work on a new screen past the first. All that clicking on the minimap seems to do, is create a selection of the screens you click on.
[...]
 2) Once any selection larger than one screen has been made, the program crashes shortly thereafter.
[...]
 3) Whenever I save in KSLC, it chews up the custom object parameters I've set in my world.ini file...
[...]

Sorry to get back to you so late.

Thanks for the praise, as a programmer I really rarely see such, I really appreciate it :)

1. KSLC was meant only as a checker, editting features are there only for the "quick-fix" type of editting rather than creating new levels from scratch. A full-fledged editor would be much more difficult to make. Though I can see KSLC is becoming an editor more and more.
If you have a clear use-case on how to implement new room creation, I'd appreciate if you shared your thoughts. For me, this kind of work is the most difficult (beside getting the free time, obviously ;) , deciding on how the stuff should interact together; if a mouse-click should start selection or create a new room or ...

2. This is a known issue, I believe I've already solved it, but since in between I've messed up other things, the new version is not yet ready for release.

3. KSLC was built when custom objects didn't exist, so it doesn't account for them. I really need to catch up on this issue. Thanks for the report, I'll add it to the ToDo list.

Re: KS Level Composer
« Reply #18 on: September 24, 2009, 00:45:24 »
 Haha! I got ahead of myself, I saw all the advanced editing tools and couldn't go back to the original KS level builder, and figured it was solely designed as a level editor replacement because the tools rocked so much.

 Durr, if I use it for the intended reasons it makes a bit more sense! XD

 And that Looki guy has an editor that doesn't do all the magical kickass error checking stuff, but it's super solid for just building levels, so I can just use that for the editing.

 So if I use this as a checker, (which I am now) about the only thing you should concern yourself with is keeping the thing from killing the custom objects in the world.ini file.

 Yeah, don't bother adding anything other than what you intended. If you get around to all the checking functionality pointed at in the program menus you'll really come out on top.

 Aaaand if you have time to add more, then I ain't stopping you.  8)
http://jerkdouglas.deviantart.com
 Hit the gallery and you'll find the concept directory for my game.

*

Offline xoft

  • 16
  • 0
    • View Profile
Re: KS Level Composer
« Reply #19 on: September 28, 2009, 16:04:49 »
Good news, everyone :)

KSLC has reached the age of two years today. On 28th September 2007, the first line of its code was written and the first log entry reads "Development started. ZLib for Delphi found"

To commemorate, I've dusted off the decaying sources and made some changes, yay. New version 0.3.15 is out there, grab it while it's still warm :)
In this new version:
Fixed: Crashes after selecting rooms in the map view
Fixed: Selection-only room duplication copied wrong parameters from World.ini
Fixed: Exception occured when entering negative / invalid numbers in Duplication dialog
Fixed: Custom objects should stay untouched
Added: Option whether to modify shifts / warps or not while duplicating rooms

I think many people have been waiting for these features, at least it seems so from the posts here. Hopefully I didn't mess anything up, so give it a try. But remember, always make a backup before trying KSLC, just in case.

*

Offline Bored2death

  • 454
  • 0
  • My attempt at a Nurykabe Tiled room XD
    • View Profile
Re: KS Level Composer
« Reply #20 on: September 29, 2009, 04:04:54 »
So, does this new version fix the whole not detecting shifts/warps for wallswims?
Spoiler: Achievements (click to show/hide)

*

Offline xoft

  • 16
  • 0
    • View Profile
Re: KS Level Composer
« Reply #21 on: September 29, 2009, 07:54:28 »
Shifts no, that didn't occur to me, there's not much of a chance that a shift destination inside a wall would go unnoticed :)
Warps have been checked since forever, though there may be some issues when using flags.

*

Offline TechnoGeek

  • 238
  • 0
  • My new project, Notroid
    • View Profile
Re: KS Level Composer
« Reply #22 on: September 30, 2009, 02:08:31 »
Shifts no, that didn't occur to me, there's not much of a chance that a shift destination inside a wall would go unnoticed :)
Warps have been checked since forever, though there may be some issues when using flags.
Definitely with flags, possibly even with normal warps.
Spoiler: Technogeek's Signature (click to show/hide)

*

Offline xoft

  • 16
  • 0
    • View Profile
Re: KS Level Composer
« Reply #23 on: September 30, 2009, 07:24:16 »
Definitely with flags, possibly even with normal warps.

If you know something I don't, please share. I was under the impression that normal warps were working ok. And noone else has ever complained.

*

Offline Bored2death

  • 454
  • 0
  • My attempt at a Nurykabe Tiled room XD
    • View Profile
Re: KS Level Composer
« Reply #24 on: October 01, 2009, 02:34:55 »
I've noticed that warps give you false positives when tested, and flag warps definitely aren't detected once activated.
Spoiler: Achievements (click to show/hide)

Re: KS Level Composer
« Reply #25 on: October 01, 2009, 03:44:23 »
 Everything I've checked out works great.

...except my custom object listings in the world.ini are still being eaten.

 My OS is Windows XP SP2 if that information has any bearing on the problem.
http://jerkdouglas.deviantart.com
 Hit the gallery and you'll find the concept directory for my game.

*

Offline xoft

  • 16
  • 0
    • View Profile
Re: KS Level Composer
« Reply #26 on: October 01, 2009, 09:23:33 »
Bored2death, can you please provide a sample level when this happens? A short one with as little rooms as needed to reproduce is okay, as long as the effect is observable; a description of which of the detected wallswims is the false positive would be nice too.

JerkDouglas, I don't think it has anything to do with the OS, rather there's still some error in parsing the world.ini file. I could not test COs since I don't have a single level using them. I'll try to find one and see what the problem is. Thanks for the report.

*

Offline AA

  • 510
  • 23
  • Was ITA84
    • View Profile
    • Insight on Videogames
Re: KS Level Composer
« Reply #27 on: October 01, 2009, 10:57:51 »
JerkDouglas, I don't think it has anything to do with the OS, rather there's still some error in parsing the world.ini file. I could not test COs since I don't have a single level using them. I'll try to find one and see what the problem is. Thanks for the report.

Maybe I'm missing something, but by looking at the source code it doesn't seem that the procedure that saves the World.ini file accounts for Custom Objects anywhere.

uKSRepresentations.pas file
Code: [Select]
procedure TKSLevel.SaveEventParams();
var
ep, sl: TStringList;
i: integer;
begin
ep := TStringList.Create();
ep.Add('[World]');
ep.AddStrings(WorldParams);
ep.Add('');
ep.Add('[Cutscene Music]');
ep.AddStrings(CutsceneMusicParams);
ep.Add('');
for i := 0 to NumRooms - 1 do
begin
sl := Room[i].GetEventParams();
if Assigned(sl) then
begin
if (sl.Count > 0) then
begin
ep.Add('[x' + IntToStr(Room[i].XPos) + 'y' + IntToStr(Room[i].YPos) + ']');
ep.AddStrings(sl);
ep.Add('');
end;
sl.Free();
end;
end; // for i

// save to INI:
try
ep.SaveToFile(LevelDir + 'World.ini');
except
on e: Exception do
begin
if Assigned(Log) then Log.Log(LOG_ERROR, '!!! Exception received: "' + e.Message + '" !!!');
raise;
end;
end;
end;

Or is there a different procedure being used for that? If there is, I'm sorry.
Videogames are for everyone, by everyone

*

Offline xoft

  • 16
  • 0
    • View Profile
Re: KS Level Composer
« Reply #28 on: October 01, 2009, 11:05:37 »
[...]
Maybe I'm missing something, but by looking at the source code it doesn't seem that the procedure that saves the World.ini file accounts for Custom Objects anywhere.
[...]

Oy, of course, you're right! I've parsed the params in, but never included them when saving back! Stupid me. Fixing now.

EDIT: Plus, there is an object leak in the code, ep never gets destroyed. Must've been sleeping already when writing that code :P
« Last Edit: October 01, 2009, 11:08:13 by xoft »

*

Offline xoft

  • 16
  • 0
    • View Profile
Re: KS Level Composer
« Reply #29 on: October 01, 2009, 12:23:43 »
New version: 0.3.16

Contains a single fix, thanks to AA, the custom objects shouldnt get chewed up anymore.