-
Posts
24,625 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Downloads
Everything posted by Josh
-
Drawer 5 and 6 seem to still use triangle mesh collision, so I have them disabled for now. The drawers tend to droop a bit with gravity. This might be due to the way they are positioned. I created the slider joint at (0,0,0) since there are no pivots in the desk mesh to place them. I think the drawers should be centered at their rear center, and then a pivot added to the desk mesh I can use to position them. That might make the slider joint more accurate. Here's the script: require("scripts/class") local class=CreateClass(...) function class:CreateObject(model) local object=self.super:CreateObject(model) local joint local n object.model:SetMass(20) object.model:SetCollisionType(COLLISION_PROP) object.drawer={} for n=1,4 do object.drawer[n]=LoadModel("abstract::0d_drawer_0"..n..".gmf",object.model) object.drawer[n]:SetMass(0.1) object.drawer[n]:SetCollisionType(COLLISION_PROP) joint=CreateJointSlider(object.model,object.drawer[n],Vec3(0,0,0),Vec3(0,0,1)) joint:SetLimits(-0.5,0) end function object:Reset() local n for n=1,6 do if self.drawer[n]~=nil then self.drawer[n]:SetMatrix(self.model.mat) end end end function object:Free() local n for n=1,6 do if self.drawer[n]~=nil then self.drawer[n]:Free() self.drawer[n]=nil end end self.super:Free() end end
-
How is that rude? I have no control of it. If enough people complain to BRL, maybe it will change. I already wrote on their forum, but they don't care if only I complain about something.
-
A BSOD when overclocking is not a bug, it's a feature...it keeps your GPU from melting!
-
1. Replacing o's with e's is cute, but I don't think the engine API commands should be misspelled. 2. You can use the existing leadwerks.framewerk module if you want. It's the same code. 3. BlitzMax can't compile a module named "framework" so it isn't going to be distributed as a module. Complain to BRL if you don't like this. All in all, this really makes no difference to BMX users, so nothing was gained or lost.
-
Framework, Lua, and the programmers who love them
Josh commented on Josh's blog entry in Development Blog
You could still use the buffer commands to write your own rendering routines, though I doubt anyone will do that in Lua. I'm glad we are moving upwards, and not wallowing around in the fundamentals anymore. -
Can you make physics shapes using convex hulls? The triangle mesh can't work with dynamic physics. The mesh looks good.
-
Use the choice edit property style.
-
That's cool, I like having physical books for programming.
-
What doesn't happen like it should? Your coffee maker starts squirting gravy? The purple cats outside your window fly upside-down? Be specific. If you mean that your script has no effect, Lua can't run a file from a .pak file, since that is our convention, and Lua doesn't know what it is. I think the best solution is probably to have the engine search for any script by the right name, if one is not found in the same folder as the model. There are reasons for doing the file directly instead of loading the string and passing that to Lua. Only the lua_dofile() command can run a compiled Lua script. It also make debugging easier, because Lua knows what file it is running, and can pass that information back in any error messages that occur.
-
It actually doesn't matter where on the drawer the pivot is, as long as the tag you place in the desk mesh matches the position of the drawer pivot, so the drawer appears in the right place.
-
Set the mass to non-zero.
-
Here, the program creates a skybox just by loading the environment_atmosphere model. Make sure you have the scripts folder copied to your project directory: // ==================================================================== // This file was generated by Leadwerks C++/LEO/BlitzMax Project Wizard // Written by Rimfrost Software // http://www.rimfrost.com // ==================================================================== #include "engine.h" int main( int argn, char* argv[] ) { Initialize() ; RegisterAbstractPath("C:/Leadwerks Engine SDK"); SetAppTitle( "luatest" ) ; Graphics( 800, 600 ) ; AFilter() ; TFilter() ; TWorld world; TBuffer gbuffer; TCamera camera; TMesh mesh; TLight light; TMesh ground; TMaterial material; world = CreateWorld() ; if (!world) { MessageBoxA(0,"Error","Failed to create world.",0); return Terminate(); } TFramework framework=CreateFramework(); TLayer layer = GetFrameworkLayer(0); camera=GetLayerCamera(layer); PositionEntity(camera,Vec3(0,0,-2)); //Set Lua variable BP L=GetLuaState(); lua_pushobject(L,framework); lua_setglobal(L,"fw"); lua_pop(L,1); LoadModel("abstract::environment_atmosphere.gmf"); material=LoadMaterial("abstract::cobblestones.mat"); mesh=CreateCube(); PaintEntity(mesh,material); ground=CreateCube(); ScaleEntity(ground,Vec3(10,1,10)); PositionEntity(ground,Vec3(0,-2,0)); PaintEntity(ground,material); light=CreateDirectionalLight(); RotateEntity(light,Vec3(45,45,45)); // Game loop while( !KeyHit() && !AppTerminate() ) { if( !AppSuspended() ) // We are not in focus! { // Rotate cube TurnEntity( mesh, Vec3( 0.5f*AppSpeed() ) ) ; // Update timing and world UpdateFramework(); // Render RenderFramework(); // Send to screen Flip(0) ; } } // Done return Terminate() ; }
-
// ==================================================================== // This file was generated by Leadwerks C++/LEO/BlitzMax Project Wizard // Written by Rimfrost Software // http://www.rimfrost.com // ==================================================================== #include "engine.h" int main( int argn, char* argv[] ) { Initialize() ; RegisterAbstractPath("C:/Leadwerks Engine SDK"); SetAppTitle( "luatest" ) ; Graphics( 800, 600 ) ; AFilter() ; TFilter() ; TWorld world; TBuffer gbuffer; TCamera camera; TMesh mesh; TLight light; TMesh ground; TMaterial material; world = CreateWorld() ; if (!world) { MessageBoxA(0,"Error","Failed to create world.",0); return Terminate(); } TFramework framework=CreateFramework(); TLayer layer = GetFrameworkLayer(0); camera=GetLayerCamera(layer); PositionEntity(camera,Vec3(0,0,-2)); material=LoadMaterial("abstract::cobblestones.mat"); mesh=CreateCube(); PaintEntity(mesh,material); ground=CreateCube(); ScaleEntity(ground,Vec3(10,1,10)); PositionEntity(ground,Vec3(0,-2,0)); PaintEntity(ground,material); light=CreateDirectionalLight(); RotateEntity(light,Vec3(45,45,45)); // Game loop while( !KeyHit() && !AppTerminate() ) { if( !AppSuspended() ) // We are not in focus! { // Rotate cube TurnEntity( mesh, Vec3( 0.5f*AppSpeed() ) ) ; // Update timing and world UpdateFramework(); // Render RenderFramework(); // Send to screen Flip(0) ; } } // Done return Terminate() ; }
-
It's just a limitation of the way the renderer works. 3D World Studio is designed to work on very old graphics hardware, and it doesn't have very good blending abilities. This won't affect how the terrain looks when you run it in DBPro or another program.
-
Something similar to this was seen in beta testing. It was solved by clamping some values...just need to find out exactly where.
-
Cool, what book did you get?
-
Post some sample files.
-
The green one is correct. Just make sure the pivot you add for the drawer in the desk model is in the same place. The type of drawer should be a separate model, with a convex hull .phy file. If any drawers are the same, I can load another copy of the model. Here's what I am going to do in code: drawerpivot=object.model:FindChild("drawer") drawer=LoadModel("abstract::furniture_desk_drawer1.gmf") drawer:SetPosition(drawerpivot:GetPosition(1),1) drawerjoint=CreateJointSlider(object.model,drawer,Vec3(0,0,1) drawerjoint:SetLimits(0,0.6) --or whatever amount looks good The doors in the tunnels scene will open like Penumbra if you just fly up to them in the editor, hold the shift key, and click and drag them with the mouse. I would not worry about LOD at this point. Let's see if this even works first! Looks pretty nice so far.
-
I would do your animation in the object:Render() function. That way animation only has to be performed on models that actually get drawn.
-
I added the missing module to the server, too.
-
Finishing the framework docs today...
-
Framework, Lua, and the programmers who love them
Josh commented on Josh's blog entry in Development Blog
Last time I talked to the author, he said he was having trouble getting a response from Valve, so it being on Steam is news to me. I'm glad it worked out for them. Penumbra is the model of an efficient and successful low-budget game. Everything about it is designed to minimize required production resources and maximize the depth of experience. For example, use of an intercom system allows them to have personal interaction with another character, and the only resources it requires are voice acting. -
We're finishing up 2009 by resolving some longstanding design issues that haven't been particularly critical, but have weighted on my mind. Framework is not like the main engine. It's far more high-level, and is also the kind of code people want to customize. I don't like locking the user into my way of doing things. However, the interaction between Lua, C++, and Framework commands are a real issue, which we started to see immediately as Lua became available. This was resolved by compiling Framework into the engine DLL and providing the source code in the BMX folder. Most people will be happy with the default settings, but a few will want to write their own renderers, and fortunately they still can. Most importantly, Lua can access the Framework commands, so all the water and atmospheric effects will work the same in C++ and in the editor. In the end, we finally wound up doing something I said we never would: There are commands like SetBloom(), SetNearDOF(), etc. However, since this is open-source code built on top of the buffer and shader systems, I am happy with it. The user still has low-level power, but is supported by a lot of default code that does most of what they want. This is the design I have always tried to provide. The solution we arrived at with Framework can also be applied to other systems that are commonly needed, yet don't quite fit into the main engine. Providing open-source code, and then compiling it into the DLL and adding a Lua interface seems to be a good solution for anything like this. The next system I could see handled this way is AI. I am carefully watching the work Chris Paulson is doing with the recast library, and I think it has a very promising future. Oh, and in other news Penumbra is finally available on Steam! Penumbra is a physics-driven game that uses the same physics library we use, Newton Game Dynamics. I highly recommend this series, both for learning and for fun.
-
There's an update available now. This compiles the Framework commands into the main engine so that Lua can access the entire framework command set. C++ programs will now more closely resemble the results you see in the editor, because water, sky, and other settings can be controlled with Lua and any programming language.