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");
@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 ?
@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
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:
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
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:
@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.
@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 after calling application:setFullscreen(true), application:setFullscreen(false) does nothing. And yes, it behaves weirdly when you have 2 monitors (and more, I guess):
Fullcreen works for me, but only once 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.
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.
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
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()endfunction dataSaver:saveValue(key, value)--temp variablelocal app
--default data storagelocal path ="|D|app.txt"--open filelocal file =io.open(path, "r")if file then-- read all contents of file into a stringlocal contents = file:read("*a")--Decode json
app = json.decode(contents)io.close( file )-- close the file after using it--if file was emptyif(not app.data)then
app.data ={}end--store value in table
app.data[key]= value
--Encode table to json
contents = json.encode(app)--open filelocal file =io.open( path, "w")--store json string in file
file:write( contents )--close fileio.close( file )else--if file doesn't exist--create default structure
app ={data ={}}--store value
app.data[key]= value
--Encode in jsonlocal contents = json.encode(app)--create filelocal file =io.open( path, "w")--save json string in file
file:write( contents )--close fileio.close( file )endendfunction dataSaver:loadValue(key)--temp variablelocal app
local path ="|D|app.txt"--open filelocal file =io.open( path, "r")if file then--read contentslocal contents = file:read("*a")--Decode json
app = json.decode(contents)if(not app.data)then app.data ={}end--return valuereturn app.data[key]end--if doesn't existreturnnilendfunction dataSaver:save( filename, dataTable )local path = filename..".json"--Encode table into json stringlocal jsonString = json.encode( dataTable )-- io.open opens a file at path. Creates one if doesn't existlocal file =io.open( path, "w")if file then--write json string into file
file:write( jsonString )-- close the file after using itio.close( file )endendfunction dataSaver:load( filename )local path = filename..".json"-- will hold contents of filelocal contents
-- io.open opens a file at path. returns nil if no file foundlocal 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 itio.close( file )--return Decoded json stringreturn json.decode( contents )else--or return nil if file didn't exreturnnilendend
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
]]localfunction Split(str, delim, maxNb)-- Eliminate bad cases...ifstring.find(str, delim)==nilthenreturn{ str }endif maxNb ==nilor maxNb <1then
maxNb =0-- No limitendlocal result ={}local pat ="(.-)" .. delim .. "()"local nb =0local lastPos
for part, pos instring.gmatch(str, pat)do
nb = nb + 1
result[nb]= part
lastPos = pos
if nb == maxNb thenbreakendend-- Handle the last fieldif nb ~= maxNb then
result[nb + 1]=string.sub(str, lastPos)endreturn result
endlocalfunction parsemtl(mtls,path,file)local mtl={ texturew=0, textureh=0}--for line in io.lines(path.."/"..file) dolocal p = path.."/"..file
local f =io.open(p, "r")for line in f:lines()do
fld=Split(line," ",6)for i=1,#fld,1do
fld[i]=string.gsub(fld[i], "\r", "")endif(fld[2]~=nil)then
fld[2]=string.gsub(fld[2], "\r", "")endif 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"thentable.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"thentable.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()endend
f:close()endfunctionstring.starts(String,Start)returnstring.sub(String,1,string.len(Start))==Start
endfunctionstring.ends(String,End)return End==''orstring.sub(String,-string.len(End))==End
endfunction 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=nillocalfunction buildObject()local m=nilif(imap~=nil)thenfor _,vm inpairs(imap.vngmap)dolocal nx,ny,nz=0,0,0for _,vn inipairs(vm)do
nx=nx+imap.lvn[vn+1]
ny=ny+imap.lvn[vn+2]
nz=nz+imap.lvn[vn+3]endlocal nl=math.sqrt(nx*nx+ny*ny+nz*nz)
nx=nx/nl
ny=ny/nl
nz=nz/nl
for _,vn inipairs(vm)do
imap.lvn[vn+1]=nx
imap.lvn[vn+2]=ny
imap.lvn[vn+3]=nz
endend
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=trueendif(mtl.normalMap~=nil)then
m:setTexture(mtl.normalMap,1)
m.hasNormalMap=trueendif mtl.kd then
m:setColorTransform(mtl.kd[1],mtl.kd[2],mtl.kd[3],mtl.kd[4])endif #imap.lvn>0then
m.hasNormals=true
m:setGenericArray(3,Shader.DFLOAT,3,#imap.lvn/3,imap.lvn)endlocal sobj=spr.objs[oname]if sobj==nilthen
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,100000local maxx,maxy,maxz=-100000,-100000,-100000for i=1,#imap.lv-2,3dolocal 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=nilendreturn m
end--for line in io.lines(path.."/"..file) dolocal p = path.."/"..file
local f =io.open(p, "r")for line in f:lines()do
fld=Split(line," ")for i=1,#fld,1do
fld[i]=string.gsub(fld[i], "\r", "")endif fld[1]=="v"thentable.insert(v,tonumber(fld[2]))table.insert(v,tonumber(fld[3]))table.insert(v,tonumber(fld[4]))elseif fld[1]=="vn"thentable.insert(vn,tonumber(fld[2]))table.insert(vn,tonumber(fld[3]))table.insert(vn,tonumber(fld[4]))elseif fld[1]=="vt"thentable.insert(vt,tonumber(fld[2]))table.insert(vt,tonumber(fld[3]))elseif fld[1]=="f"thenif imap==nilthen
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-1local it=tonumber(ifl[2])if(it==nil)then
it=-1elseif(it<0)then
it=(#vt/2)+it+1end
it=it-1endlocal inm=tonumber(ifl[3])if(inm==nil)then
inm=-1elseif(inm<0)then
inm=(#vn/3)+inm+1end
inm=inm-1endif inm==-1then inm=facenm.code endlocal ms=iv..":"..it..":"..inm
if self.vmap[ms]==nilthen
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>=0thentable.insert(self.lvt,vt[it*2+1]*mtl.texturew)table.insert(self.lvt,vt[it*2+2]*mtl.textureh)endif inm>=0thentable.insert(self.lvn,vn[inm*3+1])table.insert(self.lvn,vn[inm*3+2])table.insert(self.lvn,vn[inm*3+3])elselocal 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
endreturn self.vmap[ms]end
imap.i={}
imap.ni=0
imap.lv={}
imap.lvt={}
imap.lvn={}
imap.vmap={}
imap.vngmap={}
imap.gnorm=-2endlocal itab={}local normtab={ code=imap.gnorm, lvi={}, lvni={}}for ii=2,#fld,1doif(fld[ii]~=nil)and(fld[ii]~="")thentable.insert(itab,imap:alloc(fld[ii],normtab))endend
imap.gnorm=imap.gnorm-1if(#itab>=3)thenif #normtab.lvni>0then-- Gen normalslocal 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 inipairs(normtab.lvni)do
imap.lvn[vni+1]=nx
imap.lvn[vni+2]=ny
imap.lvn[vni+3]=nz
endendfor ii=3,#itab,1dotable.insert(imap.i,itab[1])table.insert(imap.i,itab[ii-1])table.insert(imap.i,itab[ii])endendelseif fld[1]=="o"or fld[1]=="g"then
buildObject()--print(line)
oname=fld[2]elseif fld[1]=="mtllib"thentable.remove(fld,1)
parsemtl(mtls,path,table.concat(fld," "))elseif fld[1]=="usemtl"then
buildObject()
mtl=mtls[fld[2]]endend
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?
@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.
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.
Comments
Likes: SinisterSoft
Likes: SinisterSoft, hito9
is the issue with slow setfullscreen on/off fixed too?
Fragmenter - animated loop machine and IKONOMIKON - the memory game
I had a problem with
My Makefile.def looks like this:
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:
i still have to start two players for the second time to the studio to see one of them.
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Fragmenter - animated loop machine and IKONOMIKON - the memory game
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
Fragmenter - animated loop machine and IKONOMIKON - the memory game
QTBASEDIR=/c/Applications/Qt514
QT_ARCH=mingw_64
QT_TOOLSARCH=mingw900_64
QTVER=6.2.2
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.
Fragmenter - animated loop machine and IKONOMIKON - the memory game
thanks
Fragmenter - animated loop machine and IKONOMIKON - the memory game
after calling application:setFullscreen(true), application:setFullscreen(false) does nothing.
And yes, it behaves weirdly when you have 2 monitors (and more, I guess):
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Fragmenter - animated loop machine and IKONOMIKON - the memory game
But it seems like @hgy29 have not pushed changes to github.
Likes: MoKaLux
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
dataSaver.lua
objloader.lua
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?
Likes: hgy29, MoKaLux, MobAmuse
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.
Thanks for your feedback.
Likes: MoKaLux, hito9
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
Likes: MoKaLux