MyXpandaZ's Recent Forum Activity

  • Hello, I have a large plugin about 5000 lines of code. How can I get this plugin to work with advanced minify I realize I can use ['name'] something like that but that would take hours, is there an easier way?

    Tagged:

  • R0J0hound Hello! Can you tell me if your example can be bound to deltatime? There are some controversial points and I don't know how to do it better. Thank you very much for what you do!

    P.S. Sorry to still torment you with my questions and requests, but you are a pro! I wanted to ask you how do you think it is possible to improve performance if you consider the logic for characters outside the screen differently?

  • Ashley Yes, it seems very effective, but here, for example, objects are static and do not interact with each other. For example, we tried to use the example from R0J0hound(https://www.construct.net/en/forum/construct-3/how-do-i-8/avoid-overlapping-sprites-178823), it works more efficiently than physics, but it is still not able to produce 60 fps at 1000 objects on my PC, while your test with pigs my pc can withstand at 50k objects.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • WackyToasterYes I'm sure of it, there are really a lot of enemies, on the first level with about 10 minutes they go thousands, it certainly does not work perfectly there are also lags, but there are a lot of objects! And thanks for the tips, we will try to apply a lot of things to get good results!

  • WackyToaster I know, it does sound intimidating. But for example, survivor io can handle several thousand enemies. I think this can be achieved, and we will try to get to at least 700 enemies, we are trying to find a way, maybe Ashley can tell us something.

  • Ashley Hello! Thank you, we've already done it and we're testing it now. We're just trying to create a game that can handle 1000 moving objects decently, we've already used a few solutions, they were more efficient than the box2d physics, but still very bad on weak devices. And honestly c++ is our last option, we don't know what to do anymore :(

  • Hi everyone, has anyone used c++ in construct 3? I suppose it is possible to do it through WebAssembly and js modules. If it is possible, it will be very good!

    c++ works more efficiently than js in several times (sometimes up to 10 times better), it can greatly increase the performance of games!

    Tagged:

  • R0J0hound I'm sorry to bother you again, I wanted to ask if there is any way to fix this? I'm using your formula to move

    gifyu.com/image/S4J9k

  • The non-behavior way is to compare the distance between each pair of objects and push them apart and update their velocities if they are two close. That doesn't scale well with such a large amount of objects, so we need to do some kind of spatial hash so we only need to check objects that are nearby. Unfortunately if doing it with events it's hard to get that much of an improvement so JavaScript is better.

    Here's one possible test of that. It handles one object type and treats them all as the same size. Disable the group to compare performance with the physics behavior.

    https://www.dropbox.com/scl/fi/ja4hfo7dv9sqq7phs1q25/spatialGridJS.c3p?rlkey=heo2ewlpffq6n6kwusnnefdk8&dl=1

    With 1400 objects:

    Custom push out: 60fps

    Physics: 10fps

    The example also does it's own physics, but you can just use the spatialGrid() function if you just want push out.

    That's really cool! Great job, but can we make the sprites chase another object? I tried it, but it looked weird to me. I'd love it if you could tell me more about your project!

  • You can try to use custom movement behaviour to make them move towards player and solid behaviour to avoid overlapping, probably it will work properly

    Can you elaborate on that? I tried it and it seems solid doesn't work with custom movment. Custom movment has a push out action solid in that case works, but enemies are teleported instead of pushed.

  • Hi! I want to make a game like vampire survivor, now I am working on the enemies on the forum I found a very good example

    construct.net/en/forum/construct-3/how-do-i-8/move-enemies-vampire-survivors-171628

    But the problem is that this example uses physics behavior that very negatively affects the performance of the game, it is very hard for cell phones to process at least 200 such enemies.

    I tried instead of physics to use bullet behavior, it works well, and has a performance ten times better. But in this case, the enemies overlap each other. If the solution to this problem?

  • I think I made an updated version, that fixes some issues and has better performance a while back but I never posted it here, only in the discord:

    it should be this one:

    https://drive.google.com/file/d/1xL7J-6fcYV0DROR24FHLW_w1j78QgD4a/view?usp=sharing

    version with pathfinding: https://drive.google.com/file/d/1YYAZbvwfxjkVCD5ZpBJWaqBB15qI-DaG/view?usp=sharing

    That's really cool! What did you change in the physics example that made such a difference in performance?

MyXpandaZ's avatar

MyXpandaZ

Member since 17 Mar, 2022

None one is following MyXpandaZ yet!

Trophy Case

  • 2-Year Club
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

5/44
How to earn trophies