Jump to content

gamecreator

Members
  • Posts

    4,937
  • Joined

  • Last visited

Everything posted by gamecreator

  1. What function(s) do you need to call to end a Leadwerks program properly? I ask because my program runs and exits fine but when I record it with OBS, it freezes then crashes on exit. It gives me the impression that I don't clean up properly but maybe Leadwerks and OBS just don't get along on my system (anyone else have this?). My current exit is simply the one from the examples: if (window->Closed() || window->KeyDown(Key::Escape)) return false; Do I even need to release all the loaded entities before quitting? The map? Sounds/music? Or does Leadwerks handle this? Super low priority but was just curious.
  2. I kind of hope you get cars working, partly because I'm greedy and would love for your settings to be shared with the community (including me!). Plus it seemed like Josh's post helped you ID the proper values yesterday. But I'm sure you already put in a lot of time so don't kill yourself over it. A randomly generated marble game would with tracking and high scores would still be pretty sweet. And of course the ghosts.
  3. For the Winter Tournament I'm going 3D. I created a simple custom plant (vegetation) for an alien world.
  4. Sure enough, this ended up being the issue. Thank you very much again, macklebee.
  5. Thank you. I'll take a look at the settings on the map light. Seems like that might be the problem. And I'm probably not clear how dynamic is defined. I have rocks breaking (manually moved/rotated children) and the moving/rotating pieces animate shadows on the ground. I looked at your link but will re-read the descriptions with a clearer head. As for the bool: sorry. It's a quick copy and paste job for this tournament from an attempt at a multiplayer game. The host would create a controller but the clients wouldn't (they would just position the character where the host tells them to).
  6. So this is my code: void playerclass::initialize(float xx, float yy, float zz, int which, bool localplayer) { x=xx, z=zz; controller = Pivot::Create(); model = laserred = laserblue = sphere1 = sphere2 = NULL; model = Model::Load("Models/bot/bot.mdl"); if(!model) { MessageBoxA(0, "Loading bot model has failed. Exiting.", "Error", 0); exit(1); } model->SetPosition(0, 0.5, 0, false); model->SetParent(controller, true); model->SetRotation(0, 180, 0, true); model->SetShadowMode(Light::Dynamic, true); laserred = Model::Load("Models/bot/laserred.mdl"); if (!laserred) { MessageBoxA(0, "Loading red laser model has failed. Exiting.", "Error", 0); exit(1); } laserred->SetPosition(0.0, 0.39, 0.58, false); laserred->SetParent(controller, false); laserred->Hide(); laserblue = Model::Load("Models/bot/laserblue.mdl"); if (!laserblue) { MessageBoxA(0, "Loading blue laser model has failed. Exiting.", "Error", 0); exit(1); } laserblue->SetPosition(0.0, 0.39, 0.58, false); laserblue->SetParent(controller, false); laserblue->Hide(); // These 2 spheres form a triangle with the laser origin // to detect rocks within the triangle sphere1 = Model::Sphere(); sphere1->SetPosition(-5, 0, 5); sphere1->SetParent(controller, false); sphere1->Hide(); sphere2 = Model::Sphere(); sphere2->SetPosition(5, 0, 5); sphere2->SetParent(controller, false); sphere2->Hide(); controller->SetShadowMode(Light::Dynamic, true); controller->SetPosition(xx, yy, zz, false); controller->SetMass(1); controller->SetPhysicsMode(Entity::CharacterPhysics); } The only light in the scene is the one that comes by default with a map you create. If I add my own light then a shadow does appear. But if I remember right, you're not supposed to have two directional lights in a scene. I'll see what happens if I take out the one that came with the map...
  7. I'm trying to have my character have a shadow when parented to a controller. However, he is not animated. The shadow appears fine if I load him alone with just: Model *model = Model::Load("Models/bot/bot.mdl"); However, when I parent him to a controller, there is no shadow. I've tried: controller->SetShadowMode(Light::Dynamic); which worked with my animated characters in other projects but not here. I've also tried to add the second argument (recursion) with both true and false. I also tried the same with the model. The model itself has no children. I also tried: player.model->SetParent(NULL, true); and while that frees it from the controller, it doesn't get a shadow back. Also gave parenting another model to a controller a shot. No shadow also. Any thoughts? (I feel like I could get it to work if I add some bones to the character and pretend to animate it and switch the shaders to animated.)
  8. The number of hours you use Leadwerks is stored as an unsigned long. You get unpredictable results once you exceed the maximum value.
  9. It would be so nice to finally have this in! In theory this will be ready for the next tournament but that's up to Josh when 4.3 comes out. Fingers crossed.
  10. He said the people he took it to could get 900 series to work. I assume they used the same power supply.
  11. I meant that there's also keyframe-only animation in Max, like shown around 1:15 (not tied to bones). The Max exporter has a lot of options and I tried several of them but I couldn't get it to animate and the 2016 FBX Leadwerks couldn't convert at all. I'm a little surprised that UU3D could export the model animation without bones (the top opening and that thing coming up is not attached to bones). But there may be some exporter setting combination we're missing (checking or unchecking the animation checkbox didn't change anything).
  12. Yes or code the movement yourself. You can move children independently with code if you want with something like: entity->GetChild(0)->SetPosition(1,1,1,true);
  13. Thank you! It worked. I did have it recursive but I didn't know the Color::Diffuse would be required for it. Appreciated! (I wonder if it might be a bug since SetColor(1, 0, 0, true) works on parent-only models.)
  14. I looked at your Max file. You don't have a skinned mesh set up. Leadwerks animates using skinned models via bones. I'm pretty sure it doesn't support keyframe animation. You would need to use the Skin modifier to attach and animate bones on a model.
  15. Latest 4.2 LE shader. All it had on it was diffuse but now I've added normal and specular and also shadow. None of it changed anything. I've uploaded the rock here, if someone's curious: http://www.mediafire.com/file/p7xbdgq0bk9a1dw/rock.zip (It was free on Turbosquid.)
  16. This is kind of random but any idea why SetColor would work on some models but not others? Is there a material setting requirement? With this code: Model* model = Model::Sphere(); model->SetPosition(-386.159, 35.252, 251.961); model->SetScale(0.1, 0.1, 0.1); model->SetColor(1, 0, 0, true); player.model->SetColor(1, 0, 0, true); rock[0].model->SetColor(1, 1, 0, true); rock[1].model->SetColor(1, 0, 0, true); rock[2].model->SetColor(1, 0, 1, true); rock[3].model->SetColor(1, 1, 1, true); the sphere and the player model turn red but the rocks in my scene don't change colors, though I can move them, hide them, whatever else. Not sure what the problem could be. Not a big deal but I was gonna change rock colors as a debug method when they're within laser range.
  17. I might be a little more hopeful that Josh can commit to this now with an ETA sometime next year.
  18. I was thinking of using the map load hook to remove rocks in a map and replace them with my own since they need to be interacted with (broken apart). Something like the following: void MapLoadCallback(Entity* entity, Object* extra) { std::string text = entity->GetKeyValue("name"); if(text.compare("rock")==0) { Vec3 pos; pos=entity->GetPosition(); entity->Release(); // Create new breakable rock here at pos } } I know people have used this hook to create progress bars and I think Josh said that it wasn't intended for that. So I wonder if this is something that might screw up my program. I haven't tried it yet but before I code it in, I was wondering if this would be ok to do. The other option is to use ForEachEntityInAABBDo and specify the entire map. Not sure if that would be slow. Thoughts or other options?
  19. Depends on his system. HDs and fans and such add up. But I agree that it's probably not the issue.
  20. The main song was a 24MB WAV. It ZIPs to 22MB. As an OGG it's 2MB and it ZIPs to the same size. In other words, the download could have been 12MB instead of 32MB. And that's just a small tournament game with one song.
  21. gamecreator

    evp.h

    I ran into this too. You need to change the working directory. For some reason that doesn't transfer over properly. Right-click on your project name on the left, click Properties, Debugging and fix the Working Directory. $(SolutionDir)..\..\ worked for me.
  22. Josh suggested it might be the cables but if you tried the new then old then new again, I suspect those are probably ok. Also, depending on the rest of your system, you might be cutting it close with your power supply. This page suggests 400W minimum. Then again, maybe you got unlucky with a defective card.
×
×
  • Create New...