We are currently in the process of converting the website to the new design. Some pages, like this one, are still broken. We appreciate your patience.
Mārtiņš Možeiko
So you want to write this? struct MainMenu : MyDllInterface { virtual bool aFunction(); }; struct…
»
Ritchie Brannan
// the interface will look something like this: struct MyDllInterface { virtual bool aFunction(…
»
Ritchie Brannan
If I expose a function returning a bool it will return a bool. If I call a function returning a fl…
»
Ritchie Brannan
Just call the function directly, so 1 line.
»
Mārtiņš Možeiko
I wrote 10 lines to call 3 different functions (counting also empty lines). How many lines of cod…
»
Mārtiņš Možeiko
And how you imagine using such functions with different return types? WhatTypeIuseHere? result = …
»
Ritchie Brannan
Basically there is far less code involved if you use a virtual interface.
»
Ritchie Brannan
..and your functions can all have different return values. The entire function signature can be di…
»
Mārtiņš Možeiko
So are functions in OP question.
»
Ritchie Brannan
Well for one thing, your functions can all have different parameter lists. From a code stand point…
»
Mārtiņš Možeiko
How using C++ with virtual interface is simpler than regular C functions? SceneFun* SceneFunction…
»
Ritchie Brannan
If you are prepared to use a little C++ this can be a lot simpler. Create a pure virtual interface…
»
Roderic Bos
Thanks for your answer, luckily I have the code, so when you showed the audio stuff I can run from…
»
Benjamin Kloster
If code verbosity is what you are worried about, pull the switch statement out into its own functi…
»
Jon Valdes
Well, it's just 1 line of code regardless of how many possible scenes you have. A switch statement…
»
Casey Muratori
Because there is so much to cover making a whole game from scratch, I had to keep the scope reason…
»
Casey Muratori
OK, so next obligatory question: what makes it "simpler" to use function pointers instead of using…
»
Jon Valdes
Hi Casey, They're different "update and render" functions for the different "scenes" in the game. …
»
Casey Muratori
So, mandatory first question here: what do you mean by "fixing function pointers after a DLL reloa…
»
Casey Muratori
Unfortunately v2/v3/v4 are actually not as optimize-able on SSE as one might want, because SSE is …
»
Casey Muratori
Mostly what I'd say about this is that I'm the wrong one to ask :( I don't really know very much …
»
Mārtiņš Možeiko
If operations you are performing on vX are done in a loop, then yes it makes sense to optimize wit…
»
jeringa
Would it pay to optimise the v2, v3 & v4 etc math to run with SSE? Also there are several places w…
»
Den V
Thank you for your answers. I will check those links out.
»
Mox
Yeah, I know, throwing cycles away isn't my hobby either. But I was merely thinking theoretically.…
»
Livet Ersomen Strøm
I think you may be right, but don't know, for sure. Anyways, I found the material in this link pre…
»
Mox
Hi, I was wondering how premultiplied alpha and gamma work together. Particularly if the alpha mig…
»
Roderic Bos
The former, like Casey did with the ground chunks. He used precreated images, so for the backgroun…
»
Mārtiņš Možeiko
Are you talking about procedurally/randomly mixing complete sounds to create music, or completely …
»
Mārtiņš Možeiko
I don't know how it chooses that, but you can always see what other threads are doing by double cl…
»