CrudeMik's Recent Forum Activity

  • Hey,

    I have a project with these roaming AI which don't use path finding but instead each has collision sprites pinned to their body and they use those to check collisions against other physics objects and thrust away from them, here's a snippet of my code to show generally how I'm putting it together:

    I'm quite happy it all works well enough but I'm finding that with 8 / 12 / 16 AI in the scene my CPU is climbing up and up, I want there to be quite a lot of AI if possible so I'm wondering if there's better ways to achieve similar results.

    I'm using a lot of if this is overlapping blah blah to pick instances, where I'm betting there's a smarter way to pick these guys with UID's and the such but I can't think of how.

    Here's a video of them in action

  • Started adding AI to the game:

    AI seeks resources in asteroids, manages fuel and shares information within a network of docking platforms. The AI simulates player inputs to navigate the environment, they seek to assigned x and y positions and use collision polys to avoid physics objects. They can seek around objects as the left and right collides has a ‘last collided’ check on them which allows the AI to strafe when an object is detected in front of them.

    They try to conserve fuel where possible and when they have either started to run low or have collected enough data, they attempt to dock at the nearest landing platform.

  • Thank you R0J0hound - that works

  • Hi,

    I have this bit of code:

    I want instances of itself to be an 'obstacle' - I need some code where if object a is overlapping object b and also overlapping object b(not self) then do action

    This is all in aid of having AI that avoid obstacles and also each other - but I don't want to use Boids.

    Any help greatly appreciated as always

  • Interesting findings. I'm seeing a improvement by doing this (image below), though compared with the complex collision checks going on in the other event sheets, this is still taking up the most % which I don't quite get. As TiAm says though debug readings are not 100% accurate.

    Hasuak - yes I have very silly naming conventions haha.

  • nimos100 - I get you, yeah that makes sense I'll go through an optimize that way, turning off collisions on sprites that are just for background art for example?

    I like the distant object off / on example, I wonder how it works with physics, what's the difference between collision properties and collision box 2d?

  • nimos100 - shit! wow so is overlapping and trigger once it is then.

    I'm still getting creeping performance, only less severe, I'll keep poking at it.

  • nimos100 - is overlapping better?

  • ah I think it was the asteroids overlapping asteroids, destroy asteroids event that was doing it actually, I'm now using only 15% CPU at the start, will leave it running and see what happens.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Aphrodite

    Yeah I can't really figure it out, this is what's happening in the cluster main group:

  • Hey, I'm confused about something, check out this image, this is when launching my game:

    and this is after the game has been running for 10 mins, just standing still, stationary.

    I'm not sure if I'm reading this right, but I can't see what's adding to the event CPU% everything seems to increase maybe by 1 or 2 % which I can't figure out why yet, but that shouldn't constitute for a roughly 40% increase.

    In the scene, there's under 1000 objects but I'd say maybe 4 - 600 of them are physics objects using box2D

    I'm confused as to what could be causing the gradual increase in consumption. I have a few 'repeat x number of times' at the start of layout but after that not much.

  • mattb - I would be very interested in trying this. I guess with polygon plugin, there's no way to texture at all is there? What if it was like a texture mask, so a tiled rock texture that only shows on the polygons, then we use the outline colour of the poly to act as the outline for the texture, if that makes sense?

CrudeMik's avatar

CrudeMik

Early Adopter

Member since 29 Jan, 2010

None one is following CrudeMik yet!

Connect with CrudeMik

Trophy Case

  • 14-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

19/44
How to earn trophies