Hello! Allow me first to apologize if this post is a duplicate, apparently my
first one was not accepted and I just subscribed. Now, I've been trying to
make a 2D RPG but I'm stuck. I cannot figure out how to properly use
tilesets, and I cannot find any useful or beginner-friendly tutorials.
First of all, I have the tileset of my main character. I want to slice the
image into tiles and use them for my character's movement. Up, down, right,
left.
Secondly, how can I use a "map" I made with Tiled Map Editor with pygame? I
simply exported my map as an image file, but I guess if it was imported in
the code as tiles, with scenery and object layers, it would be easier to add
things like collision detection etc.
> Secondly, how can I use a "map" I made with Tiled Map Editor with pygame? I
> simply exported my map as an image file, but I guess if it was imported in
> the code as tiles, with scenery and object layers, it would be easier to
> add
> things like collision detection etc.
Didn't try it, but a quick google search ("tmx pygame") ended in:
On Wed, Nov 14, 2012 at 7:07 PM, yannisv <yannisveza...@gmail.com> wrote:
> Hello! Allow me first to apologize if this post is a duplicate, apparently my
> first one was not accepted and I just subscribed. Now, I've been trying to
> make a 2D RPG but I'm stuck. I cannot figure out how to properly use
> tilesets, and I cannot find any useful or beginner-friendly tutorials.
> First of all, I have the tileset of my main character. I want to slice the
> image into tiles and use them for my character's movement. Up, down, right,
> left.
> Secondly, how can I use a "map" I made with Tiled Map Editor with pygame? I
> simply exported my map as an image file, but I guess if it was imported in
> the code as tiles, with scenery and object layers, it would be easier to add
> things like collision detection etc.
If all you want to do is animate a sprite from a tile sheet, you can use
the Spritesheet recipe <http://www.pygame.org/wiki/Spritesheet>. It might
be useful as is, or you can tailor it to your needs. While you're there, be
sure to check out the pygame cookbook
<http://www.pygame.org/wiki/CookBook>to fill up your bag of tricks.
If you care to study a great example of a map scrolling technique, I always
recommend Retro Game
Library<http://www.pygame.org/project-Retro+Game+Library-1065-.html>.
I call this a great example because it is a complete yet simple game
framework, making it exceptionally instructional.
Finally, you might get more ideas and suggestions on IRC freenode.net#pygame.
Just ask your question and give it some time. Folks there tend to stay
logged in so they can catch up on chat once in a while. Long periods of
silence are not uncommon. They are not ignoring you, just sleeping or
gaming or watching TV, or doing things that are certainly better left
unknown. :)
Gumm
On Wed, Nov 14, 2012 at 11:52 AM, Radomir Dopieralski
<pyg...@sheep.art.pl>wrote:
> On Wed, Nov 14, 2012 at 7:07 PM, yannisv <yannisveza...@gmail.com> wrote:
> > Hello! Allow me first to apologize if this post is a duplicate,
> apparently my
> > first one was not accepted and I just subscribed. Now, I've been trying
> to
> > make a 2D RPG but I'm stuck. I cannot figure out how to properly use
> > tilesets, and I cannot find any useful or beginner-friendly tutorials.
> > First of all, I have the tileset of my main character. I want to slice
> the
> > image into tiles and use them for my character's movement. Up, down,
> right,
> > left.
> > Secondly, how can I use a "map" I made with Tiled Map Editor with
> pygame? I
> > simply exported my map as an image file, but I guess if it was imported
> in
> > the code as tiles, with scenery and object layers, it would be easier to
> add
> > things like collision detection etc.
I ended up making many different images for the player movement. The player
seems stuck though, as it will not change no matter which buttons I press.
Is it possible to tell me what is wrong, or how to update it properly?
Thanks in advance.
import pygame
import sys
import os
from pygame.locals import *
On Wed, Nov 14, 2012 at 12:07 PM, yannisv <yannisveza...@gmail.com> wrote:
> Hello! Allow me first to apologize if this post is a duplicate, apparently
> my
> first one was not accepted and I just subscribed. Now, I've been trying to
> make a 2D RPG but I'm stuck. I cannot figure out how to properly use
> tilesets, and I cannot find any useful or beginner-friendly tutorials.
> First of all, I have the tileset of my main character. I want to slice the
> image into tiles and use them for my character's movement. Up, down, right,
> left.
> Secondly, how can I use a "map" I made with Tiled Map Editor with pygame? I
> simply exported my map as an image file, but I guess if it was imported in
> the code as tiles, with scenery and object layers, it would be easier to
> add
> things like collision detection etc.