-
Posts
688 -
Joined
-
Last visited
Profile Information
-
Location
Sacramento, California
Recent Profile Visitors
21,354 profile views
Chris Vossen's Achievements
Newbie (1/14)
54
Reputation
-
Hello Leadwerks Community! In the game industry everyone is always shuffling around between companies as projects reach different stages of development. Since my senior year of college I have been striving to get on board a production team. So, when Telltale offered me a production internship I jumped at the chance. One of my favorite parts of the transition is that Telltale uses Lua as their scripting language so if I ever run into a production problem that involves scripting I could always jump in and investigate their code! I loved my time at Leadwerks from day drinking with Josh while coding to running our GDC booth. It has been truly amazing. I also wanted to say farewell to the Leadwerks community, you guys have been the most intelligent and professional online community I have ever seen and without you guys Leadwerks would not exist. Thank you all for all the content that you've put up. Seeing games created with the engine make it all worth while. Farewell for now (I am still constantly going check the blogs), Chris Vossen P.S. I can't wait to see Leadwerks on Steam and all the future games that are going to come out of LE3!
-
Native Code Tutorials
Chris Vossen commented on Chris Vossen's blog entry in Chris Vossen's Development Blog
oops Rastar you are completely correct. When I said: I should have said C++ programming in Leadwerks, ie how to escape (or enhance) component based programming. Kennar- I agree that all the tutorials should be housed in one spot, so you don't have to scrounge around the forums. As for pdf's we'll have to see about that (although I'm pretty sure there are tools or scripts out there to turn webpages into pdf) -
Native Code Tutorials
Chris Vossen commented on Chris Vossen's blog entry in Chris Vossen's Development Blog
I will make sure to cover the generic knowledge as well. -
Between the release of LE3 and the GDC, life at Leadwerks has been busy to say the least. Now that things have settled down (a little) it is time for something that I have been looking forward to for a while: Tutorials! At GDC we were constantly talking about the power and flexibility that direct native code programming allows and how users are not locked into only component based programming. But then you look at the example game Darkness Awaits and see only component based programming and just Lua scripts.... It's time to right these wrongs. A comprehensive series of tutorials are underway that will teach how to use the many tools of the engine as well as demonstrate the capabilities of direct native code programming. This series is currently in the design phase and I am working with universities to make sure that the tutorials not only teach the engine but also cover key game development topics. Here are a few high level design points for the tutorials: Teach the engine and its tools C++ programming First Person Shooter As always I'd love to hear suggestions and ideas! I'll keep updates coming as tutorial development ramps up!
-
Check out GetTexture: http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/material/materialgettexture-r125 then change of the texture.
-
I'm a little confused as to the exact nature of the prefab factory. Are you trying to input a prefab name and destination and then have a function that when called will load a prefab at that destination?
-
I'm just going to quickly post these 2 bits of code: Top Down Camera: Script.target = nil--Entity "Target" Script.distance = 10--float Script.debugphysics = false--bool Script.debugnavigation = false--bool Script.pitch = 20--float Script.height = 10--float function Script:Start() if self.target==nil then return end --debug functions for viewing physics or navigation in game self.entity:SetDebugPhysicsMode(self.debugphysics) self.entity:SetDebugNavigationMode(self.debugnavigation) --Set the camera's rotation self.entity:SetRotation(self.pitch,0,0) end function Script:UpdatePhysics() --Exit the function if the target entity doesn't exist if self.target==nil then return end --Get the target entity's position, in global coordinates local p0 = self.target:GetPosition(true) --Calculate the new camera offset local offset = Vec3(p0.x,p0.y+self.height,p0.z-self.distance) --Add our original offset vector to the target entity position p0 = offset self.entity:SetPosition(p0,true) end Character movements: (on a goblin model) Script.camera = nil --Entity "camera" --Define animation sequences Script.sequence={} Script.sequence.walk=5 Script.sequence.idle=6 function Script:Start() self.currentyrotation = self.entity:GetRotation().y self.modelrotation = -90 App.window:ShowMouse() end function Script:UpdatePhysics() local window = Window:GetCurrent() local move = (window:MouseDown(Key.LButton) and 1 or 0) local playerscreenpos = self.camera:Project(self.entity:GetPosition(true)) local mousescreenpos = window:GetMousePosition() local vectorbetween = mousescreenpos - playerscreenpos self.currentyrotation = Math:ATan2(vectorbetween.y, vectorbetween.x) + self.modelrotation self.entity:SetInput(self.currentyrotation,move,0) if move ~= 0 then self.entity.animationmanager:SetAnimationSequence(self.sequence.walk,0.04,200) else self.entity.animationmanager:SetAnimationSequence(self.sequence.idle,0.05,200) end end To understand the code basically Math::ATan2 finds the angle between the mouse and the player Camera::Project takes the character position in global space and converts it to screen space.
-
So the proper way to do it is a call to World:Clear(), unfortunately we forgot to tag it for lua (and document it). I'm posting a bug report for this right now and hopefully the lua tag (and documentation) will be available with the next build.
-
This is a slippery bug (it is really hard to recreate), that we thought we had pinned down. Make sure your current LE3 copy is up to date (Click on the update button on the installer) and we will check it out.
-
In the editor I'd create a rocket model, set it's physics shape and collision type, attach a particle effect, and then save it as a prefab. Then in code I'd use the prefab load function:Prefab If I can find the time, maybe. What sort of mouse movement are you thinking of?
-
Leadwerks 3 "How do I ____?" Questions and Answers
Chris Vossen replied to Chris Vossen's topic in Programming
SetCollisionType -
Setting up a map with 3rd person controls and camera
Chris Vossen commented on Chris Vossen's blog entry in Chris Tutorials
@ Rick: Yeah I noticed the problem that after posting 2 "tutorials" the first one become hard to find. Right now the things I am posting are super rough so there is no "Official tutorial" section. But I would like an official tutorials section in the future. But currently there is not enough time. @Shadmar Video tutorials always sound like a good idea, but I always find myself having to rewind, or pause the video and you can't copy and paste stuff. I think ideally a combination of a video tutorial and a written tutorial would be awesome. (But the amount of time to produce quality tutorials would skyrocket)