-
Posts
422 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Posts posted by Scott Richmond
-
-
Who said that? What about the bugs in 2.28?
*shrugs* I figured the updater only pulls items from one repository.
-
Ahh, I see. No problems then. Thanks Rick.
-
But why create another Update function? Why not just put the code under the default Update function?
-
Take a look at windmill.lua:
--Include the base script for all classes dofile("Scripts/base.lua") --Some global sounds we will use for all instances squeak={} squeak[0]=LoadSound("abstract::squeak_1.ogg") squeak[1]=LoadSound("abstract::squeak_2.ogg") --This function builds the interface for the properties editor function InitDialog(grid) <SNIP> end --Spawn function for creating new instances function Spawn(model) local entity=base_Spawn(model) --Retrieve a few limbs we will use later entity.blades=model:FindChild("windmill_blades") entity.base=model:FindChild("windmill_housing") entity.model:SetKey("spinspeed","1") --An update function for one instance. Declaring the function as part of the entity table allows us to use "self" for the table function entity:Update() <SNIP> end end --Update function, called during every UpdateWorld() function Update(world) if world==world_main then local model,entity for model,entity in pairs(entitytable) do if model.world==world then entity:Update() end end end end
Now I understand that the Update(world) function is run at every tick automatically by LE. What I don't understand is why this script redirects the Update() function to this custom entity:Update() function. Is there a specific reason for this?
-
i don't know if the last one will work... newton has issues with scaling.
bahahaha. Zing!
-
Haha. So, I think the Dbol() function makes your controller much more responsive. You need to use it in conjunction with the Consume() and GenitalShrinkage() functions.
- 1
- 1
-
What I want to do is set some custom entity keys in C++ (easy) and than retrieve those keys and values in the LUA Update for each entity and do some work. Unfortunately I'm struggling to work out how the LUA Set/GetKey command works:
function base_GetKey(model,key,value) local entity=entitytable[model] local intensity,r,g,b,a if entity==nil then return value end if entity.model==nil then return end if key=="position" then return entity.model.position.x..","..entity.model.position.y..","..entity.model.position.z elseif key=="mass" then return entity.model.mass elseif key=="sweptcollision" then return entity.model:GetSweptCollisionMode() elseif key=="rotation" then return entity.model.rotation.x..","..entity.model.rotation.y..","..entity.model.rotation.z elseif key=="buoyancy" then return entity.model.buoyant elseif key=="scale" then return entity.model.scale.x..","..entity.model.scale.y..","..entity.model.scale.z elseif key=="gravity" then return model.usegravity elseif key=="friction" then return model.staticfriction..","..model.kineticfriction elseif key=="color" then intensity=tonumber(entity.model:GetKey("intensity","1")) return (entity.model.color.x*255.0/intensity)..","..(entity.model.color.y*255.0/intensity)..","..(entity.model.color.z*255.0/intensity)..","..(entity.model.color.w*255.0) elseif key=="castshadows" then return entity.model:GetShadowMode() elseif key=="material" then if entity.model.material~=nil then return entity.model.material:GetName() end elseif key=="active" then if entity.active==0 then return 0 else return 1 end elseif key=="enabled" then if entity.enabled==0 then return 0 else return 1 end end return value end
I've pulled this from the base LUA file. How do I specify a model and key, and get the value? It sort of looks like this function doesn't really pull down keys that aren't already defined right there.
Any help would be great.
-
So, I have to upgrade to get the 2.3 updates? Forgive me, but was there that much of an update that we have to pay for the 2.28 to get to 2.3?
It seems so. It looks like Josh only maintains one version of LE (2.3). You get LUA integration and the new WYSIWYG editor. For $50 it really is worth it.
-
Fantastic Chris - I can't wait to get stuck into it.
-
Ah I see. The bit depth triggers windowed mode.
Ok so I've made the move to Framewerk. Its very nice! I'm glad I did.
-
I have looked at this thread but so much of it is in BlitzMax and I don't understand that so well.
There is a fair bit to it, but basically I have figured out that you do your LoadScene as usual, but include the code I've pasted below beforehand:
SetGlobalObject ("world_main", fw.GetMain().GetWorld()); SetGlobalObject ("world_transparency", fw.GetTransparency().GetWorld()); SetGlobalObject ("world_background", fw.GetBackground().GetWorld()); SetGlobalObject ("camera_main", fw.GetMain().GetCamera()); SetGlobalObject ("camera_transparency", fw.GetTransparency().GetCamera()); SetGlobalObject ("camera_background", fw.GetBackground().GetCamera());
That allows LUA to properly execute some commands. So far everything works for me except sound, which I have no idea why its not working.
-
Hrm. Its a bit messy. Ah well.
-
Have a read through this Thread it may help.
Ah. Found out what was wrong - I have my scripts under /Data/Scripts/... This does not work out well as all the scripts are hard coded to be located under Scripts/...
There any reason why the abstract file-system was left out for the dofile command in LUA?
-
I get lights, sounds, emitters, coronas, models etc..
Don't get a direct skybox parsing or so far waterplane.
All in C++
Waterplane works as well in Bmax.
Ah well thats good news. Prey tell. My level does not appear to load the light I have in there.
-
Hrm, this is interesting, as its one of the big gripes I have at the moment. I love the editor but there seems to be so much rigmaroll around loading a scene. So, in C++, one does a LoadScene and everything should load providing that there is a script associated with each model? Right now lights don't seem to load for me.
-
You get lights with LoadScene in C++?
-
With the new sandbox the expectation is set to be able to easily create and run levels in LE. But these is this huge gap between making the level and then loading it.
For all intensive purposes, LoadScene is broken. I know is a known issue, but we shouldn't have to do a 'processScene' after the load scene in an attempt to load lights and whatnot.
Either depreciate LoadScene or fix it up to be able to load everything a scene might have.
- 1
-
Thats a question I wouldn't mind having answered as well. To be honest I think the whole scene loading system in LE 2.3 is very shoddy. As far as I know it doesn't load lights, emitters, physics bodies (Thus, no colision), etc. Its a mess.
Can anyone clear this up for us?
-
I've seen Chris's work first hand and it's pretty impressive. Recast is probably as good as anything else out there including what's currently available in the big AAA design houses. Chris has not only taken this and integrated it with Leadwerks but also integrated Open Steer and the AI++ lib to give a more comprehensive AI solution rather than just straight path finding. To be honest his own navmesh solution was pretty good too! I believe people have already done integrations of Recast for OGRE and UNITY and probably other engines too.
Wow nice. Chris you should chuck up a bit of a blog entry on what you've done thus far - It sounds very interesting!
-
This game?:
Sorry, couldn't resist. This looks really interesting. Maybe I can integrate it into the engine.
haha, nice video. Josh I think that is great idea - The software license certainly permits it. It would be a fantastic addition to the engine.
-
One thing to keep in mind here is that this is a game and you'll need to take into account what feels right. Just because you get the numbers right doesn't mean that when its played your 6 tonne plane will feel like a 6 tonne plane. By all means get the numbers close, but I would definitely spend some time seeing how things feel in-game as well.
-
Framewerk doesn't create the graphics window, so it's up to you if you use fullscreen or windowed mode.
Graphics(800,500); // windowed Graphics(1920,1080,32); // fullHD fullscreen
I just assumed 'Graphics' was part of Framewerk. But running in 800, 600 put me into full-screen, where are you delimiting windowed/full-screen?
-
I think the simplest answer would be to make it all relative. For example, if you have a 200KG iron ball and a 2KG book in a scene. Whatever you make the book in LE, lets say a mass of 4, then make the iron ball have a mass of 400.
-
I wouldn't say it's only for FPS, since also flight simulators, train simulators, submarine simulators, golf simulators, horse simulators, MMO, RPG, RTS, and all kind of games which need a realistic looking environment can use it.
Maybe some commands for changing some shader settings could be added, but if the default values are correct and give a realistic looking scene, there is not much need for them either. I think many players don't want too much special effects either, if they give no benefit to the gameplay, but only lower FPS.
In my opinion the HDR and Bloom has been way over-blown in a number of scenes I've seen. I prefer a more subtle effect. Its a subjective thing I realise.
Just a quick one - How do you get Framewerk to run windowed?
2.3??? Upgrade??
in General Discussion
Posted
Ah. Fixed up my comment.