|
|
|
|
|
by nonethewiser
1150 days ago
|
|
> This is such an interesting aspect of web games: HTML-based UIs. I am neither a web dev nor (especially) game dev expert , but I recently came across this crossroads when building a small js canvas game. Should I use html elements styled with css for my game UI? After a very short time thinking about it I decided not to implement the UI this way. It seems like a good idea because html and css are easy to use. Much easier to style a button and assign it a js function than draw buttons on the canvas and check if they’ve been clicked. But I felt like it spanned a boundary that might prove hard to reconcile in some scenarios, but that was more of an instinct than a well reasoned conclusion. I’m curious what others think about it. |
|
My biggest surprise was, before I jumped in I figured there would probably be some existing "RPG inventory" libraries I could build from, that handled dragging icons around between icon slots etc. But I never found any game-oriented UI projects I could use, and ended up building entirely from scratch.