Jump to content
 Share

Cyber_Spectre

Penguin in Space

Recommended Posts

normal.PNG.af7e7e3d204cc513c320455597380961.PNG

 

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.

1840045955_Thicco(1).thumb.png.87c04f05633286f3b45b381b4acc4602.png

 

Share this post


Link to post
Share on other sites




×
×
  • Create New...