So sprite sheets tend to be horizontally long. Flixel's animation system takes an image, and divides it up as a series of squares based on its height. Individual sprites can be whatever resolution or aspect ratio you like. The square sprite constraint only relates to animated sprite sheets. You adjust the hit box for your character in the code, so the hit testing can be non-square, even if the sprite graphics are square. But my game is using a 64圆4 sprite for the main character, and 32x32 sprites for the level. The sprites used in the demo game are 16x16 pixels. Aside from that, they can be whatever resolution you please. The only requirement at the moment is that sprite graphics are square. The sprite resolution is also independent of game logic. The game would hit-test for platforming based on the invisible sprites, but would render your painted work as the level's actual graphics. If you felt like it, you could use transparent blocks for your level editing and collision detection, and then layer a hand-painted texture over them. In the game I'm working on, I'm loading an image as a sprite that takes up the entire real estate of the screen, and using it as the background for my menu, easy as pie. And you always have the option of loading in individual images as sprites objects with whatever resolution you please, and then layering them behind or in front of the play field. But you aren't actually required to use those constraints for actual rendering. It uses basic square sprites for its collision detection and level editing. There's nothing stopping you from loading images of any resolution into Flixel. some handpainted 720p backgrounds, hires sprites etc. Can flixel be used for stuff other than pixel art? E.g.
0 Comments
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
March 2023
Categories |