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 - moistweb

Pages: [1] 2
1
Graphics / Re: Applying a sf::Transfrom to a sf::Sprite
« on: June 24, 2014, 08:14:39 pm »
Guys my problem has been solved. I modified the AnimatedSprite to work with a sprite instead of vertices. I canceled the inheritance and made a sf::Sprite as a private member. This latter sprite represents the currentSprite, its texture gets set in the setAnimation() ( see the code in the wiki), and its frame rectangle ( sf::FloatRect) gets updated by each update().
To be honest you can't do much with the sf::Vertex method in the wiki, it's better to use sprites to actually use all sf::Sprite's methods.

2
Graphics / Re: Applying a sf::Transfrom to a sf::Sprite
« on: June 24, 2014, 04:32:27 pm »
I think I got your points guys. What I think of doing now is modify the AnimatedSprite code to use sf::Sprite instead of vertices ( this is fairly simple, this is what I sould have done if I made my own Animation class), that way I could leave the same members in this class and add another function getActiveSprite() to pass it to the collision function. I think I'm on the right track.

3
Graphics / Re: Applying a sf::Transfrom to a sf::Sprite
« on: June 24, 2014, 04:00:39 pm »
Well actually I use the collision methods written in the Github Wiki :
https://github.com/SFML/SFML/wiki/Source%3A-Simple-Collision-Detection-for-SFML-2
To test for Pixel Perfect Collision we need to pass two sprites. So I thought if I could merge the sf::Transform of the AnimatedSprite with a sprite ( including setting its texture and textureRect), I could represent the actual state of the AnimatedSprite, and therefore it is usable as an argument in the PixelPerfectTest().
Just in case my question wasn't clearly formatted, I would like some way to apply an sf::Transform to a newly created sprite. Or better, another way to test collision with AnimatedSprite. What I couldn't figure out is a way to achieve the same result in the following code :
 
sf::Sprite playerCollisionSprite;
sf::Transform animatedPlayerSpriteTransform=  animatedPlayerSprite.getTransform();
playerCollisionSprite.setTransform(animatedPlayerSpriteTransform); // this function is actually what I'm looking for

if ( Collision::BoundingBoxTest(enemySprite, collisionSprite)
{
    // process collision ( modify health or generate explosion animation...)
}
 

4
Graphics / [SOLVED] Applying a sf::Transfrom to a sf::Sprite
« on: June 24, 2014, 01:20:33 am »
Hello everyone,
I've been recently working with the Animated Sprite in the Wiki. And so I came across an operation that requires retrieving the current active sprite from the AnimatedSprite, with all its transforms ( to be specefic, this operation is collision detection, I need to pass the sprite with all the transforms applied to it in order to test for collision). The problem is that the AnimatedSprite doesn't use sprites to output the animation result ( it uses sf::Vertex if I'm not wrong).  This class is derived from sf::Transformable, so it's possible to retrieve the sf::Transform from it, but the problem is that I couldn't find a way to apply this transform to the sprite that gets passed to the collision detection function. Any help guys, I really need to fix this !

5
General discussions / Re: Unofficial Nightly Builds
« on: June 19, 2014, 05:49:42 pm »
Yes that's what I doubted. I downloaded the VC++ 2013 x32 build, the opengl.exe and shader.exe in the examples directory were detected by Avast as malwares, but anyways I guess that's just Avast going mad again. Everything else is working perfectly fine, sorry for the interruption. Thanks for the builds

6
General discussions / Re: Unofficial Nightly Builds
« on: June 19, 2014, 05:24:55 pm »
Hey there, when downloading the VC++ 2013 build, Avast says there's a malware associated with the file. I need this build, is it a false positive ?

7
Thanks binary1248 I will search further on the topics you mentioned they seem interesting

8
Pixel shader ? what's that ? I'm sorry but I'm not familiar with shaders, do you have any article or tutorials I can start with ? thanks for your reply

9
Graphics / White Highlight over a sprite using color multiplication
« on: June 18, 2014, 02:25:25 pm »
Hello everyone,
in my Shmup game, and as every other Shmup games, enemies when getting hit tend to highlight in white for aesthetic purposes. I want to do the same, 'on the fly', without having to load a white version of the enemy sprite, that is, use color multiplication or some other technique. Unless the problem I found is that color multiplication doesn't produce a white color in the result. Any suggestions guys to achieve the result ?

10
Thank you for you replies guys. Ixrec I will check the link soon, thanks :).  eXpl0it3r, I will do so in future posts, thanks for the remark.

11
Hey all,
This question is more Visual Studio specific : I'd like to know if there's an extension that enables showing a drop box ( similar to when you're typing a function name, and then a small menu shows all available functions with a name similar to what you typed, and the same goes to variables), unless in my case, I'd like from Visual Studio to show all available filepaths when you start typing a filepath string ( e.g. "Assets/Backgrounds/, in this case the menu should show a list of all available files within the Backgrounds folder). That's because typing a wrong filepath everytime and getting the unexisting texture filepath issue is a bit hard to go through when designing levels or enemies. Hope my request was explained clearly enough. See ya :)

12
Graphics / Re: Append multiple textures to a single sprite ?
« on: June 06, 2014, 11:51:36 pm »
Okay, that's what I will be using I guess, thanks for the respond ^^

13
Graphics / Append multiple textures to a single sprite ?
« on: June 06, 2014, 03:22:06 am »
Hello folks,
I'm currently designing the Background class for Skywalk, and so I thought of a solution to achieve a good background management. This solution requires to append multiple loaded textures into one single sprites, but I just can't think of a solution, the only method relating textures to sprites that I know of is setTexture() ( and setTextureRect() of course). Can someone help me figure this thing out such that when I load a texture, I can add it to the end of the sprite  ( i.e. without modifying previously added textures) ?

14
SFML projects / Re: Digital Artist ( basic random image generation)
« on: June 03, 2014, 12:18:08 am »
Thank you :)

15
SFML projects / Digital Artist ( basic random image generation)
« on: May 30, 2014, 01:18:19 pm »
Hey there,
just wanted to do some creative work, waiting for more of inspiration and will-power ( :p ) to comeback in order to work on Skywalk ( the Shmup game I'm working on). So I made this random image generator program that has been stuck in my head for some time, and thought it would be great to share it with you, so here it is :

https://copy.com/qPZyku6bxeyad16g

It can generate up to 1 490 116 119 384 765 625 different images, pretty interesting so make sure you give it a try.


Pages: [1] 2
anything