Jump to content


Penguin in Space

Recommended Posts



I've been messing around with sprites and animations in SFML. I tried to animate the tux penguin from Linux and came out with this. In fact, I believe I might make this the player. I mean, why not? What do you all think?


- Spectre

Share this post

Link to post
Share on other sites

Here's a challenge. Try to change the sprite based off how much health it has. sprite.setTextureRect(); uses all 4 values in sf::IntRect. The first 2 values corespond to the exact pixel in your sprite sheet, the second 2 values represent the size of the texture. You can dynamically change the first two values to jump between rows and columns to make some pretty cool stuff.


Another little thing you could fool around with is sf::Image, which allows you to actually edit whatever texture is loaded using various functions.


And if you really wanna get some game development practice, try to make the controls smooth. An extremely key part of making good 2D controls is adding weight to your characters movement. If your character instantly switches direction upon pressing a directional button the controls are going to feel stiff and weirdly unresponsive. Try to see if you can't fool around with floating point and make the movement feel smooth. Make your movement have acceleration. Make your character have to gradually shift from one direction to the next if you move your character from one direction to another direction.

I write programs and stuff.


If you need to contact me, here is my discord tag: Dustin#6688


I am a busy person. So responses may be delayed.



Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...