SoldjahBoy's Recent Forum Activity

  • Ashley That was exactly my point. You can have pretty much as many objects as you want if they are doing nothing or very little. When things start moving and calculating collisions that's when the performance begins to be affected with loads of objects.

    Another good tip to observe is (like in my case I didn't even realise at the time) to turn off collisions for objects that don't need it. For example my weather effects don't need collision calculations - but collisions were enabled for those objects. I have maybe 600-800 "rain objects" at any time when it's raining, and the fps drop was noticeable. After disabling collisions for those objects it freed up a lot of CPU usage.

    ~Sol

  • You can also place it based on the current viewport - if your layout is really large and you have some scrolling going on, using layoutwidth and layoutheight won't work for placing it in the center of the players screen.

    You would need to do something like;

    Object.X = (viewportright("layername")-viewportleft("layername"))/2

    Object.Y = (viewportbottom("layername")-viewporttop("layername))/2

    Of course if your game is just a single screen then what Drasanas said would do the trick.

    ~Sol

  • Maybe try posting this in the LITETWEEN THREAD so the person who made it can see your question

    ~Sol

  • On my PC I can have 10,000 objects at 60fps if they aren't doing anything... however I can have only 2,000 objects and fps is down to 30-35 if everything is doing complicated movements, etc.

    I'm not sure exactly what would be causing your issue - but I found doing some simple optimistations like having a core condition "is on-screen" made a HUGE difference to performance for doing things like rotating body parts for my characters etc. If they aren't on screen it ignores all of the IK solver chain and just uses "set X/Y" position to lighten the load.

    If you have a lot of moving stuff in the layout maybe only "move" them when they're within certain bounds of the viewport maybe, or even destroy them until the player gets closer to the position where they will be required.

    In my map layout I have literally over 300,000 objects and it runs perfectly - because it's only drawing around ~500 or so objects at any given time on the viewport - and nothing is moving.

    ~Sol

  • I don't think so. in fact the opposite is true. whatever type of game you are making If you want pixel perfect exactness then you do not want to use dt for anything you want to let speed slow as framerate slows. if you have any part of you movement system tied to dt then even if you are running average 60 fps any momentary fluctuation in dt which appears to be very common, will cause your object to momentarily freeze or skip.

    Sorry I should have said, critical for exactness over time.

    It's true that if you want pixel perfect exactness for collisions etc, not using dt can be better... however if you need to ensure your character moves X pixels over X time (for say, infinite runner games, or maybe using it for a real-time timer) then dt is essential.

    dt is basically the equivalent of "skip X frames if less than 60fps" to make sure timed exactness is met.

    ~Sol

  • A workaround for now would be to have an instance variable set as boolean value for the object. Toggle the boolean when you toggle visibility - then compare boolean value.

    ~Sol

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Using dt may cause jank when fps drops but this is intended... if you don't use dt and you have very tight controls then weird things happen - like jumping being a different distance to what is intended. You should use dt only on things that are critical for exactness.

    ~Sol

  • I guess it can't hurt filing as a bug. If it is intended behaviour then Ashley will know and just close the report. If not then he will fix it at some point

    ~Sol

  • > On collision with enemy OR Inverse Player is on layout - Create PopupObject at x/y

    >

    thank you very much for you valuable revert back,

    could you please provide me any example, i am not ale to find create popup object..

    so i want a example so that i can create popup object

    PopupObject is just the name he gave for the example. It can be any object, however you want to name it.

    Make a sprite and call it "PopupObject" then do System->create object "PopupObject" (or whatever name you chose to give the object in question).

    Making a menu appear on the screen is no different to making anything else appear. Usually you would use sprites or maybe tiled background objects to make a menu... the same way you would make an enemy appear or a "power-up" or whatever.

    ~Sol

  • Hmmm, this must be a "quirk" of the pathfinder movement - it just gives up when it's "good enough". Probably to do with speed/optimisation of the behaviour most likely.

    I guess doing something like Arima suggested, using LOS and then simply "moveto" once LOS has been achieved. You can set your LOS distance to be fairly close to the object itself and it should give the desired result.

    I think maybe I should play around with pathfinding a bit more and see if there is some other way, but that method sounds pretty good to me in theory.

    ~Sol

  • What happens if you set the pathfinding cell size to be the exact same as the actual object doing the pathfinding?

    Eg. if your object is still set at 5px, make the path cells to be 5px also... just wondering what would cause it to suddenly stop when it gets "close enough". It has to be something between the actual object bounding box size, and the pathfinding cell size.

    ~Sol

  • You don't need to have all animations for one specific character in a single animation group.

    You can have;

    Variable.CharacterType="whatever" (fighter,mage,archer)

    variable.CharacterAction="whatever" (walk,attack)

    Then do:

    set animation -> Variable.CharacterType & Variable.CharacterAction

    "FighterWalk"

    "FighterAttack"

    "MageWalk"

    "MageAttack"

    "ArcherWalk"

    "ArcherAttack"

    ^Possible combinations from one event listed^

    If you have some way to tell the type of character already, then you can simply do it like this and save a lot of headache. I guess the best benefit of it would be if you decide later to add extra animation frames or something - you will be adjusting all kinds of frame numbers and stuff later on.

    ~Sol

SoldjahBoy's avatar

SoldjahBoy

Member since 2 Apr, 2008

Twitter
SoldjahBoy has 3 followers

Trophy Case

  • 16-Year Club
  • Email Verified

Progress

17/44
How to earn trophies