Jump to content
  • entries
    944
  • comments
    5,899
  • views
    929,482

Leadwerks 5 beta Update


Josh

1,305 views

 Share

A new beta is available with the following changes:

  • Script prefixes are now changed to lowercase entity:Update(), entity:Start(), etc., as well as widget:Draw(), etc. This is because Entity() and Widget() are going to be functions to cast an object to that type.
  • Sprites are now created on a sprite layer object. A sprite layer is created in a world and added to a camera. This allows control over what camera sees what set of sprites. See the examples for details.
  • GUI system is partially working. Resizing the window won't reposition items correctly. Only four widget types are supported, panel, button, hyperlink, and label. Example in the FPSGame demo. The game menu system is packed into an entity script and works really nicely. Widget scripts are a little harder to develop now since they use a system of persistent objects, but performance is very much better than LE4. An interesting detail is that you get free interpolation of position and color at a rate of 60 hz.
  • A lot of work was done to improve the Lua binding system. See details here. Error reporting and handling is much improved.
  • No work was done on sound.
  • No work has been done to the multicam demo, which some people had trouble with.
  • Actors crashing / Lua stack error bug fixed.
  • Changed .bat files to use release version of EXE instead of debug.
  • New commands EmitEvent() and GetEvent(). If the returned event type is EVENT_NONE, there is no event. EVENT_QUIT can be emitted anywhere in the program to signal the main loop to exit. Typical usage is like this:
while window:Closed() == false do
	
	while true do
		local event = GetEvent()
		if event.id == EVENT_QUIT then return end
		if event.id == EVENT_NONE then break end
		if event.id == EVENT_WINDOW_CLOSE and Window(event.source) == window then return end--you don't need this when Window:Closed() is being checked for already
	end

	world:Update()
	world:Render(framebuffer)

end

 

  • Like 1
 Share

0 Comments


Recommended Comments

There are no comments to display.

Guest
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...