Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • entries
  • comments
  • views

Luawerks For 4.4




Luawerks has been updated for Leadwerks 4.4, taking advantage of the new GUI system while adding new features and commands that allow you to develop your game better.


Developer Console Refresh

The Developer Console is the stable of the framework. Thanks to the GUI, you can now scroll through your history, highlight, and move the cursor around! Page through your history using the Page Up and Page Down keys! Having a console is vital for development as it allows developers to change maps and other values in-game instead of restarting the program after changing some code. You can add your own commands easily as well. For more information, see the page about the Console here.



An Integrated Menu

The standard release of Leadwerks 4.4 comes with a menu. I shipped my own standard menu with Luawerks to be more integrated with the rest of the framework. Unlike the official menu script, the Luawerks menu uses 2 GUI's; one for the main menu, and the other for the panels/windows. You can just edit the main menu without effecting the panels, and vise versa. Menu also calls the panels via console commands. 



The Gotcha's Fixed

Upon installing Luawerks into the project, I recommended that the user calls SetCamera() instead of Camera:Create(), so that the world class would know what camera to reference. This caused a problem when the user switched maps, so I also requested that the user releases the camera too. I replaced this with a for loop in the GetCamera() function, and calling camera:Release() isn't necessary.

You can now load maps in-which their names have spaces! 


Load Models as Copies

I added a second parameter to the LoadModel() function. If set to true, the function will load a model, create and return a copy of the model, and release the original asset. This allows you to manipulate that model without effecting other references. This is great if you want one model to use multiple skins.

This image shows two of the same models loading two different materials.



Here is an example on how to create a copied/unique model:

self.mymodel = LoadModel("Models/MyModel.mdl",true)


LOD Models [Experimental]

An experimental feature I've added is an object with multiple models and it switches the models based on the camera's distance from the entity. This only works on Static objects as I didn't calculate velocity and mass.

You'd need to make it an object script like so:

function Script:Start()
	self.model = ModelLOD("Models/LodTest/main.mdl")

function Script:UpdateWorld()

As I said before, this was something I was playing with, and I don't think it's ready for full use yet. Although it'll help with poly counts, each ModelLOD needs to be updated to get the distance of the camera, so you'd need to weigh your costs.

On top of all that, bug fixes were made, new commands were added, and more things are planned for future releases. Documentation will continue to be updated here.


About Luawerks

Luawerks is a Lua framework for video games developed on the Leadwerks Game Engine. It supplies developers with additional functions, handles the game loop and allows them to debug their code with a developers console. With all that out of the way, you can focus on making your game fun!

You can purchase Luawerks from the Leadwerks Workshop Store for $9.99.

For documentation and bug reporting, please visit the GitHub page.

  • Upvote 2


Recommended Comments

Thanks for the info on the update of this interesting work.   What's the roadmap?....Are there any future features which are soon to be integrated and what is the further future for the product?  If it is sensible to elaborate anyway.


  • Upvote 1
Link to comment

Thanks for your interest. Off the top of my head, a controls tab in the options and some sort of map select when hitting new game were things I wanted to put in this update, but I wanted it to be ready for 4.4's release. 

A Trello for a road map would be a good idea, I'll set one up soon. Thanks.

Link to comment
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...