Jump to content

3 weeks of Leadwerks 3



blog-0736658001363902877.jpgIn follow up to Andy, I also want to do a little blog on my experience with Leadwerks 3 so far. The first week after purchasing I didn't have much time to spend on it. Luckily after that week, there was quite some time left for the start of a new adventure.





In contrary to Leadwerks 2.3, I now want to lay most of my focus on C++. That is kind of Ironic, since a lot more people are interested in Lua now that Leadwerks 3 has arrived. It is not that surprising since the advantages of using Lua have improved quite a lot. Ofcourse we have debugging and stepping through Lua scripts which is a huge gain. And the other thing is the flowgraph editor. Rick has provided me an extra motivation boost to try out the flowgraph editor, with his cool scripts. (Of which the volume trigger is my personal favorite smile.png ). I tried to create a little script myself and within minutes, real simple gameplay interaction was set up.(Gravity activator) Something that was a lot harder to do with Leadwerks 2.3.



C++ and Shaders

For my own portfolio and skill set I started with C++ and the LE3 API. Just like with LE2, the API is very easy to use. Chris and Josh have done an excellent job on describing commands for both C++ and Lua. Pretty much every command comes with a working example. In the future I also hope to learn more about shaders. Shadmar has allready created severall of them, which you should check out.



A good way to teach yourself something, is to try teaching it to others. Thats the motto I have been going with since I have started creating tutorials for Leadwerks 2.3. The road is wide open again with the arrival of Leadwerks 3. The first 5 video tutorials for using C++ with LE3 are uploaded on youtube and more are on their way. Eventually I hope to reach a point were we will create a game that uses a combination of C++ and Lua. For a complete overview of tutorials, have a look here:



Future updates

There are plenty of things that can be improved with Leadwerks 3. Thats a fact. I am not talking about the deferred rendering with dynamic shadows. It is really the little things that count. I am more than confident that these issues will be dealt with in the near future. As soon as Josh is back from the GDC, there will probably be updates every other day. For now, I am really happy with my purchase of Leadwerks 3. I am looking forward to all the cool stuff that this community is going to create.





Recommended Comments

There are plenty of things that can be improved with Leadwerks 3. Thats a fact. I am not talking about the deferred rendering with dynamic shadows. It is really the little things that count.


I'm also in same mood about that.

But i think LE 3 going eye candy with shadows and others stuff, it's a marketing good point to attract people searching these features.


Im' not C++ Fan at all. I like a lot actual way of using Lua, it's simple once you have understood some concepts (thanks to Chris for some explanation on some posts).


And i have some doubts about making a full game C++, or it can be by getting all entities by names in a loop like in the old LE 2 way i didn't liked.

For me Lua is just perfect, you create the script behaviour you nedd ,attach it and just run the level, no worry about finding entities by names or manage them, caus they are managed by the attached scripts.

Share this comment

Link to comment

I dream of some Car editor special for vehicules of 4 wheels.

Somethign where you would import some car body, define physics and mass.

Then import a wheel, position it by symmetry on right position, than tweak defaut physic values.

Than just use some physics commands on the vehicle.


I think it's for later.

Share this comment

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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.

  • Blog Entries

    • By Josh in Josh's Dev Blog 0
      I'm back from I/ITSEC. This conference is basically like the military's version of GDC. VR applications built with Leadwerks took up about half of Northrop Grumman's booth. There were many interesting discussions about new technology and I received a very warm reception. I feel very positive about our new technology going forward.

      I am currently reworking the text field widget script to work with our persistent 2D objects. This is long and boring but needs to be done. Not much else to say right now.
    • By Josh in Josh's Dev Blog 4
      Here are some screenshots showing more complex interface items scaled at different resolutions. First, here is the interface at 100% scaling:

      And here is the same interface at the same screen resolution, with the DPI scaling turned up to 150%:

      The code to control this is sort of complex, and I don't care. GUI resolution independence is a complicated thing, so the goal should be to create a system that does what it is supposed to do reliably, not to make complicated things simpler at the expense of functionality.
      function widget:Draw(x,y,width,height) local scale = self.gui:GetScale() self.primitives[1].size = iVec2(self.size.x, self.size.y - self.tabsize.y * scale) self.primitives[2].size = iVec2(self.size.x, self.size.y - self.tabsize.y * scale) --Tabs local n local tabpos = 0 for n = 1, #self.items do local tw = self:TabWidth(n) * scale if n * 3 > #self.primitives - 2 then self:AddRect(iVec2(tabpos,0), iVec2(tw, self.tabsize.y * scale), self.bordercolor, false, self.itemcornerradius * scale) self:AddRect(iVec2(tabpos+1,1), iVec2(tw, self.tabsize.y * scale) - iVec2(2 * scale,-1 * scale), self.backgroundcolor, false, self.itemcornerradius * scale) self:AddTextRect(self.items[n].text, iVec2(tabpos,0), iVec2(tw, self.tabsize.y*scale), self.textcolor, TEXT_CENTER + TEXT_MIDDLE) end if self:SelectedItem() == n then self.primitives[2 + (n - 1) * 3 + 1].position = iVec2(tabpos, 0) self.primitives[2 + (n - 1) * 3 + 1].size = iVec2(tw, self.tabsize.y * scale) + iVec2(0,2) self.primitives[2 + (n - 1) * 3 + 2].position = iVec2(tabpos + 1, 1) self.primitives[2 + (n - 1) * 3 + 2].color = self.selectedtabcolor self.primitives[2 + (n - 1) * 3 + 2].size = iVec2(tw, self.tabsize.y * scale) - iVec2(2,-1) self.primitives[2 + (n - 1) * 3 + 3].color = self.hoveredtextcolor self.primitives[2 + (n - 1) * 3 + 1].position = iVec2(tabpos,0) self.primitives[2 + (n - 1) * 3 + 2].position = iVec2(tabpos + 1, 1) self.primitives[2 + (n - 1) * 3 + 3].position = iVec2(tabpos,0) else self.primitives[2 + (n - 1) * 3 + 1].size = iVec2(tw, self.tabsize.y * scale) self.primitives[2 + (n - 1) * 3 + 2].color = self.tabcolor self.primitives[2 + (n - 1) * 3 + 2].size = iVec2(tw, self.tabsize.y * scale) - iVec2(2,2) if n == self.hovereditem then self.primitives[2 + (n - 1) * 3 + 3].color = self.hoveredtextcolor else self.primitives[2 + (n - 1) * 3 + 3].color = self.textcolor end self.primitives[2 + (n - 1) * 3 + 1].position = iVec2(tabpos,2) self.primitives[2 + (n - 1) * 3 + 2].position = iVec2(tabpos + 1, 3) self.primitives[2 + (n - 1) * 3 + 3].position = iVec2(tabpos,2) end self.primitives[2 + (n - 1) * 3 + 3].text = self.items[n].text tabpos = tabpos + tw - 2 end end  
    • By 💎Yue💎 in Dev Log 5
      The prototype of a four-wheeled vehicle is completed, where the third person player can get on and off the vehicle by pressing the E key.  To move the vehicle either forward or backward, is done with the keys W, and the key S, to brake with the space key.  And the principle is the same as when driving the character, a third person camera goes behind the car orbiting 360 degrees.

      I don't think the vehicle is that bad, but I'm absolutely sure it can be improved.  The idea is that this explorer works with batteries, which eventually run out during the night when there is no sunlight.
      Translated with www.DeepL.com/Translator
      Mechanics of the game.
      I'm going to focus on the mechanics of the game, establish starting point (Landing area), after the orbiter accident on Mars where all your companions died, now, to survive, you will have to repair your suit, oxygen runs out, good luck.  This involves replacing the oxygen condenser that is failing and the suit is stuck.

      On the ground and performance.
      The rocks, the terrain and the vehicle kill the SPF, but there is a solution, and everything is related to the chassis of the vehicle. That is to say that if I put a simple collision bucket for the vehicle, the yield recovers, something that does not happen if I put a collider of precise calculation for the car. This has the advantage of better performance but is not very accurate, especially when the car crashes with an object in front, because the horn of the car has no collision. And the solution to this, is to put a sliding joint, as was done with the area in which the player climbs the car and descends from it.

      On the rocks, I am trying to make them with the slightest polygons and the most distant from each other. 
      Obviously on Mars I can not create canyons, high mountains, is because the terrain does not produce shadows on itself, that's why the terrain tries to be as flat as possible, simulating a desert with dunes. 

      That's all for now.
  • Create New...