Jump to content

martyj

Members
  • Posts

    544
  • Joined

  • Last visited

Everything posted by martyj

  1. My hardware: CPU: AMD Ryzen 7 1700X GPU: Nvidia 980 TI. I modified by build process to optimize the build for speed and removed debugging information, and this doubles the FPS to 30-45. But considering my GPU I would expect a much higher FPS. My screen resolution is 95% of 1080p. Dropping my resolution doesn't help with framerate as well. Polygon count: 500k Shadow polygon count: 420k Batches: 520
  2. @Thirsty Panther I've gone over that post often. The problems I am experiencing do not seem to match any of the issues listed.
  3. My game has really low frame rates. Between 14 and 24 fps. I profiled my game today and the GPU utilization and CPU utilization are super small. https://imgur.com/a/IOxg4 This makes me think the bottlekneck is either memory bandwidth or PCI Express bus restrictions. Any ideas on how I can resolve these performance problems? Thanks, Marty
  4. The server might have a firewall rule in place.
  5. For one off linux programs I usually just do gcc executions myself. You could do a makefile. To get it to install on Linux I would install libenet-dev Then make this code change #include "enet-1.3.1/include/enet/enet.h" -> #include <enet/enet.h> Then just run g++ g++ josh_enet_prog.pp -lenet Afterwards the program can be run via "./a.out" Passing a -o option to g++ you can specify the output name as well g++ enet.c -lenet -o myamazingprogram
  6. You could try compiling on the server itself. This way your library is linked to what is on the server instead of compiling on your linux machine and moving it up.
  7. I don't think PHP can execute a long running process like that. See this link: https://www.inmotionhosting.com/support/website/file-management/how-to-enable-ssh-through-whm
  8. Yea you would have to run that via a service. For a quick hack, I usually run programs like that via screen via the command line. I think web hosts that have CPanel also offer ssh access. I don't know though. I'd recommend a sleep of like 20 milliseconds. 5 seconds sleep would cause a lot of lag for connections and could cause dropped packets with a lot of clients hitting your server.
  9. If the game tries to connect to the IP via port 80, apache/nginx would handle the requests. Why are you running a program every 5 seconds? Why not just having it run consistently? If you're doing what I think you are doing you'd probably be best running a program as a Linux service using something like systemd. That way it can continuously run listing for connections and negotiating the NAT passthrough.
  10. You could run it via a cronjob. CPanel supports cronjobs I believe. Every 5 seconds is kind of too often for a cron task though. They have a once a minute setup, but you can fake it by running 20 of them with sleeps between each process call. Something like this: ./execEnet sleep 5 ./execEnet sleep 5 ..... For failures you could even setup to email you once upon failure. If you're looking for a dedicated server solution I recommend Linode. https://www.linode.com/?r=676ae2c48255ad95cf5ef53c0651f9c59d908541 For OS I recommend Ubuntu as it is the easiest to setup and maintain. I have a few dedicated servers that I run if you want to try some things without spending money. Hit me up in a PM if you're interested.
  11. I don't personally think the do-while loop is that useful. Hence why it hasn't been used. In my whole 6.5 years of professional software development, I can only recall using it once. The same code for Leadwerks is there as the easiest possible way to show an example of the desired method call such as Entity::SetPosition Complicating it with structures for learning purposes will just complicate these examples IMO.
  12. Would that be modifying VegiationLayer::filtermap? I assume vegetation is defined by an image with the same size as the Terrain's height map. If colored it would show that vegetation. 0 = no possible vegetation? Updating the vegetation texture would update the vegetation on the GPU? (Haven't looked at any shaders yet)
  13. So one thing I would like, if not impossible, is the ability to hide a specific item in the vegetation layer. For example: A player walks up and cuts down a tree. We could hide that instance of the tree and replace it with an instanced object to perform, say a dropping animation. Is this currently possible? Would be really useful for infinite based content to have all the vegetation intractable.
  14. Infinite terrain would be really cool, but how do you add infinite content to infinite terrain? It would be wonderful for a sandbox type of game
  15. 600 using model->Instance(true, false); on the demo project in my link.
  16. So switching from Copy to Instance only lets me load about 10% more. I think I need to implement a vegetation type system for these animals as no matter what, it will be using a ton of memory. Thanks for the help!
  17. Ah very well could be hitting the memory limit. I didn't think of the process as being 32 bit only having access to 2.3 Gb of ram. I'll try Instance instead. So as far as the vegetation system goes, for these items I'm only using the vegetation system for layout. Instead of manually copying an entity all over my map, I'll use the easy vegetation system to layout my entities. I'm running a 1024x1024 terrain size.
  18. In Leadwerks 4.4 when running Model::Copy on an entity several times the game will crash. The code: World* world = World::GetCurrent(); if (world->terrain == NULL) { return; } std::map<std::string, std::string> vegNameEntMap = { { "fallowdeer", "Deer" }, }; int vegCount = world->terrain->CountVegetationLayers(); for (int i = 0; i < vegCount; i++) { VegetationLayer* layer = world->terrain->GetVegetationLayer(i); std::string modelPath = layer->modelpath; std::string parentName = ""; System::Print(modelPath); for (auto it = vegNameEntMap.begin(); it != vegNameEntMap.end(); it++) { if (modelPath.find(it->first) != std::string::npos) { parentName = it->second; break; } } if (parentName.size() == 0) { continue; } // Hide Layer layer->viewrange = 0; Entity* model = world->FindEntity(parentName); if (model == NULL) { continue; } Vec3 scale = model->GetScale(); AABB aabb = world->aabb; std::vector<Mat4> instances; layer->GetInstancesInAABB(aabb, instances); System::Print("Loading Layer: " + parentName + " of Size: " + std::to_string(instances.size())); for (unsigned int j = 0; j < instances.size(); j++) { Mat4 instance = instances[j]; Entity* copy = model->Copy(true, false); copy->SetMatrix(instance, true); copy->SetScale(scale); } } The program seems to consistently crash around 1.7 GB of RAM used. If I replace the code in the loop with this it also crashes: Entity* copy = Model::Load(modelPath); copy->SetMatrix(instance, true); copy->SetScale(scale); You can download my project here: (200Mb) (Removed) I plan to use this code for having wild animals roam my land. Using the vegetation system to place different interactable entities such as Trees or Animals.
  19. The slope is always positive though. Depending on the angle between my Character and the Slope it could be a negative rotation positive one, or across the Z axis instead of the X, ect.
  20. Hmm, must have been the case. When I tested it with very rough terrain it works as expected. Maybe you might have some tips as to what I'm trying to solve? I'm working on a custom Character Controller to not use a lot of CPU. I'm trying to align an entity to the slope of the ground based upon its position. I plan on doing this in two phases. 1. If the Character is far from the player, but not far enough that it is clipped, I plan on using the terrain's normal for rotation. 2. If the Character is close to the player, use World::Pick to get the info based upon a possible model collision. To get the rotation for X and Z I do the following: Vec3 i = Vec3(1, 0, 0); Vec3 k = Vec3(0, 0, 1); double xAngle = 90-Math::ACos(i.Dot(terrainNoraml)); double zAngle = 90-Math::ACos(k.Dot(terrainNoraml)); this->GetEntity()->SetRotation(Vec3(xAngle, rotation.y, zAngle), true); I think the only thing left to do is to rotate the normal vector based upon the Character's rotation. Is there a better way to do this?
  21. Whenever I call GetNormal(x, z) on the Terrain object, it returns the same Vector of (0, 1, 0) Any idea on how I can get a normal for the terrain at a given point without using Pick()?
  22. http://web.archive.org/web/20130307233427/http://www.leadwerks.com:80/werkspace/page/documentation/_/command-reference/entity/
  23. That very well could be the case, but how do we know which functions to use? Is Entity::AlignToVector a physics function?
  24. I was wondering if anyone has any tips for debugging newton dynamics? My game is crashing when I call Entity::Turn on a Model that has Rigid Phsyics, box shape, and a mass of 60. Vec3 posit = this->GetEntity()->GetPosition(true); Vec3 navPoint = this->nextNavPathPoint; posit.y = 0; navPoint.y = 0; double angle = Math::ACos(posit.Dot(navPoint)/posit.Length()); this->GetEntity()->Turn(0, angle, 0, true); See attachment for my stack trace. I'll try workup a demo tomorrow which has the same problem.
×
×
  • Create New...