Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Gideros 2025.10 — Gideros Forum

Gideros 2025.10

Hello,

A new Gideros version is available, mainly focused on performance improvements in specific cases.

Full change log:
Improvements
[gfx/sprite] new 'addChildrenAt' call to add several children to specific positions inside a sprite in one call (faster)
[gfx/particles] addParticles is much more efficient with a lot of particles
[export/html5] Change code to support WASM64 (not yet enabled)
[layout] getLayoutContsraints, getLayoutParameters and getLayoutInfo now accept a mask of needed values in return for faster processing
[styling] More color operations in styles

Fixes
[export/html5] Fix some existing files not replaced on export
[plugin/tts] Use correct lua context in callbacks
[Library] Fix 3D library shader

Download it from here:
http://giderosmobile.com/download
Tagged:
+1 -1 (+5 / -0 )Share on Facebook

Comments

  • MoKaLuxMoKaLux Member
    edited October 17
    awesome, thank you hgy29 :)
    will update the wiki to the best of my ability asap, God's willing!
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
  • hgy29hgy29 Maintainer
    Yes @MoKaLux, I didn't explain how to use those new functions.
    Sprite:addChildrenAt() takes a single argument, a table with keys indicating the position where to add a new child, and values the children themselves.
    Exemple:
     parentSprite:addChildrenAt({1=child1, 3=child3})

    Likes: MoKaLux

    +1 -1 (+1 / -0 )Share on Facebook
  • hgy29hgy29 Maintainer
    Another example for Sprite:getLayoutParameters()
    -- Return a table containing only the computed cellSpacingY of the layout, instead of returning everything
    local lp=sprite:getLayoutParameters(true,Sprite.LayoutKeys.cellSpacingY)

    Likes: MoKaLux

    +1 -1 (+1 / -0 )Share on Facebook
  • MoKaLuxMoKaLux Member
    edited October 17
    hgy29 said:

    Exemple:

     parentSprite:addChildrenAt({1=child1, 3=child3})
    I tried but got this instead :|
    local sprite = Sprite.new()
    local pix = Pixel.new(0x0000ff, 1, 32, 32)
    pix2 = pix:clone()
    pix3 = pix:clone()
    pix2:setColor(0xff0000)
    pix3:setColor(0x00ff00)
    -- position
    pix:setPosition(1*32, 1*32)
    pix2:setPosition(1.5*32, 1.5*32)
    pix3:setPosition(2*32, 2*32)
    -- order
    sprite:addChild(pix)
    -- Expected '}' (to close '{' at column 22), got '='
    --parentSprite:addChildrenAt({1=child1, 3=child3}) -- not ok
    --sprite:addChildrenAt( { 2=pix3, 3=pix2 } ) -- not ok
    --sprite:addChildrenAt { 2=pix3, 3=pix2 } -- not ok
     
    local pixs = {}
    pixs[1] = pix3
    pixs[3] = pix2
    sprite:addChildrenAt( pixs ) -- OK
     
    stage:addChild(sprite)
    :)
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
  • hgy29hgy29 Maintainer
    Example for new 'brightness' operator in style tables:
    local stageStyle={
    	baseColor=ColorValue(0.7,0.6,0,1)
    }
     
    local spriteStyle={
    	__Parent=stageStyle, --Inherits from 'stageStyle'
    	color1="=baseColor:brightness:1.1",
    	color2="=baseColor:brightness:0.8",
    }
    for x=1,4 do
    	for y=1,4 do
    		local gradient=Pixel.new(0xFFFFFF,1,32,32)
    		gradient:setPosition(x*32,y*32)
    		gradient:setStyle(spriteStyle)
    		gradient:setColor("color"..(1+((x+y)%2)))
    		stage:addChild(gradient)
    	end
    end
     
    stage:addEventListener(Event.MOUSE_DOWN,function() 
    	stageStyle.baseColor=ColorValue(math.random(),math.random(),math.random(),1)
    	stage:setStyle(stageStyle,true)
    end)

    Likes: MoKaLux

    +1 -1 (+1 / -0 )Share on Facebook
  • hgy29hgy29 Maintainer
    @MoKaLux,

    Sorry right syntax was probably:
     parentSprite:addChildrenAt({[1]=child1, [3]=child3})

    Likes: MoKaLux

    +1 -1 (+1 / -0 )Share on Facebook
  • hgy29hgy29 Maintainer
    There was a little bug in the binaries, I have updated them a few minutes ago. If you already downloaded them, the new style functions weren't completely correct.

    Likes: MoKaLux

    +1 -1 (+1 / -0 )Share on Facebook
  • hgy29hgy29 Maintainer
    Also, Sprite:addChildrenAt() can also be used like this:
    parent:addChildrenAt({ child1, child2, child3 })

    Likes: MoKaLux

    +1 -1 (+1 / -0 )Share on Facebook
  • MoKaLuxMoKaLux Member
    edited October 18
    ok I added a couple of the new functions (plus some more) :p :
    - Sprite:setHiddenChildren
    - Sprite:isOnStage
    - Sprite:setStyle
    - Sprite:resolveStyle
    - Sprite:addChildrenAt

    Those are missing because I couldn't wrap my head around them :/ :
    - sprite:setWorldAlign
    - sprite:updateStyle (is this one actually really easy?)
    - sprite:spriteToLocalMatrix

    Viva Gideros!

    Likes: hgy29

    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
    +1 -1 (+1 / -0 )Share on Facebook
  • hgy29hgy29 Maintainer
    Sprite:setWorldAlign(boolean) instructs Gideros to align the Sprite position on a screen pixel. This is useful for Textfields since it makes the text look more sharp.
    Sprite:spriteToLocalMatrix(otherSprite) returns a Matrix that transforms a coordinate in otherSprite space into a coordinate in current sprite space.

    Sprite:updateStyle() performs what need to be done when the style table of a Sprite has changed. It is called automatically by Gideros or when application:applyStyles() is called.
    It can be overriden by your own classes if needed, so it is lua visible so that you can call it in such cases.

    Likes: MoKaLux

    +1 -1 (+1 / -0 )Share on Facebook
Sign In or Register to comment.