@GalliezB wrote:
Hello,
I'm student and i try to do a game in 2D for my project in first year. I'm too beginner in C ++.
I'm trying to do this game with openframework and i have FPS problem for the map display.// 32 pixel * 32 pixel = image size. nbrCaseX = ofGetScreenWidth() / 32; nbrCaseY = ofGetScreenHeight() / 32; for (int x = 0; x < nbrCaseX; x++) { for (int y = 0; y < nbrCaseY; y++) { sprite.drawSubsection(x*32, y*32, 32, 32, 608, 0, 32, 32); } }
But with this draw, FPS is now 10-15 fps maximum.
How can I optimize the code for a lot of sprite display ?
Thanks
Posts: 3
Participants: 2