How do I optimize this?

0 favourites
  • 11 posts
From the Asset Store
Professional mobile games optimized template, featuring adaptable screen sizes, functional menus, and music/sound button
  • Hello I have trouble with one Event sheet called "Chunks" it takes 50% of CPU usage, perhaps due I pull "Yandere Dev" on this sheet. I tried functions but they don't work. So perhaps someone of you GODS of this community will help me( "the idiot" trying to make complex game) on this.

    Thanks in advance.

    File:

    mediafire.com/file/fprxg922wgd3hix/SomeGame.capx/file

    To start you need launch from World_1 layout and to exit either Alt+F4 or press ESC and using arrows highlight last square.

    Here stats of PC's I used to test:

    Ryzen 5 3600, RX570, 32GB ram: 58-60fps

    Phenom II x6 1045 (oc 3.2GHZ), r7 360, 8GB ram: 30-35fps

    Ryzen 3 1200, GTX 1050TI, 8GB ram: 45-50fps

    Core 2 Duo T9400, gma4500mhd, 4GB ram: 19-30fps

    Core i5 4200u, Intel HD 4400, 8GB ram: 10-19fps

    Core i5 5200u, Intel HD 5400, 8Gb ram: 15-20fps

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello NamelessPFK...

    in my modest computer Chunks are never taking more than 4%... world1 and raytrace takes most of the CPU...

    So I do not understand exactly what you are facing...

    nevertheless and regarding to this "chunks" I got a question for you: its there any reason to have as many as "sector" as separate 67 objects?

    I suppose you need it to detect when it´s created as you use "on create" ... but this is unnecessary

    you can use "on created" followed by a wait 0 (to wait to next tick) and then pick the one you need... by doing this you can simplify your code a lot and save some video memory (as same object will not be as heavy as 67)

    example here...

    prnt.sc/tm8e1t

  • Hello NamelessPFK...

    in my modest computer Chunks are never taking more than 4%... world1 and raytrace takes most of the CPU...

    So I do not understand exactly what you are facing...

    nevertheless and regarding to this "chunks" I got a question for you: its there any reason to have as many as "sector" as separate 67 objects?

    I suppose you need it to detect when it´s created as you use "on create" ... but this is unnecessary

    you can use "on created" followed by a wait 0 (to wait to next tick) and then pick the one you need... by doing this you can simplify your code a lot and save some video memory (as same object will not be as heavy as 67)

    example here...

    https://prnt.sc/tm8e1t

    OK if you played my project its kinda like open world game each of those objects spawn specific objects in dynamic way. For performance reasons because if you have mid range machine at more than 1000 objects frame rate drops. Somewhat I got my code a little bit more optimized after posting this Ryzen 3 machine got stable 60 but rest are still running low. But Iam gonna try your example because I need make this game run even on potato. Thanks for help. I will report results when I have some time on project.

  • Hello NamelessPFK...

    in my modest computer Chunks are never taking more than 4%... world1 and raytrace takes most of the CPU...

    So I do not understand exactly what you are facing...

    nevertheless and regarding to this "chunks" I got a question for you: its there any reason to have as many as "sector" as separate 67 objects?

    I suppose you need it to detect when it´s created as you use "on create" ... but this is unnecessary

    you can use "on created" followed by a wait 0 (to wait to next tick) and then pick the one you need... by doing this you can simplify your code a lot and save some video memory (as same object will not be as heavy as 67)

    example here...

    https://prnt.sc/tm8e1t

    Hi!

    I checked your example and made some sorta my interpretation of it.

    Now instead of 64-67 separate objects with 5 boleans each I made one object cloned it 64 times and gave separate id's and single bolean for checking that everything is spawned. It kinda boosted performance and event sheet become unreadable mess but its like 1/3 of size and I was shocked by performance of some machines.

    Ryzen 5 3600: Stable 60 with drop here and there

    Ryzen 3 1200: Same as 3600

    Phenom II x6 1045: 48-60 it drops when there are more than 1000 objects

    i5 5200u: Similar to Phenom but with biger drops

    i5 4200u: 19-30 perhaps due being single channel memeory (Thinkpad x240)

    Core2 Duo T9400: Somewhat unstable either 8-25 or 19-30

    So it runs better but still I need find way to make it run on Core 2 duo because game is looking like it should run on this hardware. Annyway thanks for help.

  • well.. check out what you can do and then upload some caps to see what we can find else to improve.. deal?

  • well.. check out what you can do and then upload some caps to see what we can find else to improve.. deal?

    OK. I'am happy that somebody wants to help.

  • Here is version with some advancements done. This one runs 60 fps on Core i5 5200U laptop. So question is simple it's already can go to next stage were I focus on AI or its possible to shave more fat. Core 2 Duo laptop runs at 30 fps same with x240 Core I5 4300U. Btw Police now do roadblocks (still in wide roads they kinda buggy).

    mediafire.com/file/fprxg922wgd3hix/SomeGame.capx/file

  • Good improvement!

    But what it’s your question now? In how can I help you exactly?

  • Good improvement!

    But what it’s your question now? In how can I help you exactly?

    I just have few questions. If I make chunks from 832x832 pixels to something larger will engine spawn less stuff or more if less then it could shrink down object count and will allow me add set pieces like: trash cans, boxes, maybe even ramps (to see how stuff works you need in Layout World_1 set Layer 1 visible Scale rate 100 and parallax 100 then set View invisible and then set Window size to something like 4K or 8K resolution or 16K to see how stuff spawns and enable Scroll To behavior in Player object) . Next question is how make Players car act like car because now it's janky and looks like something too basic. Next question is did you sir/ma'am know something about "Mode7" effect used for floors if so how use it? And final question is will smaller map improve Path Finding for Police AI.

  • I had a hard days...

    will try to answer your questions as best as I can soon...

  • I had a hard days...

    will try to answer your questions as best as I can soon...

    No problems. Take your time.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)