Jump to content

YouGroove

Members
  • Posts

    4,978
  • Joined

  • Last visited

Everything posted by YouGroove

  1. Hi, I use pick(), it works, but only when the mob is facing the player. The problem is when using GotoPoint() the mob don't faces the player, and calling Pick() even with good spheres debug position , Pick don't work. I put a red and blue sphere to see pick start and pick end. function Script:RaycastPlayer2() self.debugSphere:SetPosition( self.target:GetPosition(true), true) self.debugSphere3:SetPosition( self.entity:GetPosition(true), true) -- disable model picking self.entity:SetPickMode(0) local world = World:GetCurrent() local pi = PickInfo() if (world:Pick(self.entity:GetPosition(true), self.target:GetPosition(true), pi, 0, true)) == false then return 0 end -- did we hit our target? if pi.entity == self.target then return 1 end -- we hit something else return 2 end The pick is called every frame at beginning of UpdateWorld. Why it don't works when the mob is facing another direction ? This is driving me nuts.
  2. I would need it, i don't see the wireframe of BSP to align perfecty the column squares to existing floor and roof boxes (it is faster in top view than navigating on 3D viewport for BSP manipulation)
  3. If i use Navmesh edge lentght = 50 , i have similar results as Olby, he has cubes pattern also for the navmesh. Edge lenght don't change square polygon size, it just change how much vertex you will have around objects. The idea was be able to choose the size of the base squares generated. It's a suggestion only, having the character going somewhat far away and switching to simple forward move when the player is on the line of sight is a solution meanwhile.
  4. Try some last game with full settings and tell me you have the same frame rate when you change resolution ? 1280*1050, medium settings, no scripts : 38 fps (compared to 60 fps in 1280*1024 with two script running) I let it down, i'll make tests on the desktop computer, but like previous tests, i will have a noticeable frame rate drop i think. I'll continue on the game, i'll ask Josh if something can be done for performance if things get even worst, or i'll try a different game mode and view.
  5. Latest beta build for testing also, the edge lenght don't change the basic squares size. On your map you have only 4 big squares, your map is smaller than mine.
  6. Is there any bottleneck problem in LE3 with ressources priorities and allocations or GPU ? - LE3 alone : 30 fps (1368*1024) - Crysis and LE3 : LE3 drops down to 10 fps I'm not asking LE3 to perform like a big team made engine as that don't make sense. But on a same PC laptop , i would expect LE3 in medium settings with some BSP cubes, to have higher frame rate than Crysis using higher graphics both on simple maps. LE3 at 1280*1050 with medium settings. Like i said, i have several solution for the game in case fps would not go high, so it's not a problem, i'm more curious, why resolution has so much impact on some empty BSP level ? I think it is some bottlenecks in LE3 that can be improved ?
  7. Hi, Does someone uses higher resolution than 1024*768 ? Is the frame rate staying good ? I'm testing on my laptop and i have a solid 60 fps within 1024*768, and when i put 1368*1024 or 1600*900 the frame rate drops from 60 to 30 while the level is pretty basic. I'm ok if the final game stays at 30 fps on higher resolutions. But having the frame rate already lowering while the level is empty without full screen effects or water, i'm not sure it will be able to keep 30 fps on the final game ?
  8. Documentation, that matters a lot, that's good.
  9. Hi, I was trying navmesh and AI and i fond that path calculation is based on vertex. The problem is withing open areas the squares polys of navmesh can be too big for some small to medium maps, and the character will take a long path to reach the player : http://www.leadwerks.com/werkspace/topic/11959-gotopoint-shorter-path/ Could it be possible to have a new option on navmesh generation to tell the size of the squares we want to be generated ?
  10. We could implement that in LE3, launch a special game mode that would raycast from top to down on the level and store hit point height in some big array. The complex thing is to calculate the shortest path from a position to another. Navmesh generated is clean : If we could adjust navmesh generation to generate smaller cube regions navmesh would get more precise ? I placed more objects on the map to generate a new navmesh with less open areas, it helps ot have shorter paths as navmesh will take closer vertex on the map to reach the player. The solution is combining : - adding obstacles on the map to not have too much open areas - using simple forward movement when the player is visible on the line of sight The best would be an option to tell the navemesh to generate smaller square patches. Another test, and navigation was really going in circles, that's strange as there is navmesh vertex really closer to the player.
  11. Hi, Using GotoPoint(), i have a mob that makes big circles sometimes when the player is on the opposite side of some obstacle. Does anyone have experienced that ? Is there a way to have a shorter path ? I know MonsterAI.lua checks if the player is visible directly and just no more uses navigation, but a simple forward move, but it is not possible to have a shorter navigation path ?
  12. Thanks I will ask on suggestions a new Lua editor i think to avoid that style of problems.
  13. The two first methods works when i launch the game , when i comment and try Point() it crashes. local pos1 = self.entity:GetPosition(true) local pos2 = self.target:GetPosition(true) local v = Vec2() v.y = pos1.x - pos2.x v.x = pos1.z - pos2.z local angle = Math:ATan2(v.y, v.x) --self.entity:SetInput(angle, 0) --self.entity:SetRotation(0, angle , 0) self.entity:Point(self.targert,2,1) Must be my system or some cache memory or some restart needed. If someone can test with Lua ?
  14. Nope Rick, Otherwise the mob would not be chasing my player when i run the game. It's a field where i drop player entity : Script.target=nil--entity "Target"
  15. Some insight on AI work. ------------------------ Mob AI : Each time you are no more in the line of sight of a mob due to some obstacle or cover, it will try to move to your position. When you are in the line of sight , they simply fire at you. When they are in attack mode , they can use two sensors, left and right for : - Strafing left or right when the player hit them instead of staying static - Choose another position if some mob have another mob in it's line of sight. ---------------------------------------- Mobs Melee on player : Another one is the melee management positions. When the player is attacked the mob will choose some available position slot : Left, Right, Front , Back and just call GotoPoint() , the Player registers that the slot is no more available. The next mob wanting to attack at melee will have to pick a free available position slot , if there is no available position it will wait. This system is usefull to avoid many problems , like mobs that collides between them and can't reach the player, and also allows you to control how many willl get very close to the player and let other mobs come near but wait at some distance until a position is available so they can get closer and attack. ------------------------ Level covers management : During gameplay for each level there will be some script managers per zone (pivot object) , that will manage many things and also the covers of the zone. Above the yellow is a building , and the three pivots are the potential covers. Each second the manager script will raycast from each cover to the player position and will register what are the positions that can cover the mobs against the player fire. Each mob needing a cover will ask the manager script what are the cover points where it will go. -------------------- For AI, i find better looking at some videos : - AI cover surfaces - Smart objects It's not a revolution, but something i plan to make in LE3 game
  16. I found a working solution : http://www.leadwerks.com/werkspace/topic/11840-animation-models-tutorial-request/page__hl__tutorial function Script:RaycastPlayer2() -- disable model picking self.entity:SetPickMode(0) local world = World:GetCurrent() local pi = PickInfo() if (world:Pick(self.entity:GetPosition(true), self.target:GetPosition(true), pi, 0, true)) == false then return 0 end -- did we hit our target? if pi.entity == self.target then return 1 end -- we hit something else return 2 end
  17. Hi, To point some entity to another i have some few solutions : 1) http://leadwerks.wikidot.com/wiki:face-entity 2) call SetInput(rotation,0) 3) Point() function Trying Point() function it makes crash LE3 ? if self.mode == "attack" then self.entity:Point(self.targert,1,1) end I use axis Y as rotation so second argument is 1 and i put 1 on third argument for the speed of rotation. Does someone have any idea on what i'm doing wrong ? ------------------------------------------ This function points an entity at another entity. Syntax void Point(Entity* entity, int axis = 2, float rate = 1.0, float roll = 0.0) Parameters entity: the target entity to point towards. axis: the entity's axis to orient. This may be 0, 1, or 2, for the X, Y, and Z axes, respectively. rate: a multiplier to indicate how quickly the entity should orient itself. roll: the rotation around the specified axis.
  18. The main problem i have is the ray, it detects the player, but it detects the player throught BSP walls ? What means that in the doc of Pick() It's not very clear. True means one collision only is returned, the first closest collision that happens False means all collisions will be returned
  19. I'm someone very practical , less theoric I use 3D coat and Substance painter : main PBR methods are roughness and metalness, i like that way of working as i can create any variety of surface, more roughness and less metalness will be visible but will keep a metal effect. What matters is that you find the method that suits you, if you prefer specular go for it. I was mainly pointing that metalness is not 0 or 1 but a variation between 0 an 1 (black and white bitmap if you understand better)
  20. Thanks, i was seeking in preferences, but it was hidden at bottom
  21. I didn't attach the child object by code , instead i just drag and drop the object as child in the scene view. Using Align it don't rotates the child.
  22. Hi, In Script folders , i see all scripts from sub folder, i don't want that, i didn't find any options. Does someone know how to display real content of script folders ?
  23. You could even optimize more : if bullet.x < ship.x - (ship.width) SetColor (Red) if bullet.x > ship.x + (ship.width) SetColor (Red) if bullet.y < ship.y - (ship.width.y) SetColor (Red) if bullet.y > ship.y + (ship.width.y) SetColor (Red)
  24. @BES : Try a real modeler, you will work better and faster. @Dan22 : Snoop is copyrighted, but if you call him , who knows he could perhaps even sponsor your game
  25. I would also like to debug on entities that are not associated with camera and that are using Raycast and a real 3D line is possible. Anyway i could debug better with your method, but the raycast passes through BSP , i would expect the ray to return the first collision, and when it's BSP that is first collision , the Pick should not find the player character then. I just need les theoric tutorials and more gameplay practical examples
×
×
  • Create New...