October 21, 2020, 03:02:14 AM

Author Topic: Qube's Game Framework - The dreaded GUI  (Read 6776 times)

Offline Qube

  • Administrator
  • Hero Member
  • *****
  • Posts: 2529
  • I mostly code at night... Mostly.
    • SyntaxBomb - Indie Coders
Re: Qube's Game Framework - The dreaded GUI
« Reply #60 on: June 24, 2019, 04:54:18 AM »
IT'S DONE!!! ;D

Just over two months ago I started this project :o - Squeezing in every bit of spare time I had I'm finally finished with phase 1 of the project ( the GUI and GUI designer ).

Quick outline of how it all flows.

The GUI designer - A bit of a nightmare at times to write and 50% more code wise than the actual GUI :



You can save the window to reload at a later date for any additional tweaks :



The designer also creates the full source code for the window and control logic. You can save the source code or dump it into the clipboard for easy pasting direct into your app :



Let's create a super simple test of a window with a text box and a button. When you click the button is simply adds "Hello" into the text box :



The designer outputs the code to create the window and gadgets :



And also creates the logic for all possible events for each gadget in that window with a little helper text :



But as all we want is the action from a button click we'll delete most of it and add to the button click action :



Here's what the main control loop looks like to control the GUI. Simply insert your created GUI and off you go :

I've split it up into sections in case I need to do any custom work in between ( you never know ).

#Note : The "qGameFramework" handles setting up the screen and stuff, hence why no commands are in this example.



The final working result of this advanced test :



Thrilling I know :P

I'm sure I'll be adding more gadgets and features over time but for now I have everything I need to build the game tools I want. It's a massive time saver to visually do a GUI and have the source code spat out as all you have to do then is code where needed.

Now I can start on my next project which is a shiny new map maker with some swishy wishy features ;D
Mac mini ( 2018 / 2020 ), 3 GHz 6-Core Intel Core i5, 16 GB 2667 MHz DDR4, 1TB NVMe, eGPU Radeon Pro 580 8 GB, LG Ultragear 27GL83A-B 27 Inch
Commodore VIC-20, 1.1Mhz MOS 6502 CPU, 5KB RAM, VIC ( 6560 ) GPU

Until the next time...

Offline iWasAdam

  • Hero Member
  • *****
  • Posts: 1961
Re: Qube's Game Framework - The dreaded GUI
« Reply #61 on: June 24, 2019, 01:49:13 PM »
Just, really well done on completing this  8)
No suggestions, just admiration.

Offline Steve Elliott

  • Hero Member
  • *****
  • Posts: 2816
  • elgol 2021
Re: Qube's Game Framework - The dreaded GUI
« Reply #62 on: June 24, 2019, 02:03:00 PM »
Great stuff.  Congrats on completing  :D
Windows 10, 64-bit, 16Gb RAM, CPU Intel i5, 3.2 GHz, Nvidia GeForce GTX 1050 (2Gb)
MacOS Catalina, 64-bit, 8Gb RAM, CPU Intel i5, 2.3 Ghz, Intel Iris Plus Graphics 640 1536 MB
Linux Mint 19.3, 64-bit, 16Gb RAM, CPU Intel i5, 3.2 GHz, Nvidia GeForce GTX 1050 (2Gb)
Raspberry Pi 3 and 4

Offline Dabz

  • Sr. Member
  • ****
  • Posts: 261
  • Is it cos I is ginger?
    • dabzy.co.uk
Re: Qube's Game Framework - The dreaded GUI
« Reply #63 on: June 24, 2019, 02:52:03 PM »
Lovely! :)

Dabz
Intel Core i5 6400 2.7GHz, NVIDIA GeForce GTX 1070 (8GB), 16Gig DDR4 RAM, 256GB SSD, 1TB HDD, Windows 10 64bit

Offline Qube

  • Administrator
  • Hero Member
  • *****
  • Posts: 2529
  • I mostly code at night... Mostly.
    • SyntaxBomb - Indie Coders
Re: Qube's Game Framework - The dreaded GUI
« Reply #64 on: June 24, 2019, 03:33:16 PM »
Thanks :) took way longer than anticipated. I first thought about 3 weeks and not over two months :o - At least I can get on with the good stuff now ;D
Mac mini ( 2018 / 2020 ), 3 GHz 6-Core Intel Core i5, 16 GB 2667 MHz DDR4, 1TB NVMe, eGPU Radeon Pro 580 8 GB, LG Ultragear 27GL83A-B 27 Inch
Commodore VIC-20, 1.1Mhz MOS 6502 CPU, 5KB RAM, VIC ( 6560 ) GPU

Until the next time...

Offline Rick Nasher

  • Hero Member
  • *****
  • Posts: 790
Re: Qube's Game Framework - The dreaded GUI
« Reply #65 on: June 25, 2019, 09:20:46 PM »
Very nice. Way to go Qube!  8)

Time to serve yourself a brewski!  ;)
_______________________________________
 B3D + physics + shaders + X-platform = AGK!
:D ..ALIENBREED *LIVES* (thanks to Qube).. :D
_______________________________________

 

SimplePortal 2.3.6 © 2008-2014, SimplePortal