HTML+CSS UI Rendering

General discussion about LÖVE, Lua, game development, puns, and unicorns.
qurs
Prole
Posts: 5
Joined: Fri Mar 10, 2023 9:59 am

HTML+CSS UI Rendering

Post by qurs »

Hello there!
I'm looking for a tool to create a UI using HTML+ CSS. I only came across LURE, but in 10 years it has undergone changes, while the article on the love2d wiki has remained unchanged. And I am confused, I do not know how to use it, there is nowhere at least a brief instruction on how to use it.
Are there anyone here who knows how to use LURE or knows alternatives?
LURE - https://github.com/rdlaitila/LURE

I'm sorry if I wrote in the wrong place, I'm new to your forum. Thank you in advance!
Last edited by qurs on Fri Mar 10, 2023 4:40 pm, edited 1 time in total.
Andlac028
Party member
Posts: 174
Joined: Fri Dec 14, 2018 2:27 pm
Location: Slovakia

Re: HTML+CSS UI Rendering

Post by Andlac028 »

First of all, why you would like to create UI in HTML and CSS and at same time, use Love and Lua?

In my opinion, HTML and CSS can get too complicated to be supported (okay, maybe few features may be supported, but not entire renderer with all tags and style properties etc). I would either use Lua and Love, or do web app using HTML, CSS and JS.

What you would like to accomplish with it?
qurs
Prole
Posts: 5
Joined: Fri Mar 10, 2023 9:59 am

Re: HTML+CSS UI Rendering

Post by qurs »

Andlac028 wrote: Fri Mar 10, 2023 1:07 pm First of all, why you would like to create UI in HTML and CSS and at same time, use Love and Lua?

In my opinion, HTML and CSS can get too complicated to be supported (okay, maybe few features may be supported, but not entire renderer with all tags and style properties etc). I would either use Lua and Love, or do web app using HTML, CSS and JS.

What you would like to accomplish with it?
It's more convenient for me to work with the interface through HTML and CSS, besides, I have a friend who makes an incredible design using HTML and CSS. Unfortunately, Lua cannot provide a convenient ground for creating interfaces.
Besides, did the creator of LURE somehow implement this? So it's still possible..
Xugro
Party member
Posts: 114
Joined: Wed Sep 29, 2010 8:14 pm

Re: HTML+CSS UI Rendering

Post by Xugro »

qurs wrote: Fri Mar 10, 2023 10:11 amI only came across LURE, [...] And I am confused, I do not know how to use it, there is nowhere at least a brief instruction on how to use it.
You cannot use it (yet):
https://github.com/rdlaitila/LURE#status wrote:LURE is currently under development and cannot yet produce rendered content.

If you want to use Lua as a scripting language, but use HTML and CSS for rendering, then take a look at Fengari. With Fengari you can use Lua in the browser. If you want to use löve with HTML and CSS you have to write your own renderer.

qurs wrote: Fri Mar 10, 2023 10:11 amUnfortunately, Lua cannot provide a convenient ground for creating interfaces.
An alternative is to use one of the GUI libraries that are listed in the wiki: https://love2d.org/wiki/Graphical_User_Interface
qurs
Prole
Posts: 5
Joined: Fri Mar 10, 2023 9:59 am

Re: HTML+CSS UI Rendering

Post by qurs »

Xugro wrote: Fri Mar 10, 2023 5:08 pm You cannot use it (yet):
Thanks. This is exactly the answer I needed. I don't know how I didn't notice that it wasn't finished =(
User avatar
dusoft
Party member
Posts: 654
Joined: Fri Nov 08, 2013 12:07 am
Location: Europe usually
Contact:

Re: HTML+CSS UI Rendering

Post by dusoft »

qurs wrote: Fri Mar 10, 2023 1:12 pm It's more convenient for me to work with the interface through HTML and CSS, besides, I have a friend who makes an incredible design using HTML and CSS. Unfortunately, Lua cannot provide a convenient ground for creating interfaces.
Besides, did the creator of LURE somehow implement this? So it's still possible..
You might want to rather learn Lua/LOVE graphics and/or look into LOVE UI libraries linked above. Even if some package does bring support of HTML/CSS, it won't be on par with browsers. It have taken years to built them and they still have hundreds of rendering bugs (!).

If you do some small subset of CSS, it might be possible, but you will still encounter rendering bugs that will fail your designs in the end.

I would recommend against it.
qurs
Prole
Posts: 5
Joined: Fri Mar 10, 2023 9:59 am

Re: HTML+CSS UI Rendering

Post by qurs »

dusoft wrote: Sun Mar 12, 2023 11:34 am
qurs wrote: Fri Mar 10, 2023 1:12 pm It's more convenient for me to work with the interface through HTML and CSS, besides, I have a friend who makes an incredible design using HTML and CSS. Unfortunately, Lua cannot provide a convenient ground for creating interfaces.
Besides, did the creator of LURE somehow implement this? So it's still possible..
You might want to rather learn Lua/LOVE graphics and/or look into LOVE UI libraries linked above. Even if some package does bring support of HTML/CSS, it won't be on par with browsers. It have taken years to built them and they still have hundreds of rendering bugs (!).

If you do some small subset of CSS, it might be possible, but you will still encounter rendering bugs that will fail your designs in the end.

I would recommend against it.
Thanks for the advice. I know about libraries (at least I found out while I was looking for information). I just know a few games that used HTML+CSS for some interface, found out about LURE and was very excited about this idea.
User avatar
BrotSagtMist
Party member
Posts: 659
Joined: Fri Aug 06, 2021 10:30 pm

Re: HTML+CSS UI Rendering

Post by BrotSagtMist »

This games most likely dont have their own html renderer.
You can import webkit for example quite easy and have it show pages or part of pages inside any window you want.
obey
User avatar
dusoft
Party member
Posts: 654
Joined: Fri Nov 08, 2013 12:07 am
Location: Europe usually
Contact:

Re: HTML+CSS UI Rendering

Post by dusoft »

qurs wrote: Sun Mar 12, 2023 12:58 pm Thanks for the advice. I know about libraries (at least I found out while I was looking for information). I just know a few games that used HTML+CSS for some interface, found out about LURE and was very excited about this idea.
You can test the legacy version for your scenario:
A prior naive implimentation (sic!) was written many years ago and for reference purposes is found in the legacy folders of many of the project's sub-directories, which was capable of rendering some very primitive DOM elements and text.
User avatar
dusoft
Party member
Posts: 654
Joined: Fri Nov 08, 2013 12:07 am
Location: Europe usually
Contact:

Re: HTML+CSS UI Rendering

Post by dusoft »

Also since Lua support C++ binding, you might be able to use C++ for rendering HTML/CSS directly.
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 11 guests