Results 1 to 6 of 6

Thread: 2D platform game design

  1. #1

    2D platform game design

    I am working on a simple platform game. The game is going to have some platforms that the player (and monsters) can walk and jump on and so on. I am wondering how I should render the platforms?

    I am using a sprite class for the player, monsters and stuff like that. Should I use sprites for the platforms as well? Or is there some smarter way to do it? Perhaps a background image (with painted platforms on, rendered just before the level/stage starts) and some data structure to calculate collisions is advisable?

    One problem I see is bad performance if I use sprites for platform graphics. If I have a screen with many platforms that is painted by using 32x32 sprites, I roughly need to use 300-400 sprites. Tests shows that my ?¢_ogame/graphic engine?¢__ can handle 500-600 32x32 sprites with smooth moving sprites and no performance hit, but I hate the idea that more that half of my sprites are used just to paint platforms.

    Any help is very appreciated
    Regards,
    <br />Mikael thomsen
    <br />homepage: www.mikaelthomsen.dk

  2. #2

    2D platform game design

    You could split the map into a grid and use a couple of 2-D arrays, one to hold the index of the image you want to draw at each position, and another to hold whether or not they are 'solid'. If you have moveable platforms, then these should probably be sprites. Since each grid position will be static, you can optimise your drawing methods to only draw the part of the grid that is visible.

    Hope this helps.
    [size=10px][ Join us in #pgd on irc.freenode.net ] [ Sign the Petition for a Software Patent Free Europe ][/size]

  3. #3

    2D platform game design

    Sound like a good idea - but your solution still forces me to paint an image for each visible grid cell in every application loop. That could still result in up to 300-400 images.

    I am not sure if painting images is quicker than painting sprites. In my game engine the difference between images and sprites are close to nothing. I will need to test that.
    Regards,
    <br />Mikael thomsen
    <br />homepage: www.mikaelthomsen.dk

  4. #4

    2D platform game design

    Have a look on my website. There's a tutorial about creating a platform game. Might be just what you're looking for.

  5. #5
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25

    2D platform game design

    Hi Mikael, I'm glad people are still interested in these types of games. Being one that grew up on them, I do enjoy playing them thoroughly when I have the chance.

    I found a really nice article on GameDev.net about Difficulty in Dextartiry-Based Platform Games. I hope you find it useful. Hopefully we will eventually see such articles on this site in the near future.

    Good luck with your game.
    Jason McMillen
    Pascal Game Development
    Co-Founder





  6. #6

    2D platform game design

    Nice web-site Traveler! I have read your fine tutorial about making platform games. I have never done any DelphiX programming, but your tutorial still gave me some ideas for my upcoming platform game. Thanks a lot!

    Great article, Will! The article addresses many aspects of making platform games. I have learned a lot of it. Thanks!
    Regards,
    <br />Mikael thomsen
    <br />homepage: www.mikaelthomsen.dk

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •