Pyro2 notes

This topic contains 0 replies, has 1 voice, and was last updated by  nerobot 2 years, 4 months ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #5652

    nerobot
    Participant

    I didn’t use pyro yet, just looked the code.

    Some things that helps to improve framework, IMO 🙂

    Framework

    [ ObjectPool ]
    add flag ‘auto-increase’ for GetAvailable:T()

    [ DrawData : ImageSet ]
    move call of ‘_drawData.GetSize( 0 )/1’ outside of for declaration (is it calls every step?)

    and for all other places where using 2-dim arrays (PathFinder, Layer)

    [ Message ]
    better to use Eachin for _messages instead of until

    Scenegraph

    [ Camera : _DrawLayers ]
    1. 3-times call for _scene._layers.Get( i ), better to store it in local var, so it was called 1-time
    2. better to use Eachin here

    ^ the same: Camera._UpdateLayers, Scene.Draw / GetLayer / etc

    [ Emitter ]
    Local obj:=LoadString( filePath ).Replace( “~n~r”,”~n” ).Trim().Split( “~n~n” )
    Usually there is ~r~n endings, not ~n~r in text files on Windows.
    and why split by ~n~n , but singe ~n?

    ^ the same: SceneLoader.Load

    [ LayerSprite : Flip ]
    there are unnecessary checks for “flippedXY=-1” inside of “If flippedXY=-1” block.

    Gui

    better to use Eachin (many places).
    call _members.Get( i ) – many times per one loop step (Eachin will fix that)

    <hr />

    Please, tell me if using of stack.Get( i ) better than Eachin. At a first look – Get() don’t create new iterator object..

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.