Ludii Forum
(Thread #2) Prompt to save .lud file when closing Editor or Ludii Player itself - Printable Version

+- Ludii Forum (https://ludii.games/forums)
+-- Forum: Problems (https://ludii.games/forums/forumdisplay.php?fid=5)
+--- Forum: Ludii Player Problems (https://ludii.games/forums/forumdisplay.php?fid=6)
+--- Thread: (Thread #2) Prompt to save .lud file when closing Editor or Ludii Player itself (/showthread.php?tid=995)



(Thread #2) Prompt to save .lud file when closing Editor or Ludii Player itself - fuerchter - 06-06-2022

Hi,
I have a suggestion for the Ludii program. I think it would make sense if closing the Editor or Ludii itself triggered a save prompt ("Save? Yes/No/Cancel") for unsaved changes. I unfortunately lost a few changes when messing about with the Language (struggling to learn it so far anyways) by forgetting to save manually. I feel like this could go a long way to making it more usable for those looking to write games. This currently is one of the biggest suggestions I would have, but if feedback is wanted I can list a few more in this thread.


RE: (Thread #2) Prompt to save .lud file when closing Editor or Ludii Player itself - MatthewStephenson - 06-07-2022

Hi,

Thanks for your suggestion. I will discuss this with the rest of our team and see if we can add this feature into one of our next releases.
If you have any other suggestions feel free to let us know, however we cannot guarantee we will be able to add them all.

Cheers,
Matthew


RE: (Thread #2) Prompt to save .lud file when closing Editor or Ludii Player itself - fuerchter - 06-08-2022

Okay, I typed up some of the other things, I'd be interested in (some probably less/more reasonable than others). I'm sure others have other ideas/needs, but this is what I came up with so far (also keeping in mind that I don't have much experience with Ludii so yet).

1. It would be great if SuggestionDialog had some concept of where in the grammar we are. So in the example below, instead of the results of a keyword search it would offer the ludemes that can be used as arguments for (phase ...). The way it currently is you might be lead to believe, that the suggestions would all be correct grammar (based on other IDE's conventions). I don't know if this is technically possible and would run well (does it require compilation?), but this would be incredibly useful.
[Image: 6VpfUQa.png]
[Image: 0xZKmnb.png]
2. Similar to 1. it would be great if SuggestionDialog fully identified and highlighted the ludeme that was right-clicked from the generated JList. So for (move Select ...) e.g. right-clicking it doesn't highlight the first item in the list, but the one that is actually (move Select ...).

3. Include the full Java type in fullDocumentForConstructor. This makes them easier to look up in the language reference. While 1. and 2. don't exist, it also makes it easier to determine which ludeme was actually right-clicked.

4. Show line numbers. This is a slippery slope towards "Build a full text editor from scratch", but if someone were to use the built-in editor primarily, having to open a different editor to communicate a location in a .lud is a bit unnecessary. Compiler errors could also make use of this (I think they don't currently?).

5. In the "Game Logic Guide", you state:
[Image: Npunw5e.png]
Would it be possible to output/step through this tree of ludemes (and its results) as you're testing your .lud, to get more of an idea of what's going on behind the scenes? I'm guessing, the closest thing to this we currently have is looking at the .trl file? If this is not feasible in Ludii itself, would this be possible by building from source and attaching a debugger (if so, how?)?

6. Is there more information about the current State (see the "Game Logic Guide" again), that .lud developers could have (other than the dev tooltip and "Display phase in title")?

7. For "Load Game from File", "Load Trial" and "Save Trial" (possibly others?) the JFileChooser doesn't remember your location across sessions (Ludii closed and reopened). You could either make it do so, or set each of them to the working directory (+ some subdirectory). Drag and drop for each file type would also be nice.

8. AnalysisPage's content seems to get cleared on app.repaint(). Analysis reports also don't include move numbers, so say Alpha-Beta found a proven win/loss (or Biased MCTS prints a very high/low value e.g.) somewhere during your game, you wouldn't be able to navigate back to it.


RE: (Thread #2) Prompt to save .lud file when closing Editor or Ludii Player itself - laurawoods - 04-13-2023

I fully agree with your feedback. Including an automatic save prompt when closing the Editor or Ludii is a great idea. I'm sure many users would find it helpful to avoid losing unsaved changes.