D GUI Framework (responsive grid teaser)

Nick Sabalausky (Abscissa) SeeWebsiteToContactMe at semitwist.com
Thu May 23 19:32:28 UTC 2019


On 5/22/19 6:33 PM, H. S. Teoh wrote:
> On Wed, May 22, 2019 at 02:18:58PM -0700, Manu via Digitalmars-d-announce wrote:
>> On Wed, May 22, 2019 at 10:20 AM Ola Fosheim Grøstad via
>> Digitalmars-d-announce <digitalmars-d-announce at puremagic.com> wrote:
> [...]
>>> But you shouldn't design a UI framework like a game engine.
>>>
>>> Especially not if you also want to run on embedded devices
>>> addressing pixels over I2C.
>>
>> I couldn't possibly agree less; I think cool kids would design
>> literally all computer software like a game engine, if they generally
>> cared about fluid experience, perf, and battery life.
> [...]
> 
> Wait, wha...?!  Write game-engine-like code if you care about *battery
> life*??  I mean... fluid experience, sure, perf, OK, but *battery
> life*?!  Unless I've been living in the wrong universe all this time,
> that's gotta be the most incredible statement ever.  I've yet to see a
> fluid, high-perf game engine *not* drain my battery like there's no
> tomorrow, and now you're telling me that I have to write code like a
> game engine in order to extend battery life?
> 
> I think I need to sit down.

You're conflating "game engine" with "game" here. And YES, there is very 
meaningful distinction:

Game engines *MUST* be *EFFICIENT* in order facilitate the demands the 
games place on them. And "efficiency" *means* efficiency: it means 
minimizing wasted processing, and that *inherently* means *both* speed 
and battery.

The *games*, not the engines, then take that efficiency and use it to 
fill the hardware to the absolute brim, maximizing detail and data and 
overall lushness of the simulated world (and, in the case of indie 
titles, it's also increasingly used to offset sloppy game code - with 
engines like Unity, indie game programming is increasingly done by 
people with very little programming experience). THAT is what kills 
battery: Taking an otherwise efficient engine and using it to saturate 
the hardware, thus trading battery for either maximal data being 
processed or for lowering the programmer's barrier to entry.

Due to the very nature of "efficiency", the fundamental designs behind 
any good game engine could just as easily be applied to minimizing 
battery usage as they can be to maximizing CPU/GPU utilization.


More information about the Digitalmars-d-announce mailing list