Ludii Forum
HTML - 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: HTML (/showthread.php?tid=459)



HTML - slimy_asparagus - 02-25-2021

In trying to get Spartan Chess ready for submission, I have noticed that the rules section can handle HTML. Sort of. It seems to treat new lines as newlines rather than spaces and simply collapsing all the spaces. Almost as if it was a mixture of natural text and HTML.

Surely it would be better if this sections were treated as one or the other. Maybe by default it was treated as text but you could explicitly make it HTML. Then when you did use HTML the code would be more readable because you could put extra spaces in. 

On a related note, has anyone looked at all that HTML we get from compilation errors? It would be nice if that was rendered so we could actually read it.


RE: HTML - MatthewStephenson - 02-25-2021

Hi,

Currently I would advise only using html tags for URL links, and that you use the same href format as in other games (e.g. Chess).

All other text should just be plain text.

This is because we use this same text in our database and website, so adding in your own html styles may lead to unexpected results.

I (think) you might be able to get away with some basic style tags like <b> and <u> but I would advise against doing any more than this.

If you need to add new lines within your rules, you can just do this within the metadata text (e.g. something like Shafran Chess)

If you have an example .lud that isn't displaying how you want, I can also take a look.

Cheers,
Matthew


RE: HTML - slimy_asparagus - 02-25-2021

Matthew,

Thanks for the advice. By the way I get the following errors when loading Shafran Chess:

Code:
Compiled Shafran Chess successfully.
WARNING: Move [[SetPending:value=42], [Move:typeFrom=Cell,from=41,typeTo=Cell,to=43,decision=true], [SetTemp:temp=43], [SetCounter:counter=-1]] is duplicated in the legal moves.
WARNING: Move [[SetPending:value=32], [Move:typeFrom=Cell,from=31,typeTo=Cell,to=33,decision=true], [SetTemp:temp=33], [SetCounter:counter=-1]] is duplicated in the legal moves.
WARNING: Move [[SetPending:value=23], [Move:typeFrom=Cell,from=22,typeTo=Cell,to=24,decision=true], [SetTemp:temp=24], [SetCounter:counter=-1]] is duplicated in the legal moves.
Player 1 to move.



RE: HTML - MatthewStephenson - 02-25-2021

Hi,

Are you using the latest version of Ludii (1.1.15)?

I can't replicate that error on my version.

Cheers,
Matthew


RE: HTML - slimy_asparagus - 02-25-2021

(02-25-2021, 04:06 PM)MatthewStephenson Wrote: Hi,

Are you using the latest version of Ludii (1.1.15)?

I can't replicate that error on my version.

Cheers,
Matthew


Yup 1.1.15. Same error when I clear the status panel and restart.


RE: HTML - MatthewStephenson - 02-25-2021

Hi,

This message is printed when we encounter two (or more) identical moves in the set of legal moves, but only if the "developer options" are enabled in the Ludii advanced preferences.

It should not have any impact on human-play, but could be useful for game designers to detect if they have multiple copies of the same move being created (which can potentially lead to poor AI performance).

Cheers,
Matthew


RE: HTML - slimy_asparagus - 02-25-2021

Ah thanks. That explains it.


RE: HTML - Michael - 02-26-2021

While we're at it: Is there a way to make the rules appear formatted on the website? In the player the rules look nice with line breaks, but on the website everything is just one big blob of text. Not pretty.. I just took a look at Shafran Chess at the website, expecting it to see line breaks, but no..


RE: HTML - MatthewStephenson - 02-26-2021

Hi,

That should be fixed now Smile

Cheers,
Matthew


RE: HTML - Michael - 02-26-2021

Very nice! Thanks!