Tsardall's Recent Forum Activity

  • I have tried too and the CPU usage go hight when the camera is moving (in my test the fps where still very good despite the CPU struggling for some reasons)

    Also in debug mod without deleting/diseabling anything, its says that the draw calls take up 25% of the CPU but when removing literally everything else but the sprites, the draw calls are now taking 95% and the CPU is still used too 100%. So I am not sure whats the issue.

  • They have line of sight behaviour but I dont think its checking every thicks unless I made a mistake. Also I don t think a tilemap would work because its 1 object. I need all the sprite or tiles of the map to old informations like variables.

    Also I am using a 3d camera that moves could it change anything about the sprites updating?

  • I thought it was the line of sight behaviour that was causing the lag thats why I wanted an alternative to it,but now it’s probably that there’s to much sprite.

    I dont know I could change that since I want to be able to paint the map and larger sprite wouldn t look good.

    EXEMPLE:

    *Every cells are 5x5 pixels of resolution

  • It lags all the time and i think its only checking around the sprites having the “france” variable.

    So the issue really is the massive amount of sprite? Setting them to be non-visible outside the screen doesn’t change anything (it takes even more CPU) and changing the sprites for SVG image doesnt fix anything about lag.

    Also I can’t really reduce the amount of sprite because together they form the a map that change colour depending on the variable and each hold information so a tile map wont work since its only 1 object.

    Doesn’t it mean that a project like this one can t be done efficiently in Construct3?

  • Its only an event to activate what's below when the button is clicked.

    It's in a group. But i think the lag is caused because I have too much objectes (40'000 sprites)

  • The line of sight can see up to 8 pixel, so by checking if there's any sprite in its reach I can also insure that they are all within 8 pixel. Thats how I calculate the distance.

  • They are all the same sprite (but copied over) and they already change colour and variable when owned by any country via the eventsheets.

    Here's how it look:

    *Its only a small part of the map

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Because those 40’000 objects are all tiles that make up the map. They change colour depending of the country owning them.

  • I have about 40,000 copies of a sprite and it's slowing down my project immensely with CPU usage at 95%. With the debug menu I see that some event-sheets are also contributing to the lag but turning them off changes nothing, the same amount of CPU is used whatever I disable or modifie. So I'm having trouble finding what the problem could be other than the massive amount of objects.

    Thank you-

  • Basically, I am using only one object and copies of it. What differentiate some of the copies is their variable : Ownership (which is whether owned or unowned)

    Now I need to calculate if the distance between a owned object and an unowned one is less or equal to 8.

    For now I am using the Line of sight behavior to do so but I feel like it makes performence drop to much for some reason and want to know if there is an alternative to it .

  • Thank you, it worked

  • Are your pages only sprite or you have text pinned to them?

    Because I did something similar only using 1 sprite, instead of many pages on different Z layers, I used sprite animation and frame.

    That way you would only have to refere to one sprite and just tell which frame/animation you want.

Tsardall's avatar

Tsardall

Member since 13 Jun, 2021

None one is following Tsardall yet!

Trophy Case

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

Progress

6/44
How to earn trophies