Ok, i finally got double buffering to work, so now the graphics are smooth. But the problem is that i dont know how to use sprites, anyone know how?