In current Sphere, grabbing the map is limited to just the visible area on the screen (unless you use some kind of hack).
var surfaces = []; var c = CreateColor(0, 0, 0, 180); var i = GetNumTiles(); while (i--) { var surf = GetTileImage(i).createSurface(); surfaces.unshift(surf); } var width = GetLayerWidth(layer); var height = GetLayerHeight(layer); var l_surf = CreateSurface(width << 4, height << 4, Colors.clear); for (var y = 0; y < height; y++) { for (var x = 0; x < width; x++) { l_surf.blitSurface(surfaces[GetTile(x, y, layer)], x << 4, y << 4); } } return l_surf;
What's the framerate of the code here?https://github.com/Radnen/sphere-sfml/blob/master/Engine/Engine/Startup/scripts/test.jsJust curious.
Not sure now, but damn nowhere near 400000, that can't be right. My tests had been around 11,000 fps, which is consistently 2,000 higher than SphereGL.I get 9500 FPS on that demo, in Sphere I get 8600 FPS.I can't even run a single test in your code without a segfault or some other strange glitch. May I consider unit testing?