MIX-IT-UP Comp Entry - HoneyThings

Started by iWasAdam, September 19, 2019, 11:57:21

Previous topic - Next topic

STEVIE G

Quote from: Xerra on October 15, 2019, 16:52:09
Quote from: Derron on October 14, 2019, 21:29:27
Don't tell you create the options dialogue from ground on - instead of reusing bits and bytes from your other projects / existing "framework".

I was reading a post by a veteran coder today on twitter who says reusing code is less common than you might think. Sometimes it's less hassle to just hard-code a nifty system into your current project instead of pasting in something similar from a previous project and spending more time refactoring it. Made me think how often I actually do end up doing just that. With me it's probably 95% of the time I'd have been better off just starting from scratch.

I concur - unless the game flow and structure is the same it's a bit of a chore.  I'm having that very same issue as we speak - trying to re-use (shoehorn in) the Menu code from an older game.  The structure of both games is quite different so might have been quicker starting again.

Steve Elliott

#91
Me too.  Sometimes games are so different and looking at a project a fresh you can often come up with a better/simpler/more optimized solution.  The only way to make a framework work for every single game is to put heaps of time into making it very versatile on this particular feature, and that type of code is boring; so I can see why a start from scratch approach is favoured in this case.
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

3DzForMe

my menu is a WIP:


While 1

Text 20,20,"Enter 1 for 1 player or 2 for 2 player"

waitkey()

;get keypress - TO DO

Went



;D

Wildest West for the WIN ;)

EDIT - Went is my subconscious taking over - its 520, my shift starts at 630, need to press a shirt, have brekkie, and drive to work. >:D
BLitz3D, IDEal, AGK Studio, BMax, Java Code, Cerberus
Recent Hardware: Dell Laptop
Oldest Hardware: Commodore Amiga 1200 with 1084S Monitor & Blitz Basic 2.1

Qube

Quote from: Steve Elliott on October 15, 2019, 17:45:45
Me too.  Sometimes games are so different and looking at a project a fresh you can often come up with a better/simpler/more optimized solution.  The only way to make a framework work for every single game is to put heaps of time into making it very versatile on this particular feature, and that type of code is boring; so I can see why a start from scratch approach is favoured in this case.
Yup, different games require different GUI's and perhaps even different effects when the mouse is hovering over them or clicked on. You can do a basic generic GUI box check function and that's really about it.

When I was spending stupid amounts of time doing my AGK GUI and designer I thought long and hard about game GUI's and came to conclusion that such a thing would require a dedicated approach and just not worth the effort as you can't do a one size fits all with games. The GUI I made is for internal apps and for that it works well but I'd never use it for games as it's much quicker to code up a custom routine.
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

So you code a drop-down-widget and combo boxes each time over and over?

I think for checkboxes and buttons stuff can be coded each time but inputs (with cursor, deleting, maybe copy/pasting), dropdowns, scrollers ... modal dialogues you better use some already written stuff - or have to code all the special handling each time over and over.
If your game does not offer much options ("[ x ] Fullscreen" and "Start Game") then this framework/lib-approach is of course too much.

My GUI is surely not configurable to the last aspect but I can add overlays, use nine patches, ... all I need to make it look the way I want - if I wanted ;)
In most cases it will at least suit to most casual game setting screens as it most of the times is just a matter of creating/using the right graphical assets and bitmap fonts (for styled fonts).

So for _me_ it paid out to have written the GUI thing - fix an issue once and have it fixed in all your games (ok, needs recompile and potential minor adjustments if you refactor but that is OK).

Performance wise a non-generic solution might of course be faster as you skip all the unneeded stuff.


Another thing to consider is to use the widgets as base for your game interaction stuff. So I use the GUIWidgets as base for other elements too (automatic drag-n-drop-support etc.). So this speeds up development in other areas too.


@ Qube
In a "Sci-Fi simulation exploration game" I think your GUI would give you benefits as such stuff is GUI-heavy.



@ Honey
Back to Adam's worklog ;)


bye
Ron

iWasAdam

worklog it is then...
But not before a mini comment.
Agnostic GUI's are fine for using everywhere and apps, etc. but for games, you usually need something just a little bit different. maybe it only accepts keyboard commands, maybe just mouse, or maybe it's visual look is just so different it need special handling. If you need something quick and only for use in one place, then cade something dirty. if you need something that can AND will be used in other places then use a GUI framework of some kind.

so.. today is all about mazes -of certain kinds...


EEP! only a few days to go!


Derron

For the "dark" side you might consider darkening the items/units too - to avoid "popping out" too much because of the color vibrance difference.
in the screen it is the crate/box and the icecream-boss who pop out a bit.


Hope the game plays as good as it looks.


bye
Ron

iWasAdam

#97
It's all about the delicious honey swirl and how to get it...
5 fiendish areas to temp and twist your mind with...

And the Lord of Chaos is back for one last time:

iWasAdam

CRAP, BUGGER Windows fullscreen...  :( >:(

sorted  8)

iWasAdam


iWasAdam

8 separate song tracks  :o Phew! 33 individual sounds. lots of variation!

Qube

Quote from: iWasAdam on October 18, 2019, 12:14:50
8 separate song tracks  :o Phew! 33 individual sounds. lots of variation!
2 days left, I think you can squeeze in another 8 tracks :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.

Steve Elliott

lol no to more music.  Just bug fixes and gameplay tweaks!
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

3DzForMe

BLitz3D, IDEal, AGK Studio, BMax, Java Code, Cerberus
Recent Hardware: Dell Laptop
Oldest Hardware: Commodore Amiga 1200 with 1084S Monitor & Blitz Basic 2.1

iWasAdam

All sound is now finished  "Bass" "All exits are clearly marked!" :P
just last minute checking and testing:

2 found, 2 to find... And all those lives I could have had!

"All exits are: Bass"