I am trying to scroll a world map horizontally using numpy.roll() on a pixels2d object in pygame.
This is the picture I am using, but in .bmp:
This is what I get:
I tried changing the axis of np.roll(), but it didn't seem to affect the result much.
Am I doing something horribly wrong?
Here is my code:
import pygame as pg, numpy as np
pg.init()
world_map = pg.image.load('Miller.bmp')
screen = pg.display.set_mode(world_map.get_size())
world_map = pg.surfarray.pixels2d(world_map)
while 1:
np.roll(world_map,1)
screen.blit(pg.surfarray.make_surface(world_map), (0,0))
pg.display.flip()
pg.time.wait(1000)