User Tag List

Results 1 to 3 of 3

Thread: Many physics objects & performance

  1. #1
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)
    Literswater's Avatar
    Join Date
    Apr 2014
    Posts
    164
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Many physics objects & performance

    I am making a sidescroller in which the player can only move from left to ride.

    I have noticed a frame runs very slow when there are a lot of objects (static physics) in it, regardless of them being far from the window and the objects' "inactive when far from window" property is set to either Yes or Automatic. The objects have to actually be destroyed in-game in order to improve the performance significantly. It doesn't matter if you are at a spot with close to zero objects or in an area where whole constructions are made of separate parts.

    So I have considered changing everything so that an object will only be created when the player is near it. However, that is very complex to do, especially with physics stacked on top of each other. Besides, I would expect the "inactive when far from window" means pretty much the same thing. Why does it seem to make such little difference?

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export Module
    tompa's Avatar
    Join Date
    Nov 2011
    Location
    Uppsala, Sweden
    Posts
    358
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In mmf2 I noticed that even at the state inactive, objects are included in internal scoping. You're always better off having as little objects as possible with the least amount of calculations/actions taken. Naturally Fusion handle all objects by a list of fixed values for the majority of events. I don't currently think it's a bad idea for any engine. It's probably an industry standard.

    I don't see the complexity with a physics-distance in a 2D space? is it about positions, z-order, parallax effects?

  3. #3
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)
    Literswater's Avatar
    Join Date
    Apr 2014
    Posts
    164
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The game really relies on a lot of objects to encounter and play with.. kind of like how the old Mario games could made huge levels with tons of funny creatures with such little capacity.

    It runs very smoothly during my short tutorial-levels where you cross little distance to get to the end. The official level, however, is long. The framerate becomes horrible until the player has destroyed most of the static physics. Just the fact that those objects are standing still somewhere in the frame seems to be enough to slow the game down immensely.

Similar Threads

  1. Replies: 2
    Last Post: 23rd June 2014, 09:08 PM
  2. Physics objects for iOS?
    By MJK in forum iOS Export Module Version 2.0
    Replies: 8
    Last Post: 19th December 2013, 07:27 PM
  3. Using physics objects with non physics movements
    By Redsquirrel in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 11th December 2013, 01:51 PM
  4. big performance problem when active objects overlap [257.9]
    By SirEatAlot in forum iOS Export Module Version 2.0
    Replies: 5
    Last Post: 4th April 2013, 11:08 AM
  5. Performance issues: hidden List Objects
    By Boba Fonts in forum Multimedia Fusion 2 - Technical Support
    Replies: 10
    Last Post: 26th April 2012, 10:59 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •