Jump to content


  • Content count

  • Joined

  • Last visited

Community Reputation

455 Excellent

1 Follower

About reepblue

  • Rank
    Advanced Member

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

7,093 profile views
  1. reepblue

    [BUG]Crashing on Linux when opening a project

    It sounds like he is having issues with the editor. I was having issues running game executables after installing the dev libraries. You sure all you did was install steam and Leadwerks? If it's a new install please provide any other apps/packages that might cause conflicts.
  2. reepblue

    Full screen no working 4.6 :(

    Other software can prevent full screen from working too. I had the Samsung Magician running that did something similar to what's happening here. Try going back to 4.5 first as 4.6 beta hasn't been updated in months.
  3. reepblue

    Saving and Map files

    A long time ago, there was an app on Steam called The Leadwerks Game player. It's goal at the time was to allow people to upload their lua games to an audience without going through Greenlight at the time. The app used the workshop system to achieve this. In order for this to work, Valve required that no games should be able to modiy the users system to prevent malicious code, hence why sandbox mode was created. Although cool, the app bombed. Sandbox mode is a relic of that time and just gets in the way these days. You don't need to really worry about this when it comes to publishing as a stand alone app id.
  4. reepblue

    GDC 2019

    If there is an editor and C++ is more of a focus, I see it as "functional enough for development." With VR in Leadwerks today, there seems to be less control with the API than other options. No rotation support, can't change the controllers, idk how to hide the sensors, and my previous bug report. I also got random screen issues with the right eye. Best way to describe it it's like being half way underwater but it's vertical. When you are near your VR setup again, let me know, I'll send over the project. Could be AMD also, idk. And with the Rift, Steam VR keeps crashing randomly; taking Leadwerks and Steam with it but that's really not your fault.
  5. reepblue

    Can we add c++ to objects ?

    I'm not sure why that was written there. Those files were never included.
  6. reepblue

    GDC 2019

    At this point, do you think Turbo be ready to be developed for or you plan to show and release Leadwerks with the new forward rendering system? I hope VR is improved in the engine and has a few more features at this point. I was playing around with it with my Rift and it was quite a chore to develop for. Not sure if this goes for the Vive. Oh, one thing you can also do is show all this running on Linux. Not many options have a native Linux editor and tools. 🙂
  7. reepblue

    Saving and Map files

    You do not want to have the actual map file, rather snapshot the current values of a point in time and have the game reload all that information upon a restart. The best save system imo is with Source Engine games in which everything is saved, but most other games just worry about player data and npc count.
  8. reepblue

    Can we add c++ to objects ?

    This should help. Please read code.
  9. reepblue

    VR: Map changing fails in when VR Enabled

    Ok, thanks for the acknowledgement, and hopefully it can be addressed soon. Also, I've seen worse setups. 🙂
  10. reepblue

    Compiling C++ on Linux

    For Ubuntu 18.04 (After installing the app with Steam): sudo apt-get install libglu1-mesa-dev libcurl4-openssl-dev libxft-dev libopenal-dev libcurl4-openssl-dev libxft-dev libxrender-dev libcurl4-openssl-dev libtolua++5.1-dev Then as explained here, You need to add -no-pie to the linker flags like so:
  11. reepblue

    Something wrong with Prefabs?

    Some entities also act weird when they are a child to something. Since you need to parent things to save as one object, you can try breaking the prefab up buy unparenting all the root entity's children on Start. I recall doing something like that before..
  12. reepblue

    Something wrong with Prefabs?

    Be careful using prefabs with CSG as they can cause unusual effects. Prefabs do not really want to work with complex situations. They are mostly useful for spawning models with a script pre-assigned to them. This would be something I would just assign the object with a script or actor and create the objects I need in the code. I usually never use prefabs due to situations like this, but I'm sure others adore them. 🤷
  13. reepblue

    Apple to deprecate OpenGL

    Apple actually blocked an app from their walled garden due to the fact it used MoltenVK. Of course, if you wanted to release a game on Steam, that's fine so as long Steam works. Overall, it's just dumb.
  14. reepblue

    VR: Map changing fails in when VR Enabled

    To save you more time, replace the stock app files with this: Header: #ifndef APP_H #define APP_H #ifdef WIN32 #pragma once #endif #include "Framework.h" namespace Leadwerks { class App { Window* window; Context* context; public: App(); virtual ~App(); bool Start(); bool Loop(); static void ChangeLevel(const std::string& pName); }; } #endif // APP_H CPP: #include "App.h" #define VR_ENABLED 1 namespace Leadwerks { unsigned int windowstyle = 0; unsigned int winwidth; unsigned int winheight; iVec2 gfxmode; World* world; std::string changename; std::string currentmap; void Call_PostStart() { Entity* e; for (int i = 0; i <= world->CountEntities(); i++) { e = world->GetEntity(i); if (e != NULL) { if (e->GetKeyValue("PostStart") != "1") { if (e->CallFunction("PostStart")) { std::string entityname = "\"" + e->GetKeyValue("name") + "\""; Print("Firing PostStart() on entity: " + entityname); e->SetKeyValue("PostStart", "1"); } } } } }; void Call_ChangeMap(const std::string& pName) { std::string fullname = "Maps/" + pName + ".map"; System::Print("Changing map to: \"" + fullname + "\"..."); if (Map::Load(fullname) == false) { Print("Error: Failed to load map file \"" + fullname + "\"..."); fullname.clear(); currentmap = ""; return; } fullname.clear(); currentmap = pName; Call_PostStart(); changename = ""; System::Print("Current map is: \"Maps/" + currentmap + ".map" + "\"..."); }; App::App() : window(NULL), context(NULL) {} App::~App() { delete world; delete window; } bool App::Start() { gfxmode = System::GetGraphicsMode(System::CountGraphicsModes() - 1); currentmap = System::GetProperty("map", "Maps/start.map"); gfxmode.x = Math::Min(1280, gfxmode.x); gfxmode.y = Math::Round(gfxmode.x * 9 / 16); windowstyle = Window::Titlebar + Window::Center; #ifdef VR_ENABLED VRRules::InitVR(); #endif window = Window::Create(System::AppName, 0, 0, gfxmode.x, gfxmode.y, windowstyle); context = Context::Create(window, 0); if (context == nullptr) { Debug::Assert("Failed to create context"); } world = World::Create(); if (currentmap != "") { ChangeLevel(FileSystem::StripAll(currentmap)); } return true; } bool App::Loop() { if (window->Closed()) return false; if (window->KeyHit(Key::Escape)) return false; if (window->KeyHit(Key::Space)) { ChangeLevel(currentmap); return true; } if (changename != "") { // Pause the clock Time::Pause(); /* if (VRRules::IsVREnabled()) { VR::DisableCamera(); } */ // Pause garbage collection System::GCSuspend(); // Clear all entities world->Clear(); // Load the next map Call_ChangeMap(changename); // Resume garbage collection System::GCResume(); /* if (VRRules::IsVREnabled()) { VR::EnableCamera(); } */ // Resume the clock Time::Resume(); changename = ""; } // Update the app timing Time::Update(); // Render the world world->Update(); world->Render(); if (context != NULL) { #ifdef VR_ENABLED context->SetBlendMode(Blend::Alpha); auto t = Math::Round(Time::UPS()); context->DrawText("FPS: " + String(t), 2, 2); //Refresh the screen VR::MirrorDisplay(context); context->Sync(); #else //Refresh the screen context->Sync(true); #endif } return true; } void App::ChangeLevel(const std::string& pName) { changename = pName; } }
  15. I was working on my VR project this weekend and came across something regarding world clearing/context going nullptr when you go to change the map. The code below is a lua example of this, but if you were to re-write this in C++, the debugger will stop at the first reference of the context. Hit space on the keyboard to call the restart. If you tried when VR is not enabled, it'll work fine. --Set the application title title="VR Template" --Create a window local windowstyle = 0 local winwidth local winheight local gfxmode = System:GetGraphicsMode(System:CountGraphicsModes()-1) if System:GetProperty("devmode")=="1" then gfxmode.x = math.min(1280,gfxmode.x) gfxmode.y = Math:Round(gfxmode.x * 9 / 16) windowstyle = Window.Titlebar+Window.Center end window=Window:Create(title,0,0,gfxmode.x,gfxmode.y,windowstyle) --Create the graphics context context=Context:Create(window,0) if context==nil then return end --Create a world world=World:Create() --Load a map local mapfile = System:GetProperty("map","Maps/start.map") if mapfile~="" then if Map:Load(mapfile)==false then return end prevmapname = FileSystem:StripAll(changemapname) --Send analytics event Analytics:SendProgressEvent("Start",prevmapname) window:HideMouse() end while window:Closed()==false do if window:KeyHit(Key.Escape) then return end if window:KeyHit(Key.Space) then changemapname = "start" end --Handle map change if changemapname~=nil then --Pause the clock Time:Pause() --Pause garbage collection System:GCSuspend() --Clear all entities world:Clear() --Send analytics event Analytics:SendProgressEvent("Complete",prevmapname) --Load the next map if Map:Load("Maps/"..changemapname..".map")==false then return end prevmapname = changemapname --Send analytics event Analytics:SendProgressEvent("Start",prevmapname) --Resume garbage collection System:GCResume() --Resume the clock Time:Resume() changemapname = nil end --Update the app timing Time:Update() world:Update() --Render the world world:Render() --Refresh the screen VR:MirrorDisplay(context) context:Sync() end Again, it throws an exception at VR::MirrorDisplay stating something about the context pointer.