Jump to content

ZioRed

Members
  • Posts

    1,133
  • Joined

  • Last visited

Everything posted by ZioRed

  1. ehm.. I disagree with this, a browser is more than an app, it's a container of apps, facebook and many other (Google Chrome OS?) are only few example of what a browser is capable to do.. it's not so impossible that in the future some good 3D games will be deployed on a browser, take a look at O3D This is good
  2. Isn't it enough simply not to call ForEachEntityInAABBDo when you are in "pause scan" mode (with some flag in your code)? As Lumooja said it seems you don't register callback in an event driven way, the callback you specify within ForEachEntityInAABBDo is only called when you call ForEachEntityInAABBDo in your code.
  3. I would really like to see an official and complete wrapper for .NET with full access to every engine C/C++ commands (like the old Core.* functions named as the C/C++ official from 1.32 .NET headers) shipped with the engine or the library be a managed DLL. I must admit that Lazlo and Tyler made a very good work with the new .NET header 2.0 but still I don't like to have a "custom engine.dll", I just want to use the official engine.dll
  4. EDIT: ops Macklebee beats me on the same answer
  5. ZioRed

    GUI system

    I'd prefer an internal engine GUI (scalable whenever is possible, so everyone can however integrate more GUIs like CEGUI or WebKit or whatever they prefer) which doesn't require any other external library. Automatic mantain ratio on resolution switch would be also a great feature (yes I know we can do on our own but would be nice if the GUI system handles it automatically).
  6. I prefer to mantain Maps and Models in separated folders to avoid a waste of unrequired space when many objects are present in more levels. For the technical question, if you really don't need them to change why don't turn your properties into variables (or better constant in an external .lua to include in any model you need, like the .lua in the Scripts/Constants folder)?
  7. Yes it seems to me that the headers currently miss the "Color" in the Leadwerks.ShadowMode enum, but I think it should work if you use it in a SBX.
  8. GetKey/SetKey are still methods of every object: object:SetKey(key,value) object:GetKey(key,value) They are declared in class.lua
  9. Perhaps I have an old version? Where is the code lines which handle the vegetation layers on gamelib?
  10. I didn't find anything about vegetation management there, it has TScene::LoadMap which however calls the engine's LoadScene function and then processes with its own ProcessSceneInfo and ProcessScene methods for internal processing. And I neither found no engine functions to load or set vegetation layers, so it seems that Rick's solution fits better (creating on the fly a new sbx file with only terrain and vegetation stuff).
  11. I still don't know shaders coding, but I noticed that postfilter_desaturate.frag defines LW_DESATURATE while inside postfilter.frag there are no checks for it but only for LW_SATURATION on line 234: #ifdef LW_SATURATION Include "saturation.frag" #endif May be it is a bug or I am completely wrong (I checked on all frags/verts and didn't find any define for LW_SATURATION).
  12. I have tried SimpleIni, it's really simple
  13. ZioRed

    Suggestions

    Never figured out how to give reputation to members until now, thanks to klepto I will from now
  14. If you will go to accept this request, I would suggest to add an optional parameter to auto-show/hide the entities with "false" as default value, just to avoid invalidating any previous code. However I think that the case of a mesh blocking the visibility of its entity falls more in the field of game design than engine logic.
  15. If you're using the 1.32.8 wrapper there is not Engine.Initialize, you should call Framework.Initialize after Graphics.Initialize (if you will get an error calling this, probably you're importing the System.Drawing using, in that case you can remove the using or prefix "Leadwerks."), watch the tutorial or download the templates (you need to overwrite the DLL after you save the solution in your project directory because the one shipped with the templates is before 1.32.8, they will be replaced with new versions as soon as the new stable wrapper has been released in the next weeks): Graphics.Initialize(800, 600); Framework.Initialize(true); FileSystem.AbstractPath = "C:/Leadwerks Engine SDK"; while (!Keyboard.KeyHit(Key.Escape) && !Window.HasRequestedClose()) { Framework.Update(); Framework.Render(); Graphics.Flip(); } Engine.Terminate();
  16. Nice work, could be even nicer if you expose configuration settings to the plugin such as the SDK path (most plugins can use the SDK converters so we can write Forms to enable/disable the command-line options). If you would like to add the configuration settings, then it would be useful to allow a plugin to be configured too in the same option Form.
  17. I tried against the code of the tutorial "Introduction to Models" and have 101 entities count using "ENTITY_MODEL | ENTITY_BODY": #include "engine.h" #include <cstdio> #include <sstream> int entities = 0; void _stdcall myfunc( TEntity entity, BP extra ) { entities++; } inline float rnd( float min=0.0, float max=1.0 ) { return min + ((float)rand()/RAND_MAX)*(max-min); } int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd ) { Initialize() ; RegisterAbstractPath("D:/LE/2.32"); SetAppTitle( "ConsoleCPP" ) ; Graphics( 800, 600 ) ; TWorld world = CreateWorld() ; if (!world) { MessageBoxA(0,"Error","Failed to create world.",0); return Terminate(); } TBuffer gbuffer=CreateBuffer(GraphicsWidth(),GraphicsHeight(),BUFFER_COLOR|BUFFER_DEPTH|BUFFER_NORMAL); //Create a camera TCamera cam=CreateCamera(); CameraClearColor(cam,Vec4(0,0,1,1)); PositionEntity(cam,Vec3(0,2,-10)); //Create a light TLight light=CreateDirectionalLight(); RotateEntity(light,Vec3(45,45,0)); //Create a render buffer TBuffer buffer=CreateBuffer(800,600,BUFFER_COLOR|BUFFER_DEPTH|BUFFER_NORMAL); TModel model=LoadModel("abstract::oildrum.gmf"); if (!model) { MessageBoxA(0,"Error","Failed to load mesh.",0); goto exitapp; } SetBodyMass(model, 1); for ( int n=1; n<=100; n++ ) { model=CopyEntity(model); PositionEntity(model,Vec3(rnd(-5,5),rnd(5,15),rnd(-5,5))); RotateEntity(model,Vec3(rnd(0,360),rnd(0,360),rnd(0,360))); SetBodyMass(model, 1); } //Main loop while(!KeyHit(KEY_ESCAPE)) { //Update the world UpdateWorld(); //Render the scene SetBuffer(buffer); RenderWorld(); //Render lighting SetBuffer(BackBuffer()); RenderLights(buffer); entities = 0; ForEachEntityDo(reinterpret_cast<byte*>(myfunc), 0, ENTITY_MODEL | ENTITY_BODY); //std::string s; std::stringstream out; out << entities; //s = out.str(); DrawText(0, 30, out.str().c_str()); //Swap the front and back buffer Flip(); } exitapp: return Terminate(); }
  18. Don't know if it's the correct way, but have you tried to pass ENTITY_BODY to ForEachEntityDo() as last parameter?
  19. As far as I remember the collision type parameter that you pass to the pick function is not the one of the "pickable entity" but of the raycast itself.
  20. I wrote a simple program which I use as base for some editors (it uses 1.32 version of wrapper and LETKControl).
  21. I don't know how will be different the code from the new incoming wrapper, but I wrote a "getting started" which used the 1.32 version of the wrapper (I don't think the new wrapper will be enough different to invalidate that tutorial or the other one I wrote for Lights, if needed I will update them when the new will be released).
  22. I cannot find a definition for TList in engine.h and never succeeded to access them from neither a TWorld nor a World, so I thought those could be deprecated from an old version.
  23. C# headers for 2.3x will be released soon, Tyler and Lazlo are working on a new huge version, so I think you will waste your time if you create your own wrapper because their will be the "official" as soon as it's stable enough
  24. I haven't tried, but from its description it seems ForEachEntityInAABBDo is useful for this.
  25. The last code works for me, I see a white cube in the center of the black window (used 800/600 for width/height)
×
×
  • Create New...