Jump to content

gamecreator

Members
  • Posts

    4,937
  • Joined

  • Last visited

Everything posted by gamecreator

  1. Posted an issue I have here (not Blender related though).
  2. This is in the programming forum so I assume he's looking for how to do it by code (maybe changing terrain materials while program is running).
  3. Just the one that Leadwerks activates when you add water to a scene. If you move the camera underwater, there is no blue/swaying effect at all. By the way, shadmar uploaded a version to dropbox some months after that discussion Thirsty Panther linked. The post is here: https://www.leadwerks.com/community/topic/10334-day-and-night-cycle-shader/?do=findComment&comment=106706 I believe that's the latest version but someone let me know if that's not the case.
  4. I think this is the post you a referencing: https://www.leadwerks.com/community/topic/17103-infiniteviewrange-navmesh-issues/?do=findComment&comment=111417 I only noticed the strange navmesh generation by code but could easily have other negative effects. To be fair, SetWorldSize is undocumented though BuildNavMesh is official.
  5. Oh ok. I'm not sure what that one is meant to do but I noticed that it's not under the Post Effects folder (if I add it to a scene in the editor, it seems to stop updating). I've been using one that shadmar shared online and possibly on the workshop.
  6. To be clear, you're talking about one you found online, right (since the one that comes with Leadwerks doesn't do underwater)? Can you link to the one you're trying to use?
  7. It's a post effect you can attach to your scene or active by code. Fair warning that the one that comes with Leadwerks doesn't (or didn't) have an underwater effect so it looks bad when you're underwater. You can find one I think on the workshop or on the forums from shadmar that includes that too.
  8. Asset::CreateNew also works so far but when I last dealt with this I think I had some issue when I tried to assign different materials. Only copy seemed to work for that. I don't know if in that thread I didn't notice that I had an extra copy or what. Thank you for the help!
  9. Thank you for the suggestion Ma-Shell. The copy trick from an entity ended up working: Model *temp=NULL; temp=(Model *)Model::Load("Models/level/ground.mdl"); groundmodel=(Model *)temp->Copy(true); temp->Release(); It's weird to need to do this and hopefully Josh or someone else can also chime in on this but I guess I got my workaround for now.
  10. My understanding of the function was that it would load a single model as a copy instead of an instance, so you could modify just that copy. It makes no sense to me for it to load 2 copies into the groundmodel variable and that I then can't even interact with the first one (if I do groundmodel->Move, for example, it only moves the second loaded model). If you do this multiple times, you'll have twice as many models as you need. And this still doesn't explain why Release doesn't release both of them. The number of entities keeps going up, every time I run that function, even though it should in theory clear both. Edit: I'll try to see what happens if I do an entity copy instead of an entity load. Thanks for the suggestion.
  11. I'm trying to load a model as a copy instead of the default instance but for some reason it loads in twice. if(groundmodel!=NULL) { groundmodel->Release(); groundmodel=NULL; } printf("entities before: %d\n",world->CountEntities()); groundmodel=(Model *)Model::Load("Models/level/ground.mdl")->Copy(true); // groundmodel=(Model *)Model::Load("Models/level/ground.mdl"); printf("entities after: %d\n",world->CountEntities()); However, if I comment out the Copy line and uncomment the one below it (instance load), it works as expected. Is this a bug or am I doing something wrong?
  12. I think there was a thread on this before; don't know if you already searched.
  13. Oh, I thought you meant just visually.
  14. You can do that in the editor under View, Show Navigation.
  15. I don't know your specifics but recently I had a crash when I loaded a different model in my game. The issue ended up being that I was trying to manipulate an attachment via code that the new model didn't have. In other words, make sure you're not trying to access a model (like a gun) that your new models may not have. Just a thought; could be anything though.
  16. Pretty much. You can have the client send an ID # you made up as the very first packet after they connect. If the host receives this number, it accepts the client into the game. Otherwise, it doesn't let them play. They'll still be in the lobby (I don't think a host can remove a client from a lobby) but you treat them as if they're not.
  17. The other fun end of that, which happened to me, is when random people join your lobby while you're testing, since their programs don't test for any keys you may set. ?
  18. Pretty sure it's automatically just your Steam ID it deals with. The post here should answer your second question but I don't know about the third. You can do it if you use the Steam SDK (already incorporated into Leadwerks) but it's a bit harder.
  19. Sounds like you're looking for the SetRange command but check out the other Source commands too.
  20. Unfortunately I think Newton development broke vehicles in Leadwerks. Multiplayer seemed good in testing. Most important to me, Game Analytics is broken right now until Josh can get in touch with support there. The character controller is buggy in several aspects (but mostly works fine) as is navmesh generation by code. Probably a few other things I'm forgetting. I'm hoping Josh chooses to fix at least some of these for the next release.
  21. Worst case, since it's text, maybe we could inject that information via some quick code. But I'm sure you'll find an exporter first.
  22. Seems like it might. Not sure about the code part of it. The below image is an untextured triangle (exported from Max). I've also attached a zip with the FBX and MDL. vertexcolortest.zip Also worth noting that if you open my FBX in a text editor, you'll see the following section, describing the vertex colors (3 RGBA sets):
  23. Two issues (4.5 release): 1. I took the SetInput example code and added a jump and set the maxdecel argument to 0.01 so the character controller slides on the ground, as if on ice. However, while you slide and press jump (letting go of the directional button), jumping slows you down and stops you, while in the air (much faster than even ground deceleration would). 2. With acceleration/deceleration included, shouldn't the character controller slide while you try to change directions? Right now the below code lets you change directions instantly in any other direction. Worse, you instantly go full velocity in the new direction, even if it took a second or two to get up to full speed the original direction. I may be doing something wrong but these seems like bugs. #include "Leadwerks.h" using namespace Leadwerks; Entity* player = NULL; int main(int argc, const char *argv[]) { Leadwerks::Window* window = Leadwerks::Window::Create(); Context* context = Context::Create(window); World* world = World::Create(); Camera* camera = Camera::Create(); camera->SetRotation(35, 0, 0); camera->Move(0, 0, -8); Light* light = DirectionalLight::Create(); light->SetRotation(35, 35, 0); //Create the ground Model* ground = Model::Box(10, 1, 10); ground->SetPosition(0, -0.5, 0); ground->SetColor(0.0, 1.0, 0.0); //Create a shape Shape* shape = Shape::Box(0, 0, 0, 0, 0, 0, 10, 1, 10); ground->SetShape(shape); shape->Release(); //Create a character player = Pivot::Create(); Entity* visiblecapsule = Model::Cylinder(16, player); visiblecapsule->SetScale(1, 2, 1); visiblecapsule->SetPosition(0, 1, 0); player->SetMass(1); player->SetPhysicsMode(Entity::CharacterPhysics); while(true) { if (window->Closed() || window->KeyDown(Key::Escape)) return false; Leadwerks::Time::Update(); float move = (window->KeyDown(Key::Up) - window->KeyDown(Key::Down)) * 4; float strafe = (window->KeyDown(Key::Right) - window->KeyDown(Key::Left)) * 4; float jump = window->KeyHit(Key::Space) * 10; player->SetInput(0, move, strafe, jump, false, 0.05, .01); world->Update(); world->Render(); context->Sync(); } return 0; }
  24. Have you looked at this? https://www.leadwerks.com/community/topic/13308-development-with-c-and-lua-on-linux/
×
×
  • Create New...