Search the Community
Showing results for tags 'Publish Standalone Game'.
-
Hello. So, it's been around three to four days now I've been trying to publish my game as a standalone including only used file. I know it's a pretty basic function but the game is just a little demo. I already publish it here without include only used files, which made the game bigger in size. I manually deleted unwanted files that won't be useful to the game but I really don't want to always manually delete useless files and I'm sure it's not efficient. A lot of files aren't used but are still include. The problem is, whenever I publish a standalone game only including use files, the game crash the second it opens. When I went to see the log I saw it was because of an Assert problem: So I dig up inside the data.zip folder to see if the file was here, and in fact IntroTest/Materials/Resources/splash.tex was in the data.zip. The problem actually comes from IntroTest/Materials/Resources/Startup/startup1.tex. There wasn't any Startup folder. See the hierarchy of my files in the picture below to help you understand: I use this texture files for a splash screen. In the code I iterate through each frames with a Wait of 10ms between each frames using coroutines. You can find the code below. It's pretty basic and probably very bad, I wrote it a few months ago when I was re-learning Lua for a billionth times. --Intro start "video" screen. --Display Jostatu, Leadwerk logo. function Script:Start() menuenable = false alpha = 1 self.x = window:GetWidth() self.y = window:GetHeight() self.imgData = { pos = {x = 0, y = 0}, alpha = 0 } --Coroutine declaration self.intro = coroutine.create(Intro) end function Script:UpdateWorld() if coroutine.status(self.intro) ~= "dead" then coroutine.resume(self.intro, self) end end --This function will be called after the world is rendered, before the screen is refreshed. --Use this to perform any 2D drawing you want the entity to display. function Script:PostRender(context) context:SetBlendMode(Blend.Alpha) context:SetColor(Vec4(1, 1, 1, alpha)) if frametexture ~= Texture:Load("Materials/Resources/splash.tex") then context:DrawImage(frametexture, 0,0,self.x,self.y) else context:DrawImage(frametexture, self.x / 2 - 500,self.y / 2 - 200) --Align image to center (widnows width / height : 2 - widht / height of image : 2) end context:SetBlendMode(Blend.Solid) end -- helper function to wait x ms function Wait(ms) local time = Time:GetCurrent() while Time:GetCurrent() < time + ms do coroutine.yield() end end function FadeOut() for c = 1, 0, -0.01 do alpha = c Wait(10) end end function FadeIn() for c = 0, 1, 0.01 do alpha = c Wait(10) end end function Intro() --Jostatu intro video System:Print("Jostatu Animation beginning") [[--================================================================================================================= THIS IS WHERE THE FRAMES ARE ITERATING, AND TEXTURE ARE BEING LOADED WITH THE ACTUAL FRAME =================================================================================================================--]] local frame = "Materials/Resources/Startup/startup" for framenb = 1, 14 do System:Print("Looped "..framenb) frametexture = Texture:Load(frame..framenb..".tex") Wait(50) end System:Print("Jostatu animation done") Wait(1000) --First fadeout FadeOut() --Leadwerk splashscreen System:Print("Changing image to Leadwerk engine splash screen") frametexture=Texture:Load("Materials/Resources/splash.tex") --First fadein FadeIn() Wait(1500) --Last fadeout FadeOut() end In the editor the intro plays nicely, everything is ok. But when I publish the game, as a standalone, only including used files, well it crashes with the error we've talked above because Leadwerk do not include the Startup folder in the publish process: I've created a blank project, only including needed files for the startup intro. Same, so it's not coming from my game but from Leadwerk. You can download this blank project below if you want to see by yourself. I've also included the leadwerk project if you want to explore in the editor. Thank you very much for your help. I'm sorry if I miss something big and it's obvious ? IntroTest.zip
-
It seems that "Publish Standalone Game" feature is not available on Leadwerks Game Engine for GNU/Linux. Will this feature be coming to us wonderful GNU/Linux users?