Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. 2D Platformer (XNA)

2D Platformer (XNA)

Scheduled Pinned Locked Moved C#
game-devhelpdesigntutorial
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MasterSharp
    wrote on last edited by
    #1

    I don't know how to make collisions work for a game I'm currently making. I have an image (800 / 600) and a person. I'm not going to make any tile classes for the level (at least yet...), but I can't seem to get the person to 'work' with this. They fall through places and such, and sometimes when there's cliff, move straight to the top of it when moved that direction. I have a physics engine I could utilize, but I heard it isn't great for platformers. (To help understand my issue, I want something along the lines of the game "Braid") If anyone could give *** *** *** ANY *** *** *** insight or help, please do. Even if it's a different design idea (such as tiles). (And please don't bring XNA's Torque level building whatever into this) I hope I explained my issue well, but if there are any questions about the dilemma, please ask. PLEASE help if you can. Thanks many in advance.

    - I love D-flat! - Need. More. Code.

    C 1 Reply Last reply
    0
    • M MasterSharp

      I don't know how to make collisions work for a game I'm currently making. I have an image (800 / 600) and a person. I'm not going to make any tile classes for the level (at least yet...), but I can't seem to get the person to 'work' with this. They fall through places and such, and sometimes when there's cliff, move straight to the top of it when moved that direction. I have a physics engine I could utilize, but I heard it isn't great for platformers. (To help understand my issue, I want something along the lines of the game "Braid") If anyone could give *** *** *** ANY *** *** *** insight or help, please do. Even if it's a different design idea (such as tiles). (And please don't bring XNA's Torque level building whatever into this) I hope I explained my issue well, but if there are any questions about the dilemma, please ask. PLEASE help if you can. Thanks many in advance.

      - I love D-flat! - Need. More. Code.

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      I've not used XNA, what does it add to C# ? that is, if I wrote an article on per pixel collision detection ( I did, it's here on CP ), would it help, or are you using some level of abstraction in XNA that protects you from that sort of code ?

      Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

      M 1 Reply Last reply
      0
      • C Christian Graus

        I've not used XNA, what does it add to C# ? that is, if I wrote an article on per pixel collision detection ( I did, it's here on CP ), would it help, or are you using some level of abstraction in XNA that protects you from that sort of code ?

        Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

        M Offline
        M Offline
        MasterSharp
        wrote on last edited by
        #3

        XNA just adds certain specific things easier for beginners. (Game loop, draw loop, simpler things) It could help, and I might have seen it a long time ago... so maybe not... Btw: I switched the design to tiles.... I've almost got it but ONE part doesn't work. What exactly is the algorithm for collision. I set it up to find if the velocity.X / Y is smaller / bigger (based on input) and from there updated certain parts for positions, but it doesn't seem to work right. (The player ends up on top of the platform as they fall....)

        - I love D-flat! - Need. More. Code.

        modified on Sunday, March 16, 2008 11:39 PM

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups