-
Posts
544 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Downloads
Everything posted by martyj
-
The reason not to hide the tree is that I want a stump still to show. I could swap the tree model with a stump model if needed. I defiantly want something there to be a place holder so players don't stand in a tree when I spawn one. @Rick. I agree completely with wanting multi-threaded asset loading support.
-
I'm trying to programmatically change models skins depending on what type of NPC it is or a specific interaction. Such as woodcutting, when you chop down a tree, the tree will change its material to be an invisible material on its surface. Other cases this will be used is for Multiplayer, each player can have a unique skin. My problem can be seen in this video: I've tried using Entity::Copy and Entity::Instance to copy the entity, but to no avail. I've also tried copying each surface. Which causes the entity not to show up. As seen from this image: http://i.imgur.com/NKuyzuH.jpg Even with the cloned surfaces, if I set the material, the model doesn't show. Any idea how I can set a material on an instance without it changing any other instance of the same model?
-
@Rick, that wouldn't work during map loading as it's done on the main thread. Another hook would be nice. For Model::Load.
-
Not really a progress bar, but just show something on a loading screen. Maybe just the text taht's displayed in std::out "Loading somemodel.mat"
-
Passing in the name of the function instead of a reference to the function works due to the fact that the function name is really just a reference to a section of memory of code to execute. So the problem is that the function does get called, but not on Model loading, but after all the models have been loaded.
-
My map loading hook is never called. std::string mapName("Maps/test.map") bool success = Map::Load(mapName, LoadMapHook); void LoadMapHook(Entity* entity, Object* object) { System::Print("MapLoadHook"); App* app = App::GetApp(); app->RenderLoadingScreen(); } Anyone else experiencing this issue? ----------- Edit: He hook is called after all the entities are loaded. Is this because the hook is for creation of entities and not just Model loading? How can we get a hook on model loading?
-
Interesting to note that System::Print accepts C strings.
-
An item wielded has a hand on it right? With an item wielded I still got sticks from trees.
-
I still can't figure out how to make a fire. I've tried using logs on it, flint on it, using items on each other. Nothing seems to work. And now I'm dead due to hunger
-
I love the loading screen. How did you do the progress bar? It seems really accurate as a percentage. I would assume you did draw calls on the callback hook for loading? void Load(const std::string& path, void hook(Entity* entity, Object* extra), Object* extra = NULL, const int flags = Map::LoadScripts, const uint64_t fileid = 0);
-
That's a nice turret, but I think it would be better if it looked more like this: http://www.turbosquid.com/3d-models/3d-model-sentry-gun/814754
-
It's not a problem with IPB. It could be a plugin you have installed or it could be a configuration. Do you have any filters for like profanity? It could be there. The image posted below is from a fairly stock IPB install.
-
Some how one of my maps is causing a division by zero crash I have a copy of the backup so it's ok. Here is the map for bug reference. http://martyj.net/grid1_copy.map OS: Windows 10 LE Version: 4.0 Pro (Beta)
- 1 reply
-
- 1
-
You'd have to move your whole steam folder to a new drive. What you could do if you don't want to do that is use what's called a Junction. https://msdn.microsoft.com/en-us/library/windows/desktop/aa365006%28v=vs.85%29.aspx It basically creates a link from one folder to another. So Steam will save in SteamApps/Common/Leadwerks, which you could change to another drive. ------- If you want to move your whole steam folder (recommended). Just copy everything to a new drive, then delete everything out of the steam folder EXCEPT SteamApps and Steam.exe. Run the Steam.exe and Steam will re-installl in the new location.
-
I am still running into issues even with turning each axis on its own. My case is such that I have a few given Pivots in the game, and I generate multiple points between these pivots to move a camera smoothly between these points. This also rotates the camera based upon the rotation of the points. My test points are kind of uncommon. Vec3 positionstart = Vec3(2, 1, 0) Vec3 rotationstart = Vec3(0, 0, 0) Vec3 positionend = Vec3(5, 3, 0) Vec3 rotationend = Vec3(90, 15, 180) Vec3 rot = box->GetRotation(true); Vec3 new_pos; Vec3 new_rot; cur->nextPoint(Time::GetCurrent(), new_pos, new_rot); Vec3 rotDiff = new_rot - rot; box->SetPosition(new_pos); box->Turn(rotDiff.x, 0, 0, true); box->Turn(0, rotDiff.y, 0, true); box->Turn(0, 0, rotDiff.z, true);
-
Will these be available for purchase as well? I need a new jacket for my trip to England in late June.
-
So long story short: Turn(rot.x, 0, 0) Turn(0, rot.y, 0) Turn(0, 0, rot.z) to apply a full object rotation?
-
Turn takes in a Vec3 in C++. virtual void Turn(const Vec3& rotation, const bool global = false);//lua virtual void Turn(const float x, const float y, const float z, const bool global=false);//lua It's not a problem with Turn or SetRotation. The problem is with GetRotation. The object actually appears correctly in the scene when you use SetRotation. The value returned from GetRotation is wrong.
-
I have been testing some camera movement code, and there is a bug with getting the rotation of an Entity OS: Windows 10 LE Version: Beta Branch 4.0 Professional Graphics Card(s): AMD R9 280x, Nvidia GTX 650 TI App Start box = Model::Box(2, 2, 2); box->SetColor(1.0, 0.0, 0.0, 1.0); box->SetPosition(Vec3(5.0, 3.0, 0.0), true); box->SetRotation(Vec3(57.250671f, 9.541766, 114.50135), true); App Loop if (window->KeyHit(Key::L)) { Vec3 next_rot = Vec3(57.493263f, 9.582211, 114.986526); Vec3 rot = box->GetRotation(true); Vec3 diff = next_rot - rot; box->Turn(diff, true); //box->SetRotation(next_rot, true); // Will return the same results with GetRotation afterwards System::Print(next_rot); System::Print(rot); System::Print(diff); System::Print(box->GetRotation(true)); // Bug shows here } This will print the following As you can see, the global rotation of the box changes drastically compared to the turn value. I also wrote a Lua script that shows the error --Initialize Steamworks (optional) Steamworks:Initialize() --Set the application title title="RotateTest" --Create a window local windowstyle = window.Titlebar if System:GetProperty("fullscreen")=="1" then windowstyle=windowstyle+window.FullScreen end window=Window:Create(title,0,0,System:GetProperty("screenwidth","1024"),System:GetProperty("screenheight","768"),windowstyle) window:HideMouse() --Create the graphics context context=Context:Create(window,0) if context==nil then return end --Create a world world=World:Create() world:SetLightQuality((System:GetProperty("lightquality","1"))) --Load a map local mapfile = System:GetProperty("map","Maps/start.map") if Map:Load(mapfile)==false then return end box=Model:Box(2,2,2) box:SetColor(1, 0, 0, 1) box:SetPosition(5.0, 3.0, 0.0, true) box:SetRotation(Vec3(57.250671, 9.541766, 114.50135), true) while window:KeyDown(Key.Escape)==false do --If window has been closed, end the program if window:Closed() then break end --Handle map change if changemapname~=nil then --Clear all entities world:Clear() --Load the next map Time:Pause() if Map:Load("Maps/"..changemapname..".map")==false then return end Time:Resume() changemapname = nil end if window:KeyHit(Key.L) then next_rot = Vec3(57.493263, 9.582211, 114.986526) rot = box:GetRotation(true) diff = next_rot - rot box:SetRotation(next_rot, true) System:Print(next_rot) System:Print(rot) System:Print(diff) System:Print(box:GetRotation(true)) end --Update the app timing Time:Update() --Update the world world:Update() --Render the world world:Render() --Render statistics context:SetBlendMode(Blend.Alpha) if DEBUG then context:SetColor(1,0,0,1) context:DrawText("Debug Mode",2,2) context:SetColor(1,1,1,1) context:DrawStats(2,22) context:SetBlendMode(Blend.Solid) else --Toggle statistics on and off if (window:KeyHit(Key.F11)) then showstats = not showstats end if showstats then context:SetColor(1,1,1,1) context:DrawText("FPS: "..Math:Round(Time:UPS()),2,2) end end --Refresh the screen context:Sync(true) end
-
There's no FBX file attached. Check the material for the weapon to make sure that it has the animation shaders.
-
Nothing wrong with overly ambitions projects as long as the person has the drive to continue to work on them. Anything is possible given enough time. Except for maybe time travel.
-
Windows 10 AMD Radeon R9 280X Updating the project fails with "Failed to copy the libsteam_api.so to the project directory.". I suspect updating the shaders would fix the rendering. The editor renders just fine. -------------- On another note, I don't see why it's trying to use the .so. A .so is a Linux binary shared object. WHich exists on the file system in the Linux folder, but it shouldn't be used in my project. I have yet to delete Leadwerks and re-download it
-
I am on the leadwerks beta branch. When leadwerks updated I lost my rendering of my game. I've updated my drivers and I still get a black screen. So I decided to update my project. When I go to the project manager screen and click update, I get the error as stated "Failed to copy the libsteam_api.so to the project directory." I will PM Josh the download to my project. Although if there's a solution without dowloading it that might be best. It's 11GB uncompressed.
-
I believe @Drarem is trying to do 2d game rendering in Leadwerks. Leadwerks isn't really designed for 2d. It could do 2d games, but it would require additional programming on the users end to work with 2d concepts. You're not going to have to worry about double buffering or any of that with leadwerks. The best way to do 2d rendering in leadwerks in the way that you're wanting to is to use this Camera::SetProjectionMode Then to render your objects as a sprite. http://www.leadwerks.com/werkspace/page/api-reference/_/sprite/
-
Here is an updated version to multiplayer. If anyone is interested in learning how to get multiplayer in their game, feel free to message me! Leadwerks doesn't offer networking at the moment, so you'll need the C++ version to work on Multiplayer. For my server I am using Golang using TCP and UDP sockets. UDP for player position, TCP for player connections and chat.