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

Pages: [1]
1
System / Re: [SFML 2.0] Disabling error message
« on: March 19, 2013, 01:22:56 am »
A quick look at the documentation and the thread on the forum gave me the informations I wrote on the first post.

Anyway, thank you for your anwer, it helps a lot.

2
System / [SFML 2.0] Disabling error message
« on: March 18, 2013, 10:26:51 pm »
Hi !

I'm spamming the loadFromFile method on several directories. I'd like to keep my shell clean and set my own error messages instead of the dozens SFML's messages.
I learnt that I can't disable the messages and that they are sent to a specific ostream owned by SFML. Can I do something on that ostream to avoid the messages to be printed ?

Thanks for your help.

3
General / Re: Unable to load file : configuration problem
« on: May 02, 2012, 11:16:18 pm »
Nothing changes after I move my images.
Nevertheless, something strikes me now : When I use the .exe file, the game window does not open itself, I have to open it myself and a console windows appear with errors, not the game windows. This also happens when I use the run button of Codeblock.

I'm using .png images.

The following code does not works :

Code: [Select]
#include <SFML/Graphics.hpp>

using namespace std;
using namespace sf;

int main()
{
imageFadePlay = new Image;
    if(!(*imageFadePlay).LoadFromFile("images/nouvellePartie_fade.png"))
    {
        cerr << "Image loading failed : nouvellePartie_fade.png" << endl;
    }
    else
    {
        spritePlay.SetImage(*imageFadePlay);
        spritePlay.SetPosition(position);
        spritePlay.Scale(m_scale);
    }

return 0;
}

4
SFML projects / Re: Vertical Shooter
« on: May 02, 2012, 09:35:54 pm »
I started working on a vetical shooter too a week ago. You're doing a nice job, animations and gameplay seems good on your vidéo.

5
Graphics / Re: Spawning bullets
« on: May 02, 2012, 09:29:19 pm »
Quote
But a bit more information can still be helpfull.

I don't even think about someone using C++ without classes and creating a bullet class is obvious to me. Now that I read your message and his message again, I think that you're right and we should have given more information about that.

Quote
pushes it on to a std::vector

I read somewhere that std::list are more efficient when you need to randomly delete objects that are in the list. Isn't it a better choice in this case ?

6
Graphics / Re: Spawning bullets
« on: May 02, 2012, 02:23:30 pm »
I personnaly use a list where I store all my projectiles.
I do not have my code here but roughly :

player.fire : create the projectile and store it into the list
manageProjectile : move each projectile and check their positions for collision. I use this method in my game loop.

Do not forget to destroy every projectile that leaves your screen or meets an obstacle.

7
General / Re: Unable to load file : configuration problem
« on: May 02, 2012, 10:47:21 am »
The error message is : "Unable to load file"

Quote
The working directory seems to be the good one
How can you see that "it seems to be the good one"?

I can configure an execution directory and an execution working directory. I guess that the second one is the working directory.

8
General / Unable to load file : configuration problem
« on: May 02, 2012, 09:48:26 am »
I'm trying to run an SFML project on code block on a new computer and there is a bug : every image loading  return false. The working directory seems to be the good one, I have no link error message, and this code works on another computer with the aproximate same configuration : SFML 1.6, windows 7 x64, NVIDIA graphic card (GT520M here).
Any advice ?

Pages: [1]