Tommek Posted September 8, 2014 Share Posted September 8, 2014 Hi, How can I let the player change the ingame video settings? Or videosettings in general? regards, Tommek Quote Link to comment Share on other sites More sharing options...
Rick Posted September 8, 2014 Share Posted September 8, 2014 Make a menu system to allow them to select the settings. Then I think you'd have to recreate the window & context (maybe world also)? Quote Link to comment Share on other sites More sharing options...
Tommek Posted September 8, 2014 Author Share Posted September 8, 2014 Yeah ok, but I don't see any hint in the docu on this. What am I searching? Quote Link to comment Share on other sites More sharing options...
Rick Posted September 8, 2014 Share Posted September 8, 2014 Window and Context. There would be no doc on exactly doing this. If you are using Lua you can look into App.lua to see how the window and context is created. You would want to :Release() those (maybe it's :Delete() now?) and recreate them (:Create()) inside your UI that allows the user to pick. If using Lua you can make some functions inside App to do that and then you can call those inside your UI, although that would kill your UI textures and everything, so you'd have to recreate all of those as well. Most of the work here is in how you structure your code to make this work seamlessly. You might get an error when you release the context if you have textures and such still active, so you might have to release all the UI first, then the context/window, then recreate the window/context, then recreate your UI and place them back into the options UI like nothing happened. Quote Link to comment Share on other sites More sharing options...
AggrorJorn Posted September 8, 2014 Share Posted September 8, 2014 If you want to resize a window (resolution selection), you can simply call http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/window/windowsetlayout-r444 instead of removing the window. Quote Link to comment Share on other sites More sharing options...
Rick Posted September 8, 2014 Share Posted September 8, 2014 Does that resize the context too? Isn't the context matching to the window size? We should probably add something like this to the wiki along with a loading map bar. Quote Link to comment Share on other sites More sharing options...
AggrorJorn Posted September 8, 2014 Share Posted September 8, 2014 I do this for the Tunnels game options menu in the workshop and the context seems to adjust to to it. What you can do however is display an image before loading, and in the next frame you start the loading of a map. When the map is done loading, the image is no longer drawn. 1 Quote Link to comment Share on other sites More sharing options...
YouGroove Posted September 8, 2014 Share Posted September 8, 2014 How to set Anti aliasing, bloom and other effects in Lua ? it seems there is no documentation on that for non C++ users. Quote Stop toying and make games Link to comment Share on other sites More sharing options...
Josh Posted September 8, 2014 Share Posted September 8, 2014 http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/camera/camerasetmultisamplemode-r802 http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/camera/cameraaddposteffect-r820 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
YouGroove Posted September 8, 2014 Share Posted September 8, 2014 Okay. I thaught it should be some general setting. A downside is that effects can't be globally activated/deactivated globally independently from cameras (you have to code it yourself). Would be good to have at least one Lua example code in official docs 1 Quote Stop toying and make games Link to comment Share on other sites More sharing options...
Haydenmango Posted September 9, 2014 Share Posted September 9, 2014 These are all the video settings functions I have found that work with Lua. self.world:SetTessellationQuality() can be 0 1 or 2 self.world:SetLightQuality() can be 0 1 or 2 Texture:SetAnisotropy() can be 1,2,4,8, or 16 self.camera:SetMultisampleMode() can be 1,2,4,8,16, or 32 3 Quote Check out my game Rogue Snowboarding- https://haydenmango.itch.io/roguesnowboarding Link to comment Share on other sites More sharing options...
dennis Posted September 16, 2014 Share Posted September 16, 2014 Do it with a menu I used SQLite and LUA in LE2.5. I think that LE 3.2 will do just fine with it just make it that the player is able to change the settings during render. after that when game is up let the game check the SQLite DB or just tables if you prefer. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.