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

Gideros 2020.7 Released!

@Hgy29 just made a great release of Gideros...

There is one addition that really need emphasising:
Gideros now has initial support for Lua Shaders! If you code your shaders in Lua then Gideros will automatically translate them to the export platforms native shader language - eg GLSL, HLSL or MTL.

There is an example project to show how easy it is to add effects using Lua.

Help with coding shaders: https://wiki.giderosmobile.com/index.php/Writing_Shaders
Lua specific: https://wiki.giderosmobile.com/index.php/Lua_Shaders

See the full list of changes below.

New features
[library] A library is provided to allow writing shaders in lua, in a platform independent way
[plugin/chroma] Add Chroma plugin by @SinisterSoft
[plugin/share] Add share plugin (Android/iOS)

Improvements
[core/layout] Allow anchoring by floating point amount
[core/layout] Layout now accept cellSpacing parameter
[core/input] Support F1-F12 keys (on QT)
[core/object] Core.class now accepts a destructor has third arg
[export/android] Migrate to androidX
[export/android] Update gradle and build tools
[plugin/lfs] Upgrade to 1.6.3, add unicode support for windows, report AHS flags for windows

Fixes
[core/text] Improve tab handling
[core/text] Use the previous separator length and not the current one when computing current line width
[core/text] Fix reporting of minimum size for empty textfields (for layout)
[core/layout] Support zero sized sprites
[core/sprite] hitTestPoint and related functions shouldn't return true if Sprite isn't on screen
[export/uwp] Fix shader uniforms initialization, reduce Win10 SDK minimum version
[export/html5] Support UrlLoader PUT with data
[export/android] Ignore exception on buffer based text input
[plugin/map] Replace deprecated call
[plugin/native] Normalize class names for android
[plugin/threads] Fix build for Win32

As usual, you can get the latest version here:
http://giderosmobile.com/download
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
https://deluxepixel.com
Tagged:
+1 -1 (+8 / -0 )Share on Facebook
«13

Comments

  • SinisterSoftSinisterSoft Maintainer
    edited July 2020
    I also added a plugin to control Razer Chroma devices - with this you can easily display colour effects and light up keys to specific colours during your game.



    The example demo is in the plugin's folder.



    The plugin is fully documented here: https://wiki.giderosmobile.com/index.php/Chroma
    razer.png
    1870 x 1066 - 429K
    demo.png
    707 x 143 - 17K
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
    +1 -1 (+3 / -0 )Share on Facebook
  • SinisterSoftSinisterSoft Maintainer
    The Chroma plugin btw is an example of how anyone (even I managed it ;) ) can add an existing REST API as plugin so it can easily be used through all of the Gideros export platforms.
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • antixantix Member
    Thanks for this update :)

    A while ago there was mention of the possibility of Gideros being able to export to iOS without having to open X-Code, just like it does currently for Android without having to open Android Studio. Is this feature still in development or has it been ditched?

    Likes: SinisterSoft

    +1 -1 (+1 / -0 )Share on Facebook
  • MoKaLuxMoKaLux Member
    edited July 2020
    thank you for this wonderful update, I need to play with lua shaders :)
    PS: @hgy29 nice picture from your town in the demo B)
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
    +1 -1 (+2 / -0 )Share on Facebook
  • hgy29hgy29 Maintainer
    antix said:


    A while ago there was mention of the possibility of Gideros being able to export to iOS without having to open X-Code, just like it does currently for Android without having to open Android Studio. Is this feature still in development or has it been ditched?

    Not completely, but since you need Xcode to upload your app to your phone or to the App Store, it is much less useful than for Android
    +1 -1 (+3 / -0 )Share on Facebook
  • MobAmuseMobAmuse Member
    edited July 2020
    Nice work! + donated :)
    +1 -1 (+2 / -0 )Share on Facebook
  • edited July 2020
    @hgy29 Maybe we can use some tools like fastlane.tools for that?
    We still need Xcode but almost thing will be done automatically.
    Something like this will automatically upload your file and screenshot, descriptions ... to apple:
    https://docs.fastlane.tools/actions/upload_to_app_store/

    Likes: SinisterSoft

    Coming soon
    +1 -1 (+1 / -0 )Share on Facebook
  • antixantix Member
    @hgy29 darn. Oh well :)
  • Any example?

    [core/object] Core.class now accepts a destructor has third arg

    Also
    local tp = TexturePack.new({"img1.png", "img2.png", "img3.png"})
    Crushes the player.
  • hgy29hgy29 Maintainer
    @rraptor, quick exemple:
    TestClass=Core.class(Object,nil,function(self) print("Destroyed") end)
    local test=TestClass.new()
    test=nil
    collectgarbage()
    And thanks for reporting TexturePack issue. I am surprised it crashes, but I will look into it ASAP (in two weeks or so).

    Likes: antix, MoKaLux

    +1 -1 (+2 / -0 )Share on Facebook
  • hgy29hgy29 Maintainer
    Answered on github ;)
  • rrraptorrrraptor Member
    edited July 2020
    hgy29 said:

    Answered on github ;)

    Ah, ok :)

    Small suggestion, how about to extend Sprite:isVisible() (or create another method) to be able to get if it actually on screen (if parent (or parent of a parent) is hidden then it will return false)?
    local root = Sprite.new()
    local sub = {}
     
    local prev = root
    for i = 1, 4 do 
    	local curr = Sprite.new()
    	prev:addChild(curr)
    	sub[i] = curr
    	prev = curr
    end
     
    root:setVisible(false) --< hide everything
     
    print(sub[3]:isVisible()) --> true

    Likes: hgy29

    +1 -1 (+1 / -0 )Share on Facebook
  • SinisterSoftSinisterSoft Maintainer
    Gideros 'Razer Chroma' plugin linked to on the Razer developer site.

    https://developer.razer.com/works-with-chroma/download/

    Likes: MoKaLux

    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
    +1 -1 (+1 / -0 )Share on Facebook
  • olegoleg Member
    @hgy29 -consolidate projekt - Great feature, i just saw it =)
    my games:
    https://play.google.com/store/apps/developer?id=razorback456
    мій блог по гідерос https://simartinfo.blogspot.com
    Слава Україні!
  • olegoleg Member
    oleg said:

    @hgy29 -consolidate projekt - Great feature, i just saw it =)

    Icons not moved

    image.png
    523 x 609 - 30K
    my games:
    https://play.google.com/store/apps/developer?id=razorback456
    мій блог по гідерос https://simartinfo.blogspot.com
    Слава Україні!
  • olegoleg Member
    After the update, my game that used shaders broke down

    The code is the same as in the examples of gideros, only for me it goes as a class:
    picShyder = Core.class(Sprite)
     
    function picShyder:init(pic,w,h)
     
     
     
    local texture = Texture.new(pic)
     
     
    local effect = Shader.new("vs","ps",1,
    {
    {name="g_MVPMatrix",type=Shader.CMATRIX,sys=Shader.SYS_WVP, vertex=true},
    {name="g_Color",type=Shader.CFLOAT4,mult=1,sys=Shader.SYS_COLOR},
    {name="lightPos",type=Shader.CFLOAT4,mult=1,vertex=false},
    {name="g_Texture",type=Shader.CTEXTURE,mult=1,vertex=false}
    },
    {
    {name="POSITION0",type=Shader.DFLOAT,mult=3,slot=0,offset=0},
    {name="vColor",type=Shader.DUBYTE,mult=0,slot=1,offset=0},
    {name="TEXCOORD0",type=Shader.DFLOAT,mult=2,slot=2,offset=0}
    })
     
    local mesh = Mesh.new()
    --local w=256
    --local h=256
     
    mesh:setVertexArray(0, 0, w, 0, w, h, 0, h) -- розмір текстури на екрані
    mesh:setTextureCoordinateArray(0, 0, w, 0, w, h, 0, h)  -- фактичний розмір текстури
    mesh:setIndexArray(1, 2, 3, 1, 3, 4)
    mesh:setTexture(texture)
    mesh:setShader(effect)
     
    self:addChild(mesh)
     
     
     
     
     
    local function onEnterFrame(event)
    	local x = w/2 * math.cos(event.time * 1.5) + w/2--- радіус * math.cos(event.time * швидкість) + центр
    	local y = h/2 * math.sin(event.time * 1.3) + h/2
    	effect:setConstant("lightPos", Shader.CFLOAT4, 1, x, y,0,0)
    end
     
    --effect:setConstant("lightPos", Shader.CFLOAT4, 1, 200, 250,0,0)
    stage:addEventListener(Event.ENTER_FRAME, onEnterFrame)
     
    end

    Do you have any ideas why the code gives an error? In previous versions everything was fine.
    ps.glsl is uploading.
    vs.glsl is uploading.
    Uploading finished.
    FragmentShader:
    0(1) : error C0000: syntax error, unexpected type identifier, expecting '{' at token "sampler2D"
    0(2) : error C0000: syntax error, unexpected type identifier, expecting '{' at token "vec4"
    0(4) : error C0000: syntax error, unexpected type identifier, expecting '{' at token "vec4"
    0(11) : warning C7022: unrecognized profile specifier "lowp"
    0(11) : error C0502: syntax error at token "lowp"
    0(11) : warning C1503: undefined variable "g_Texture"
    0(11) : warning C1503: undefined variable "texCoord"
    0(12) : warning C7022: unrecognized profile specifier "lowp"
    0(12) : error C0502: syntax error at token "lowp"
    0(13) : warning C7022: unrecognized profile specifier "mediump"
    0(13) : error C0502: syntax error at token "mediump"
    0(13) : warning C1503: undefined variable "g_Texture"
    0(13) : warning C1503: undefined variable "texCoord"
    0(14) : warning C7022: unrecognized profile specifier "mediump"
    0(14) : error C0502: syntax error at token "mediump"
    0(14) : warning C1503: undefined variable "lightPos"
    0(14
    my games:
    https://play.google.com/store/apps/developer?id=razorback456
    мій блог по гідерос https://simartinfo.blogspot.com
    Слава Україні!
  • hgy29hgy29 Maintainer
    Which Platform are you targeting ?
  • olegoleg Member
    hgy29 said:

    Which Platform are you targeting ?

    I just run gideros in the player with windows10

    my games:
    https://play.google.com/store/apps/developer?id=razorback456
    мій блог по гідерос https://simartinfo.blogspot.com
    Слава Україні!
  • SinisterSoftSinisterSoft Maintainer
    UWP doesn't support GLSL shaders - that's why one of the main reasons why Lua shaders have been added. That and the fact that Apple are also moving away from GLSL.

    See: https://wiki.giderosmobile.com/index.php/Lua_Shaders

    Likes: oleg, MoKaLux

    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
    +1 -1 (+2 / -0 )Share on Facebook
  • olegoleg Member
    edited July 2020

    UWP doesn't support GLSL shaders - that's why one of the main reasons why Lua shaders have been added. That and the fact that Apple are also moving away from GLSL.

    See: https://wiki.giderosmobile.com/index.php/Lua_Shaders

    This is not a UWP project, this is a Gideros project.
    Shaders from the example 'normalmap' run in the Gideros player, I use the same shaders but call them through the class ..

    ps/ The game is released for android
    my games:
    https://play.google.com/store/apps/developer?id=razorback456
    мій блог по гідерос https://simartinfo.blogspot.com
    Слава Україні!
    +1 -1 (+2 / -0 )Share on Facebook
  • this is probably not a new issue, but i noticed it now:
    in html export when TextInputDialog.new() is called with an empty 3rd parameter (that is, no default text in input line) then the input line does not appear at all.
  • hgy29hgy29 Maintainer
    @oleg,

    You are using
    Shader.new("vs","ps",1, ...
    whereas in Gideros sample it is
    Shader.new("vs","ps",0, ...
    . Setting the flag to 1 tells Gideros to use the shader code as-is, without adding a few defines to account for differences between OpenGL (desktop) and OpenGL ES. Your shader is written for GLES, and won't run on desktop with the precision specifiers.

    Likes: oleg

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

    oleg said:

    @hgy29 -consolidate projekt - Great feature, i just saw it =)

    Icons not moved

    Yes, those icons are not really part of the project structure, so they are not 'consildated'
  • olegoleg Member
    edited July 2020
    hgy29 said:

    @oleg,

    You are using

    Shader.new("vs","ps",1, ...
    whereas in Gideros sample it is
    Shader.new("vs","ps",0, ...
    . Setting the flag to 1 tells Gideros to use the shader code as-is, without adding a few defines to account for differences between OpenGL (desktop) and OpenGL ES. Your shader is written for GLES, and won't run on desktop with the precision specifiers.
    Thanks helped, I have no idea why I have 1 instead of 0.

    Likes: MoKaLux

    my games:
    https://play.google.com/store/apps/developer?id=razorback456
    мій блог по гідерос https://simartinfo.blogspot.com
    Слава Україні!
    +1 -1 (+1 / -0 )Share on Facebook
  • keszegh said:

    this is probably not a new issue, but i noticed it now:
    in html export when TextInputDialog.new() is called with an empty 3rd parameter (that is, no default text in input line) then the input line does not appear at all.

    bump!

    @hgy29 may be the one who can correct this issue, i suspect. thanks
  • hgy29hgy29 Maintainer
    keszegh said:

    keszegh said:

    this is probably not a new issue, but i noticed it now:
    in html export when TextInputDialog.new() is called with an empty 3rd parameter (that is, no default text in input line) then the input line does not appear at all.

    bump!

    @hgy29 may be the one who can correct this issue, i suspect. thanks
    Yes, I can see that the current code would end up doing this! Offending line: https://github.com/gideros/gideros/blob/master/emscripten/gui-js.cpp#L198

    Likes: keszegh

    +1 -1 (+1 / -0 )Share on Facebook
  • @hgy29 , meanwhile if i put there "" instead of nothing, will that work?
  • hgy29hgy29 Maintainer
    No, the code treats null or empty string the same way, unfortunately

    Dislikes: keszegh

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