XNA Creators Club Online
Page 1 of 1 (4 items)
Sort Posts: Previous Next

Need help with base coding for a test level

Last post 04/11/2009 16:35 by Craig Martin. 3 replies.
  • 04/11/2009 15:43

    Need help with base coding for a test level

    I am currently trying to make a side scroller beat em up with the ability to move up and down in a plane as well as jumping (kinda like castle crashers)
    I am wondering if I should be designing the base in 3-D to allow this or if I should use a 2-D design?
  • 04/11/2009 16:31 In reply to

    Re: Need help with base coding for a test level

    You could do it either way. Which way you want to do it is going to depend on you.
    Jim Perry - Microsoft XNA MVP
    If people spent a minute searching the forums and reading the FAQs before posting I'd be out of a job.
      Got some XNA Game Studio/XNA Framework development info to share with the community? Put it on the XNA Wiki.
        Please mark posts as Answers or Good Feedback when appropriate.
  • 04/11/2009 16:32 In reply to

    Re: Need help with base coding for a test level

    If you do it in '2D', you just move the player up and down the y axis to simulate moving in and out on the z axis.  Then you render based on their y axis position, bottom to top, to simulate that objects are in front or behind others.  Jumping is a special case here, because instead of using the y axis to simulate z, you actually want to move them along the y axis temporarily.  You would keep track of their state, and if jumping, rendering them on their 'real' z plane.

    For collision detection with this method I would assume your z plane would be chunked up a bit, imagine highway lanes, and anything in a lane is collidable with other things in that lane.
  • 04/11/2009 16:35 In reply to

    Re: Need help with base coding for a test level

    I would personally go with Vector3's. If it is essentially a 2D game, having the Z component doesn't complicate things much at all - and it allows you to keep the integrity of the X and Y components.

    But it's probably just personal preference. You could prototype both Vector2's and Vector3's and see which you are more comfortable with.
    Game hobbyist hell-bent on coding a diabolical Matrix
Page 1 of 1 (4 items) Previous Next