User Tag List

Page 3 of 4 FirstFirst 1 2 3 4 LastLast
Results 21 to 30 of 38

Thread: Code Breaking Entirely at Random

  1. #21
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,729
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)

    Re: Code Breaking Entirely at Random

    Sounds like a bench test. How big are the active objects? How many animations per active? I know you are a veteran of MMF use, but MMF2 is not in the habit of code breaking at random.

    I think that how many objects per frame you set it to, MMF2 reserves space in memory. I agree that it is not a good idea to just to go off into the sunset and set the frame limit to 20,000 actives.

    How big is the backdrop(s)?

    How about uploading an .mfa so we can see this random bust of code that MMF2 is doing.

    Thanks

    Marv
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

  2. #22
    Clicker Multimedia Fusion 2Android Export Module
    Corlen's Avatar
    Join Date
    Mar 2007
    Location
    Your House
    Posts
    848
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Code Breaking Entirely at Random

    The backdrops are only 16x16 except for the border obstacles which are 320x16 and 240x16 because I have the 16x16 placeholder active objects paste into the background if the part of the string relevant to them is a certain value.

    Basically my editor uses a huge text blitter object for the background objects so people can load their own tile set and then it creates 16x16 placeholder active objects on every single tile with a fastloop that then changes their alterable values to part of what the string is, depending on their X and Y coordinates, and then further depending on their values determines what they create, if there is a sprite or a special tile such as water. Or, if the tile is an obstacle, then is pastes into the background as an obstacle. It's rather complicated, to edit a single tile, you have to use this code:

    Left$(Text$( "Tile Layer Lower" ), (X( "Editor Cursor" )/16)+((Y( "Editor Cursor" )/16)*62))+Alterable String A( "Tile Cursor" )+Right$(Text$( "Tile Layer Lower" ), Len(Text$( "Tile Layer Lower" ))-1-((X( "Editor Cursor" )/16)+((Y( "Editor Cursor" )/16)*62)))

  3. #23
    Clicker Multimedia Fusion 2SWF Export Module

    Join Date
    Sep 2006
    Posts
    1,537
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Code Breaking Entirely at Random

    Remember that backdrops are limited to the same # cap as active objects (same value in the level properties), and once this is exceeded you can't make any new ones. MMF2 is quite deterministic so code never breaks at random unless you have physical disk damage (unlikely), so theres always some logical problem at the root. Finding it is a matter of understanding exactly what your code is doing =/

    Theres absolutely no harm that comes from setting the object limit to 20,000. There is plenty of harm that will come if you are inefficient with memory or processing in terms of slowing down your project, but only when you exceed those limits will you run into logical errors (like the "create object" scoping issue). But if your code is breaking, the reason is some logical problem, not sheer stress. So it could be a matter of exceeding the object or background limit, or it could be an issue of a bug in the code.

    The best advice I can give is to look at your most recent changes, particularly if you have extensive changelogs and revisions and backup saves. If you can pinpoint the exact change to your code that caused the previously functional other code to break, then you can probably figure out what went wrong very easily. If you can't remember or find those changes, your best bet is to look at the interactions that code has with the rest of your project and see if theres anything out of place- for example, if you reused the same alterable value for multiple things, or made a typo in the expression editor.

  4. #24
    Clicker Multimedia Fusion 2Android Export Module
    Corlen's Avatar
    Join Date
    Mar 2007
    Location
    Your House
    Posts
    848
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Code Breaking Entirely at Random

    Well I'm definitely not reaching the 20,000 limit with backdrop objects. The most backdrop objects there can be are 2,522 in my gameplay/editor frame at any given time. I didn't see what the harm was with setting it to 20,000 as long as you don't let your application run wild where it will run into memory problems and such like you mentioned. I figured it was code conflicts but it seems like it's always totally unrelated code that causes this stuff.

  5. #25
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module
    RickyRombo's Avatar
    Join Date
    Mar 2008
    Location
    Somewhere between here and there
    Posts
    3,167
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Code Breaking Entirely at Random

    I believe the worry is that setting it to 20,000 allocates space. Not necessarily true but that is a worry.

  6. #26
    Clicker Multimedia Fusion 2SWF Export Module

    Join Date
    Sep 2006
    Posts
    1,537
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Code Breaking Entirely at Random

    Its not true. The only functional difference is that a integer in your memory is set to 20,000 instead of 256. This is no memory loss since integers have predefined memory bounds in C++ anyway. Memory is allocated dynamically when classes are instanced, freed when they are destroyed.

  7. #27
    Clicker Multimedia Fusion 2Android Export Module
    Corlen's Avatar
    Join Date
    Mar 2007
    Location
    Your House
    Posts
    848
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Code Breaking Entirely at Random

    I think the only thing the limit setting is good for is preventing your app from freezing up from too many objects.

  8. #28
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,729
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)

    Re: Code Breaking Entirely at Random

    Well, let's get CT to set the default to 20,000 then, if it can be done easily. If there is a reason why it should not be the default, maybe CT will tell us. If that is the case be prepaired to suffer the rath of my old age.LOL

    Marv
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

  9. #29
    Clicker Multimedia Fusion 2Android Export Module
    Corlen's Avatar
    Join Date
    Mar 2007
    Location
    Your House
    Posts
    848
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Code Breaking Entirely at Random

    Well without HWA it's going to start freezing up at around 3000-4000 objects or maybe sooner than that probably. I have a quad core and 8GB of RAM and can run STALKER Clear Sky on moderate settings without it noticeably lagging so I know that's not the problem, it's just software acceleration can only do so much I guess. I may be wrong, but I have a feeling that 3000-4000 2D active objects doing nothing in MMF2 is nothing compared to the strain Clear Sky's 3D graphics and advanced AI system put on a computer. (Don't get me wrong, I use Clear Sky as a benchmark test pretty much because it strained my old dual core much more than Shadow of Chernobyl and I liked Shadow of Chernobyl better.) Weird thing is, I noticed as you add more objects to the debugger, it slows down your application even faster.

  10. #30
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jun 2006
    Location
    Darlington, UK
    Posts
    3,298
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Code Breaking Entirely at Random

    Quote Originally Posted by RickyRombo
    I believe the worry is that setting it to 20,000 allocates space. Not necessarily true but that is a worry.
    At least some memory is pre-allocated, but not very much. A pointer (4 bytes) per object? Slightly more? (EDIT: It's an object pointer and a function pointer per object, so 8 bytes) It would mean about 0.2MB of memory usage just for setting the cap to 20k objects. Probably the same again for created backdrops, I'd guess.

Page 3 of 4 FirstFirst 1 2 3 4 LastLast

Similar Threads

  1. [Bug] Active Object Breaking Code
    By ProdigyX in forum Android Export Module Version 2.0
    Replies: 2
    Last Post: 23rd October 2011, 05:17 AM
  2. Breaking out of a loop iteration
    By westray in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 21st September 2011, 08:22 PM
  3. breaking brick animation
    By bnanns in forum The Games Factory 2 - Technical Support
    Replies: 1
    Last Post: 7th January 2011, 08:27 PM
  4. "Brick Breaking" Style of Game Paddle Size Glitch
    By MajorityCA in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 5th April 2009, 06:05 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
  •