reepblue Posted August 24, 2015 Share Posted August 24, 2015 about: The Leadwerks Extended Executable Template (LEX for short) is a third party, and unofficial template for the Leadwerks Game Engine. The template is aimed at developers who are most interested in creating stand-alone games. The template is centered around the executable which contains a functioning options panel, a menu that can be customized, and various useful scripts. Although it's more aimed at stand-alone releases, the template is set up so you can still publish demos to the Game Launcher. Although the executable will not upload to the workshop, you can still stay connected to your fan base without destroying your stable stand-alone project. After an entire summer of development, You can now clone/fork the project on GitHub! Read the Readme for information on setting it up. Documentation Setting Up Customizing the LEX UI Answers for Expected Questions: Q: Why is the appreciations LEX, and not LEE? A: Don't ask why, I just like LEX better. Q: I'm new to Leadwerks, should I use this? A: I'm going to say no, not now. Get to know the engine with the official templates more before looking at this. Q: Will this work if I don't own the Standard Edition? A: Yes! With the executables pre-built, you're off to start your game using Lua! With the default main script, your game will still work with the game launcher. Q: Is this free to use; even for my commercial game? A: Yes! This is why I created this; To get people a jump start on their commercial projects. Q: How often will this be updated? A: The master branch will be updated with every new release of Leadwerks. A beta branch is available and will be actively updated during the engine betas. If you are using a beta branch of the engine, it's recommended you use the beta branch of LEX also. Once a new version of the engine is released, it will be merged with the master branch. Q: Why no Linux build? A: Because my Linux machine took a dirt nap and I can no longer build code for Linux anymore. I recall coding most of the UI code in Code::blocks, so it should build ok if you are on Linux with the Standard Edition. Q: Why a Template? Why not just release the executable, source, and needed files? A: Templates are a one time install, and you can use the template for multiple projects. I also wanted some scripts to show off how to communication to the application, as well as common scripts I actively use. Q: I don't want/like this template, but I want the Executable. What would I need for it to work? A: The application still crashes if there is missing files, which I plan to fix eventually. You'll need the application (Duh), ClientScheme.xml, and the UI folder under materials. In main.lua, you need to call the App class. title="MyGame" local startmap = "" local backgroundmap = "" app = App:Create(title, backgroundmap) app:SetStartMap(startmap) --[[ We loop the app here like this, and not in the app class in code so we can still communicate with the App class in other scripts. --]] while app:Loop() do end If you are still having trouble getting this to work, take a look at the main.h file of source code as all the files needed are listed there. Q: When I make my project, there is already bak* files! Why? A: This is because the Project Manager first copies the Common folder, then the selected template resulting in creating bak files for the common files. There is a batch under tools that deletes all bak files. Be careful though! It's a simple batch file with no checks at the moment. If a batch file that deletes files sounds scary to you, then don't use it, delete it! Q: Do you plan on making tutorials/documentation on how to use this? This looks all confusing! A: Yes. I'll write blog posts and link to them in the this opening post. Q: How do I customize the menu and panels? A: Edit ClientScheme.xml. Special Thanks And Conclusion First off, I'd like to thank the entire community as a whole. Although you did not help directly, searching through the forums of how to do various things really helped. I personally like to thank tjheldna for his work of tjui which it's source helped me a lot. I'd also like to thank Joshua's Leadwerks Template for showing me how to be a better programmer overall. Finally, I'd like to give credit to nick.ace and shadmar for the cubemap shader which is included with fixes for it to work in 3.6. I hope you find this useful for current/useful projects. Please provide feedback and feel free to ask any questions at anytime. If you find any bugs or issues, feel free to post an issue report in the GitHub, or report it here and I'll post it there for you. GitHub: https://github.com/reepblue/LEX-Template 10 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...
drarem Posted August 24, 2015 Share Posted August 24, 2015 I take it, it doesn't work in Linux even if i am running with windows and lua, and exporting as a standalone? Quote Link to comment Share on other sites More sharing options...
reepblue Posted August 24, 2015 Author Share Posted August 24, 2015 I'm not sure if I fully understand your question, but I'll do the best I can to answer it. Basically, since there is no Linux build, the Linux Executable that gets copied to your project is the stock one and not LEX. You should not really worry about your Linux version until near release. I just released this, so things might change over time. If you're a Linux developer, I understand your frustration of Windows getting served first, but I currently don't have anyway of compiling the application for Linux at the moment. If you're a Linux user with the Standard Edition, and you wish to compile this, I'd be more than happy to see a pull request of the Linux executable and any code adjustments if needed. 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...
drarem Posted August 24, 2015 Share Posted August 24, 2015 Yes i have the standard edition. I was in ubuntu 15.10 64bit earlier today, i opened up codeblocks and created a project, copying all the files to it. I need a refresher on finding how to link leadwerks.h, it was set up for a project a few months ago I was doing in C++ before getting pulled into the LUA world. I know enough to be dangerous.. Quote Link to comment Share on other sites More sharing options...
reepblue Posted August 25, 2015 Author Share Posted August 25, 2015 Hmm, You should be able just to open the copied Code::Blocks and add all the files in. the solution should automatically be set up to work with the LE libraries. From what I can recall, getting all the dev packages for OpenAL and such was a pain, and it took a bit of Googling. Keep me posted on how you make 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...
drarem Posted August 25, 2015 Share Posted August 25, 2015 where is the .sln file? I think you mentioned it wasn't included in the repo? or is it now Quote Link to comment Share on other sites More sharing options...
reepblue Posted August 25, 2015 Author Share Posted August 25, 2015 It's not because I could not get it to include the .cpp/h files although I added them in text. I'm using VS2015 because of SQL server issues with 2013, so I did not want to replace the solution. I'll look more into this. For now, just add everything under Source/. The stock .sln files should be generated upon creating a project with the template. 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 August 25, 2015 Share Posted August 25, 2015 Very nice! I've had the idea to support custom templates in the Workshop for a while, but was waiting for people to start making some. Now I have a reason. The UI design is very tasteful. 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 August 25, 2015 Author Share Posted August 25, 2015 I'm happy to hear that you like it Josh. Just a reminder that anyone can edit the ClientScheme.xml script to customize colors and fonts to make the UI fit their game. For instance, "A Demon's Game" might want to have black panels, a spooky font, and a red highlight color while Vectronic would be totally different. If workshop support for templates comes, I'll be more than happy to put it up there for more exposure, while keeping the git for active builds. I hope the behavior of the Project Manager improves with it so it can handle various conditions and options for template authors. Right now, it seems to copy the common folder, then the selected template. (Which you can see here what happens when the template and common folder have a file with the same directory and name.) 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 August 25, 2015 Share Posted August 25, 2015 What behavior would you prefer? To me that makes sense because the selected template can overwrite a file in the common folder. 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 August 25, 2015 Author Share Posted August 25, 2015 What behavior would you prefer? To me that makes sense because the selected template can overwrite a file in the common folder. The way it works now is great, but I'm thinking having it disable creating bak files on first time generation would be the biggest improvement, This way, the project always starts out clean. It would also be neat to having the power to exclude certain files from the common folder, and the option to inherit other templates. 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...
fredou54 Posted August 27, 2015 Share Posted August 27, 2015 Peut-on introduire Lex dans un projet déjà existant ? (Une explication video serait bien). Merci pour ton travail. Quote Link to comment Share on other sites More sharing options...
reepblue Posted August 27, 2015 Author Share Posted August 27, 2015 If Google translate is right about your question, you can copy the template into your project, then rename everything $PROJECT_NAME with the title of your game. This would be the exe's and the title value in main.lua. 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...
fredou54 Posted August 28, 2015 Share Posted August 28, 2015 works well thank you Quote Link to comment Share on other sites More sharing options...
plaggy Posted August 30, 2015 Share Posted August 30, 2015 Great work! Thank you for this gift, I want to give you something too! Feel free to have a look here: https://sellfy.com/plaggy and tell me what you may like! Quote Link to comment Share on other sites More sharing options...
reepblue Posted August 30, 2015 Author Share Posted August 30, 2015 Quite a portfolio you have there, I recommend posting that link on the Promotion board. If you mean generously give me something for free, I suggest you PM me about that unless you wish to give everyone here a free model. 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...
lxFirebal69xl Posted September 6, 2015 Share Posted September 6, 2015 Here are a few things I noticed while trying to publish a demo using Lex. 1) The standalone version has a problem with the "Materials" folder inside the data.zip, trying to launch the game without having the "Materials" folder from leadwerks in the game's directory makes it crash on start up. 2) Something is off with the loading of the maps, in the editor I could load a map just fine but if the game is published as soon as the "Changemap" script is called the game crashed without any warnings. 3) A published game doesn't run without the "ClientScheme" file, this is to be expect but the problem is, Leadwerks doesn't export that file when you publish a game. 4) In a published game, the loading screen doesn't change from the default, even if you changed it in the "Main.lua" script. Hopefully I've been of some help Quote Link to comment Share on other sites More sharing options...
reepblue Posted September 6, 2015 Author Share Posted September 6, 2015 Here are a few things I noticed while trying to publish a demo using Lex. 1) The standalone version has a problem with the "Materials" folder inside the data.zip, trying to launch the game without having the "Materials" folder from leadwerks in the game's directory makes it crash on start up. 2) Something is off with the loading of the maps, in the editor I could load a map just fine but if the game is published as soon as the "Changemap" script is called the game crashed without any warnings. 3) A published game doesn't run without the "ClientScheme" file, this is to be expect but the problem is, Leadwerks doesn't export that file when you publish a game. 4) In a published game, the loading screen doesn't change from the default, even if you changed it in the "Main.lua" script. Hopefully I've been of some help Strange. I tested it as a package with the stock template. I assume you've merged the template with your game which is something I don't 100% recommend. Try testing it with a clean LEX template, or launching it under sandbox mode (-sandbox) Also are you using this script for map transitions? Something you need to understand is that when the game is not launched in sandbox mode, the game uses the App class that's integrated in the executable. When you launch from the editor or that game launcher, the Main.lua script will act like the stock executable, and the scripts shipped with the template are meant to handle both sandbox and non sandbox cases. The loading screen is handled on the exe side of things if it's not ran in the sandbox. You can change it by replacing the loadingscreen_default texture file, or name a texture the same name as the map file, and the loading screen will show when loading that map. (Just make sure you put it under Materials/UI/LoadingScreen) Although you might not have the standard edition, the code is there for reading/debugging. (Map loading/saving is handled in rworld.cpp. Oh, and you can fix the clientscheme file not copying to the build folder by adding xml to the file include list. Since it's in the root directory, it should copy over even with "Only include used files" is checked. Also, keep in mind that none of the functionality of LEX will be in your Game Launcher Releases. 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 December 17, 2015 Author Share Posted December 17, 2015 "Unlike the original application, LEX2 is command based and allows the user to use lua commands to access all of it's additional classes. " 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...
darthlukan Posted December 18, 2015 Share Posted December 18, 2015 Forked. I'll test it out on Linux (since that's my primary dev platform) and let you know what I find. If there's a problem and I can fix it, I'll shoot you a PR 1 Quote GPG: 3694569D | Peppermint OS | i7 | GTX 960 | Github Link to comment Share on other sites More sharing options...
Defranco Posted December 28, 2015 Share Posted December 28, 2015 This doesn't work with LE 4.0 - constantly gives errors. Version 40 not supported when trying to test or debug.. Edit: just to clarify - works with default and brand new creation of project. But once you edit anything, or "save" specifically. Gives this error. Create new project - loads up. Hit test, works. Add a box. Hit save, hit test, doesn't work. Seems like saving over the default map breaks it for LE 4.0 Edit 2: Possibly found a solution - delete all the files (not folders) in the project/yourprojectname folder such and doing a project - updates. It replaces the TEX original files with your owns current version. Works now. Quote Link to comment Share on other sites More sharing options...
reepblue Posted December 30, 2015 Author Share Posted December 30, 2015 Yeah, also a recompile of the project is needed. Use the beta branch until I merge it to the master. I haven't updated it in a while since I'm working on a new version of it. 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 January 24, 2016 Author Share Posted January 24, 2016 Hey all! A quick update what I've been working on regarding this project. I noticed that the current template was complicated to understand and the UI was pretty much off limits unless you have the professional edition. Back in November, I decided to take another wack at this learning from what success and failures I learned from the first project. This version contains: A developer console off of the existing terminal. Everything is tied to it. Launch maps, or debug your physics without editing scripts. Settings now save only if a property has been changed during the session. Instant changes with world settings, camera FOV, multi sampling. More lua friendly. It uses the App.lua script to send outputs, and you get send commands via LEX:Get(). Here are the usable commands from the pkg file: // Time void Pause(); //lua void Resume(); //lua bool IsPaused(); //lua void TogglePause(); //lua int GetAppState(); //lua static const int Disconnected; static const int Connected; void LoadMap(std::string mapname); //lua std::string GetCurrentLevel(); //lua Camera* GetActiveCamera(); void Connect(); //lua void Disconnect(); //lua static void Command(std::string cmd); Known Issues: Map names can't have spaces if you wish to launch it via the console. The input and the output of the engine can overlap each other while typing. This is just the base application right now. UI classes and such will be added in due time. I wanted to get feedback to help find a direction of what you guys would like from it. You can download the exe and App.Lua script here. You can slap it in any LE4 game to try it. For a list of commands, type "help" in the console. I hope you like the lighter approach, and please let me know what you think. 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...
mihaid Posted February 9, 2016 Share Posted February 9, 2016 about: The Leadwerks Extended Executable Template (LEX for short) is a third party, and unofficial template for the Leadwerks Game Engine. The template is aimed at developers who are most interested in creating stand-alone games. The template is centered around the executable which contains a functioning options panel, a menu that can be customized, and various useful scripts. Although it's more aimed at stand-alone releases, the template is set up so you can still publish demos to the Game Launcher. Although the executable will not upload to the workshop, you can still stay connected to your fan base without destroying your stable stand-alone project. After an entire summer of development, You can now clone/fork the project on GitHub! Read the Readme for information on setting it up. Documentation Setting Up Customizing the LEX UI Answers for Expected Questions: Q: Why is the appreciations LEX, and not LEE? A: Don't ask why, I just like LEX better. Q: I'm new to Leadwerks, should I use this? A: I'm going to say no, not now. Get to know the engine with the official templates more before looking at this. Q: Will this work if I don't own the Standard Edition? A: Yes! With the executables pre-built, you're off to start your game using Lua! With the default main script, your game will still work with the game launcher. Q: Is this free to use; even for my commercial game? A: Yes! This is why I created this; To get people a jump start on their commercial projects. Q: How often will this be updated? A: The master branch will be updated with every new release of Leadwerks. A beta branch is available and will be actively updated during the engine betas. If you are using a beta branch of the engine, it's recommended you use the beta branch of LEX also. Once a new version of the engine is released, it will be merged with the master branch. Q: Why no Linux build? A: Because my Linux machine took a dirt nap and I can no longer build code for Linux anymore. I recall coding most of the UI code in Code::blocks, so it should build ok if you are on Linux with the Standard Edition. Q: Why a Template? Why not just release the executable, source, and needed files? A: Templates are a one time install, and you can use the template for multiple projects. I also wanted some scripts to show off how to communication to the application, as well as common scripts I actively use. Q: I don't want/like this template, but I want the Executable. What would I need for it to work? A: The application still crashes if there is missing files, which I plan to fix eventually. You'll need the application (Duh), ClientScheme.xml, and the UI folder under materials. In main.lua, you need to call the App class. title="MyGame" local startmap = "" local backgroundmap = "" app = App:Create(title, backgroundmap) app:SetStartMap(startmap) --[[ We loop the app here like this, and not in the app class in code so we can still communicate with the App class in other scripts. --]] while app:Loop() do end If you are still having trouble getting this to work, take a look at the main.h file of source code as all the files needed are listed there. Q: When I make my project, there is already bak* files! Why? A: This is because the Project Manager first copies the Common folder, then the selected template resulting in creating bak files for the common files. There is a batch under tools that deletes all bak files. Be careful though! It's a simple batch file with no checks at the moment. If a batch file that deletes files sounds scary to you, then don't use it, delete it! Q: Do you plan on making tutorials/documentation on how to use this? This looks all confusing! A: Yes. I'll write blog posts and link to them in the this opening post. Q: How do I customize the menu and panels? A: Edit ClientScheme.xml. Special Thanks And Conclusion First off, I'd like to thank the entire community as a whole. Although you did not help directly, searching through the forums of how to do various things really helped. I personally like to thank tjheldna for his work of tjui which it's source helped me a lot. I'd also like to thank Joshua's Leadwerks Template for showing me how to be a better programmer overall. Finally, I'd like to give credit to nick.ace and shadmar for the cubemap shader which is included with fixes for it to work in 3.6. I hope you find this useful for current/useful projects. Please provide feedback and feel free to ask any questions at anytime. If you find any bugs or issues, feel free to post an issue report in the GitHub, or report it here and I'll post it there for you. GitHub: https://github.com/reepblue/LEX-Template I tried this extension, all was ok, except when i wanted to run my standalone game......didnt worked..program was closed alone, maybe in the future.. Quote Link to comment Share on other sites More sharing options...
lilpaladin21 Posted March 1, 2016 Share Posted March 1, 2016 Hey...How do I add a continue function to my game?. 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.