Closed Gama11 closed 9 years ago
By my observations, the best configuration for low-res (pixel) games are: (HaxeFlixel default)
pixelPerfectRender = true
fixedTimestep = true
camera.antialiasing = false
For high-res games, this works much better:
pixelPerfectRender = false
fixedTimestep = false
camera.antialiasing = true
Are these typically always used in tandem?
Except in rare circumstances, would most people either do all of these:
pixelPerfectRender = true fixedTimestep = true camera.antialiasing = false
Or all of these:
pixelPerfectRender = false fixedTimestep = false camera.antialiasing = true
Meaning, in the FlxGame constructor, we could add an optional (or not optional) parameter like useHighResRendering
which, if true, sets the second group, and if false will use the first group?
Managing this stuff with a global camera flag is fine, as long as it's easy to do, and well-documented for new users to select their preferences based on their game type, as Andrei proposed.
I'm not sure fixedTimestep is really connected to high res games. It's more related to whether or not the game depends on physics and / or has to be deterministic.
Closing this, as nobody really seemed in favor of changing the current default.
I am really in favor to change the current default.
Recent forum post: https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/haxeflixel/Gcw-oxL09T8/jgm5GRaofAIJ
Anyone developing anything serious will change these values, modern game engines uses the same:
fixedTimestep = false // "delta time" animations
camera.antialiasing = true
pixelPerfectRender = false
@Gama11
fixedTimestep
is connected with his res games because it gives much better results.
To grow the user base, this project should be more appealing for commercial development (high-res), not for "game jam pixels".
I am also in favor of changing pixel perfect rendering value. Especially for targets that use tilesheet rendering.
Why not set a "FlxG.render = PixelArt"? This way all the settings are pre(-ish) configured.
@AndreiRegiani That's simply not true, a variable timestep doesn't always give better results. If you rely on deterministic phyiscs, a fixed timestep is usually preferable. I don't see how this is related to the art style. Article on timesteps.
Also... "Anyone developing anything serious"? It's not possible to use pixel art for "serious" development then? :P
@gamedevsam There's no "especially" here, not using pixelPerfectRender = false;
is too expensive when using blitting to be the default.
@Gama11: I understand, so why not make pixelPerfectRender false by default for tilesheet rendering and true for blitting? I'm not a fan of changing the timestep default.
@Gama11 It's not related to the art style, by "pixel art" I meant low-resolution, example: 256 x 240 with zoom (2x), in this case antialiasing must be off and fixedTimestep false, this is the typical Flixel game.
@JoeCreates Since pixelPerfectRender
now defaults to false with FLX_RENDER_TILE
, should pixelPerfectPosition
default to false as well?
Currently, it's true by default on all targets for the sake of consistency. However, in most cases,
pixelPerfectRender == false
yields better (smoother) results on native targets at practically no performance loss. On flash however, true is necessary as a default setting for the added performance (although it seems surprisingly usable to have it set to false in Mode).I'm thinking it might make sense to make the default depend on the render mode. Things can't be totally consistent cross-platform, sometimes it makes sense to choose the best setting based on the target - see the special logic in
FlxButton
for no highlight frames + swiping on mobile.pixelPerfectRender:Bool = #if FLX_RENDER_TILE false #else true #end
For people who want to use pixel perfect rendering on native (pixel-art games etc), this would still be easy to accomplish due to the new global camera flag.
cc @gamedevsam @PaulGene @cwkx @schonstal