Jump to content

MoustafaChamli

Members
  • Posts

    32
  • Joined

  • Last visited

Posts posted by MoustafaChamli

  1. I think gamecreator is on to something. If I use this:

     

    float Velocity = _model[currentWorld]->GetVelocity().z;
    

     

    It seems to work, up to a point. When we reach maximum speed, the character actually jumps backwards!

     

    If I try to compile with the following, though:

    float Velocity = _model[currentWorld]->GetVelocity().z;
    float Speed = Velocity->Length();
    

     

    It returns that the base operand of '->' (on the second line) is not a pointer.

  2. We're making some motion changes due to the nature of the game, and one of them affects jumping. Right now, it's set up to use a static variable called "JUMPBOOST". We'd like to change that to use the character's current velocity to affect his jump distance (as we have three moving speeds).

     

    if (inputInfo->jumpDown && !_model[currentWorld]->GetAirborne())
    {
     jump = JUMPFORCE;
     homeBaseMovement->z = homeBaseMovement->z * JUMPBOOST;
     anim = Animation_type::run_jump_rise;
     isJumping = true;
     moveType = Move_type::jumping;
    }
    

     

    We've looked into using GetVelocity, but can't seem to figure what's missing to apply it properly.

  3. Ever since the most recent update, I've been getting the following error when compiling my game:

     

    /usr/bin/ld: /home/steam/Leadwerks/Library/Linux/Release/Leadwerks.a(loadlib.o)||undefined reference to symbol 'dlclose@@GLIBC_2.2.5'|
    

     

    This happens both with the Steam and standalone versions of Leadwerks.

     

    I imagine this has something to do with binutils being at 2.24 in Ubuntu 14.10

    $dpkg -l binutils
    ii binutils	 2.24-5ubuntu amd64	 GNU assembler, linker and binary
    

  4. Hello codeape,

     

    Thanks for the response!

    Screenshot-09082014-091826-PM.png

     

     

    It doesn't seem to work here, even after recompiling the full project and updating the project files.

     

    This might be relevant, but Leadwerk had generated an ifdef __linux__, my main.cpp currentl has these lines:

    #ifdef __linux__
       FileSystem::SetDir(FileSystem::ExtractDir(argv[0]));
    #else
    HMODULE hModule = GetModuleHandle(NULL);
    if (hModule !=NULL) {
       char exePth[MAX_PATH];
       GetModuleFileName(hModule, exePth, MAX_PATH0);
       FileSystem::SetDir(FileSystem::ExtractDir(exePth))
    }
    #endif
    #ifdef __linux__
    #ifndef __ANDROID__
     settingsdir = settingsdir + "/." + String::Lower(settingsfile);
    #else
     settingsdir = settingsdir + "/" + settingsfile;
    #endif
    #else
    settingsdir = settingsdir + "/" + settingsfile;
    #endif
    

     

     

    Maybe that's not helping the compilation?

     

    I can see libsteam_api.so in the project's root directory, so it's definitely not a case of a missing file.

     

    Any ideas?

  5. So, I added the suggested $ORIGIN to the codeblocks linker settings, but I'm still seeing the error with libsteam_api.so when I try to run the game as a standalone project.

     

    I tried adding the code used by codeape to #ifdef __linux__, and that doesn't seem to have an effect either.

  6. Correction: The Leadwerks exporter does get the animations. From what I can tell, the model exports just fine. It's the moment any textures are applied, whether they were the correct ones we made, or ones available from the engine, bits of the character would fail to display, or the face will distort.

     

    Here'a screenshot with lighting enabled: http://studioslune.com/wp-content/uploads/2014/09/screenshot14.jpg

     

    Here's one without: http://studioslune.com/wp-content/uploads/2014/09/screenshot15.jpg

     

    Any ideas?

  7. When I apply a material to one of the imported models, the models stop being displayed in the Textured+Lighting render mode.

     

    I've tried this on my own machine and one of my colleague's, and the issue is reproducible.

     

    Additionally, it would seem any characters that have a face rig get deformed when in Textured+Lightning render.

     

    Is threre any reason why this might happen?

  8. That doesn't quite work, as this makes the model go completely black. I ended up doing this:

    vec3 color = ambientmat + df*ex_diffuse + sf*specmat;
    fragColor = vec4(color, 1.0) + texture(texture0,ex_texcoords) * 1.0;
    

     

    But that doesn't take into account the "toon" shading. I'll take a look at your code for the post-effects shader, see if I can use bits of it. I'm not looking for something that's like Borderlands (see screenshot above).

  9. Actually, initial OGL4 support is arriving on Linux, although it might take some time before most distros adopt it (http://www.phoronix.com/scan.php?page=news_item&px=MTcyNzI)

     

    That said, I'm getting close to a working solution, having looked around the web for some guides. Right now, I'm mostly stuck with an invalid operand on line 88 of the fragment code.

     

    Here's a link to the Fragment:

    http://pastebin.com/nDtDFnLx

     

    I figure that if I can get this, I should be able to get a working "toon" shader for the game.

     

    Just note that there are a lot of commented functions, as I'm still messing around with the code.

  10. I'm getting a better grasp at GLSL overall, and it would seem I'd need to update the code to work with OpenGL4 as it seems Blender mostly uses OpenGL2.1

     

    Getting a 3.3 and OGL2.1 fallback would be great overall, to be quite honest. I know Josh is working on a OGL3.3 fallback, so there's that.

  11. If you open those files inside Leadwerks, it will parse them and correctly categorize the shader parts (vertex, fragment etc)

     

    I've tried that, and it wouldn't read them correctly. But now that I'm a bit more familiar with how it works, I'll try again to see the results, and what needs to be corrected.

  12. I've been having trouble getting SDL to work with Leadwerks on Linux. It builds fine on Windows, but I've been getting the following error: ‘SDL_GameControllerAxis’ is not a class or namespace

     

    I set up Code::Blocks to use these:

    Compiler search directories: /usr/include/SDL2

    Link libraries: /usr/lib/i386-linux-gnu/libSDL2.so

    Options: -lSDL2 -lSDL2main

     

    Am I missing anything? Could I be pointed in the right direction? I have installed the libsdl2-2.0-0 and libsdl2-dev (with the ":i386" option) packages.

     

    Thanks!

  13. Sorry to resurrect this thread, but I've been having trouble getting SDL to work with Leadwerks on Linux. It builds fine on Windows, but I've been getting the following error: ‘SDL_GameControllerAxis’ is not a class or namespace

     

    I set up Code::Blocks to use these:

    Compiler search directories: /usr/include/SDL2

    Link libraries: /usr/lib/i386-linux-gnu/libSDL2.so

    Options: -lSDL2 -lSDL2main

     

    Am I missing anything? Could I be pointed in the right direction? I have installed the libsdl2-2.0-0 and libsdl2-dev (with the ":i386" option) packages.

     

    Thanks!

×
×
  • Create New...