Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Wouter

Pages: [1]
1
Graphics / Re: Question regarding textures
« on: October 23, 2016, 03:31:20 pm »
I think I understand, for future projects I think I am going to use the single file method because i've been noticing (as you said) that the animation images for my current project are a little bit messy/hard to manage.

Thanks for the explanation :D

2
Graphics / Question regarding textures
« on: October 22, 2016, 07:21:05 pm »
Hello there,
I've been using SFML to create a little game, but I've been wondering how to use textures properly.

I use a sprite for the player in my game and to change its texture (for example when walking in different directions) i do the following:
-create a texture for each direction (sf::texture walkTexture[4]  and load each image from file to texture)
-set player sprite to appropriate texture (playerSpite.setTexture(walkTexture[1-4]))

I've seen people put all the images for the animations in 1 big texture and then loading different parts of that texture to the sprites, is there any advantage in doing this or is it practically the same as my way in terms of efficiency?

Thanks in advance!

ps: Sorry for my imperfect English  :D






Pages: [1]
anything