Jump to content

Josh

Staff
  • Posts

    24,591
  • Joined

  • Last visited

Everything posted by Josh

  1. That's easy. Render straight to the back buffer with no lighting. It will look terrible, but it will be fast. I'd be interested in hearing some definite framerates on your machine for the editor with one of the included scenes opened, at the default window size.
  2. I uploaded a slightly modified version of hooks.lua.
  3. That blog is just speculation, and some of the things he says are very incorrect. For example, he is suggesting the large world was achieved by combining one super low-res heightmap with a high frequency detail heightmap.
  4. The way we are handling the forum now is a big improvement.
  5. I updated the file. It's 21 pages now and growing. So far it covers all aspects of scripting, and next I will write about integrating Lua with other languages.
  6. I am adding to this lesson. It's getting quite long, and talks about all aspects of the engine and Lua.
  7. Josh

    Roads in code

    If you just loaded a model and set the target it would actually work automagically.
  8. I think by "procedural" they probably mean they have a series of connected nodes the artist places, and the engine builds a mesh at runtime, sort of like how ours work.
  9. Josh

    Road bug fixed

    Let me know if you find any other problems. I am going through the scripts looking for any errors. This is a good practical lesson in the importance of consistency. B)
  10. Josh

    2.3 Sync

    This should work to set globals in the Lua virtual machine: Function SetScriptObject(name:String,o:Object) Local size:Int=GetStackSize() lua_pushbmaxobject(luastate.L,o) lua_setglobal(luastate.L,name) SetStackSize(size) EndFunction Function GetStackSize:Int() Return lua_gettop(luastate.L) EndFunction Function SetStackSize(size:Int) Local currentsize:Int=GetStackSize() If size<currentsize lua_pop(luastate.L,currentsize-size) EndIf EndFunction
  11. It may be invisible, but it will still be stored in memory and in the lua object table. The class will never get freed either.
  12. I usually like to have a lot of extra checks: function class:CreateObject(model) local object=self.super:CreateObject(model) object.cube=CreateCube() function object:Free() if self.cube~=nil then self.cube:Free() self.cube=nil end self.super:Free() end end Don't forget self.super:Free()!
  13. Josh

    Road bug fixed

    Yes, just apply a different material. I fixed the math function name thing. It's in the sync folder.
  14. Nope. The terrain shader doesn't use a matrix multiplication, for better speed.
  15. Turn on trilinear filtering and set anistropic filtering to 4.0.
  16. You can do quite a bit to the 2.3 editor with scripts.
  17. I added a vcproject to the Transparency and Refraction lesson. I'm going to include a project with each lesson showing the final result. Unfortunately, the Windows 64-bit Program Files convention interferes with this, because the project doesn't know if the header files are in C:\Program Files\Leadwerks Engine SDK or C:\Program Files (x86)\Leadwerks Engine SDK. I am going to make these projects with the header in C:\Leadwerks Engine SDK, and the default installation directory will be moved there as well.
  18. The floor/ceiling sliders can be used to control the opacity.
  19. There are still a few things I can do to improve performance with points lights especially. Multithreading won't actually make that much of a difference, because most of the bottlenecks occur on the GPU.
  20. TerrainHeight will return the height at a specific grid point. Terrain elevation will return an interpolated height at a 3D position in global coordinates.
  21. http://leadwerks.com/werkspace/index.php?/tracker/issue-25-road-position/
  22. The issue is resolved. Sync.
  23. Your first code you posted worked perfectly.
×
×
  • Create New...