Page 1 of 2

Should I build my own sprite-based UI system or wait?

Posted: Wed Sep 24, 2025 2:12 am
by skinkairewalker
Hello everyone, how u doing ?

I’ve been thinking about starting to develop my own UI system in PureBasic, using sprites as the foundation. The idea sounds exciting, but I’m also a bit hesitant.
My concern is: what if future versions of PureBasic eventually introduce a new, native UI framework? In that case, all the time and effort I put into building a custom system might end up being redundant or even obsolete.

Creating a full UI system from scratch is a big investment of time, and maintaining it long-term could be tricky if an official solution arrives later. At the same time, I don’t want to hold back progress on my projects just because of “what ifs.”

So I’d like to hear your opinions:
[*]Do you think it’s worth starting such a project now?
[*]Or would it be wiser to wait and see if a new UI system comes to PureBasic in the future?

Thanks in advance for your thoughts!

Re: Should I build my own sprite-based UI system or wait?

Posted: Wed Sep 24, 2025 8:23 am
by Fred
pf shadoko has already a working UI using PB sprite, it just need to be packaged. May be he can upload a lib for you to test.

Re: Should I build my own sprite-based UI system or wait?

Posted: Wed Sep 24, 2025 10:42 am
by pf shadoko
I can provide the library for Win64 or Win32
(but keyboard input does not work in library form, and I do not wish to give away the source code).

Re: Should I build my own sprite-based UI system or wait?

Posted: Wed Sep 24, 2025 1:40 pm
by skinkairewalker
Fred wrote: Wed Sep 24, 2025 8:23 am pf shadoko has already a working UI using PB sprite, it just need to be packaged. May be he can upload a lib for you to test.
awesooome :D
pf shadoko wrote: Wed Sep 24, 2025 10:42 am I can provide the library for Win64 or Win32
(but keyboard input does not work in library form, and I do not wish to give away the source code).
I would love to try it if possible!

Re: Should I build my own sprite-based UI system or wait?

Posted: Wed Sep 24, 2025 1:43 pm
by Rinzwind
A UI without keyboard input? Hmm

Do I understand it correctly that we get some fresh UI goodies soon packaged in PureBasic?

Re: Should I build my own sprite-based UI system or wait?

Posted: Wed Sep 24, 2025 2:17 pm
by miso
I would be happy with a keyboardinkey() that triggers with push, not with release...

Re: Should I build my own sprite-based UI system or wait?

Posted: Wed Sep 24, 2025 7:38 pm
by pf shadoko
The keyboard issue has been resolved.

Re: Should I build my own sprite-based UI system or wait?

Posted: Wed Sep 24, 2025 9:06 pm
by skinkairewalker
will it be a purebasic lib?

Re: Should I build my own sprite-based UI system or wait?

Posted: Thu Sep 25, 2025 3:12 am
by skywalk
Will this UI lib have antialiasing and the dreaded dpi awareness?

Re: Should I build my own sprite-based UI system or wait?

Posted: Thu Sep 25, 2025 8:59 am
by Fred
It's based on the PB vector library so it should be easy to do these kind of things

Re: Should I build my own sprite-based UI system or wait?

Posted: Thu Sep 25, 2025 5:48 pm
by skywalk
Whoa! Encouraging.
Running hoops with javascript callbacks to a webviewer is not my favorite approach to realize a modern native gui.
What type of baseline "gadgets" are available? listbox, editable grid, popup menus?

Re: Should I build my own sprite-based UI system or wait?

Posted: Thu Sep 25, 2025 7:40 pm
by STARGÅTE
Dear skinkairewalker,
skinkairewalker wrote: Wed Sep 24, 2025 2:12 am [*]Do you think it’s worth starting such a project now?
My answer is a clear, yes!
skinkairewalker wrote: Wed Sep 24, 2025 2:12 am My concern is: what if future versions of PureBasic eventually introduce a new, native UI framework? In that case, all the time and effort I put into building a custom system might end up being redundant or even obsolete.
Creating own libraries is never a waste of time. You always learn from it and increase your experience with PureBasic.
And your UI can be designed as you wish.
Aside from that, I would claim that PureBasic never would include a native sprite-based UI.
skinkairewalker wrote: Wed Sep 24, 2025 2:12 am Creating a full UI system from scratch is a big investment of time, and maintaining it long-term could be tricky if an official solution arrives later.
Yes, that's true. I did it myself three times until I reached a state, where I can fully control/design my UI system via a XML document, where I can define graphics, sounds, events, and effects.

As a starting point, I would recommend some of my codes:
Typeface - Sprite-based font include/module
DisplayBoxedSprite() - Zoom sprites with fixed border and stretched center.

Re: Should I build my own sprite-based UI system or wait?

Posted: Thu Sep 25, 2025 9:56 pm
by marc_256
Hi skinkairewalker,

I wrote my own GUI in screen mode for my CAD/CAM program.
It was a lot of work, yes a lot of work.
but ...
I'm happy I did it, the result is stunning.
and I learned a lot of programming in PB, sprites and OGRE.

Greetings,
marco

Re: Should I build my own sprite-based UI system or wait?

Posted: Thu Sep 25, 2025 11:17 pm
by skinkairewalker
STARGÅTE wrote: Thu Sep 25, 2025 7:40 pm As a starting point, I would recommend some of my codes:
Typeface - Sprite-based font include/module
DisplayBoxedSprite() - Zoom sprites with fixed border and stretched center.
Thats awesome, I will definitely study your examples.
STARGÅTE wrote: Thu Sep 25, 2025 7:40 pm My answer is a clear, yes!
marc_256 wrote: Thu Sep 25, 2025 9:56 pm I wrote my own GUI in screen mode for my CAD/CAM program.
It was a lot of work, yes a lot of work.
but ...
I'm happy I did it, the result is stunning.
and I learned a lot of programming in PB, sprites and OGRE.
I thank you both for the encouragement!!

Re: Should I build my own sprite-based UI system or wait?

Posted: Fri Sep 26, 2025 7:42 am
by Fred
skywalk wrote: Thu Sep 25, 2025 5:48 pm Whoa! Encouraging.
Running hoops with javascript callbacks to a webviewer is not my favorite approach to realize a modern native gui.
What type of baseline "gadgets" are available? listbox, editable grid, popup menus?
It's for games as it leverage sprite, opengl etc., not designed to be a replacement for WebView IMHO