dop2000's Recent Forum Activity

  • My guess is that TileMap should be better for performance. But you can actually test this - create a small map with sprites, run the game in Debug Mode and write down the number of collision checks per second. Then replace sprites with TileMap, check again. The less collision checks, the better.

  • Why the save size suddenly goes up from 50KB to over 3MB when you click save? It should be the same size as when saving Undo steps. This is not normal, there must be some other event in your project that's causing this. Maybe you also take a snapshot of the screen and load it into Binary data or something like that. 3MB save is A LOT, and it explains why there is a significant delay in displaying the "Save as" dialog.

    If you can't figure out why this happens, try to analyze the .alon file, see maybe there is a huge block of data that shouldn't be there, or thousands of small ones.. Try this tool for example:

    debugbear.com/json-size-analyzer

  • Yeah, there is nothing mysterious about clamp, lerp and unlerp functions, they are well documented and you can google a million examples of their use.

    About the problem you are having - I'm guessing you didn't put knob and slider into a container. If you don't want to use containers for some reason, you will need to pick the correct slider when setting position of each knob.

  • If you are saying that transposing the data is easier to implement, I guess it's an even better (more universal) solution!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Nepeo I kind of used to store records in arrays on X axis and different fields in the record on Y axis.

    Besides, some events and expressions don't work the other way, for example, you can't do "Array for each Y element", or use IndexOf to find something on Y axis.

    I actually had to do this today - changed the structure of my array so that the data is now stored on Y axis, because it was really awkward to enter about a hundred of records in one row. I know there are workarounds (I can prepare the table in excel, convert to JSON etc.), but it would be much easier if there was an option to rotate the view in C3.

  • Nepeo Is it possible to add an option to rotate the view in the Array editor? (The view only, not the data).

    It's often much easier when the data is presented in columns, especially when editing a large array, or entering long lines of text.. It's more Excel-like, compact, can fit a lot more data into the same space. Compare:

  • The platform behavior already has "is touching wall" and "is on floor" which to my knowledge are handled in the behavior's script and simply return true or false -- using them in events does not create extra collision checks.

    This is not true, I just tested with the Platform template and here are the results:

    • Default template: ~240 collision checks per second.
    • With "Is by wall" event: ~420 collision checks per second.
    • With "Is overlapping at offset" event: ~360 collision checks per second.

    So testing for overlapping at offset is actually better for performance as it uses less collision checks.

    But I agree, including "is touching ceiling" would be an simple and useful addition to the Platform behavior.

  • Maybe you need to scale the entire layout? Or scale other layers too?

  • AllanR You are right, knobs are lagging if you set their position to slider's position on every tick. But this lag is actually caused by Pin on the slider, because Pin behavior updates object position at the very end of the tick.. If you set the slider position with events too (not with Pin), then there is no lag:

    dropbox.com/s/plp4jqq6d8a858x/slider_knob_nopin.c3p

  • My Question: How do I change the position of the Knobs on the Layout WITHOUT changing their values, and also... make them stay based on their original default PIN position?

    You have this formula to set knob position to its value:

    lerp(Slider.ImagePointX(1), Slider.ImagePointX(2), unlerp(Self.Minimum, Self.Maximum, Self.Value))

    So just add this event below all other slider events:

    On every tick
    Knob is NOT dragging
    	Knob set Y to Slider.Y
    	Knob Set X to lerp(Slider.ImagePointX(1), Slider.ImagePointX(2), unlerp(Self.Minimum, Self.Maximum, Self.Value))
    

    With this approach you don't need to pin/unpin the knob all the time. When it's not being dragged, it will stick to its correct position on the slider. So Pin behavior needs to be removed.

    Also, I suggest using containers. (see my original demo)

  • You need to pick the correct Enemy object instance. Normally events like "On collision" pick instances for you, so if you do "Enemy destroy" inside this event, only one enemy instance will be destroyed.

    Enemy On collision with Sprite -> Enemy destroy

dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 261 followers

Connect with dop2000

Trophy Case

  • 8-Year Club
  • Entrepreneur Sold something in the asset store
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • x5
    Popular Game One of your games has over 1,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • x3
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • x13
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

28/44
How to earn trophies