Optimizing game camera
NumPy is just plain awesome! Now I can move 3X more octagons without any lag at all! And it greatly shortens the length of lines so I can use more descriptive names, too! Here's the NumPy version:

import pyglet
import numpy as np
from circle import octagon
from random import randrange

R = 50
SIZE = 800
COUNT = 333 # NO LAG! RUNS @ &gt;60 FPS!
WIN = SIZE, SIZE, 'Camera', True, 'tool' # x, y, caption, resizable, style

def clr():
    return (randrange(256), randrange(256), randrange(256)) * 9

def coord():
    return randrange(SIZE)

win = pyglet.window.Window(*WIN, vsync=False) # to unlimit FPS
batch = pyglet.graphics.Batch()
shapes = [octagon(coord(), coord(), R, clr(), batch, None) for _ in range(COUNT)]
coords = np.array( [shape.vertices for shape in shapes], dtype=int)
fps = pyglet.clock.ClockDisplay()

@win.event
def on_draw():
    win.clear()
    batch.draw()
    fps.draw()

@win.event
def on_mouse_drag(x, y, dx, dy, buttons, modifiers):
    global coords
    for i, shape in enumerate(shapes):
        coords[i][::2] += dx
        coords[i][1::2] += dy
        shape.vertices = tuple(coords[i])

def on_step(dt):
    pass
pyglet.clock.schedule(on_step)

pyglet.app.run()