-
Posts
2,600 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Downloads
Everything posted by reepblue
-
Here is hl2.sh file. There is debugging information that looks like it might help. #!/bin/bash # figure out the absolute path to the script being run a bit # non-obvious, the ${0%/*} pulls the path out of $0, cd's into the # specified directory, then uses $PWD to figure out where that # directory lives - and all this in a subshell, so we don't affect # $PWD GAMEROOT=$(cd "${0%/*}" && echo $PWD) #determine platform UNAME=`uname` if [ "$UNAME" == "Darwin" ]; then # prepend our lib path to LD_LIBRARY_PATH export DYLD_LIBRARY_PATH="${GAMEROOT}"/bin:$DYLD_LIBRARY_PATH elif [ "$UNAME" == "Linux" ]; then # prepend our lib path to LD_LIBRARY_PATH export LD_LIBRARY_PATH="${GAMEROOT}"/bin:$LD_LIBRARY_PATH fi if [ -z $GAMEEXE ]; then if [ "$UNAME" == "Darwin" ]; then GAMEEXE=hl2_osx elif [ "$UNAME" == "Linux" ]; then GAMEEXE=hl2_linux fi fi ulimit -n 2048 # enable nVidia threaded optimizations export __GL_THREADED_OPTIMIZATIONS=1 # and launch the game cd "$GAMEROOT" # Enable path match if we are running with loose files if [ -f pathmatch.inf ]; then export ENABLE_PATHMATCH=1 fi # Do the following for strace: # GAME_DEBUGGER="strace -f -o strace.log" # Do the following for tcmalloc # LD_PRELOAD=../src/thirdparty/gperftools-2.0/.libs/libtcmalloc_debug.so:$LD_PRELOAD STATUS=42 while [ $STATUS -eq 42 ]; do if [ "${GAME_DEBUGGER}" == "gdb" ] || [ "${GAME_DEBUGGER}" == "cgdb" ]; then ARGSFILE=$(mktemp $USER.hl2.gdb.XXXX) echo b main > "$ARGSFILE" # Set the LD_PRELOAD varname in the debugger, and unset the global version. This makes it so that # gameoverlayrenderer.so and the other preload objects aren't loaded in our debugger's process. echo set env LD_PRELOAD=$LD_PRELOAD >> "$ARGSFILE" echo show env LD_PRELOAD >> "$ARGSFILE" unset LD_PRELOAD echo run $@ >> "$ARGSFILE" echo show args >> "$ARGSFILE" ${GAME_DEBUGGER} "${GAMEROOT}"/${GAMEEXE} -x "$ARGSFILE" rm "$ARGSFILE" else ${GAME_DEBUGGER} "${GAMEROOT}"/${GAMEEXE} "$@" fi STATUS=$? done exit $STATUS I need to fix LAUNCHING the game from the IDE first, but I still think this holds the key.
-
Really weird. Now I can't launch the application from CodeLite at all. I can the scripts run it from the terminal just fine. ?
-
I'm attaching the files here if anyone wishes to experiment with it. Install within your "/home/username/.steam/steam/steamapps/common/Leadwerks/Templates/Common/Projects" directory. "Linux_CodeLite should sit with the Existing Windows and Linux folders. Looks like we just need to get the debugger system configured. If anyone has any insight, let us know! On my end, I'm getting this. Not sure it's because we are launching a shell script instead of the actual application or not. Linux_CodeLite_Test.zip
-
Tested this for a few minutes and it seems to be working as it should. I can't say if picks with a radius were effected or not. If there are any issues, I'll let you know as always.
-
Leadwerks Game Engine 4.6 Beta Updated for Ubuntu 18.04
reepblue commented on Josh's blog entry in Development Blog
Awesome. Again, I'll continue to bug hunt and test compiling on Linux this weekend. Maybe sooner depending on things. ? -
Leadwerks Game Engine 4.6 Beta Updated for Ubuntu 18.04
reepblue commented on Josh's blog entry in Development Blog
I will play with it this weekend. By any chance was this fixed in this build? Did any depenences change now building with 18.04? -
Very cool. Hopefully there will be no limit on how many can join. I'll be there unless my dentist appointment takes longer than usual.
-
Many other games support this. It's probably more apparent in my case since I only have a Rift with two senors.
-
I've requested this before somewhere, but putting it here again. It would be nice to allow the rotation of the player's camera for more limited VR space. (Ex: Oculus Rift - 2 sensors.)
-
The camera pick is done in CycloneCameraPlacement.Lua. This is the pick that causes the object (Cyclone) to be placed in walls. function Script:UpdateTrace() local pickinfo=PickInfo() local p0 = self.entity:GetPosition(true) local p1 = Transform:Point(0, 0, 999, self.entity, nil) if self.entity.world:Pick(p0, p1, pickinfo, 0, true, Collision.LineOfSight) then self.target:SetPosition(pickinfo.position) self.target:AlignToVector(pickinfo.normal) self.box:SetColor(1,0,0) self.box:Show() local hit = window:MouseHit(1) local hitPos = pickinfo.position if Game:TestCyclonePlacement(pickinfo, self.box)==true then self.box:SetColor(0,1,0) if hit==true then self:PlaceCyclone(pickinfo) end end hit = false end end Here is Game:TestCyclone located in Game.cpp for the correction placement. (To move the position away from corners) bool Game::TestCyclonePlacement(PickInfo* pPickInfo, Entity* pTargetEntity) { if (!gamerules) InstallGameRules(); // If there is no entity, return; if (pPickInfo->entity == nullptr) { return false; } // Check for surface if (pPickInfo->surface == nullptr) { return false; } //Check for a shape... if (pPickInfo->entity->GetShape() == nullptr) { return false; } // Check to see if it's CSG. if (pPickInfo->entity->GetClass() != Object::ModelClass) { return false; } else if (pPickInfo->entity->GetClass() == Object::ModelClass) { auto cast = static_cast<Model*>(pPickInfo->entity); if (cast->collapsedfrombrushes == false) return false; } // Test the material. if (CanPlaceOnSurface(pPickInfo->surface->GetMaterial()) == false) { return false; } // The target entity should be a pivot or something. // Basicly, the pivot position is where the cyclone is actually going to spawn at. if (pTargetEntity != NULL) { pTargetEntity->SetPosition(pPickInfo->position + pPickInfo->normal * 0.1); pTargetEntity->SetRotation(0, 0, 0); pTargetEntity->AlignToVector(pPickInfo->normal); float x = 0; float y = 0; PickInfo Pickinfo; auto world = World::GetCurrent(); float distance = 0.64; float radius = 0; Vec3 tracetest; tracetest = Transform::Point(0, distance, 0, pTargetEntity, nullptr); if (world->Pick(pTargetEntity->GetPosition(false), tracetest, Pickinfo, radius, true, COLLISION_CYCLONEBUMPER)) { y = -distance + MakePositve(pTargetEntity->GetPosition(false).DistanceToPoint(Pickinfo.position)); } tracetest = Transform::Point(0, -distance, 0, pTargetEntity, nullptr); if (world->Pick(pTargetEntity->GetPosition(false), tracetest, Pickinfo, radius, true, COLLISION_CYCLONEBUMPER)) { y = distance - MakePositve(pTargetEntity->GetPosition(false).DistanceToPoint(Pickinfo.position)); } tracetest = Transform::Point(-distance, 0, 0, pTargetEntity, nullptr); if (world->Pick(pTargetEntity->GetPosition(false), tracetest, Pickinfo, radius, true, COLLISION_CYCLONEBUMPER)) { x = distance - MakePositve(pTargetEntity->GetPosition(false).DistanceToPoint(Pickinfo.position)); } tracetest = Transform::Point(distance, 0, 0, pTargetEntity, nullptr); if (world->Pick(pTargetEntity->GetPosition(false), tracetest, Pickinfo, radius, true, COLLISION_CYCLONEBUMPER)) { x = -distance + MakePositve(pTargetEntity->GetPosition(false).DistanceToPoint(Pickinfo.position)); } pTargetEntity->Move(x, y, 0); //pTargetEntity->AlignToVector(pPickInfo->normal); tracetest = Transform::Point(0, 0, -0.5, pTargetEntity, nullptr); if (world->Pick(pTargetEntity->GetPosition(false), tracetest, Pickinfo, 0, true, COLLISION_CYCLONEBUMPER) == false) { return false; } }
-
Ok, I think I got it down now. Create the actor, set the entity to it, and then null the pointer. You probably don't need to null the actor pointer after asignment, the memory address carries over and gets assigned to entity->actor. #include "Leadwerks.h" using namespace Leadwerks; class MyActor : public Actor { public: virtual void UpdateWorld() { if (Window::GetCurrent()->KeyHit(Key::T)) { System::Print("Actor still in memory..."); } entity->Turn(0, Time::GetSpeed(), 0); } }; void SetActor(Entity* p) { MyActor* actor = new MyActor(); p->SetActor(actor); actor = nullptr; } int main() { Leadwerks::Window* window = Window::Create(); Leadwerks::Context* context = Context::Create(window); World* world = World::Create(); Camera* camera = Camera::Create(); camera->SetRotation(35, 0, 0); camera->Move(0, 0, -6); Light* light = DirectionalLight::Create(); light->SetRotation(35, 35, 0); light->SetShadowMode(0); Model* model = Model::Box(); model->SetColor(1.0, 0.0, 0.0); model->SetPosition(0, 0, 0); model->SetShadowMode(0); SetActor(model); while (window->Closed() == false) { if (window->KeyHit(Key::Space)) { if (model != nullptr) { model->Release(); model = nullptr; } } Leadwerks::Time::Update(); world->Update(); world->Render(); context->DrawStats(0, 0, false); context->Sync(true); } return 0; }
-
Deleting the actor will cause a crash because it's derived off of the engine's Object class.
-
Hello, After updating my project to 4.6, I've noticed that the picking system seems to be not as accurate as the 4.5 release. I've uploaded my project in full. Launch the player.map and look around near the edges of walls and floors. The axis crosshair will vanish. Pressing Mouse one will spawn an object at the calculated pick. Compile this with 4.5, and it works as expected. The picking operations are under Game.cpp while the rest of the game is in Lua. This may have to do with a previous update from December. Cyclone.zip
-
Hello, I've noticed when using the C++ actor system that the actor class doesn't automatically get released with the entity. I've tried releasing it before the entity, but it's still in memory after the entity has been released. Below is example code to demonstrate this behavior. Is this a bug or am I not creating the actor class correctly and it's not working with the engine's reference system? I expect that after the entity is released, it would take the actor with it making the actor pointer null. Please provide insight on how to clear actors properly. #include "Leadwerks.h" using namespace Leadwerks; class MyActor : public Actor { public: virtual void UpdateWorld() { entity->Turn(0, Time::GetSpeed(), 0); } void Test() { System::Print("Actor still in memory..."); } }; int main() { Leadwerks::Window* window = Window::Create(); Leadwerks::Context* context = Context::Create(window); World* world = World::Create(); Camera* camera = Camera::Create(); camera->SetRotation(35, 0, 0); camera->Move(0, 0, -6); Light* light = DirectionalLight::Create(); light->SetRotation(35, 35, 0); light->SetShadowMode(0); Model* model = Model::Box(); model->SetColor(1.0, 0.0, 0.0); model->SetPosition(0, 0, 0); model->SetShadowMode(0); MyActor* actor = new MyActor(); model->SetActor(actor); while (window->Closed() == false) { if (window->KeyHit(Key::T)) { if (actor != nullptr) { actor->Test(); } } if (window->KeyHit(Key::Space)) { if (model != nullptr) { model->GetActor()->Release(); model->Release(); //delete actor; <- This line crashes because Actor is off of Object. model = nullptr; } } Leadwerks::Time::Update(); world->Update(); world->Render(); context->DrawStats(0, 0, false); context->Sync(true); } return 0; }
-
Josh, It'll be nice to see this kind of stuff on the API reference under the C++ examples.
-
Camera:SetDebugPhysicsMode() not documented in online help
reepblue replied to mdgunn's topic in Suggestion Box
I don't know why it's unsupported since it's been implented since 3.0 and the editor uses it. ? -
The editor might not really simulate physics well. Does this happen in game. (At work so can't really watch the video right now.)
-
Leadwerks Game Engine 4.6 Beta Update
reepblue commented on Josh's blog entry in Ultra Software Company Blog
Very nice. I saw you were going back to reports from 2015; way to go! What version of Ubuntu did you rebuild this on? Curious if you are willing to get the libs to compile and play properly with 18.04. -
VR: Map changing fails in when VR Enabled
reepblue replied to reepblue's topic in Leadwerks Engine Bug Reports
Hmm, I had an idea of just not storing the VR models with the world classes vector/map container but that might not be a good idea. -
[4.6 Beta] Slow rotation with Kinematic joints.
reepblue replied to reepblue's topic in Leadwerks Engine Bug Reports
Very cool, hope it gets fixed. -
In the options menu you should be able to tick the "Fullscreen" option. When you restart, the app should launch in fullscreen. However, I've noticed that this may not always work. It might be because of a feature I've implemented, or something isn't saving properly. One way to force fullscreen is launching the application via a batch/bash file with -fullscreen, I'll definitely look into the fullscreen issue not saving per settings. Thanks.
-
FYI to everyone, I sent Chris a PM. But for anyone else who may have a similar issue, all key calls are called via the action Function table. For future inquires on Luawerks, Please contact me via PM. There is an e-mail on all scripts, however I need to move it to another server.
-
I think a while back I just used the wobble.shader in the stock assets. The trick is checking if the camera is below the world's water level and applying/removing the effect respectively. You can also use the engine fog system with the wobble shader and get a decent result.
-
Load Package not keeping folder hierarchy
reepblue replied to SpiderPig's topic in General Discussion
To be honest, the end user should decide how they want their games to be broken up. This way a hot fix doesn't mean the entire game to be redownloaded if the developer made a pack for scripts and another for materials and models and so on.