Jump to content

From Editor to C++ IDE


Carve
 Share

Recommended Posts

Excuse me if this is in the incorrect section..

 

I recently purchased LSDK (go Josh!), and I'm definitely in love with this system! I'm just curious as to how you get entitys from the Editor -> Compiled Product?

 

For an example, I started a LEO (console) project, VS 2008, added LoadScene("abstract::scene.sbx");

 

Now the issue's are: my skybox material & things are loaded, and the 'waterplane' supplied with LSDK, but once compiled (even with no errors or anything in the console about missing mats, shaders, etc) nothing shows up, except my terrain and the materials for it.. Am I doing something wrong?

 

Another question, how do I utilize LUA or XML inside of c\c++? Do I have to write parsers for each or whats the process involved there?

 

Sorry if these questions are repeated often, I did a search and haven't found anything relevant to my needs, and the wiki seems a tad bit outdated?

 

Thanks !

Link to comment
Share on other sites

I'd have a look at engine.log initially for any warning entries where the engine has not been able to load items for one reason or another. It might just be an abstract path issue.

 

As I don't use LUA at all you might be better waiting for someone who's a bit more familiar with it replying but the LUA object scripting side should run transparently. So anything that works in the editor should be loaded and executed in the code. That's as far as the LUA implementation goes as far as I'm aware. It's not currently possible to expose and use your own functionality written in C/C++ to LUA or run LUA scripts independent of the current LUA framework without implementing that yourself.

Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++

Link to comment
Share on other sites


  •  
  • Do you have all the media that you use in your scene copied to your game project?
  • Have you copied the scripts folder from ?
  • Many lua class scripts like waterplane use the 'fw' for accessing the framework.
    adding this code to your project might help:
     
    TFramework framework=CreateFramework() 
    unsigned char L=GetLuaState(); 
    lua_pushobject(L,framework); 
    lua_setglobal(L,"fw"); 
    lua_pop(L,1); 
    


Link to comment
Share on other sites

Another question, how do I utilize LUA or XML inside of c\c++? Do I have to write parsers for each or whats the process involved there?

The GetLuaState functions returns the global Lua state, and you can use the Lua library from that point on.

 

 

Link to comment
Share on other sites


  •  
  • Do you have all the media that you use in your scene copied to your game project?
  • Have you copied the scripts folder from ?
  • Many lua class scripts like waterplane use the 'fw' for accessing the framework.
    adding this code to your project might help:
     
    TFramework framework=CreateFramework() 
    unsigned char L=GetLuaState(); 
    lua_pushobject(L,framework); 
    lua_setglobal(L,"fw"); 
    lua_pop(L,1); 
    


 

1 - I have all media needed

2 - I copied the scripts folder from Scripts in Leadwerks SDK

3 - So I have to access the LUA Framework from C\C++ to be able to utilize for example a water plane?

 

I might have asked too many questions at first, I'm basicly trying to utilize the 'waterplane' (lua) script that WORKS fine in Editor, but doesn't in the Game.exe?

Link to comment
Share on other sites

The code he posted creates a framework object and sets the Lua variable to that object. Do this first, then load your world, and all scripted objects should have access to the framework object, which is used for advanced rendering settings.

 

 

Link to comment
Share on other sites

The code he posted creates a framework object and sets the Lua variable to that object. Do this first, then load your world, and all scripted objects should have access to the framework object, which is used for advanced rendering settings.

 

Awesome, thanks!

Link to comment
Share on other sites

Ok, I don't know what I'm doing wrong, but 90% of the things I set in the Scene in the Editor work. The only things I am having trouble showing are: SkyBox & Waterplane, I didn't really see any tutorial or guide showing how to utilize things such as waterplane (lua i believe) inside the actual program's code (C++), what am I missing?

 

Edit: Resolved 99% of my issues, thanks, just took more trial and error then anything <_<

Link to comment
Share on other sites

  • 2 weeks later...

Ok, I don't know what I'm doing wrong, but 90% of the things I set in the Scene in the Editor work. The only things I am having trouble showing are: SkyBox & Waterplane, I didn't really see any tutorial or guide showing how to utilize things such as waterplane (lua i believe) inside the actual program's code (C++), what am I missing?

 

Edit: Resolved 99% of my issues, thanks, just took more trial and error then anything :blink:

 

Theres an entities folder in the models folder in the LSDK folder. Copy that to your project folder.

simpleSigPNG.png

 

Programmer/Engineer/Student

www.reikumar.com

 

2.6 GHz Intel Core Duo - nVidia GeForce 8600 GT - Windows 7 64-bit - 4 Gigs RAM

C++ - Visual Studio Express - Dark GDK - Leadwerks SDK

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...