Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8373417
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T14:40:17+00:00 2026-06-09T14:40:17+00:00

So I wanted to convert my PC game to work on the Xbox 360.

  • 0

So I wanted to convert my PC game to work on the Xbox 360. It ran damn fine on the PC, with a Intel Core 2 Quad @ 2.40Ghz and a Radeon 4850 512MB.

I ported it to the Xbox, and right off the bat, there was some problem with invariance and inheritance regarding importing of lists, so I simply used the LINQ method called .Cast<>().

If that method is takes a big overhead, let me know, because I cannot deploy Performance Analysis on the 360 for some reason, most likely because it plays on the 360.

Then another problem came, and it was a nice System.OutOfMemoryException. My skybox textures were 4096×4096, so reducing them by half removed that error. Odd though, they were only 3MB x 6, so it shouldn’t be using that much of the 512MB available.

So when all those problems were cleared out of the way, a nice 1 frame per 2 seconds were introduced. It then crashes after 1 minute of gameplay, a “Code 4” whatever that means.

It plays like a powerpoint. Here are some performance analysis images from PC gameplay. They are not bad.

CPU: https://i.stack.imgur.com/mCvXN.png
RAM: https://i.stack.imgur.com/dYwa8.png And 72% = 150MB mind you.

I hope anyone here has some experience on this issue. Frankly I am all ears.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T14:40:19+00:00Added an answer on June 9, 2026 at 2:40 pm

    The root cause of your performance problems is almost certainly because you’re allocating memory while your game is running (after startup, during the Draw/Update loop).

    On Windows this is fine. The garbage collector on Windows is generational (will only clean up new objects when possible) and extremely fast. It is clever about when it chooses to run, too.

    The garbage collector on the Xbox 360, on the other hand, is completely rubbish. It runs for every 1MB of memory allocated. It checks the entire managed heap when it runs. And it’s quite slow to boot.

    So the answer is to never allocate memory while your game is in its running state.

    There’s a good blog post about this here. (It also describes the alternative to never allocating memory – which is to reduce heap complexity – which is really very difficult to implement and I don’t recommend it.)

    • You will have to remove things like LINQ, as the query objects it creates are heap objects, as are the delegates it frequently requires. Use simple loops instead.
    • If you are allocating your own reference types in draw/update, you will have to convert to using value types where possible or add object pooling.
    • Creating string objects is another common source of memory allocations – instead you can re-use a StringBuilder and render that directly.
    • Converting things (especially: numbers) to strings, even for StringBuilder will allocate memory. You need to write/find allocation-free alternatives. My answer to this similar question has one for int.

    The best way to diagnose where you are allocating memory is to run your game with the CLR Profiler on Windows. This will tell you where and when memory is being allocated. Simply optimise until you’re not allocating.

    (Or until you’re reliably allocating less than 1MB per level/map/room/whatever, and do a manual GC during a time where it’s appropriate to stutter – like a static loading screen or a fade-to-black.)

    Code 4 is an Unhandled Exception. You need to install a top-level exception handler that outputs a message, or run your game in the debugger, to determine the cause.

    Finally: That is probably the compressed size of your textures (using PNG or JPEG or similar). If your textures are uncompressed, 4096 × 4096 × 6 × 4 bytes = 384MB. This is huge – no wonder you ran out of memory. You could compress them with DXT1 and make them 6 times smaller (instructions, wiki). You could also reduce their resolution. And do you need the bottom face at all?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wanted to convert from rgb to hsv but the results seem to be
How can I convert ASN1_TIME to time_t format? I wanted to convert the return
I wanted code to convert all the characters in strings to uppercase or lowercase
I wanted to convert a wsdl file into java. I installed Axis2 plugin into
I wanted to convert some xml to a magazine like pdf document. A lot
I wanted to convert DateTime data which will be pulled from source, to Date
i wanted to convert double to float in C, but wanted to preserve the
I'm wanted to convert some of my python code to C++ for speed but
this may be a stupid question but I wanted to convert a 2 dimensional
I have a VB application. Clients wanted to convert that to a .net application.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.