Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
Gideros 2023.9 Released — Gideros Forum

Gideros 2023.9 Released

hgy29hgy29 Maintainer
edited October 2023 in Announcements
This new Gideros released is focused on memory consumption. A lot of work has been done to allow dealing with a lot of sprites without taking too much memory. A typical Sprite used to take 2kB of RAM, they are now 30% lighter. It is something, but not enough if you want to draw millions of sprites, so a new feature has been introduced: Ghosts

Ghosts are kind of lightweight Sprites: you tell Gideros to render the same real Sprite with slight variations. Not everything is possible, but it currently supports changing the layout position (gridx/gridy in layout constraints), the color of a pixel, the text and color of a textfield. More will be added in the future. The idea is that those ghosts only take a hundred of bytes of memory, since they share the rest of the settings with the original real Sprite. With this system, Gideros can now render a table of several millions of cells at a fraction of the memory cost of full Sprites.

Another new feature: you can now create sounds directly from a lua array, simplifying the use of sounds in Gideros pure code demos, and allowing lua generated sound streams.

For the full list of additions and changes, see below:
New features

[core] Add math.fft() and math.ifft()
[gfx] Implement Sprite ghosts (Sprite,Pixel,TextField)
[audio] Allow to create sounds from raw waveform data
[export/linux] Support fullscreen and Screen API

Improvements

[layout] Reduce memory usage
[layout] Add a fixed grid layout parameter telling Gideros to ignore children size requirements
[gfx] Deactivate clipping when 3D transform is detected
[gfx] Significantly reduce sprite memory usage
[gfx/textfield] Faster recoloring in most cases
[gfx/pixel] Reduce memory usage
[gfx/movieclip] Make native tween functions available to lua
[audio] Allow streaming a wave file
[studio] Add icons for Apple and Linux exports
[export/uwp] Use UWP Storage API to access files outside sandbox

Fixes

[library/3d] fix missing alpha value for fbx (json) models
[gfx/layout] Avoid setting invalid bounds on sprites (if computations are still ongoing)


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

Comments

  • is the midi plugin supported by the linux export? and the qt-based linux export?
  • hgy29hgy29 Maintainer
    @keszegh, neither of them I believe, but I’ll check
  • That's awesome! Thank you so much! There are so many exciting upgrades in this new version!
    Coming soon
  • hgy29 said:

    @keszegh, neither of them I believe, but I’ll check

    that's what i assumed by not having seen it in the plugin folders of the exports. could it be added perhaps? thanks

    also, wacom pen pressure support should work in linux-qt i guess (am i right?), what about the other linux export?
  • about ghosts, i assumed that particles have a similar purpose, what is the advantage of ghosts?
  • hgy29hgy29 Maintainer
    Advantage of ghosts is that they can be a whole sprite tree, and any kind of Sprite.

    Likes: keszegh

    +1 -1 (+1 / -0 )Share on Facebook
  • hgy29hgy29 Maintainer
    edited September 2023
    About Linux Wacom support, we use glfw library to talk to X server, which doesn’t handle touch at all.

    EDIT: There are plans to add touch support to GLFW, but can't tell if/when that'll be done: https://github.com/glfw/glfw/pull/1736
    In the end, it would be great to remove the need for GLFW and deal with X server directly, but that's probably a lot of work and learning
  • hgy29 said:

    About Linux Wacom support, we use glfw library to talk to X server, which doesn’t handle touch at all

    is there a chance to support wacom on one of the exports sometime in the future?
  • hgy29hgy29 Maintainer
    keszegh said:


    is there a chance to support wacom on one of the exports sometime in the future?

    You are asking too much I am afraid, even in touch become supported some time in the future, wacom is yet another subject

  • hgy29 said:

    keszegh said:


    is there a chance to support wacom on one of the exports sometime in the future?

    You are asking too much I am afraid, even in touch become supported some time in the future, wacom is yet another subject

    thanks, i will stick to that as of now. i hope adding midi support will work though.

    Likes: MoKaLux

    +1 -1 (+1 / -0 )Share on Facebook
  • hgy29hgy29 Maintainer
    keszegh said:


    thanks, i will stick to that as of now. i hope adding midi support will work though.

    It builds fine at least: https://github.com/gideros/gideros/commit/f4919e602b5c0be83ab949a15dabdda1546287b3
    Do you want me to send it to you for testing ?
  • hgy29 said:

    About Linux Wacom support, we use glfw library to talk to X server, which doesn’t handle touch at all.

    EDIT: There are plans to add touch support to GLFW, but can't tell if/when that'll be done: https://github.com/glfw/glfw/pull/1736
    In the end, it would be great to remove the need for GLFW and deal with X server directly, but that's probably a lot of work and learning

    instead of touch i've found stuff about supporting wintab in glfw, which would be also good for wacom.
    see e.g., https://github.com/glfw/glfw/issues/403
    but it is not clear to me if there is a working solution or not.
  • hgy29 said:

    keszegh said:


    thanks, i will stick to that as of now. i hope adding midi support will work though.

    It builds fine at least: https://github.com/gideros/gideros/commit/f4919e602b5c0be83ab949a15dabdda1546287b3
    Do you want me to send it to you for testing ?
    sure, i'd be happy to test.
  • hgy29hgy29 Maintainer
    Here it is, merge it with your existing All plugins/luamidi folder
    zip
    zip
    luamidi.zip
    31K

    Likes: MoKaLux

    +1 -1 (+1 / -0 )Share on Facebook
  • hgy29 said:

    Here it is, merge it with your existing All plugins/luamidi folder

    thanks, i will.

    Likes: MoKaLux

    +1 -1 (+1 / -0 )Share on Facebook
  • Thank you for this new release :)
    Ghost question: is it automatically applied?

    I tried this code with no luck :p
    local pixel = Pixel.new(0x0, 1, 128, 128)
    pixel:setPosition(128*2, 128*2)
    --pixel:applyGhost()
    local gpixel = pixel:applyGhost()
    stage:addChild(gpixel)
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
  • hgy29hgy29 Maintainer
    I’ll try to come with an example of ghost use in a few days

    Likes: MoKaLux

    +1 -1 (+1 / -0 )Share on Facebook
  • MoKaLuxMoKaLux Member
    edited September 2023
    And I will do the wiki please ;) DONE in the Sprite class (I only copied hgy29 text and sample code below :( ). Plus added fft ifft to Math.

    Likes: hgy29

    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
    +1 -1 (+1 / -0 )Share on Facebook
  • hgy29hgy29 Maintainer
    A quick demo of ghosts:
    --Layouts are computed from stage, configure a single sub cell, taking all space
    stage:setLayoutParameters({rowWeights={1},columnWeights={1}})
     
    --Make a grid of 24 rows, 8 columns with cells of 40x20 units
    local rn,cn=24,8
    local grid=Pixel.new()
    local rh,cw={},{}
    for i=1,rn do rh[#rh+1]=20 end
    for i=1,cn do cw[#cw+1]=40 end
    grid:setLayoutParameters({rowHeights=rh,columnWidths=cw})
    grid:setLayoutConstraints({fill=1})
    stage:addChild(grid)
     
    -- Create cell template
    cell=Pixel.new()
    cell:setLayoutConstraints({fill=1})
    local ic=Pixel.new(0,1,10,10)
    ic:setPosition(5,5)
    cell:addChild(ic)
    local tf=TextField.new(nil,"",{ flags=FontBase.TLF_REF_TOP|FontBase.TLF_VCENTER|FontBase.TLF_CENTER, w=20, h=10})
    tf:setPosition(20,5)
    cell:addChild(tf)
     
    --Create ghosts
    local ghosts={}
    for i=1,rn do 
    	for j=1,cn do
    		ghosts[#ghosts+1]={ model=cell, -- Specify ghost model
    			gridx=j-1, gridy=i-1, -- Place this ghost in the grid
    			color=math.random(0xFFFFFF), -- A random color for this cell
    			children={
    				{ color=math.random(0xFFFFFF), }, -- First child is the icon (ic), set a random color
    				{ text=math.random(10) }, -- Second child is the textfield, set a random number
    			}
    		}
    	end
    end
     
    --Apply ghosts
    grid:setGhosts(ghosts)
    +1 -1 (+2 / -0 )Share on Facebook
  • hgy29hgy29 Maintainer
    I've made a quick update to this release, now it will be 2023.9.1 with:
    - Improved particles: 32bit indices and new Particles:getNumParticles() call
    - Ghosts now support a 'transform' parameter, which will be a 'Matrix' object
    - MacOS fixes
    - Linux luamidi plugin
    - And more various fixes
    +1 -1 (+6 / -0 )Share on Facebook
  • MoKaLuxMoKaLux Member
    edited September 2023
    I seem to have an issue with composite fonts :s
    local ttfont1path = "fonts/JetBrainsMono-Regular.ttf"
    local of5 = TTFont.new(ttfont1path, 24, "", true, 3) -- outlined
    local nf5 = TTFont.new(ttfont1path, 24, "", true, 1) -- normal
    cf5= CompositeFont.new{
    	{ font=of5, color=0x0, x=1, y=2 }, -- outline
    --	{ font=nf5, color=0xffffff }, -- DOESN'T WORK IN GIDEROS 2023.9+
    	{ font=nf5, }, -- BUT THIS WORK!
    }
    It seems CF doesn't treat children color, alpha, x and y, correctly, or is it supposed to be like this?!

    Thank you o:)

    EDIT: nevermind I found the issue, now alpha is not optional anymore, if you pass a color then you must pass its alpha as well. Issue solved :)
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
  • hgy29hgy29 Maintainer
    MoKaLux said:


    It seems CF doesn't treat children color, alpha, x and y, correctly, or is it supposed to be like this?!

    Thank you o:)

    What are you expecting ?

    Likes: MoKaLux

    +1 -1 (+1 / -0 )Share on Facebook
  • MoKaLuxMoKaLux Member
    edited September 2023
    thank you hgy29, please see my EDIT above. This works now:
    -- fonts
    local ttfont1path = "fonts/JetBrainsMono-Regular.ttf"
    --
    local ttfo5 = TTFont.new(ttfont1path, 24, "", true, 8) -- outline
    local ttf5 = TTFont.new(ttfont1path, 24, "", true, 1) -- normal
    cf5= CompositeFont.new{
    	{ font=ttfo5, color=0x0, alpha=1, x=-1, y=-1 }, -- outline
    	{ font=ttf5, color=0xff0000, alpha=1 }, -- normal
    --	{ font=ttf5, }, -- normal
    }
    I post my edit here as well :p
    EDIT: nevermind I found the issue, now alpha is not optional anymore, if you pass a color then you must pass its alpha as well. Issue solved :)
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
  • hgy29hgy29 Maintainer
    Oh, I see, I’ll make alpha optional then
  • MoKaLuxMoKaLux Member
    edited September 2023
    hgy29 said:

    Oh, I see, I’ll make alpha optional then

    don't worry hgy29, I updated the wiki :p
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
  • MoKaLuxMoKaLux Member
    edited September 2023
    I have a question regarding keycode please o:)
    Would it be possible and easy to have all the NUMPAD keys available?
    NUM_DOT, NUM_ENTER, NUM_PLUS, NUM_MINUS, ...

    Second question: would it be possible and easy to have MODIFIERS work with the NUMPAD keys (like in Gideros Studio)?
    ALT CTRL SHIFT + NUM_0, NUM_1, NUM_2, ...

    I have tried the following code but it is not working for me:
    	self:addEventListener(Event.KEY_DOWN, function(e)
    		local modifier = application:getKeyboardModifiers()
    		local modif = (modifier & KeyCode.MODIFIER_SHIFT) > 0
    		--
    		if e.keyCode == KeyCode.SPACE then self.isplaying = not self.isplaying
    		-- ...
    		elseif e.keyCode == KeyCode.NUM_1 then self:modelFRONT()
    		elseif e.keyCode == KeyCode.NUM_3 then self:modelRIGHT()
    --		elseif (modif and e.keyCode == KeyCode.NUM_1) then self:modelBACK()
    --		elseif (modif and e.keyCode == KeyCode.NUM_3) then self:modelLEFT()
    		elseif e.keyCode == KeyCode.NUM_4 then self:modelBACK()
    		elseif e.keyCode == KeyCode.NUM_6 then self:modelLEFT()
    		-- ...
    		end
    	end)
    Thank you :)

    PS: regarding below answer by hgy29, that is awesome, thank you very much captain ;)
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
  • hgy29hgy29 Maintainer
    @MoKaLux: https://github.com/gideros/gideros/commit/cfd0cb03080c7734b11d0a320ae9fe20b2988071

    Modifiers should already work with numpad keys, except they weren't defined. By the ways you should use 'e.modifiers' instead of getKeyboardModifiers()

    Likes: MoKaLux

    +1 -1 (+1 / -0 )Share on Facebook
  • MoKaLuxMoKaLux Member
    edited September 2023
    I compiled with the changes and it is working, thank you hgy29 o:)
    Some sample code:
    function TheStage:myKeysPressed()
    	self:addEventListener(Event.KEY_DOWN, function(e)
    		-- ...
    		elseif (e.modifiers == KeyCode.MODIFIER_CTRL and e.keyCode == KeyCode.NUM1) then self:modelBACK()
    		elseif (e.modifiers == KeyCode.MODIFIER_CTRL and e.keyCode == KeyCode.NUM3) then self:modelLEFT()
    		elseif e.keyCode == KeyCode.NUM1 then self:modelFRONT()
    		elseif e.keyCode == KeyCode.NUM3 then self:modelRIGHT()
    		-- ...
    		end
    --		print(e.keyCode, e.realCode, e.modifiers)
    	end)
    end
    PS: warning, wiki updated with those changes for the next Gideros https://wiki.gideros.rocks/index.php/KeyCode_Constants
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
  • Hello!

    I downloaded this version on Windows and I wanted to export for Android but it doesn't write the package name in the exported Android manifest.

    Is that a bug?
  • MoKaLuxMoKaLux Member
    edited September 2023
    @zeroexu are you exporting to apk, aab or android studio please?

    Likes: zeroexu

    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
    +1 -1 (+1 / -0 )Share on Facebook
Sign In or Register to comment.