SoldjahBoy's Forum Posts

  • 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

  • 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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • > 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

  • Please be patient. We are volunteers and don't always have time to check on the forums or other people's problems.

    You have explined more clearly what your problem is... however needing to download a 1Gb file (and probably install a bunch of plugins) isn't really ideal.

    What you need to do it reproduce your problem in an easy way with a new capx file. Create a scribble with 3 or 4 animation frames of coloured squiggles... then maybe make another animation entirely of dots or something different to a squiggle - making sure it also has 3-4 animation frames.

    Once you do that we can help you a lot more easily. Again, it sounds like you're probably setting the "play animation from frame 0" on an action that runs every tick or constantly when a button is pressed. This will cause your frame to always be on 0 no matter what. You need to create a conditional trigger that sets the animation and animation frame only ONCE each time the condition is met - not constantly.

    There are a few ways to do this - like setting the animation frame to "current frame" instead of 0 (but having a group trigger once to set the frame to 0 just in case it's somewhere else in the timeline first).

    If you can re-create your issue simply, as explained, we can be more helpful.

    ~Sol

  • If that plugin doesn't work... the only way to do it is to make a custom text feed using a bunch of boxes stacked on top of each other (one for each line)... then push the text and css styling to each box going up/down each "row".

    It can definitely be done, but it will be a fun job to make it happen. Probably a simple state machine to store each text value and style, then bump it up to the box above or whatever - until all boxes for your chosen number of lines is completed.

    ~Sol

  • This is it so far HERE - because I will be going to bed shortly. I will continue on it later, but maybe so far it will help with a few features that are working.

    I still need to make the split cells spread out from each other, and make the initial split cell "shoot" forward a bit. I also need to clean up the merging after the split timer expires because currently with more than one split, they all just instantly merge to the main cell instead of gracefully "flying" into it.

    For the enemy cells it may be easier to create a totally new enemy cell object for the client reactions. Having the player cell as an instance could get messy.

    Currently what is working (but could probably do with adjustment to amounts/figures) is the speed based on mass and distance to mouse cursor, and splitting/merging cells (as long as they're at least Mass 8). You can set the instance variable to the Cell before you run it to have different mass on start, or add event to startup for desired beginning mass.

    Hope this helps so far at least. Will improve hopefully tomorrow a bit more.

    ~Sol

  • OK so working on this idea for a bit - I've figured out a few things that might help you.

    I'm still working through the logic of getting this to work how you're wanting it to and it's getting fairly complex already... but hopefully I am commenting it enough to help with that.

    I will post it up after I've got it working a bit nicer

    ~Sol

  • You can use spritefont object for this.

    ~Sol

  • Ok let me think about this and I will see what I can come up with

    ~Sol