Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
Gideros 2022.1 Released - Page 3 — Gideros Forum

Gideros 2022.1 Released

1356789

Comments

  • hgy29 said:

    Hmm, did you link your dll with the new Sdk ? Also maybe you didn't notice but the binding code have changed a bit with the switch to luau

    Im using latest version. I noticed that:
    // any destructor function now expects void* instead of lua_State*
    //in g_initializePlugin
    lua_pushcnfunction(L, ImGui_impl::loader,"plugin_init_imgui");
    and thats it. Something else?
    Well, I compiled player only, not everything, but Ill try :)

    Likes: SinisterSoft

    +1 -1 (+1 / -0 )Share on Facebook
  • hgy29hgy29 Maintainer
    @rrraptor, for some reason the player can't load the DLL, since it doesn't appear in the 'package.preload' table. It could be because of 64bit / 32bit mismatch (different toolchain used to build the dll and the player), or because the DLL has a dependancy that cannot be met. Did you switch to QT 6.2.2 with mingw 64 ?
  • hgy29hgy29 Maintainer
    Gideros 2022.1.1 is ready, fixing most of the issues reported here.
    +1 -1 (+2 / -0 )Share on Facebook
  • hgy29 said:

    Gideros 2022.1.1 is ready, fixing most of the issues reported here.

    thanks, will try. how come it is almost half the size as before?
    is the issue with slow setfullscreen on/off fixed too?
  • rrraptorrrraptor Member
    edited January 2022
    hgy29 said:

    @rrraptor, for some reason the player can't load the DLL, since it doesn't appear in the 'package.preload' table. It could be because of 64bit / 32bit mismatch (different toolchain used to build the dll and the player), or because the DLL has a dependancy that cannot be met. Did you switch to QT 6.2.2 with mingw 64 ?

    Yes, Im using 6.2.2 + mingw64.
    I had a problem with
    make -f scripts/Makefile.gid versioning

    My Makefile.def looks like this:
    QTBASEDIR=/d/Qt6
    QT_ARCH=mingw900_64
    QT_TOOLSARCH=mingw900_64
    QTVER=Tools
    QT5ICUVER=53

    Notice that I have to type "Tools" in QTVER in order to make it work, because if I put "6.2.2" there, Im getting an error (cant tell right now)
    This is the struct I have:

  • keszeghkeszegh Member
    edited January 2022
    EDITED.

    i still have to start two players for the second time to the studio to see one of them.
  • setfullscreen on/off still leads to a major freeze (i had to force close the app from task manager).
  • hgy29hgy29 Maintainer
    keszegh said:


    thanks, will try. how come it is almost half the size as before?
    is the issue with slow setfullscreen on/off fixed too?

    It is smaller because compressed with LZMA instead of ZLIB.
    And no I didn't fix the 'setfullscreen' issue, mostly because I don't know where to start with this one, since nothing changed in Gideros so that must be something with QT6

  • hgy29 said:

    keszegh said:


    thanks, will try. how come it is almost half the size as before?
    is the issue with slow setfullscreen on/off fixed too?

    It is smaller because compressed with LZMA instead of ZLIB.
    And no I didn't fix the 'setfullscreen' issue, mostly because I don't know where to start with this one, since nothing changed in Gideros so that must be something with QT6

    i see, that's quite a big problem though, which can be tested with this tiny code:
    _fullscreen=false
    function onKeyUp()
    	_fullscreen=not _fullscreen
    	application:setFullScreen(_fullscreen)	  
    end
     
    stage:addEventListener(Event.KEY_DOWN, onKeyUp,self)
  • hgy29hgy29 Maintainer
    rrraptor said:


    QT_ARCH=mingw900_64
    QT_TOOLSARCH=mingw900_64
    QTVER=Tools
    QT5ICUVER=53

    Here is what I have:
    QTBASEDIR=/c/Applications/Qt514
    QT_ARCH=mingw_64
    QT_TOOLSARCH=mingw900_64
    QTVER=6.2.2
  • hgy29hgy29 Maintainer
    @keszegh, I just had a try with your code, and couldn't spot any performance issue, except that setFullscreen seems to make the app span all screens, which is incorrect.
  • @hgy29 perhaps it crashes for me because i use an external monitor.
    also what i noticed that even when it works then setfullscreen(false) does not return the window to its previous size but it remains to be the same size as the screen, just not full-screen but in a window.
  • hgy29 said:

    rrraptor said:


    QT_ARCH=mingw900_64
    QT_TOOLSARCH=mingw900_64
    QTVER=Tools
    QT5ICUVER=53

    Here is what I have:
    QTBASEDIR=/c/Applications/Qt514
    QT_ARCH=mingw_64
    QT_TOOLSARCH=mingw900_64
    QTVER=6.2.2
    Ok, that helped. Recompiled everything again, but still, cant load dlls :(
  • @rrraptor , @hgy29 would it be possible to generate a non-beta imgui dll for the version before luau switch? (2021.1)? i think i will need to use that version for some indefinite time further (given the issues with fullscreen e.g. and also zbs) and would be great to have a dll of size 1.5mb instead of 13mb.
    thanks
  • Fullcreen works for me, but only once :D
    after calling application:setFullscreen(true), application:setFullscreen(false) does nothing.
    And yes, it behaves weirdly when you have 2 monitors (and more, I guess):
  • rrraptor said:

    Fullcreen works for me, but only once :D
    after calling application:setFullscreen(true), application:setFullscreen(false) does nothing.
    And yes, it behaves weirdly when you have 2 monitors (and more, I guess):

    thanks for testing also, i have similar experience.
  • hgy29hgy29 Maintainer
    I fixed the setFullscreen(false) issue (not restoring correct window size), it was due to a conflict with player autoscale feature, and thus desktop export was probably working. But no luck about making the window go fullscreen on a single screen when you have multiple screens merged together.
  • @hgy29 , the desktop export crashed on me also when doing setFullscreen false/true repeatedly.
  • hgy29hgy29 Maintainer
    It didn’t crash for me yet, but I fixed a crash caused by listener destructors, not sure how that could possibly relate
  • @hgy29 , i will be happy to test the next version when it comes.
  • rrraptorrrraptor Member
    edited January 2022
    keszegh said:

    @hgy29 , i will be happy to test the next version when it comes.

    I can build only player for you :) Or atleast I can try )))
    But it seems like @hgy29 have not pushed changes to github.
  • hgy29hgy29 Maintainer
    I have just pushed my latest changes, but @SinisterSoft reported an issue about ads plugin on Android, and I'd like to investigate it before I build a full release

    Likes: MoKaLux

    +1 -1 (+1 / -0 )Share on Facebook
  • hgy29hgy29 Maintainer
    BTW, @rrraptor, if you want to try luau type checking, you can enable it in Gideros Studio 2022.1.1 under "Tools/Type checking"
  • hgy29 said:

    BTW, @rrraptor, if you want to try luau type checking, you can enable it in Gideros Studio 2022.1.1 under "Tools/Type checking"

    Yes, I know already, ty :wink:
  • hito9hito9 Member
    edited January 2022
    Hi again,

    Thanks to hgy29 and those who contributed you guyz. keymap.ini implementation works well. All examples almost work fine. More feedbacks for this Gideros 2022.1.1 luau version on wine.

    Wine build: wine-7.0-rc5
    Platform: x86_64
    Version: Windows 7
    Host system: Linux
    Host version: 5.16.1-arch1-1
    • Every time I start the Gideros Studio and Player there was no connection. Every start I have to click Menu -> PLayer -> Locolhost Toggle then provided connection.
    • In the first run for "Drag Me" example there was no main.lua file in theLibrary tree. I had to link main.lua but Player became disfunctional. After Menu -> PLayer -> Locolhost Toggle click Studio could load main.lua to Player side again.
    • Here is the dataSaver Gideros class implementation to work your project. But You should also change dataSaver.loadValue() call to dataSaver:loadValue() call. I don't know, there may be the smarter way?

    dataSaver.lua

    require "json"
     
    dataSaver = Core.class()
     
    function dataSaver:init()
     
    end
     
    function dataSaver:saveValue(key, value)
    	--temp variable
    	local app
    	--default data storage
    	local path = "|D|app.txt"
    	--open file
    	local file = io.open(path, "r")
    	if file then
    		-- read all contents of file into a string
    		local contents = file:read( "*a" )
    		--Decode json
    		app = json.decode(contents)
    		io.close( file )	-- close the file after using it
    		--if file was empty
    		if(not app.data) then
    			app.data = {}
    		end
    		--store value in table
    		app.data[key] = value
    		--Encode table to json
    		contents = json.encode(app)
    		--open file
    		local file = io.open( path, "w" )
    		--store json string in file
    		file:write( contents )
    		--close file
    		io.close( file )
    	else
    		--if file doesn't exist
    		--create default structure
    		app = {data = {}}
    		--store value
    		app.data[key] = value
    		--Encode in json
    		local contents = json.encode(app)
    		--create file
    		local file = io.open( path, "w" )
    		--save json string in file
    		file:write( contents )
    		--close file
    		io.close( file )
    	end
    end
    function dataSaver:loadValue(key)
    	--temp variable
    	local app
    	local path = "|D|app.txt"
    	--open file
    	local file = io.open( path, "r" )
    	if file then
    		--read contents
    		local contents = file:read( "*a" )
    		--Decode json
    		app = json.decode(contents)
    		if(not app.data) then app.data = {} end
    		--return value
    		return app.data[key]
    	end
    	--if doesn't exist
    	return nil
    end
     
    function dataSaver:save( filename, dataTable )
    	local path = filename..".json"
    	--Encode table into json string
    	local jsonString = json.encode( dataTable )
    	-- io.open opens a file at path. Creates one if doesn't exist
    	local file = io.open( path, "w" )
    	if file then
    		--write json string into file
    	   file:write( jsonString )
    	   -- close the file after using it
    	   io.close( file )
    	end
    end
     
    function dataSaver:load( filename )
    	local path = filename..".json"
     
    	-- will hold contents of file
    	local contents
     
    	-- io.open opens a file at path. returns nil if no file found
    	local file = io.open( path, "r" )
    	if file then
    		-- read all contents of file into a string
    		contents = file:read( "*a" )
    		-- close the file after using it
    		io.close( file )
    		--return Decoded json string
    		return json.decode( contents )
    	else
    		--or return nil if file didn't ex
    		return nil
    	end
    end
     
    dataSaver = dataSaver.new()
    • io.lines() method doesn't get along with Luau. Here is the objloader lua file with prettified indentations(otherwise it's hard to catch a bug) and string.gfind replacement that fixes 3D Horse example. Also you should replace string.gfind to string.gmatch method in your files(Edit:including bitmapfont.lua) because string.gfind method had been removed in lua 5.2

    objloader.lua

    --[[
    Load meshes from a wavefromt .obj file
    Usage:
    sprite=loadObj(path,file) : load the file located at path/file
     
    Returned sprite has a few specific attributes:
    - objs: table referencing all objects within the loaded file
     
    ]]
    local function Split(str, delim, maxNb)
    	-- Eliminate bad cases...
    	if string.find(str, delim) == nil then
    		return { str }
    	end
    	if maxNb == nil or maxNb < 1 then
    		maxNb = 0    -- No limit
    	end
    	local result = {}
    	local pat = "(.-)" .. delim .. "()"
    	local nb = 0
    	local lastPos
    	for part, pos in string.gmatch(str, pat) do
    		nb = nb + 1
    		result[nb] = part
    		lastPos = pos
    		if nb == maxNb then break end
    	end
    	-- Handle the last field
    	if nb ~= maxNb then
    		result[nb + 1] = string.sub(str, lastPos)
    	end
    	return result
    end
     
    local function parsemtl(mtls,path,file)
    	local mtl={ texturew=0, textureh=0 }
    	--for line in io.lines(path.."/"..file) do
    	local p = path.."/"..file 
    	local f = io.open(p, "r")
     
    	for line in f:lines() do
     
    		fld=Split(line," ",6)
    		for i=1,#fld,1 do
    			fld[i]=string.gsub(fld[i], "\r", "") 
    		end
    		if (fld[2]~=nil) then
    			fld[2]=string.gsub(fld[2], "\r", "")
    		end
    		if fld[1]=="newmtl" then
    			--print("DM",fld[2])
    			mtl={texturew=0, textureh=0}
    			mtls[fld[2]]=mtl
    		elseif fld[1]=="Kd" then
    			mtl.kd={fld[2],fld[3],fld[4],1.0}
    		elseif fld[1]=="map_Kd" then
    			table.remove(fld,1)
    			local f=table.concat(fld," ")
    			--print("Texture:.. ["..path.."/"..f.."]")
    			mtl.texture=Texture.new(path.."/"..f,true,{ wrap=TextureBase.REPEAT })
    			mtl.texturew=mtl.texture:getWidth()
    			mtl.textureh=mtl.texture:getHeight()
    		elseif fld[1]=="map_Bump" then
    			table.remove(fld,1)
    			local f=table.concat(fld," ")
    			--print("Texture:.. ["..path.."/"..f.."]")
    			mtl.normalMap=Texture.new(path.."/"..f,true,{ wrap=TextureBase.REPEAT })
    			mtl.normalMapW=mtl.normalMap:getWidth()
    			mtl.normalMapH=mtl.normalMap:getHeight()
    		end
    	end
     
    	f:close()
    end
     
    function string.starts(String,Start)
    	return string.sub(String,1,string.len(Start))==Start
    end
     
    function string.ends(String,End)
    	return End=='' or string.sub(String,-string.len(End))==End
    end
     
    function loadObj(path,file)
    	local spr=Sprite.new()
    	v = {}
    	imap = nil
    	vt = {}
    	vn = {}
    	mtls={}
    	mtl=nil
    	spr.min={1000000,1000000,1000000} 
    	spr.max={-1000000,-1000000,-1000000} 
    	spr.objs={}
    	oname=nil
    	local function buildObject()
    		local m=nil
    		if (imap~=nil) then
    			for _,vm in pairs(imap.vngmap) do
    				local nx,ny,nz=0,0,0
    				for _,vn in ipairs(vm) do
    					nx=nx+imap.lvn[vn+1]
    					ny=ny+imap.lvn[vn+2]
    					nz=nz+imap.lvn[vn+3]
    				end
    				local nl=math.sqrt(nx*nx+ny*ny+nz*nz)
    				nx=nx/nl
    				ny=ny/nl
    				nz=nz/nl
    				for _,vn in ipairs(vm) do
    					imap.lvn[vn+1]=nx
    					imap.lvn[vn+2]=ny
    					imap.lvn[vn+3]=nz
    				end	
    			end
     
    			m=Mesh.new(true)
    			m:setVertexArray(imap.lv)
    			m:setIndexArray(imap.i)
    			--m:setColorArray(c)
    			if (mtl.texture~=nil) then
    				m:setTextureCoordinateArray(imap.lvt)
    				m:setTexture(mtl.texture)
    				m.hasTexture=true
    			end
    			if (mtl.normalMap~=nil) then
    				m:setTexture(mtl.normalMap,1)
    				m.hasNormalMap=true
    			end
    			if mtl.kd then
    				m:setColorTransform(mtl.kd[1],mtl.kd[2],mtl.kd[3],mtl.kd[4])
    			end
    			if #imap.lvn>0 then
    				m.hasNormals=true
    				m:setGenericArray(3,Shader.DFLOAT,3,#imap.lvn/3,imap.lvn)
    			end
     
    			local sobj=spr.objs[oname]
    			if sobj==nil then
    				sobj=Sprite.new()
    				spr:addChild(sobj)
    				spr.objs[oname]=sobj
    				sobj.min={1000000,1000000,1000000} 
    				sobj.max={-1000000,-1000000,-1000000} 
    			end
    			sobj:addChild(m)
    			local minx,miny,minz=100000,100000,100000
    			local maxx,maxy,maxz=-100000,-100000,-100000
    			for i=1,#imap.lv-2,3 do
    				local x,y,z=imap.lv[i],imap.lv[i+1],imap.lv[i+2]
    				minx=math.min(minx,x)
    				miny=math.min(miny,y)
    				minz=math.min(minz,z)
    				maxx=math.max(maxx,x)
    				maxy=math.max(maxy,y)
    				maxz=math.max(maxz,z)
    			end
    			m.min={minx,miny,minz}
    			m.max={maxx,maxy,maxz}
    			m.center={(m.max[1]+m.min[1])/2,(m.max[2]+m.min[2])/2,(m.max[3]+m.min[3])/2}
    			sobj.min={math.min(sobj.min[1],m.min[1]),math.min(sobj.min[2],m.min[2]),math.min(sobj.min[3],m.min[3])}
    			sobj.max={math.max(sobj.max[1],m.max[1]),math.max(sobj.max[2],m.max[2]),math.max(sobj.max[3],m.max[3])}
    			spr.min={math.min(spr.min[1],m.min[1]),math.min(spr.min[2],m.min[2]),math.min(spr.min[3],m.min[3])}
    			spr.max={math.max(spr.max[1],m.max[1]),math.max(spr.max[2],m.max[2]),math.max(spr.max[3],m.max[3])}
    			m.name=oname
    			--[[print(oname,m.min[1],m.min[2],m.min[3],m.max[1],m.max[2],m.max[3])
    			if string.starts(oname,"light") then
    				lightPosX,lightPosY,lightPosZ=m.center[1],m.center[2],m.center[3]
    				lightRef=m
    			end]]
    			imap=nil
    		end
    		return m
    	end
     
    	--for line in io.lines(path.."/"..file) do
    	local p = path.."/"..file 
    	local f = io.open(p, "r")
     
    	for line in f:lines() do
    		fld=Split(line," ")
    		for i=1,#fld,1 do
    			fld[i]=string.gsub(fld[i], "\r", "") 
    		end
    		if fld[1]=="v" then
    			table.insert(v,tonumber(fld[2]))
    			table.insert(v,tonumber(fld[3]))
    			table.insert(v,tonumber(fld[4]))
    		elseif fld[1]=="vn" then
    			table.insert(vn,tonumber(fld[2]))
    			table.insert(vn,tonumber(fld[3]))
    			table.insert(vn,tonumber(fld[4]))
    		elseif fld[1]=="vt" then
    			table.insert(vt,tonumber(fld[2]))
    			table.insert(vt,tonumber(fld[3]))
    		elseif fld[1]=="f" then
    			if imap==nil then
    				imap={}
    				imap.alloc=function(self,ifld,facenm)
    					local ifl=Split(ifld,"/",3) 
    					local iv=tonumber(ifl[1])
    					if (iv<0) then
    						iv=(#v/3+1+iv)
    					end
    					iv=iv-1
    					local it=tonumber(ifl[2])
    					if (it==nil) then
    						it=-1
    					else
    						if (it<0) then
    							it=(#vt/2)+it+1
    						end
    						it=it-1
    					end
    					local inm=tonumber(ifl[3])
    					if (inm==nil) then
    						inm=-1
    					else
    						if (inm<0) then
    							inm=(#vn/3)+inm+1
    						end
    						inm=inm-1
    					end
    					if inm==-1 then inm=facenm.code end
    					local ms=iv..":"..it..":"..inm
    					if self.vmap[ms]==nil then
    						ni=self.ni+1
    						self.ni=ni
    						table.insert(facenm.lvi,#self.lv)
    						table.insert(self.lv,v[iv*3+1])
    						table.insert(self.lv,v[iv*3+2])
    						table.insert(self.lv,v[iv*3+3])
    						if it>=0 then
    							table.insert(self.lvt,vt[it*2+1]*mtl.texturew)
    							table.insert(self.lvt,vt[it*2+2]*mtl.textureh)
    						end
    						if inm>=0 then
    							table.insert(self.lvn,vn[inm*3+1])
    							table.insert(self.lvn,vn[inm*3+2])
    							table.insert(self.lvn,vn[inm*3+3])
    						else 
    							local vngmap=self.vngmap[iv] or { }
    							self.vngmap[iv]=vngmap
    							table.insert(vngmap,#self.lvn)
    							table.insert(facenm.lvni,#self.lvn)
    							table.insert(self.lvn,0)
    							table.insert(self.lvn,0)
    							table.insert(self.lvn,0)
    						end
    						self.vmap[ms]=ni
    					end
    					return self.vmap[ms]
    				end
    				imap.i={}
    				imap.ni=0
    				imap.lv={}
    				imap.lvt={}
    				imap.lvn={}
    				imap.vmap={}
    				imap.vngmap={}
    				imap.gnorm=-2
    			end
    			local itab={}
    			local normtab={ code=imap.gnorm, lvi={}, lvni={} }
    			for ii=2,#fld,1 do
    				if (fld[ii]~=nil) and (fld[ii]~="") then
    					table.insert(itab,imap:alloc(fld[ii],normtab))
    				end
    			end
    			imap.gnorm=imap.gnorm-1
    			if (#itab>=3) then
    				if #normtab.lvni>0 then -- Gen normals
    					local ux=imap.lv[normtab.lvi[2]+1]-imap.lv[normtab.lvi[1]+1]
    					local uy=imap.lv[normtab.lvi[2]+2]-imap.lv[normtab.lvi[1]+2]
    					local uz=imap.lv[normtab.lvi[2]+3]-imap.lv[normtab.lvi[1]+3]
    					local vx=imap.lv[normtab.lvi[3]+1]-imap.lv[normtab.lvi[1]+1]
    					local vy=imap.lv[normtab.lvi[3]+2]-imap.lv[normtab.lvi[1]+2]
    					local vz=imap.lv[normtab.lvi[3]+3]-imap.lv[normtab.lvi[1]+3]
    					local nx=uy*vz-uz*vy
    					local ny=uz*vx-ux*vz
    					local nz=ux*vy-uy*vx
    					local nl=math.sqrt(nx*nx+ny*ny+nz*nz)
    					nx=nx/nl
    					ny=ny/nl
    					nz=nz/nl
    					for _,vni in ipairs(normtab.lvni) do
    						imap.lvn[vni+1]=nx
    						imap.lvn[vni+2]=ny
    						imap.lvn[vni+3]=nz
    					end
    				end
    				for ii=3,#itab,1 do
    					table.insert(imap.i,itab[1])
    					table.insert(imap.i,itab[ii-1])
    					table.insert(imap.i,itab[ii])
    				end
    			end
    		elseif fld[1]=="o" or fld[1]=="g" then
    			buildObject()
    			--print(line)
    			oname=fld[2]
    		elseif fld[1]=="mtllib" then
    			table.remove(fld,1)
    			parsemtl(mtls,path,table.concat(fld," "))
    		elseif fld[1]=="usemtl" then
    			buildObject()
    			mtl=mtls[fld[2]]
    		end
    	end
     
    	f:close()
     
    	--spr:setColorTransform(1.0,0,0,1.0)
    	buildObject() --If any in progress
    	spr.center={(spr.max[1]+spr.min[1])/2,(spr.max[2]+spr.min[2])/2,(spr.max[3]+spr.min[3])/2}
    	return spr
    end


    Guyz If possible can you attach for Bird Animation and ParticlesClown example's screenshots cos i can't load here for now. My screenshots
    https://imgbox_dot_com/Wt8h8TLr

    By th way How do i overcome "You cant post links" warning?
    +1 -1 (+3 / -0 )Share on Facebook
  • @hgy29 Gideros 2022.1.1 works well with a simple project but gives this output
    Unhandled exception: illegal instruction in 64-bit code (0x000000032cf05e58)

    with a more complex project include lots of box2d contacts, play multiple sounds. May be problem on qt6 side or wine side, i don't know.
  • hgy29hgy29 Maintainer
    @hito9, yes I know there is at least one crash that could occur in complex situations (about destructing listeners), I'll post a 2022.1.2 next week, hopefully that will solve some more issues.
    Thanks for your feedback.

    Likes: MoKaLux, hito9

    +1 -1 (+2 / -0 )Share on Facebook
  • MoKaLuxMoKaLux Member
    edited January 2022
    @hito9 yes thank you for the feedback I couldn't make 3d horse work, now I can :)

    PS: when you enable tools->type checking you can discover some more goodies (cf SinisterSoft previous post)

    @hito9 I am working on a 2d platformer and transfered it to gideros luau https://github.com/mokalux/GDOC_03_B2D_PLATFORMER_U (WIP)

    you can maybe try it on your machine?
    It uses data saver, b2d joints, ...

    PS2: gideros wiki will need some update :#

    Likes: hito9

    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
    +1 -1 (+1 / -0 )Share on Facebook
  • Hi @hgy29 . For some reason on the 2022.1 and 2022.1.1 the Addons Menu does not seem to show anything and fails to display anything. When you open that menu for the 1st time it shows an empty drop down menu box, and after that it does not render any drop down.

    Likes: MoKaLux

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