Jump to content

Laurens

Members
  • Posts

    564
  • Joined

  • Last visited

Posts posted by Laurens

  1. That's pretty sweet (and quite mind bending having never look like anything like it before) Rick.

     

    If what you are trying to do is use CEGUI from Lua, you can create a DLL that has all the CEGUI stuff and expose functions to be called from Lua, and even call functions from your DLL back to Lua.

     

    CEGUI has a built-in Lua interpreter so I can already do that, my main concern was calling a Lua script from C++ that is not an entity script. I want to do as little as possible in C++ unless it is absolutely required. The main loop would look like this:

     

    while (!AppTerminate()) {
       UpdateFramework();
    
       // Run game.lua (facade for all game logic, written as Lua scripts as well. You can compare this with a game logic class' Update() method)
    
       RenderFramework();
    
       glPixelStoref(0x806E, 0); 
       glPixelStoref(GL_PACK_ROW_LENGTH, 0); 
       glPixelStoref(GL_UNPACK_ROW_LENGTH, 0); 
       CEGUI::System::getSingleton().renderGUI();
    
       Flip();
    }
    

     

    This way I can stricly contain game logic in Lua and keep everything else contained in the C++ binary which is a clean seperation that I like.

  2. I agree with Rick, I don't care what physics engine you roll in, as long as it's well documented and stable. I would hate to get stuck with PhysX if you think it won't do Leadwerks any good but implemented it just because people like the shiny logo. I for one am completely impartial to that.

  3. Thanks for the fast replies, that should work perfectly!

     

    I use my entity scripts like classes. Then I code most of my game in a C fashion in Lua and found I was able to produce something much faster and easier. Just my experience I speak of though.

     

    This is the route I intend to take as well, using the main Lua file. I just needed to setup CEGUI in C++. Otherwise CEGUI supports Lua as well so I hope I don't need to get back to C++ again.

  4. Hi,

     

    I have decided to embrace Lua for the sake of getting a game done and stop fussing about proper architecture. To this end, I would like to have an executable similar to the engine-provided executable that just runs start.lua. With a twist. I would like to use CEGUI and I need to bootstrap it to Leadwerks in C++. No problems there, but how do I get Leadwerks to run start.lua similar to what the provided executable does? It seems the Lua API provides a dofile() method but this does not seem to be exposed to the engine.

     

    Thanks!

  5. Hi guys,

     

    This is unrelated to any sort of game development but since I know some of your are either licensed pilots, in training or otherwise enthusiasts, I figured I might as well try. I am trying to figure out an unambigious, international standard to aircraft classification or at least come close (if such a thing exists).

     

    Typically when you acquire your license it comes with a class rating for any of the following classes:

     

    - Airplane

    - Rotorcraft

    - Powered Lift

    - Glider

    - Lighter Than Air

    - Powered Parachute

    - Weight-shift Control

     

    These classes can be further subdivided, take the Airplane class for instance:

     

    - Airplane

    - Single Engine Piston - Land

    - Touring Motor Glider

    - Micro-Light Aircraft

    - Multi-engine Piston - Land

    - Single Engine Piston - Sea

    - Multi-engine Piston - Sea

     

    Considering the source material is a publication from the JAA, I can only assume this holds true for Europe, but what about the United States? Does the FAA deviate from this standard?

     

    Furthermore, are the actual rules for classification the same? For instance, in the Netherlands, an airplane is considered to be a Micro-light Aircraft when it's maximum weight is below 450 kg. Is this different on other continents or countries?

     

    Thanks!

  6. Skyboxes are stored as cubemaps, i.e all six images are stitched together to form a single image. It's possible to extract the six faces from it with the NVIDIA texture tools but you would have to stitch them back together as well before you can use it.

  7. Hello and welcome!

     

    Leadwerks is up to it, I believe Metatron has actually done a quick proof-of-concept of a racing game a while back although I cannot seem to dig it up right now. Do keep in mind that you will have to do nearly all of the programming yourself, even though Leadwerks has built-in support for vehicles. There used to be a driving game included with the evaluation kit but it was updated recently and I'm not sure if its still included but you can always download and find out yourself.

     

    Cheers!

  8. It's juts that LeadWerks could go towards some sort of Unity or Torque 3D approach, where you can create the entire game by script (entities interaction and script attaching , avoiding to have to place entities by code because they have already been placed in the editor ).

    It's just opening up lot more LeadWerks engine to fast game making with scripting system, and im' of the ones that is for this option.

     

    It's already doing that, isn't it? I am not loading any entity or script by hand anyway, and you don't have to either.

  9. Well, appearantly I was missing both lua_d.dll and tolua++_d.dll from my path but I was unable to find any documentation on that. Anyway, now I can hand CEGUI Leadwerks' lua_State but now Leadwerks crashes on running the first script. I guess these two aren't meant to be. I already asked on the CEGUI forum but I'd like to hear from you guys as well, would there be any objection against having multiple Lua states open at the same time?

  10. Well it's compiling now, but it won't run:

     

    _ceguiScriptModule = &CEGUI::LuaScriptModule::create(reinterpret_cast<lua_State*> (lua));
    

     

    The application failed with exit code -1073741515 (0xc0000135).

    This could indicate that no required .dll was found in the PATH.

     

    I suspect I cannot cast the lua state from Leadwerks and pass it to CEGUI the way I am doing because I do have CEGUILuaScriptModule_d on the path and there seem to be no other scripting-related DLL's in the archive.

     

    I've asked on the CEGUI forum what DLL's to actually include so I can rule that out though: http://www.cegui.org.uk/phpBB2/viewtopic.php?f=10&t=5794

  11. I've rolled in CEGUI and I don't observe any noticeble difference in FPS even with the most complicated GUI sheets open so I wouldn't worry about it, which I think is good advice in general. Get something working and if its slow, then optimize it later, but preferably don't waste time and bend your back to reinvent the wheel just for the odd single frame you may save.

  12. I have not tried that yet. I suspect that would require me to pull the Lua headers in and I was hoping to avoid yet another complication. If there is no way to get it from Leadwerks I guess I'll give it a go though.

  13. Hi guys,

     

    I am trying to get CEGUI to play nice with Leadwerks' already opened Lua state:

     

    byte* lua = GetLuaState();
    _ceguiScriptModule = CEGUI::LuaScriptModule::create(lua);
    

     

    but this doesn't fly. CEGUI is expecting a lua_State object and not a byte pointer. Is there any way I can get an actual lua_State from Leadwerks?

     

    Thanks!

  14. I run a filter function to filter out some of the things it should ignore :o But thanks for the input.

    What template do you use? I get a feeling that the LEO template isn't quite finished, and I'm pretty fluent in other language other than BlitzMax, so I might as well change.

     

    I am not using LEO, I very much prefer the C-API. It never gets in the way :)

×
×
  • Create New...