[Gambas-user] Gambas was live on Twitch

Benoît Minisini gambas at ...1...
Wed Sep 9 13:28:48 CEST 2015


Le 09/09/2015 06:25, Kevin Fishburne a écrit :
> On Tue, Sep 8, 2015 at 10:25 AM, Kevin Fishburne <
> kevinfishburne at ...1887...> wrote:
>>> This is the Twitch export (to YouTube) of the live stream I broadcast
>>> earlier this evening:
>>>
>>> https://youtu.be/lPUDxkkb4u4?t=5m30s
>>>
>>> 46 minutes of me working on OpenAL in Sylph using the stable Gambas PPA
>>> on Linux Mint 17.2 Cinnamon. I probably needed more beer.
>
> On 09/08/2015 04:47 PM, Jussi Lahtinen wrote:
>> I'm sure your game loading times could be heavily optimized.
>> What method you use? Are you loading everything once, or rest by demand?
>>
>
> Hey Jussi. It loads most game assets on startup, although between stages
> it loads stage-specific color, sprite and wall (OBJ model files) data.
> Generally all the other data is shared between stages. I do this partly
> for convenience but mostly because I want to minimize load times between
> stages and eliminate any "load lag" or frame-dropping during actual
> gameplay. The game's fast, so the smoother it remains during play the
> better the experience for the player. The philosophy here is "feel the
> pain once, then forget it ever happened".
>
> The actual mechanics for loading the assets are Tobias Boege's
> ObjModel.class for loading Wavefront OBJ files (3D models), Image.Load()
> for OpenGL textures and Alure.BufferDataFromFile() for OpenAL audio
> samples. When a stage is loaded is also creates arrays of display lists
> so they can be shown dynamically according to an arbitrary view distance
> in order to increase performance.
>
> I think the main reasons it took so long in the video is that I recently
> downgraded my workstation to older hardware (don't ask...) and it is
> loading all assets over an NFS share. Despite the gigabit LAN it's still
> slower than a mechanical drive or SSD. In any case, the initial load
> time is only going to get slower as more assets are added to the game,
> though I don't imagine it'll become unbearable by the end (less than 60
> seconds, hopefully, on a decent system).
>

Hi Kevin,

Looking quickly at your live twitch, I noticed that apparently, if I'm 
not wrong, you are not aware of the difference between:

     If A And B And C Then

And:

     If A And If B And If C Then

"And" must be used for binary computation. "And If" should always be 
used for tests. It is faster, as it only executes a test if the previous 
is TRUE, while "And" always evaluates all its operands. I think you will 
agree to save a few CPU cycles, do you? :-)

Regards,

-- 
Benoît Minisini




More information about the User mailing list