-
Posts
23,313 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Posts posted by Josh
-
-
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.
-
when I place it nothing seems to happen like it should
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() ; }
- 1
-
// ==================================================================== // 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...
-
It's used in hooks.lua.
-
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.
- 1
-
This example shows how to use BlitzMax, Framework, and Lua together seamlessly!
Framework is a little different from the main engine. Although it is compiled into the DLL, it is not compiled into the engine module. This allows the programmer to make their own customizations to the code. However, it also means we have to generate a code file of glue functions for Lua to be able to access the Framework commands. The attached example shows how to do this. You can also use this method to expose your own BlitzMax types to Lua!
Any time your command set changes, you need to regenerate the Lua glue code. This is done by commenting out the line that includes the glue code, and uncommenting the code that generates it:
'Include "lua-gluefunctions.bmx" generateGlueCode("lua-gluefunctions.bmx") End
Then switch the comments back to run the program:
Include "lua-gluefunctions.bmx" 'generateGlueCode("lua-gluefunctions.bmx") 'End
This allows your Lua scripts to access the entire framework command set, as well as your own types.
You also need to set the value of the global Lua variable "fw". This is done with the included SetScriptObject() function, which just uses Lua commands to set a variable.
The Framework code is distributed as code files instead of a module, mostly because BlitzMax does not allow compiling a module with the name "Framework".
-
You might want to start with a simple hard-coded app to see if this idea actually works, before you start adding a UI. I have no idea if the results will be useful or not.
-
Yeah, I think this is a good idea. Maybe an SBX can be saved as a model + automatically generated script. Until then, I recommend creating pivots in the mesh, and then using FindChild() to see where the lights should be positioned.
-
-
Use the Quake palette to test with.
-
Solutions like that result in loss of resolution, which is why things start looking washed out instead of warm. We want consistency of similar hues, not a loss of resolution.
Notice the colors are different, but look somehow consistent:
Here's a good example of "random colors syndrome":
Here is the same image multiplied by an orange tint. This looks like a lot of the screenshots I have seen. Even though the tint sort of forces it to look consistent, there is a loss of resolution and the odd colors still look odd:
Relying too much on colored lighting only washes out detail and makes everything look muddy.
Framework ? not Framewerk?
in Programming
Posted
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.