Sign up ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

When manually setting the drawing order of game components by setting

int DrawableGameComponent.DrawOrder

can one use any integer numbers as long an order is defined like

  • component1 => drawing order: 2
  • component2 => drawing order: 5
  • component3 => drawing order: 10
  • component4 => drawing order: 323

or do these integers have to be consecutive and starting with zero like

  • component1 => drawing order: 0
  • component2 => drawing order: 1
  • component3 => drawing order: 2
  • component4 => drawing order: 3


share|improve this question

1 Answer 1

It can be anything

This value can be any integer. Components in the GameComponentCollection are drawn in ascending order based on their DrawOrder.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.