Jump to content

MoustafaChamli

Members
  • Posts

    32
  • Joined

  • Last visited

Everything posted by MoustafaChamli

  1. *headdesks* After having changed with how the jump mechanic was working (as originally programmed), I came to the realization that this calculation wasn't needed. I think we can consider this topic closed.
  2. 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.
  3. Thanks for your answers guys, but this is a C++ question.
  4. 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.
  5. 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
  6. It turns out libsteam_api.so isn't copied into the directory when I build the project, which is a bit of an annoyance. But it seems to work when I copy libsteam_api.so to the published project's root directory.
  7. Hello, sorry for the long reply. I did actually rebuild. This is what the command outputs: 0x000000000000000f (RPATH) Library rpath: [$ORIGIN]
  8. Hello codeape, Thanks for the response! 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?
  9. 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.
  10. I'm having the same issue. But my cbp line already had <Add library="../../libsteam_api.so" /> I'm looking over the other thread you started (this one) for answers, but I'm not sure I get how you got it working. I'll add a further explanation on that thread.
  11. 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?
  12. Exporting with the Blender Exporter seems to ignore the embedded animations, even when I select the rig on export.
  13. More information: I'm using Blender's ASCII-based FBX exporter, as the Blender exporter and the FBX binary exporter don't seem to produce usable results with my setup. This might have something to do with the issue I'm seeing.
  14. I think I managed to get something decently close to what I was looking for, using a combination of shader scripting, post-processing, and general illumination. It's not quite what I had in Blender but it'll do for now.
  15. 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?
  16. I'm getting "couldn't find any exportable objects" when I tell it to only export what's selected. Is that an expected behaviour?
  17. 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).
  18. 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.
  19. 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.
  20. 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.
  21. 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!
  22. It got me started in the right direction. It would seem Leadwerks mostly looks at the @OpenGL4.vertex and @OpenGL4.fragment sections, so I'll fiddle with those.
  23. 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...