Vilehead's Recent Forum Activity

  • okey but what about the CPU increased usage?

  • Okey after some testing, the delayed Pos updating turns out to actualy be a V-sync issue. The pos are actualy updated correctly. Its the visiuals that arent.

    When it switched the V-Sync into unlimited or Fixed (about 100FPS) the updating is perfect. But thethe CPU suffers greatly.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well basicly i almost finished programming the gameplay and now i started working with some UI. So i wanted to replace the original mouse cursor with some nice custom one. So yeah, ive hidden the cursor and made a sprite object and an event

    +Always = Set SpirteX to MouseX and SpriteY to MouseY

    Now heres what happends.

    If the mouse is being moved rapidly and fast the Sprite is falling behind! And not only that! whenever the mouse is being moved in such a rapid manner - the CPU usage grows preety noticeable.

    At first i though its because i have about 1200 events running, so it creates the delay. But no.

    So ive gone and made a new, perfect clean project.

    Added 16^2 sprite

    Same event. Always>set PosX/Y to MouseX/Y

    If the mouse is still, then the CPU wainting on circles around 95% (+/- 0.30%.

    But when ill start moving the mouse like a crazy monkey then blam: down to 88%(!!!!). Thats a Whoping 7% CPU usage just for mouse movement O_O The heck?

    And obviously, even at such empty, newborn project - the sprite falls behind the mouse cursor.

    And its not a Debugger error - ive checked the CPU usage also via windows Task Manager. It shows the same. At worst the usage is 41% without the mouse movement. With the mouse going crazy - up to 51%. And thats with Dual AMD Phenom CPU.

    1. Why position updating leave the sprite behind?

    2. What the heck is wrong with the CPU usage?

    3. How to fix the CUP usage and/or Sprite Pos updating?

  • Thank you Arima.

    You clarified preety much everything i was concerned about.

    I resumed my work :)

  • Well heres the deal.

    I have the Level layout.

    In this layout, which is the game main layout there is the player controled object and the enemies.

    I have about 22 enemy types. All with diffrent graphics.

    Theres virtualy no way that all of them will ever be on one Layout, at once.

    At first i though i can handle this with Unique Sprites plugin and load the needed graphics as they are put in use, to spare the VRAM. But US plugin end up being quite buggy and risky to use. So i replaced it with regular Sprite object.

    Now, as i tried to avoid using Fammilies, i though that i might use one Sprite object which has all the graphics for all the enemies. But as the object is created - all of it frames and graphics are loaded into the VRAM. Regardless are they being used or not.

    This wouldnt be such a big deal if i would have less enemies. But with 22 enemies, where each has graphics wourth of +/- 4-5mb VRAM this ends up with some nasty high VRAM usage. And as i said - theres never a situation where theres more then 4 diffrent enemy types on the level. So the rest would just trash the VRAM with needless graphics.

    So i though - maybe i have to split the enemies into seperate Sprite Objects. Sure, itll be anoying to set all the PVs and whatnot for each and every one of them, but oh well - no one said GameDeving is sweets&suger. I though that i might store them on a diffrent Storage kind Layout and make sprites global.

    This way i can easly spawn the enemies i need, at the given moment, without wasting VRAM.

    BUT.

    First problem is setting up events for all of them. 22 Objects means all the events x 22. So i though that i might have to use Fam's after all. And just control the Enemy Objects with the Fam's based events. But... i am a bit affraid how well itll handle it. Its not just collision detection. Its PV's control mainly. ALOT of PV's control.

    Additionaly i dont really know how it will impact the CPU.

    I mean the graphics are being constantly loaded and unloaded as the enemies are being created and destroyed. The enemies graphics arent that big. At worst, we are talking about 15 frames TOTAL, where biggest are 128^2.

    So the question are:

    1. Will this constant loading/unloading hurt the CPU?

    2. Will it work if ill replace the exact sprites objects with Fam?

    3. Will it work for EACH of the enemy or for all of them?

    4. Do you know any other (better) way of doing this?

    5. Or maybe is there an option to Force/Set CC so he loads only the selected Animations from the Sprite Object? that would be the perfect solution. Letting me avoid Fammilies and having all the graphics nicely organised within one sprite object.

    If anything is unclear - please ask. I still havent drink my morning coffee so i am a bit sleepy and i might not wrote everything enough clear.

  • Unique Sprites used with Bullet beh crashes the app after about 7-9sec of firing. Thats regardless of fire rate or speed.

    UPDATE:

    Actualy this happends without any beh at all too.

    It doesnt happend with rising numbers of the objects. Just with time.

    Funny - as long as they wont MOVE everything is fine O.o

    But make them fly and sh*t hits the fan.

    UPDATE:

    Okey it looks like the problem might be comming from when the Unique Sprite object is being destroyed. If too many of them are being destroyed at once... well. App crashes.

  • That's fine, I never had any problems doing that. Again, family variables should work fine if you don't delete or rename them.

    Ahhhh how nice.

    Thank you Arima :)

  • Hmm. I see.

    I am thinking about using Fam's for colision detections.

    Basicly If Bullet Overlaps Enemy then > something happends

    And as i have many enemies i though to group them with a Fam.

    So instead of the above it would be like:

    If Bullet overlaps Fam >then something

    No actual Fam's related variables. Just using the Fams to wrap many objects into one category.

    What do you think? in terms of safety.

  • hmm then how to get rid of the Vars if ive made an mistake? deleting the whole fammily?

    And what sort of problems you encountered? Can you name them?

  • Heyah,

    Its been a while since i posted here.

    Anyway, my CC knowledge is not really up to date. Whats the status of Fammilies? Last time i checked they were incredibly buggy to the point where they could preety much screwe up your entire CAP.

    I am asking because i am tempted to use them, but i dont want to get myself into another mess.

  • missing Effect. Anybody re-upload please?

  • A payed plugin for a freeware, royalty-free app?

    Dont take it personaly but - no way.

    If am supposed to pay to make my own game i would just go and buy C2 or another engine. Regardless of the price.

    The whole point of CC existance currently is based around the idea that here we have an inferion, weaker version of C2 but its totaly freeware and royalty-free.

    Having a payed plugin for it defeats the whole purpous.

    I will much rather spent an additional week of work coding my own custome UI rather then pay for one.

    No hard feelings. Its just my opinion. Which you have all the rights to disagree with.

Vilehead's avatar

Vilehead

Member since 9 Nov, 2010

None one is following Vilehead yet!

Connect with Vilehead

Trophy Case

  • 14-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • RTFM Read the fabulous manual
  • Email Verified

Progress

18/44
How to earn trophies