-
Posts
7,936 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Downloads
Everything posted by Rick
-
http://leadwerks.wikidot.com/wiki:skybox This is a little wiki some of us just created and trying to populate. Open up App.lua and copy/paste this function -- credit to shadmar for the skybox function App:MakeSkyBox() self.camera:Move(0,4,-20) --Create skybox sky = Model:Create() --just render a plane and project cubemap onto it local surface = sky:AddSurface() surface:AddVertex(-0.5,-0.5,0, 0,0,-1) surface:AddVertex(0.5,-0.5,0, 0,0,-1) surface:AddVertex(0.5,0.5,0, 0,0,-1) surface:AddVertex(-0.5,0.5,0, 0,0,-1) surface:AddTriangle(2,1,0) surface:AddTriangle(0,3,2) --position in front of camera but far out to near camera clip plane sky:SetPosition(self.camera:GetPosition()) sky:SetRotation(self.camera:GetRotation()) sky:Move(0,0,self.camera:GetRange().y-50) sky:SetScale(self.camera:GetRange().y*10) sky:SetParent(self.camera) -- and paint it skymat = Material:Load("Materials/Sky/skybox_texture.mat") sky:SetMaterial(skymat) end Then in App:Start() call the function: function App:Start() -- set the application title self.title = "MyGame" -- create a window self.window = Window:Create(self.title) self.window:HideMouse() -- create the graphics context self.context = Context:Create(self.window,0) if self.context == nil then return false end self.world = World:Create() -- load the starting map local mapfile = System:GetProperty("map","Maps/start.map") if Map:Load(mapfile)==false then return false end self:MakeSkyBox() [size=4]return true[/size] end Thanks to Shadmar for this code. I plan on moving it to an entity script so we can just place it in our scene and drag in a texture file to use. The thing to note with this is the camera variable inside the MakeSkyBox() function. If you create your camera in code then you can create it in the Start() function after the world is created with self.camera = Camera:Create(). If you add a camera into your scene via the editor, then you'll want to make a new Lua script to attach to that camera and inside the Script:Start() function do: function Script:Start() App.camera = self.entity end You are then assigning self.entity (which because it's attached to the camera entity is the camera) to the App variable camera. App is global and all scripts can see the variables and functions with it.
-
Steam edition is only Lua. That's been stated a bunch of times. When 3.1 comes out for Windows/Linux/Mac (the non steam version) then it'll have C++ template.
-
The problem with the current one I'm using is that it's to real, and it has a bunch of other stuff I wasn't really interested in. I didn't really want a to scale sort of system, but just something that shows the basic idea for kids. I would prefer to see all planets on screen at once and have them be bigger.
-
@ESP My guess is that LE releasing software on Steam is completely new to the company, so he wants to make sure that launch goes smoothly as there could be Steam specific issues to overcome as Steam adds a middle layer.
-
Thanks for the info!
-
If I had that integer ID, would I be able to find that entity when the game starts up based on it? What I mean is that in world->entities what field of an entity would this map integer ID be so that I could find it if I wanted to?
-
You don't store the pointer in the map file right, as the pointer value you get each time the app actually runs can be different. So what I mean is how does the translation from not running to running happen with entities so that the property knows what entity to use at run-time?
-
Since entity names can be the same, how does LE know the right entity to use when I drag it in as a script parameter?
-
@Roland I feel like it seems like a low priority to Josh at this time so in the meantime I figured we could get something going and see what the supply and demand is like.
-
WoW has physics. It's not just about passing through characters. Anytime you jump or fall it's physics, and you generally can do both in RPG's. Not using physics is probably more useful in RTS's.
-
IN LE 3, is it possible to have 2 separate worlds simulating their own physics at it's own time? I'm looking at client side prediction and found a newton forum post that talks about using 2 worlds for client side prediction. The idea is that the server sends timestamped snapshots of where it says your client is in the world. On our client we are storing a list of timestamped positions as well. When we get the server snapshot we need to reposition our local controller to the last know server position, and then replay the rest of the simulation from our locally stored list. So the idea is that we'd do this snapping and replaying in the 2nd world that isn't shown to the player where we can catch up the simulation of the rest of our predictions in 1 game cycle, and then use this final position on the controller in our viewable world as it's current position (most likely interpolating between the viewable world position and 2nd world's position to smooth it out).
-
You can. I originally was thinking that it's sort of a bummer if you have to create an account to modify it as it's a layer that some people might not want to take, but it might just be required. Where are you seeing this though?
-
?? Still there? I just checked. I don't see anything I guess.What pages specifically.
-
@ESP I'm pretty sure you could make a Lua game in normal 3.1 (when it comes out) and it will run on the Steam version. However if you can't get Steam to work you wouldn't be able to use any Steam specific stuff, but I don't think every game really needs to do that. You'd probably just have to find someone who could submit your game to the Leadwerks Steam workshop. Or course ideally you would be able to test your game to make sure everything works the same on the Steam version but I think it should work on both.
-
Nevermind, this does a better job http://eyes.nasa.gov/download.html Very cool!
-
Does anyone know of any 3D models of our solar system? I would love to load it into Leadwerks and fly around it to show my kid. Trying to search for it now but not coming up with any obvious hits.
-
I think we could do that now. We can make our own DLL's that use the Steam API. Then we can load our DLL into Lua. I've made a RakNet DLL that gives me networking via Lua. We can do it now but it's a pain.
-
Steam is an online marketplace to buy video games. Instead of buying disks more people are just buying the game on Steam and then downloading it to their PC. Steam manages all of that for you. It keeps a list of games you "own" and you can download and delete any time you want. It's probably the most popular way to get PC games these days. It recently allowed other software (non games) to be available through it also. Hence, Josh making LE available through it.;
-
As I understand it: If you pre-ordered or were a backer then you get both the Steam version (Lua only) and the non Steam version (Lua & C++). However, the Steam version will be released first (Jan 6th or something like that) followed by the non Steam version at a later date not yet specified. I think Josh wants to be able to focus on the Steam rollout (since it's something new to him) and make sure that goes well before releasing the non Steam version.
-
I can't see your image here at work, but gamecreator says it's full white. I have this same issue, however it changes while I'm moving (mine is crosshairs for the player). In a project I have I am able to move around and in certain situations my crosshair model turns pure white, while in other situations it's normal. The map for this project is corrupt and I hope Josh is looking at fixing that so this bug can be reviewed.
-
Yeah the trial will work, but note that the API is about 95% identical between Lua and C++ (the 5% is just language features that change it some) so if you knew Lua you'd get great practice as well. Personally, I don't think you'll like the 3.0 trial once you get your hands on the amazing dynamic lighting and bug fixed 3.1 . Some shader setup is different in 3.1 than it is in 3.0 so using Lua for a couple weeks in 3.1 would probably benefit you more than using C++ in 3.0, pending that you know both Lua and C++ already anyway.
-
The only difference is that it runs the lua version. The supported API is exactly the same. The editor is the same. Via supported features you can do everything the same. With the decision to allow dll's to be loaded from lua you have all the same power. It is not the dumbed down version by any means.
-
There are 2 ways to get distances. Between 2 entities : http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/entity/entitygetdistance-r800 Between 2 points: http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/vec3/vec3distancetopoint-r403 These do the same thing as EntityDistance in LE 2.
-
You know what, as I was typing something else here to your response I understand what's going on now. This rotation code needs to go in the Script:Draw() function (where my animMgr:Update() is called) where the actual animation manipulation is taking place, instead of the Script:UpdatePhysics() where I'm deciding what animation to play. Strange how one thing someone says can trigger real understanding Thanks YouGroove
-
If anyone has bone rotation in LE 3 on an animated model working I'd love to see the code. I can't get bones to rotate if my model is animating.