Skip to main content

Top Down Map Demo

A simple demonstration of a sprite moving around a map. Includes *very* simple graphical map editor.


Valentine Blacker
(valentineblacker)
This is a small tutorial code for a top-down map in Pygame. It's not much, but it has a very simple map editor, and it demonstrates a way to use sprite-sheets for animation. Please email me with any questions or comments. Feel free to use any part of this code for any reason. I'd love to hear from you if you do, though! valentineblacker@gmail.com

Changes

Links

Home Page
https://github.com/ValentineBlacker/TopDownMap

Releases

Pygame.org account Comments

  • Ian1045 2013-06-16 02:56

    Didn't work for me for some reason... I ran demo.py, and it crashed. :/ Seems awesome though.

    mindkeep 2013-08-04 22:13

    I had to update map_generator.py, but it seems to work well enough with this change:

        def scroll_bumptiles(self):
    #this takes in the list of tiles you can't walk through, and
    #returns a new list of those tile rect translated with the camera.
    #collision_tiles_list = []

    for b in self.bumplist:
    if self.scrolling_up == True:
    b.y += self.scroll_speed
    elif self.scrolling_down == True:
    b.y -= self.scroll_speed
    elif self.scrolling_right == True:
    b.x -= self.scroll_speed
    elif self.scrolling_left == True:
    b.x += self.scroll_speed
    # I'm really not sure about this line, total guess at the original intent
    return self.bumplist