Jump to content

f13rce

Members
  • Posts

    510
  • Joined

  • Last visited

Everything posted by f13rce

  1. Ah yeah, FindPath() does return a NavPath. Now all I have to do is to find out how NavMesh works. Edit: World* world = World::Create(); NavMesh* navMesh = world->navmesh; NavPath* path = new NavPath(); path->navmesh = navMesh; path = path->navmesh->FindPath(pivot->GetPosition(true), Vec3(10, 0, 10)); Seems to work. When I add this debug for loop: for (int i = 0; i < path->points.size(); i++){ cout << i << ": " << path->points.at(i).x << ", " << path->points.at(i).y << ", " << path->points.at(i).z << endl; } I get the following result: 0: 0, 1.75, 0 1: 8.25, 1.75, 5.5 2: 10, 1, 10 Sooo it seems to work! All I have to do now is making the unit move from waypoint to waypoint. Thanks for the help! Final edit: Results are in... and wow. With my PC the FPS would drop to 1 FPS after 64 units spawned using physics and GoToPoint().. With the new way of pathfinding I get 1 FPS after spawning 1135 units who don't use physics anymore. That's about 94% increase in FPS in general. Thanks again!
  2. I see, thanks for the hint. I also saw from the post Rick linked you had a variable called "path" from the type NavPath. How did you assign the path the variable should be using?
  3. Thanks Rick. I'll try to mess around with it.
  4. Sounds like a great solution! Although, do you still remember where you can find that post? I've done a quick search through the forums and documentation but I couldn't find anything related to that specifically. I'll keep searching though.
  5. Thanks for the comment beo6. It's running fine if I don't add any sort of physics, but then I can't make use of the GoToPoint() function as navigation. So I'm kinda stuck here. I've already set the graphics on its lowest settings. Disabled everything that wasn't necessary. It's really the physics taking the FPS down while I don't need it aside from the navigation.
  6. Hey everybody, I'm still working on that game where you capture bases and spawn fighters. I've been struggling for a while with my laptop because too many units (fighters) cause an insane drop of FPS. Fortunately I know this time that my code is no big mess like it was back when I made Ravage (oops). It seems that the physics I had to apply with the navigation was bringing it down a lot (~120 FPS to ~5 FPS with 32 units on the field (tested on my laptop (specs below))). So whenever a unit is being created, I use the following lines to move it towards a position: model = Model::Box(1,1,1); pivot = Pivot::Create(); pivot->SetPosition(0, 0, 0); model->SetPosition(0, 0, 0); model->SetParent(pivot); pivot->SetMass(1); pivot->SetPhysicsMode(Entity::CharacterPhysics); pivot->GoToPoint(10, 0, 0, 3); //Doesn't get called every update. Only when initialized. Unfortunately, GoToPoint() does not work anymore if you comment out the SetMass() and SetPhysicsMode(). Neither does it work to replace Entity::CharacterPhysics with Entity::RigidbodyPhysics (which makes sense though). I've included the source of the testproject to check the FPS. Just make a new C++ project and replace the files with the ones in the attached .rar file. I used Fraps to display the FPS. --- Even if I can't disable the physics, is there any way to improve the FPS nonetheless? I'm not calling GoToPoint() every update or something like that, so that doesn't seem the problem. Laptop specs: OS: Windows 8 64bit CPU: Intel Core i7 Q720 @ 1.60GHz (8CPUs) Memory: 6GB RAM GPU: Ati Mobility Radeon HD 5400 Thanks in advance Edit: I should also note that I don't need any physics. The landscape is flat and the units only need to be on one constant Y position. I only need the navigation. TestprojectSource.rar
  7. Try updating your project via the project manager, worked for me. Make sure to backup your project though.
  8. Since the terrain patch GoToPoint() seems to have stopped working. I have made a new NavMesh but it still doesn't seem to work. It's happening for both the terrain and basic shapes.
  9. Thanks for the comments so far, I really like seeing this topic evolve. I'll take a good look into Flexman's advice with the shader. I've never made a shader before so this will be fun. Every area is ~50% bright by default because of the fog of war. The fog becomes invisible if the player (or a friendly unit) is near.
  10. A gameplay video with my commentary:
  11. Hi all, So I'm currently making my RTS/MOBA game.. Now I'm kinda stuck at making Fog of War. Honestly I have no idea how to make it. I was thinking about making a plane make surfaces fully transparent whenever a friendly unit is near, but I'm sure some of you know a better way to do this. The fog of war always needs to be a bit transparent so you know what's in that area (like trees and such). Basically like this: Any ideas how to make fog of war in Leadwerks 3?
  12. Placeholders only, everything still subject to change..... but at least the core gameplay is mostly working
  13. Hi all, Was kinda wondering how I can obtain the 2D screen co-ordinates from a 3D world point. I'm currently needing this for the UI in my game. I want to draw a line from my mouse to an object in my world using Context::DrawLine(). Anyone have a clue how I could do this (in C++)? Thanks in advance!
  14. Can't show much of the working project yet because of placeholders / uninformative HUD, but this may give you an idea of what I'm making I wrote on it with my remarkable writing skills to make things clear; V is for village which you can capture and the X is for the wildlife to spawn.
  15. It's fine to use it for another check.
  16. Maybe that's why I got stuck as well. I couldn't find a page of it either.
  17. Sorry for the late reply, internship kept me busy. I've tried it again and even Darkness Awaits does the same. The window that gets made after hitting 'Run' in the editor makes it pop behind the task bar. At the moment simply fixed it by auto-hiding the task bar. It's just a small QoL change if this can get fixed though with little priority. @Raul Oh, you
  18. Screenshot basically shows it all. I don't have this with Darkness Awaits. How can I quickly fix this? Cheers, Ivar / Evayr
  19. f13rce

    Launch Day

    This is amazing. Can't wait till I get home
  20. I know some people who make free royalty-free music, they release it on their YouTube and website. You can even request some music if you'd like. They're pretty good.
  21. I'll start porting my LE2 project to LE3. I can't wait to try out the pathfinding, it's so much use for the game concept I have now. I'm making a MOBA, but I've voted for RTS since that option isn't there. Can't wait haha
×
×
  • Create New...