Qube's Game Framework - The dreaded GUI

Started by Qube, April 09, 2019, 01:19:33

Previous topic - Next topic

Qube

Quote from: Steve Elliott on April 22, 2019, 22:58:28
Looking very swish, and other coding software to follow.  Cool.   8)
Thanks. Yup, I have to fight the boredom of GUI writing so I can use it to make the dev tools I have planned :P.

Cool thing about the GUI is I can use it in both low res ( that's the version in the screen shot ) and HD resolutions by just changing two variables, 1) The GUI sprite atlas to use and 2) Which font to use.
Mac Studio M1 Max ( 10 core CPU - 24 core GPU ), 32GB LPDDR5, 512GB SSD,
Beelink SER7 Mini Gaming PC, Ryzen 7 7840HS 8-Core 16-Thread 5.1GHz Processor, 32G DDR5 RAM 1T PCIe 4.0 SSD
MSI MEG 342C 34" QD-OLED Monitor

Until the next time.

Qube

Another super exciting update on my GUI adventures ;D

Tonight I put the finishing touches to the event system and implemented timers \o/

For the timer test I create a window, a label and a timer set to trigger once per second. When the event fires I update the text of the label with the current time. The code is as per below. Quite happy with how it's all turning out and soon I'll have enough to start creating some shiny new game making tools.


If gui_Event_Get( thisEvent ) = gui_Event_Match( gui_Event_Window, "timer 1" )
gui_Gadget_Find( gui_Event_Window, "label 1" )
If guiFoundGadget > 0
guiGadgets[ guiFoundGadget ].text = GetCurrentTime()
EndIf
EndIf


The code above is simply "look at the event" > "is it's label called 'timer 1'" > "yes - find 'label 1' in the window of the event" > "update it's text". Not bad considering AGK has no fancy frilly language gymnastic features :P

Soon I'll move on to the GUI designer which will output the source code to create the window & gadgets and also have blank If / EndIf's ready to fill in what happens if things are clicked etc.

Full on action video :

https://www.youtube.com/watch?v=fG-pd8OBIBg
Mac Studio M1 Max ( 10 core CPU - 24 core GPU ), 32GB LPDDR5, 512GB SSD,
Beelink SER7 Mini Gaming PC, Ryzen 7 7840HS 8-Core 16-Thread 5.1GHz Processor, 32G DDR5 RAM 1T PCIe 4.0 SSD
MSI MEG 342C 34" QD-OLED Monitor

Until the next time.

Qube

Phew, finally at a stage where I can begin on the GUI designer. I've enough gadgets coded up to move on to the next step of this mind numbing project.

Early screen shot of my GUI designer ;D :P

Mac Studio M1 Max ( 10 core CPU - 24 core GPU ), 32GB LPDDR5, 512GB SSD,
Beelink SER7 Mini Gaming PC, Ryzen 7 7840HS 8-Core 16-Thread 5.1GHz Processor, 32G DDR5 RAM 1T PCIe 4.0 SSD
MSI MEG 342C 34" QD-OLED Monitor

Until the next time.

GaborD


Qube

Quote from: GaborD on May 11, 2019, 00:50:52
This looks really great!
Thanks :) - It's turning out well and will be useful for in-house tools. I know a GUI based thread is very boring for many people and also a very boring theme to watch video's of GUI stuff :( - But I must inflict my personal pain on others ;D

Hopefully the next updates with the GUI designer and then level maker in action will be somewhat more, erm exciting? :P
Mac Studio M1 Max ( 10 core CPU - 24 core GPU ), 32GB LPDDR5, 512GB SSD,
Beelink SER7 Mini Gaming PC, Ryzen 7 7840HS 8-Core 16-Thread 5.1GHz Processor, 32G DDR5 RAM 1T PCIe 4.0 SSD
MSI MEG 342C 34" QD-OLED Monitor

Until the next time.

iWasAdam


Qube

For those still following the thread that haven't fallen into a coma yet...

I've finally got enough gadgets done to warrant moving on to the next dull, I mean exciting phase ... "The GUI Designer"

Below is a 1st steps video demonstrating adding gadgets to a window. Super exciting I know but even more exciting is the next step of being able to drag those gadgets around and setting their properties. After that will be the code generation part of the GUI designer.

It's all happening at a slow pace but I don't want to over excite myself at this old age :P

https://www.youtube.com/watch?v=-fXS2Nfl6Ak
Mac Studio M1 Max ( 10 core CPU - 24 core GPU ), 32GB LPDDR5, 512GB SSD,
Beelink SER7 Mini Gaming PC, Ryzen 7 7840HS 8-Core 16-Thread 5.1GHz Processor, 32G DDR5 RAM 1T PCIe 4.0 SSD
MSI MEG 342C 34" QD-OLED Monitor

Until the next time.

blinkok

Looks very nice! Can you resize the window smaller than the area used by the controls.

Qube

Quote from: blinkok on May 15, 2019, 04:12:15
Looks very nice! Can you resize the window smaller than the area used by the controls.
You sure can :) - All clipping is pixel perfect and will be demonstrated in a later video once I add in the visual side of editing gadgets.
Mac Studio M1 Max ( 10 core CPU - 24 core GPU ), 32GB LPDDR5, 512GB SSD,
Beelink SER7 Mini Gaming PC, Ryzen 7 7840HS 8-Core 16-Thread 5.1GHz Processor, 32G DDR5 RAM 1T PCIe 4.0 SSD
MSI MEG 342C 34" QD-OLED Monitor

Until the next time.

GaborD

Quote from: Qube on May 15, 2019, 01:17:43
For those still following the thread that haven't fallen into a coma yet...

Well, I am sure not falling into a coma after that last vid.
The amount of functionality you already have in there is amazing.
Very impressive.

Steve Elliott

GUI Designer, very nice. I'm all for writing code rather than running through menus, but this is an exception that will save a ton of time - just drag n drop.
Win11 64Gb 12th Gen Intel i9 12900K 3.2Ghz Nvidia RTX 3070Ti 8Gb
Win11 16Gb 12th Gen Intel i5 12450H 2Ghz Nvidia RTX 2050 8Gb
Win11  Pro 8Gb Celeron Intel UHD Graphics 600
Win10/Linux Mint 16Gb 4th Gen Intel i5 4570 3.2GHz, Nvidia GeForce GTX 1050 2Gb
macOS 32Gb Apple M2Max
pi5 8Gb
Spectrum Next 2Mb

Qube

QuoteThe amount of functionality you already have in there is amazing.
Very impressive.
Thanks. Lot's to do yet but its slowly taking shape :)

QuoteGUI Designer, very nice. I'm all for writing code rather than running through menus, but this is an exception that will save a ton of time - just drag n drop.
Yes, hand coding GUI windows is very slow going and so this mind numbing exercise ( not a big fan of GUI coding ) will speed up that side, especially when I start coding game related tools.
Mac Studio M1 Max ( 10 core CPU - 24 core GPU ), 32GB LPDDR5, 512GB SSD,
Beelink SER7 Mini Gaming PC, Ryzen 7 7840HS 8-Core 16-Thread 5.1GHz Processor, 32G DDR5 RAM 1T PCIe 4.0 SSD
MSI MEG 342C 34" QD-OLED Monitor

Until the next time.

Derron

Have fun to include all the property-widgets so you can setup the "special" stuff of each widget (custom font, custom text limitations, min/max of spinners, ...). THIS is the nasty stuff of a GUI designer ;-)

Blueprints would be cool too (so you can "click together" that eg. a button is set to "hidden" if another one is clicked). This is all GUI stuff, so it should not be stuff the coder has to have a look at - it is a matter for the designer dude. Also it is easier to do stuff by mouse (if possible) than wiring it up by hand in code, compile, try ...


bye
Ron

Qube

QuoteHave fun to include all the property-widgets so you can setup the "special" stuff of each widget (custom font, custom text limitations, min/max of spinners, ...). THIS is the nasty stuff of a GUI designer ;-)
That's the part I'm working on now. I don't need custom fonts per gadget as I like a uniformed look for GUI text and I'd never use that feature.

QuoteBlueprints would be cool too (so you can "click together" that eg. a button is set to "hidden" if another one is clicked). This is all GUI stuff, so it should not be stuff the coder has to have a look at - it is a matter for the designer dude. Also it is easier to do stuff by mouse (if possible) than wiring it up by hand in code, compile, try ...
I have group support for things like buttons, so I can enable / disable all in that group. Also radio groups are of course automatically handled. The idea to link x with 1 2 3 4 sounds a cool feature on the surface but I can't see a scenario where I'd use it over and over again to speed up GUI coding.

The GUI designer will have all the basics to quickly make GUI's and generate the source code with blank If / EndIf statements for events related to that window. It'll save a load of manual creation of GUI stuff. If / when it becomes apparent that additional features are needed then they'll get added based on need rather than "wouldn't it be cool if" as I'll be adding funky pointless stuff forever :P
Mac Studio M1 Max ( 10 core CPU - 24 core GPU ), 32GB LPDDR5, 512GB SSD,
Beelink SER7 Mini Gaming PC, Ryzen 7 7840HS 8-Core 16-Thread 5.1GHz Processor, 32G DDR5 RAM 1T PCIe 4.0 SSD
MSI MEG 342C 34" QD-OLED Monitor

Until the next time.

Qube

Quote from: blinkok on May 15, 2019, 04:12:15
Looks very nice! Can you resize the window smaller than the area used by the controls.

Here you go, just for you :) - early video of widgets in action :P

https://www.youtube.com/watch?v=8xzqH6mTDYs
Mac Studio M1 Max ( 10 core CPU - 24 core GPU ), 32GB LPDDR5, 512GB SSD,
Beelink SER7 Mini Gaming PC, Ryzen 7 7840HS 8-Core 16-Thread 5.1GHz Processor, 32G DDR5 RAM 1T PCIe 4.0 SSD
MSI MEG 342C 34" QD-OLED Monitor

Until the next time.