reepblue Posted May 24, 2017 Share Posted May 24, 2017 < Linked Removed > This was the replacement of LEX I was working on a while back. When you install this in your project, your app will have support for console commands, a working dev console, and a separation of main menu, in-game and paused states. As long as your map doesn't have spaces, you can load any map by entering map mymap in the console box. To open the console box, press tilde or slash. I was writing documentation, but then I got busy, and sorta forgot about it. < Linked Removed > Decided to share this more publicly. Haven't worked on it in a while, so if you have any questions, please gimme a few moments to go over it to answer your question(s). Thanks! Edit: Gonna clean it up and fully document it. It'll also be on the workshop. 3 Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon! Link to comment Share on other sites More sharing options...
Lord Seppuku Posted May 24, 2017 Share Posted May 24, 2017 Hey, reepblue, always have been a fan of your videos (sad, that you don't post too often), but besides that, I was wondering if I could port your Luawerks API over to C++, especially for the use of the console. I fell it would be much faster and easier to implement into C++ code that way with an added touch of security from modification in a commercial game, and also as a project for me to continue learning C++. I will give credit to you and keep the code open source and on Github. Always have been a fan on how the Source Engine console worked, I might even use it in a project I'm planning. So, how about it? Quote Link to comment Share on other sites More sharing options...
reepblue Posted May 24, 2017 Author Share Posted May 24, 2017 Again, Luawerks was written in C++. There are many problems distributing it like that. Leadwerks updates every few months. So it's a cat and mouse game keeping it updated and making sure projects work out of the box. Pre-compiled apps are a no go also. We'd have to test on all platforms that Leadwerks supports. While this was OK with Windows and Linux, but soon the engine will support macOS and I don't have a Mac! Most people use Lua with Leadwerks. The developer for "A Demon's Game" didn't know C++ and if a bug happened or something wasn't quite right, they would have to wait on me to get back to them. I felt like I was taking control away from people. With the full API, you have access to all public functions and members; fully supported or not. You can wake up one morning to an engine update and your code is broke because Josh did something to make the engine better. (Short or long term) C++ programmers can be picky about how things are done. Even I'm like that! It's easier to debug and fix lua errors than application crashes. Also I had a case in which the app ran fine for everyone but one person. Speed isn't an issue as no to very little mathematics/weird calls are preformed in the script. I'm currently converting Luawerks for a paid release on the Workshop. Pretty much I'm just adding polish to the code, and documenting everything I feel the user should know about. I'm not sure about being ok with what you want to do unless it's for personal use. I'll keep you informed tho. Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon! Link to comment Share on other sites More sharing options...
Lord Seppuku Posted May 24, 2017 Share Posted May 24, 2017 Thanks, sounds fine and your points are very reasonable. Would love to see you post more videos, but I will be happy to go along my merry way maintaining a version for my personal use and don't worry it won't go up on any site. 1 Quote Link to comment Share on other sites More sharing options...
reepblue Posted May 26, 2017 Author Share Posted May 26, 2017 It's ready to rock! http://steamcommunity.com/sharedfiles/filedetails/?id=933409657 1 Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon! Link to comment Share on other sites More sharing options...
Josh Posted May 29, 2017 Share Posted May 29, 2017 Approved for sale. 1 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...
reepblue Posted June 14, 2017 Author Share Posted June 14, 2017 Luawerks will be updated for 4.4. I used Joshes recent menu to integrate it with the rest of the framework. Done: Options will be saved to the cfg file upon hitting the apply button. Don't worry, it still changes the world settings too! The new console interface is working. Backwards compatible with 4.3. To Do: Figure out why the font looks garbled. Find out how to change Fonts and colors for certain text. (The old console highlighted warnings in yellow and errors in red.) Console user history, In the previous console, if you hit the up arrow you can cycle through previous entries. Find the backup of LEX and see where I put the buttons and game logo. Going to recreate that. I still need to support basic backgrounds when a map isn't loaded. If I have time, I'll add support for background maps. 1 Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon! Link to comment Share on other sites More sharing options...
Josh Posted June 14, 2017 Share Posted June 14, 2017 You could actually execute a line of lua code in the console with Interpreter::ExecuteString() 1 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...
reepblue Posted June 14, 2017 Author Share Posted June 14, 2017 Interesting, might make a 'call' command for that. Thanks! Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon! Link to comment Share on other sites More sharing options...
Crazycarpet Posted June 14, 2017 Share Posted June 14, 2017 Looks like Luawerks is coming along nicely. Good work Reepblue. // Console command: 'lua_run' - Executes lua string. DECLARE_CONCOMMAND( "lua_run", [](int argc, ARGS argv) { if (GetConvar("sv_cheats").GetInt() != 1) return Leadwerks::System::Print("\"sv_cheats\" must be \"1\" to execute Lua code using \"lua_run\"."); std::string _execString; for (const auto& value : argv) { _execString += value + ' '; } int stacksize = Leadwerks::Interpreter::GetStackSize(); Leadwerks::Interpreter::ExecuteString(_execString); Leadwerks::Interpreter::SetStackSize(stacksize); }, "Execute string on the interpreter's lua state." ) The above code is kind of ugly because it doesn't handle errors so if your code errors the application crashes. Would like to find a way around this in the near future. Also it has a trailing space, which shouldn't hurt anything. Quote Link to comment Share on other sites More sharing options...
reepblue Posted June 14, 2017 Author Share Posted June 14, 2017 27 minutes ago, Crazycarpet said: Looks like Luawerks is coming along nicely. Good work Reepblue. The above code is kind of ugly because it doesn't handle errors so if your code errors the application crashes. Would like to find a way around this in the near future. Also it has a trailing space, which shouldn't hurt anything. Oh yeah, found that out myself. Not only the game crashes, but if it's hooked to the debugger, the editor will also crash, lol. Fixed my fullscreen issue, I really need to figure out how fonts work with the GUI as they still look broken, but everything else is pretty functional. Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon! Link to comment Share on other sites More sharing options...
Josh Posted June 14, 2017 Share Posted June 14, 2017 Not sure if you know this, but there is some funny stuff I did with the error function to make the debugger catch errors. See the code in the default App.cpp file. 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...
reepblue Posted June 15, 2017 Author Share Posted June 15, 2017 This might help CrazyCarpet, but idk if i'd be much use for me being Luawerks is locked into Lua. Adding more functionality right now. I'm really happy how this is turning out. Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon! Link to comment Share on other sites More sharing options...
reepblue Posted June 15, 2017 Author Share Posted June 15, 2017 Redid the UI. I had to make two GUI's for different font size support, but hopefully the widget class/scripts will allow this with just one GUI in the future. Also removed <4.3 support in the next build to keep the code clean. Oh also implemented simple networking. It's really just a glorified chat box. I also did a chat box panel for communicating with players; not really gonna talk much about it since it's still very rough. I just got the options menu to redo with custom control support. 1 Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon! Link to comment Share on other sites More sharing options...
Josh Posted June 15, 2017 Share Posted June 15, 2017 The text field will emit an event when it loses focus or when the user presses enter, so you don't necessarily need that send button if you don't want it. 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...
Crazycarpet Posted June 15, 2017 Share Posted June 15, 2017 Send button looks nice though, plus sometimes you find yourself looking around for say in the future a server IP or something in another menu before finishing whatever you're typing. (Example: In source sometimes you'll type "connect " then go find the IP and paste it in.) Quote Link to comment Share on other sites More sharing options...
reepblue Posted June 16, 2017 Author Share Posted June 16, 2017 8 hours ago, Josh said: The text field will emit an event when it loses focus or when the user presses enter, so you don't necessarily need that send button if you don't want it. That button is there mostly for aesthetics as not having one makes it look weird. Most chat applications still have a send button, and I think it falls under the same dilemma. It's 90% useless, but if you remove it, something will feel off. 2 Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon! Link to comment Share on other sites More sharing options...
reepblue Posted June 16, 2017 Author Share Posted June 16, 2017 Pretty much final now. I removed my mess of networking and my menu GUI is just a set of buttons that open panels via console commands! Only thing left to do is to add a "Controls" tab in the options menu, but I'm still investigating how that'll work. The functionality already exists, the issue is what Widget would be best. Now I'm just gonna spend the next few days polishing, bug hunting and updating documents. I'll push this update when 4.4 goes gold as you now need 4.4 for this to work. Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon! Link to comment Share on other sites More sharing options...
chrisknapp001 Posted February 23, 2019 Share Posted February 23, 2019 Question: where have i to change the escape key for getting into the menu. I want to use space instead. I paid for this! Chris 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.