Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
4ceae14
New settings: simplifiedRenderAlphaThreshold, simplifiedRenderInWorld…
kiberptah Mar 1, 2026
24b5e75
Create start_project.bat
kiberptah Mar 11, 2026
68e8242
option to camera to not reset on layer change
kiberptah Apr 29, 2026
dfa546a
better entities resize border
kiberptah Apr 29, 2026
61fa5bc
Cleanup fork features: fix settings save bug, match codebase style
kiberptah Jul 7, 2026
27bb589
Ignore local compile_debug.bat helper script
kiberptah Jul 7, 2026
d208c5c
Ignore local compile_debug.bat helper script
kiberptah Jul 7, 2026
ea06c2f
Custom commands: optional OS restriction (all/windows/mac/linux)
kiberptah Jul 7, 2026
aec530d
Clearer warning when all manual commands are restricted to another OS
kiberptah Jul 8, 2026
a3e3b1d
Fix stale advanced-select display when change event doesn't rebuild t…
kiberptah Jul 8, 2026
9c8f888
Merge experimental: OS-restricted custom commands + fork feature cleanup
kiberptah Jul 8, 2026
59655ad
Entity move follows the Grid option like the placement preview
kiberptah Jul 8, 2026
19b2d70
Hide entity resize handles while moving a selection
kiberptah Jul 8, 2026
1855479
Smaller entity resize handles radius
kiberptah Jul 8, 2026
cfd1186
World view: multi-level selection and group move
kiberptah Jul 8, 2026
dd6aed6
Fix lingering highlight when ctrl-unselecting the active level
kiberptah Jul 8, 2026
9c7af21
New setting: option to keep World view open when pressing ESC
kiberptah Jul 8, 2026
453bf20
Settings: group camera auto-fit and ESC options under new Behavior se…
kiberptah Jul 8, 2026
5f6a24f
Ignore local compile_and_run.bat helper script
kiberptah Jul 8, 2026
b0196e0
Settings: move Behavior section to top of second column
kiberptah Jul 8, 2026
dcc801a
Fix errors when deleting a level that is in the multi-selection
kiberptah Jul 11, 2026
06a4124
Fix level switching in level view after using world multi-selection
kiberptah Jul 11, 2026
d34ed8c
Sync world multi-selection with active level when selected outside wo…
kiberptah Jul 11, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
lastBuildVersion.txt
json_doc.xml
compile_debug.bat
compile_and_run.bat

*.crash.json
*.crash.ldtk
Expand Down
48 changes: 47 additions & 1 deletion app/assets/tpl/editAppSettings.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,27 @@ <h3>Visuals</h3>
<input type="checkbox" id="blurMask" />
</dd>

<dt>
<label for="simplifyWorldView">Simplified world view render</label>
<info>
If enabled, levels in the World view are rendered using a single colored pixel per tile.
If disabled, tiles are rendered in full resolution, which could impact performances on large worlds.
</info>
</dt>
<dd>
<input type="checkbox" id="simplifyWorldView" />
</dd>

<dt>
<label for="simplifiedRenderAlphaThreshold">Simplified render alpha threshold</label>
<info>
When the simplified world view render is enabled, tiles with an average alpha below this threshold are excluded from the render.
Decrease this value if the simplified view is missing details, increase it if too many small details are included.
</info>
</dt>
<dd>
<input type="number" id="simplifiedRenderAlphaThreshold" step="0.01" min="0" max="1" />
</dd>

</dl>
</div>
Expand All @@ -107,6 +128,32 @@ <h3>Visuals</h3>
<div class="right">
<dl class="form">

<dt class="full">
<h3>Behavior</h3>
</dt>

<dt>
<label for="cameraResetOnWorldModeChange">Auto-fit camera on world mode change</label>
<info>
If enabled, the camera will automatically zoom to fit when switching between World and Level modes (eg. when changing layers).
Disable this option to keep your current camera position instead.
</info>
</dt>
<dd>
<input type="checkbox" id="cameraResetOnWorldModeChange" />
</dd>

<dt>
<label for="escExitsWorldMode">Exit World view with ESC</label>
<info>
If enabled, pressing ESC while in the World view closes it and returns to the Level view.
Disable this option to keep the World view open when pressing ESC.
</info>
</dt>
<dd>
<input type="checkbox" id="escExitsWorldMode" />
</dd>

<dt class="full">
<h3>Controls</h3>
</dt>
Expand Down Expand Up @@ -186,4 +233,3 @@ <h3>Advanced options</h3>
</div>

</div>

2 changes: 2 additions & 0 deletions app/assets/tpl/editProject.html
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ <h2>
A list of custom commands that will be executed by LDtk in various situations.
The working directory for all these commands is the project directory.
If multiple commands are to be ran at a given moment (eg. before saving), they will be executed in order of appearance here.
Each command can be restricted to a specific operating system: it will be ignored when the project is opened on another OS.
</info>
</dt>
<dd class="customCommands">
Expand All @@ -153,6 +154,7 @@ <h2>
<ul></ul>
<xml id="customCommand">
<select class="when"></select>
<select class="os"></select>
<input type="text" class="command"/>
<button class="remove"> <span class="icon delete"></span> </button>
</xml>
Expand Down
3 changes: 3 additions & 0 deletions app/start_project.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@echo off
npm run start
pause
10 changes: 10 additions & 0 deletions src/electron.common/Settings.hx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ typedef AppSettings = {
var uiStates : Array<{ id:String, val:Int }>;
var lastUiDirs : Array<{ ?project:String, uiId:String, path:String }>;
var projectTrusts : Array<{ iid:String, trusted:Bool }>;

var simplifiedRenderInWorldView : Bool;
var simplifiedRenderAlphaThreshold : Float;
var cameraResetOnWorldModeChange : Bool;
var escExitsWorldMode : Bool;
}

enum abstract UiState(String) {
Expand Down Expand Up @@ -117,6 +122,11 @@ class Settings {
uiStates: [],
lastUiDirs: [],
projectTrusts: [],

simplifiedRenderAlphaThreshold: 0.1,
simplifiedRenderInWorldView: true,
cameraResetOnWorldModeChange: false,
escExitsWorldMode: true,
}

// Load
Expand Down
22 changes: 18 additions & 4 deletions src/electron.renderer/GenericLevelElementGroup.hx
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ class GenericLevelElementGroup {
arrow = new h2d.Graphics(renderWrapper);
pointLinks = new h2d.Graphics(renderWrapper);
selectRender = new h2d.Graphics(renderWrapper);
var f = new dn.heaps.filter.PixelOutline(SELECTION_COLOR);
f.setPartialKnockout(0.66);
// Outline alpha is 0 to make the selection highlight less intrusive
var f = new dn.heaps.filter.PixelOutline(SELECTION_COLOR, 0);
f.setPartialKnockout(0.5);
selectRender.filter = new h2d.filter.Group([
f, new dn.heaps.filter.PixelOutline(0x0),
f, new dn.heaps.filter.PixelOutline(0x0, 0),
]);
invalidateBounds();
}
Expand Down Expand Up @@ -598,7 +599,14 @@ class GenericLevelElementGroup {


function snapToGrid() {
return true;
// Grid cells and points can only be moved in grid increments, entities follow the Grid option
for(ge in elements)
switch ge {
case null:
case GridCell(_), PointField(_): return true;
case Entity(_):
}
return App.ME.settings.v.grid;
}


Expand Down Expand Up @@ -708,6 +716,12 @@ class GenericLevelElementGroup {
// Apply movement
ei.x += Std.int( getDeltaX(origin, to) );
ei.y += Std.int( getDeltaY(origin, to) );
if( App.ME.settings.v.grid ) {
// Snap to grid honoring the entity pivot, like the placement preview
var g = li.def.scaledGridSize;
ei.x = M.round( ( M.round( (ei.x - ei.def.pivotX*g) / g ) + ei.def.pivotX ) * g );
ei.y = M.round( ( M.round( (ei.y - ei.def.pivotY*g) / g ) + ei.def.pivotY ) * g );
}
changedLayers.set(li,li);

// Out of bounds
Expand Down
Loading