Jump to content

gamecreator

Members
  • Posts

    4,937
  • Joined

  • Last visited

Posts posted by gamecreator

  1. Alright! Finally getting up and running on the netwerks front. Josh was kind enough to update the SDK to include the DLL. I can now get it running but it crashes on TerminateNetwerks(), after user presses ESC. If I comment out that line, the program exits properly.

     

    At this point my program is super simple.

     

    #include "engine.h"
    #include "netwerks.h"
    
    int main()
    {
    if(!Initialize()) return 1;
    
    InitializeNetwerks();
    
    RegisterAbstractPath("D:/Programming/Leadwerks Engine SDK");
    
    // Set graphics mode
    Graphics(320,40);
    
    // Create framework object and set it to a global object so other scripts can access it
    TFramework fw = CreateFramework();
    
    // Set Lua framework object
    SetGlobalObject("fw",fw);
    
    // Set Lua framework variable
    BP lua=GetLuaState();
    lua_pushobject(lua,fw);
    lua_setglobal(lua,"fw");
    lua_pop(lua,1);
    
    // Get framework main camera
    TCamera camera = GetLayerCamera(GetFrameworkLayer(0));
    PositionEntity(camera,Vec3(20,60,-50));
    RotateEntity(camera,Vec3(45,0,0));
    
    TLight light=CreateDirectionalLight();
    RotateEntity(light,Vec3(45,45,45));
    
    THost host;
    host = CreateHost(0,80,2);
    
    SetStats(0);
    
    while(!KeyHit(KEY_ESCAPE))
    {
    	UpdateFramework();
    	RenderFramework();
    
    	DrawText(0,0,"Host Keys: ");
    	DrawText(0,20,"Peer Keys: ");
    
    	Flip(0);
    }
    
    exitapp:
    TerminateNetwerks();  // Crashes here if this line isn't commented out
    return Terminate();
    }
    

     

    I removed the error checking to make things as easy as possible.

     

    Any ideas why it would crash?

  2. Good thought. I haven't updated in a bit though so I think I actually have 2.30 (at work now so I can't check) so it seems it hasn't been included in some time. That's actually what I was trying to PM Josh about (see Recent Status Updates on main Forum Page). Darn. enet is undocumented. RakNet is a bit complicated for me. Leadwerks networking is undocumented and kind of half broken. Bleh.

     

    Thank you for everyone's help though. It truly is appreciated more than you know. ;)

  3. Thank you. Added it. Still crashed. But now the console says that netwerks.dll failed to load. I tried to find the dll but it doesn't seem to come with the program. Very odd.

     

    On a side note, for those like Lumooja who seem to be familiar with this: how did you learn? Is there a resource outside of the wiki and related documentation that I'm missing? Nothing mentions functions like InitializeNetwerks() and TerminateNetwerks() that I could find, for example.

  4. I added netwerks.cpp and it compiled then crashed but thank you both! That's one step forward. :)

    (I was under the impression, by the way, that including netwerks.h would cover this but it seems I was wrong.)

  5. It seems this comes up from time to time but does anyone have a basic network example they could share? I'm stumped right from the start. All I'm trying to do is send integers back and forth from host to client and reverse.

     

    Even putting this in

     

    THost host;
    host = CreateHost(0,80,2);

     

    results in:

    error LNK2019: unresolved external symbol "unsigned char * __cdecl CreateHost(int,int,int)" (?CreateHost@@YAPAEHHH@Z) referenced in function _main

     

    What does that mean? Any help would be really appreciated!

  6. I would also still love to see a simple tutorial showing the basics of networking. I don't need lobbies or patching or chat or anything "higher level" - just reliable transfer of simple data (integers or I guess packets) between two computers.

     

    I've looked at RakNet and frankly, it seems more complex than what I need. A lot to learn for "little" need.

  7. Logos are critical... for big companies. Does anyone not know what the nike symbol is? Can anyone not name the colors of Coca Cola or Pepsi? Logos are among the first impressions people get. It's the handshake of the advertising world.

     

    That said, though I grew fond of the gears, I can see this one working. And it's unavoidable for a logo, which should be simple (so it's easy to remember, among other things) to be similar to other logos, which are also simple. Most of the best logos are based off of basic shapes like boxes or circles. The current Leadwerks logo is the simplest you can get but at the same time shows and hints at depth and detail.

  8. They are also being grossly mis-sold on the basis of wind strength predictions which are proving over inflated.

    Did you mean to say that they are blown out of proportion?

  9. I've narrowed it down to a single mesh which was causing the problems: the boots. I've attached the max file to this post, as well as a screenshot of the settings I used to export. The specific error is: "There was an error during export objects!" If I delete the boots and try to export the rest of the stuff in the scene, it exports fine (though it takes a while to do so). The gloves I had on the character were also open meshes but those exported without problems (using the same settings). Any ideas why this doesn't export?

    boot.zip

    post-368-12684591746225_thumb.png

  10. There are some requirements for exporting models.

    First, I love the exporter! It's been super useful ever since I found it. But do you have a list somewhere of the requirements you just mentioned? Last night I got an error trying to export a model. There are only three causes I can think of immediately:

     

    1. The models were about 20,000 triangles total

    2. I had open meshes (uncapped), like gloves

    3. The models were mapped before but I removed the textures (they were pointing to images which were no longer there)

     

    I wasn't doing or exporting any animation/bones/skinning.

     

    Also, a related topic: on larger meshes the script takes quite a while to finish. The attempt above, for example, took maybe a minute or two and then finally gave me an error. It's done the same for items it successfully exported. Is there a way to make it faster?

     

    Thanks again. Whether or not you can answer, I'll do some more testing to see what the problem may be, like trying to export just the uncapped gloves) or putting proper textures on the meshes.

×
×
  • Create New...