bitcraft / pyscroll

make scrolling games with animated maps in pygame
GNU General Public License v3.0
177 stars 28 forks source link

Isometric support #4

Open bitcraft opened 10 years ago

bitcraft commented 10 years ago

I'm going to add experimental isometric support in a new branch. I'll be commiting the changes later this week. Please watch the readme in the branch, and add any issues that you find.

pyscroll uses many hacks to get good framerates for orthogonal maps and they don't directly translate well to isometric rendering, so there will be many features missing until i find new creative ways to render quickly.

Keep an eye out on the readme, I will keep notes there that relate to it.

Thanks!

TurBoss commented 9 years ago

Hi, any news on this? thx

bitcraft commented 9 years ago

I haven't thought about it in a long time. Have you tried using the Isometric branch? It worked, as I remember, but its been over a year.

bitcraft commented 8 years ago

Isometric rendering has been added to the main branch. Instead of using the BufferedRenderer, use the Isometric one (IsometricBufferedRenderer):

import pyscroll
from pytmx.util_pygame import load_pygame

# Load TMX data
tmx_data = load_pygame("desert.tmx")

# Make data source for the map
map_data = pyscroll.TiledMapData(tmx_data)

# Make the scrolling layer
screen_size = (400, 400)
map_layer = pyscroll.IsometricBufferedRenderer(map_data, screen_size)

# make the PyGame SpriteGroup with a scrolling map
group = pyscroll.PyscrollGroup(map_layer=map_layer)

In my testing, there are obvious tile sorting issues, and unfortunately, I don't have much time to devote to this particular feature, but pull requests are welcome.