Problem with lag on the Xbox

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • Hi all, I have started using the XNA exporter and It seems whenever I have more than about 70 actives (they are duplicates) on a level it lags so much it's unplayable. I only get this lag when testing on the Xbox and never on my PC, this is the case for the other projects I'm working on as well. I have tried changing the frame rate, lowering the screen resolution, removing layers, making the sprites smaller, removing fast loops etc. I have only been able to get very simple games to run without lagging. I'm sure I must be doing something wrong as I haven't noticed anybody else mentioning it. Any advice would be appreciated. Thanks

  • Nope, I had this problem as well, it sucks major balls - you have to be really careful how you code things, and it's a right nightmare if you're used to just coding like you would in MMF on an ordinary day.

    Few tips from experience:

    Try and keep everything in groups, and only activate them when absolutely needed. I mean *really* tuck everything into a deactivated group if you can - I found this was the best way of improving performance.
    Don't use the OR conditions, I found these slowed things down loads.
    Don't use changing the font size on counters (and possibly text) - this crashes at runtime for me.
    Don't use restrict actions condition - it's bugged after 5m and literally just stops working - took weeks to work this out (awesome!)
    Alpha-blending seems to be okay for me, so don't be afraid of using that.

    I was experiencing slowdown at 1200 events, no extra layers or fast loops and with a low resolution, so I can imaging with these implemented you have to be very careful.

    IndieDB Page: Please login to see this link.
    Development Blog: Please login to see this link.

  • Thank you for the advice. Sounds like it would be best to start fresh rather than to try cleaning up what I've already done. I've already spent more than two weeks failing at this so If I still can't get anything up and running I might look into the IOS exporter, or just stick with the PC. Thanks again mate.

  • Just out of interest do you have a quick backdrop in there somewhere?

    Game Launcher Creator V3 - Please login to see this link.
    Bespoke Software Development - Please login to see this link.
    Learn Clickteam Fusion 2.5 - Please login to see this link.

    Danny // Clickteam

  • No quick backdrops, a few days ago I read somewhere that it was better to use smaller tiles to make up a larger image. Sadly I still get the lag with or without backdrops though. I'll try to simplify things like using ball movement for enemies to keep the amount of events as low as possible. This whole XNA thing is much more restrictive than I was expecting.

  • No quick backdrops, a few days ago I read somewhere that it was better to use smaller tiles to make up a larger image. Sadly I still get the lag with or without backdrops though. I'll try to simplify things like using ball movement for enemies to keep the amount of events as low as possible. This whole XNA thing is much more restrictive than I was expecting.

    That IS strange and I'm not just saying it to 'defend' the product but if anything I found it very responsive no matter what I threw at it. See my blog post here: Please login to see this link. I wrote that back in August.

    Please do keep narrowing your MFA down as I would be interested to know what's causing the slowdown.

    Game Launcher Creator V3 - Please login to see this link.
    Bespoke Software Development - Please login to see this link.
    Learn Clickteam Fusion 2.5 - Please login to see this link.

    Danny // Clickteam

  • I echo Danny's experience, I've found it to be super smooth even in one of my projects which was quite complex. Comparable to performance on my PC really, and with way more than 70 actives.

    I do remember from beta testing there were some bugs that triggered massive slowdown (lower than 1fps). But to my knowledge they were all fixed. I wonder if something you're doing is triggering something similar?

    I'm focusing a lot on android atm, but I'm hoping to go back to a bit of xbox development soon so if you like I can help get to the bottom of it.

    Creator of Please login to see this link. & Please login to see this link.. Always working on some exciting game development projects! Check out the latest at : Please login to see this link.

    Follow me on twitter Please login to see this link.

  • I echo Danny's experience, I've found it to be super smooth even in one of my projects which was quite complex. Comparable to performance on my PC really, and with way more than 70 actives.

    I do remember from beta testing there were some bugs that triggered massive slowdown (lower than 1fps). But to my knowledge they were all fixed. I wonder if something you're doing is triggering something similar?

    I'm focusing a lot on android atm, but I'm hoping to go back to a bit of xbox development soon so if you like I can help get to the bottom of it.

    Don't forget that you guys are probably coding to a much better standard than others, including me.

    For the first run of coding on my current project, I got stacks of slow-down without using anything too special - but it was coded in a very basic fashion. Now I've re-written everything it works far smoother - and the overall code is actually longer as I've added more features.

    I'm not saying you've coded it badly Rookyard - just pointing out that just because others have managed to get something running fast with plenty going on means nothing when there are so many pitfalls you get caught out with by essentially doing nothing wrong! There are so many ways to perform certain actions and some will smash a frame-rate while others will be okay, and there's no telling which is which until you've experienced everything (or really understand coding properly).

    Oh, and as Danny says - remove everything in your game piece by piece until the slow-down stops happening. Document it and make a few saves which you overwrite, or it's tricky to work out which bit it was when you fix it. I literally had to remove everything in my game and bring it to about 8 events before I worked out the problems I was having - and it was actually down to event order, which was very peculiar, as there was no logical reason to why the order would make a difference in that scenario.

    IndieDB Page: Please login to see this link.
    Development Blog: Please login to see this link.

  • Ah ok. There is definitely a lot to know about how to make things smooth inside MMF.

    There's a good thread about optimization in the iOS forum: Please login to see this link. some of it will likely apply here. But there's also a lot of performance threads in the main MMF2 forum like this Please login to see this link.. Some quick tips off the top of my head:

    -Turn off fine collision detection if you don't need it on an object.
    -Order conditions with fast or most likely to be false on top. Things like comparing values are fast, things like collision detection are more expensive.
    -The same applies to fast loops. Try to avoid a lot of expensive conditions in a fastloop.
    -Organise your code into groups which can be deactivated when not needed.
    -Use qualifiers where possible.

    Creator of Please login to see this link. & Please login to see this link.. Always working on some exciting game development projects! Check out the latest at : Please login to see this link.

    Follow me on twitter Please login to see this link.

  • XNA is somewhat peculiar when it comes to the speed of the main loop.
    The loop is divided in two : handling of the game, and display.
    If one of the two takes more than the necesary time (for example 20ms for a 50hrz game), the next time, XNA will only call the handling routines and not the display routines to fall back.
    Although it is a good idea, it makes the game completely collapse when it is just a little too slow, and then you get a 1 fps animation rate.
    I suggest you reduce the speed of the game in the properties of the application until it works again. Proceed by trying each new frequency... FOr example, if you start at 50, try 40. If it is back to normal at 40, try 45. If you have lag at 45, try 42 etc... Choose the highest frame rate that gives a good animation.

    Francois
    PM: Please login to see this link.

  • Interesting stuff, Francois!

    I found that my game worked fine in XNA until I introduced a handful of fastloops. Those knocked it right down to 1FPS like you mentioned. Based on that I'd say people planning to build for XBox should definitely steer clear of fastloops.

  • I have been experiencing a lot of the same problems with extreme lag on the XBOX360. Just tried out a fairly large frame (10240x1024) with 10000 bouncing ball objects flying around it, this ran great on the PC--however on the Xbox this same level crawled even with just 25 or 30 moving objects out there (even after knocking the application frame rate down to 30fps)! The actives I am testing with are basically just 64x64 bouncing balls, they don't use any crazy fastloops or anything like that... I have been working on this Xbox prototype for a few months now, and this is the first time I have really considered giving up and just making a PC game. If I could even get 1% of the performance on Xbox that I am getting on PC then there might be hope... but currently I am not. :( I have been very careful to build clean and tried to follow all the best practices for Xbox development, but so far I have never seen my game perform on Xbox360 at anywhere remotely approaching the level it does on the PC. Is it hopeless? Should I do what a lot of other indies seem to be doing: utterly abandon Microsoft and everything to do with XNA? Any help/advice would be appreciated--thanks! :)

  • Thanks for the response Francois, I understand that the Xbox has some serious limitations and we designers just have to deal with that. :)

    I have actually really enjoyed trying out some gameplay ideas on the 360, and my original plan was simply to design within the limitations of the Xbox (no matter how severe), but the sacrifices in terms of time and effort required to maintain performance are just so massive! As much fun as it has been (and a valuable, if trying, learning experience), I have made the realization in the last couple of days that I may never be able to pull off the graphics or gameplay I have in mind on the 360. But then there is a little voice in my head saying "You can make it work Joel! Just make smaller rooms, and be smart about how enemies get created/destroyed"... And I start to listen to that voice and think about the Xbox again, but then I remember all the days and weeks spent trying to force things to work on the 360, the massive difficulty of doing even the simplest things, and I think "If I keep going like this I will never even finish the game, much less make it through the gauntlet of getting this thing approved and released on Xbox". At the end of the day I guess what is important to me is realizing the original vision and inspiration for the game--I am just not sure it is technically achievable on the Xbox, at least with my level of MMF2 proficiency. And I am even less sure that the reward at the end of that road is worth the extreme effort and sacrifice it will take to get there. I always tell my students "use tech that works for you, not against you", and I think this is good advice. Perhaps it is time to take a big fat dose of my own medicine, stop being a slave to the 360, and get back to just being a happy game designer creating a fun game. :)

  • I've found that the best thing to do for porting to XNA for XBox is to lower the maximum number of actives at runtime (for particle effects etc.), deactivate all off screen and avoid fastloops wherever possible. I've found I can get away with using one set of fastloops at at time but when multiple different fastloops are running at once it chugs. My game is pretty complex but remember it's a low res game being scaled up.

  • Thanks for the tips DistantJ! I have had pretty good success with adding large numbers of actives (100 or more) to my small sandbox levels, the problems are coming now that I am trying to increase the size of the levels and add some visual touches like particles and parallax background layers. Scrolling maps bigger than 2560x2560 perform fine on the X360 with just the avatar in play, but don't seem to run well even with a very small number of actives (with bouncing ball movement) on the field, and I think it may have to do with the collision checks for these actives... Maybe if I could find a way to stream the backdrops as the player moves around the level? Does anyone have a method for doing something like this that will work in XNA?

    The walls of my levels are all built from an instanced 128x128 backdrop object, which means I have quite a lot of individual backdrops out there; could this setup be causing some problems for game performance? I have tried using fewer/larger backdrop images, and noticed some long load times and slow performance doing it this way... Has anyone had similar problems, and if so how were you able to work around them?

  • For shortest possible load times, make sure you have 'group images in mosaic files' checked in the XNA application options. It makes a huge difference. If they are still long you must have a tonne of graphics or sound to load?

    I've found performance on xbox to be generally fine, although I am used to working with mobile exporter capabilities now.

    Creator of Please login to see this link. & Please login to see this link.. Always working on some exciting game development projects! Check out the latest at : Please login to see this link.

    Follow me on twitter Please login to see this link.

  • Thanks again for the help Cole, I will be sure to keep 'group images in mosaic files enabled'.

    Still not sure what is causing the extreme difference in performance of large scrolling level spaces on PC vs. X360; tried some out-of-the-box ideas yesterday like building the entire world out of active objects and then deactivating them when off-screen... but nothing has really worked yet. On the PC side, I continue to be amazed and delighted by how far I can push my prototype--it seems to take anything I can throw at it and ask for more. I have several enemy types that include multiple active objects and use some pretty intense fastloops: dropping several hundred of these complex enemies into a vast 10240x10240 field did not hurt game performance at all, everything ran wonderfully at 100 fps. This level of design freedom is just too awesome to ignore, and is basically the reason I am moving away from Xbox development and focusing on the PC.

    I have thought about trying to export for iOS or Android, but haven't really explored developing for mobiles as of yet. In your experience, are the demands and limitations of mobile platforms like these comparable to the Xbox360? I would expect the Xbox to have much more power and capability than a phone, but the 360 is a pretty old machine now so honestly I don't know whether it still stacks up against mobiles or not.

  • I've ported 2 of my games to 360, and I'd say the xbox performance with XNA is kinda comparable to medium/high end smartphones running iOS/Android exporter with a few exceptions like fastloops. Which I think would be about what you can expect given that the xbox's hardware is from 2005, and modern high-end phones are approaching the same amount of computing power as a desktop PC machine from around then.

    I haven't tried anything with a huge playfield like you have though, so it could be that large play areas are a weakness of XNA. I'm about to start porting a much faster-paced project to 360, so I'll post here if I find any optimization tips.

    I don't think any of the exporters will ever be comparable the performance level of the PC runtime, as that's what MMF2 was originally designed around and they are, generally speaking, the most powerful systems.

    Creator of Please login to see this link. & Please login to see this link.. Always working on some exciting game development projects! Check out the latest at : Please login to see this link.

    Follow me on twitter Please login to see this link.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!