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

Pages: [1] 2 3
1
General / Re: [SFML 2.0] Error Linking
« on: February 11, 2013, 08:34:23 pm »
Well, just read the message:

Quote
libGLEW.so.1.5, needed by libsfml-graphics.so, not found

How do I get libGLEW.so.1.5

EDIT: I ran "sudo apt-get install libglew1.5 libjpeg62" and I still get the same errors.

2
General / [SFML 2.0] Error Linking
« on: February 11, 2013, 07:40:31 pm »
I'm currently running GNU/Linux Mint and trying to get SFML 2.0 running. I went into the tutorial for Linux for SFML 2.0 and used the sample code. I downloaded and placed the include/SFML into /usr/include. And I also placed SFML/lib into /usr/lib.

I was then able to compile the source from the tutorial successfully with "g++ -c main.cpp"
But when I tried to link it with "g++ main.o -o sfml-app -lsfml-graphics -lsfml-window -lsfml-system"

I got these errors. Any ideas?:

/usr/bin/ld: warning: libGLEW.so.1.5, needed by /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so, not found (try using -rpath or -rpath-link)
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__glewUniform1fARB'
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__GLEW_ARB_shader_objects'

/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__glewGetObjectParameterivARB'
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__GLEW_ARB_vertex_shader'

/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__glewFramebufferTexture2DEXT'
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__glewUniformMatrix4fvARB'

/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__glewGenFramebuffersEXT'
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__glewUniform3fARB'

/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__glewRenderbufferStorageEXT'
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__GLEW_ARB_fragment_shader'

/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__glewActiveTextureARB'
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__glewShaderSourceARB'

/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `glewInit'
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__glewBindFramebufferEXT'

/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__glewFramebufferRenderbufferEXT'
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__glewLinkProgramARB'

/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__glewUseProgramObjectARB'
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__glewBlendFuncSeparateEXT'

/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__glewGenRenderbuffersEXT'
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__glewUniform2fARB'

/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__glewUniform4fARB'
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__glewCreateProgramObjectARB'

/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `glewGetErrorString'
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__glewCompileShaderARB'

/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__glewDeleteObjectARB'
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__glewGetUniformLocationARB'

/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__glewGetInfoLogARB'
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__GLEW_EXT_blend_func_separate'

/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__glewDeleteFramebuffersEXT'
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__glewCheckFramebufferStatusEXT'

/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__glewUniform1iARB'
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__GLEW_ARB_texture_non_power_of_two'

/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__GLEW_ARB_shading_language_100'
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__glewCreateShaderObjectARB'

/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__glewBindRenderbufferEXT'
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__GLEW_EXT_framebuffer_object'

/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__glewAttachObjectARB'
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libsfml-graphics.so: undefined reference to `__glewGetHandleARB'

collect2: error: ld returned 1 exit status

3
General / Re: Linker Errors
« on: September 11, 2012, 05:08:20 pm »
Fixed. Thank you.

4
General / Re: Linker Errors
« on: September 11, 2012, 02:21:58 am »
Yea, sorry about the length of the code. I was in a rush, and didn't have time to rewrite a basic program.

Anyways, I tried what you suggested, yet no luck.

5
General / Linker Errors
« on: September 11, 2012, 12:42:54 am »
Hi, I'm setting up SFML again for my project, but I keep getting these linking errors:

Error   10      error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Window::setFramerateLimit(unsigned int)" (__imp_?setFramerateLimit@Window@sf@@QAEXI@Z) referenced in function "void __cdecl invent(void)" (?invent@@YAXXZ) C:\Users\Anonymous\Documents\Visual Studio 2010\Projects\Game\Game\main.obj
Error   12      error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Window::display(void)" (__imp_?display@Window@sf@@QAEXXZ) referenced in function _main     C:\Users\Anonymous\Documents\Visual Studio 2010\Projects\Game\Game\main.obj
Error   8       error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Window::close(void)" (__imp_?close@Window@sf@@QAEXXZ) referenced in function "void __cdecl invent(void)" (?invent@@YAXXZ)  C:\Users\Anonymous\Documents\Visual Studio 2010\Projects\Game\Game\main.obj
Error   7       error LNK2019: unresolved external symbol "__declspec(dllimport) public: static bool __cdecl sf::Keyboard::isKeyPressed(enum sf::Keyboard::Key)" (__imp_?isKeyPressed@Keyboard@sf@@SA_NW4Key@12@@Z) referenced in function "void __cdecl invent(void)" (?invent@@YAXXZ) C:\Users\Anonymous\Documents\Visual Studio 2010\Projects\Game\Game\main.obj
Error   9       error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall sf::Window::pollEvent(class sf::Event &)" (__imp_?pollEvent@Window@sf@@QAE_NAAVEvent@2@@Z) referenced in function "void __cdecl invent(void)" (?invent@@YAXXZ) C:\Users\Anonymous\Documents\Visual Studio 2010\Projects\Game\Game\main.obj
Error   13      error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall sf::Window::isOpen(void)const " (__imp_?isOpen@Window@sf@@QBE_NXZ) referenced in function _main        C:\Users\Anonymous\Documents\Visual Studio 2010\Projects\Game\Game\main.obj
Error   11      error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::VideoMode::VideoMode(unsigned int,unsigned int,unsigned int)" (__imp_??0VideoMode@sf@@QAE@III@Z) referenced in function "void __cdecl invent(void)" (?invent@@YAXXZ)    C:\Users\Anonymous\Documents\Visual Studio 2010\Projects\Game\Game\main.obj
Error   14      error LNK1120: 7 unresolved externals   C:\Users\Anonymous\Documents\Visual Studio 2010\Projects\Game\Debug\Game.exe    1
 


I followed the tutorial for Visual C++, and I still can't figure it out. Any ideas?

Source:

#include <SFML/Graphics.hpp>
#include <SFML/Audio.hpp>
#include <Windows.h>
#include "Collision.hpp"
#include "Inventory.hpp"

const int sleepTime = 200;

       
int main()
{
        //Create window, and limit frame rate
        sf::RenderWindow window (sf::VideoMode(800, 600, 32), "Game", sf::Style::Default);
        window.setFramerateLimit(60);

//------------------------TEXTURES------------------------------

        //Declare textures
        sf::Texture texture;
        sf::Texture texture1;
        sf::Texture texture2;
        //Load image
        if(!texture.loadFromFile("Sprites/main.png"))
        {
                return 1;
        }
        if(!texture1.loadFromFile("Sprites/background.png"))
        {
                return 1;
        }
        if(!texture2.loadFromFile("Sprites/house.png"))
        {
                return 1;
        }

//------------------------SPRITES--------------------------

        //Creates and places the sprites
        sf::Sprite sprite;
        sf::Sprite background;
        sf::Sprite house;
        sprite.setPosition(400, 300);
        background.setPosition(0, 0);
        house.setPosition(440, 300);

        //Loads texture into sprite
        sprite.setTexture(texture);
        background.setTexture(texture1);
        house.setTexture(texture2);

//-------------------------RECTANGLES--------------------------------

        //Declares the rectangles
        sf::IntRect front(1, 1, 18, 24);
        sf::IntRect back (20, 1, 18, 24);
        sf::IntRect left (20, 26, 18, 24);
        sf::IntRect right (1, 26, 18, 24);
        //Steps
        sf::IntRect frontLeft(39, 1, 18, 24);
        sf::IntRect frontRight(39, 26, 18, 24);
        sf::IntRect backLeft();
        sf::IntRect backRight();
        sf::IntRect leftLeft();
        sf::IntRect leftRight();
        sf::IntRect rightLeft();
        sf::IntRect rightRight();

        sf::IntRect backgroundRect (0, 0, 800, 600);

        sf::IntRect houseRect (0, 0, 17, 22);

       
        //Crop sprites using rectangles defined above
        sprite.setTextureRect(front);
        background.setTextureRect(backgroundRect);
        house.setTextureRect(houseRect);

//-----------------------SOUND------------------------------------------------------

        //Declare the Sound Buffer
        sf::SoundBuffer footstepsBuffer;
        sf::SoundBuffer bumpBuffer;
        //Loads the sound file
        if(!footstepsBuffer.loadFromFile("Sounds/footsteps.wav"))
        {
                return 1;
        }
        if(!bumpBuffer.loadFromFile("Sounds/bump.wav"))
        {
                return 1;
        }

        //Declare sound
        sf::Sound footsteps;
        sf::Sound bump;
        //Load Buffer into Sound
        footsteps.setBuffer(footstepsBuffer);
        bump.setBuffer(bumpBuffer);

//-------------------------------MAIN-----------------------------

        //Main window loop
        while(window.isOpen())
        {
                sf::Event event;

                //Vectors used for collision
                sf::Vector2i spritePosition(sprite.getPosition());
                sf::Vector2i backgroundPosition(background.getPosition());
                sf::Vector2i housePosition(house.getPosition());

                //Sprite Vectors
                sf::Vector2i backVector(back.width, back.height);
                sf::Vector2i frontVector(front.width, front.height);
                sf::Vector2i rightVector(right.width, right.height);
                sf::Vector2i leftVector(left.width, left.height);

                //House Vectors
                sf::Vector2i houseVector(houseRect.width, houseRect.height);

                while(window.pollEvent(event))
                {
                        if(event.type == sf::Event::Closed)
                        {
                                window.close();
                        }

                        if(event.key.code == sf::Keyboard::Insert)
                        {
                                sf::Image screenshot = window.capture();
                                screenshot.saveToFile("Screenshot.png");
                        }
                }

//------------------------------Inventory------------------------------------
                if(sf::Keyboard::isKeyPressed(sf::Keyboard::I))
                {
                        sf::Thread window2(&invent);
                        inventoryIsOpen = !inventoryIsOpen;
                        if(inventoryIsOpen){
                                invent();
                                window2.wait();
                        }
                        else{

                        }
                }

//-----------------------------------MOVEMENT----------------------------------------

                if(sf::Keyboard::isKeyPressed(sf::Keyboard::Up))
                {
                        //Change to stepping sprite
                        Sleep(sleepTime);
                        sprite.setTextureRect(back);
                        sprite.move(0, -24);
                        //Redeclaring the collision textures
                        sf::Vector2i spritePosition(sprite.getPosition());
                        sf::Vector2i housePosition(house.getPosition());
                        if(collision(spritePosition, backVector, housePosition, houseVector) == true)
                        {
                                sprite.move(0, 24);
                                bump.play();
                        }
                        else
                        {
                                footsteps.play();
                        }
                }

                else if(sf::Keyboard::isKeyPressed(sf::Keyboard::Down))
                {
                        //Change to stepping sprite
                        Sleep(sleepTime);
                        sprite.setTextureRect(front);
                        sprite.move(0, 24);
                        //Redeclaring the collision textures
                        sf::Vector2i spritePosition(sprite.getPosition());
                        sf::Vector2i housePosition(house.getPosition());
                        if(collision(spritePosition, frontVector, housePosition, houseVector) == true)
                        {
                                sprite.move(0, -24);
                                bump.play();
                        }
                        else
                        {
                                footsteps.play();
                        }
                }

                else if(sf::Keyboard::isKeyPressed(sf::Keyboard::Right))
                {
                        //Change to stepping sprite
                        Sleep(sleepTime);
                        sprite.setTextureRect(right);
                        sprite.move(19, 0);
                        //Redeclaring the collision textures
                        sf::Vector2i spritePosition(sprite.getPosition());
                        sf::Vector2i housePosition(house.getPosition());
                        if(collision(spritePosition, leftVector, housePosition, houseVector) == true)
                        {
                                sprite.move(-19, 0);
                                bump.play();
                        }
                        else
                        {
                                footsteps.play();
                        }
                }

                else if(sf::Keyboard::isKeyPressed(sf::Keyboard::Left))
                {
                        //Change to stepping sprite
                        Sleep(sleepTime);
                        sprite.setTextureRect(left);
                        sprite.move(-19, 0);
                        //Redeclaring the collision textures
                        sf::Vector2i spritePosition(sprite.getPosition());
                        sf::Vector2i housePosition(house.getPosition());
                        if(collision(spritePosition, rightVector, housePosition, houseVector) == true)
                        {
                                sprite.move(19, 0);
                                bump.play();
                        }
                        else
                        {
                                footsteps.play();
                        }
                }

                //Draw sequence
                window.clear(); //(Red, Green, Blue, (optional) Alpha) Alpha is transperency

                //Draw....

                window.draw(background);

                window.draw(house);

                window.draw(sprite);

                window.display();
        }
        return 0;
}

6
General / Re: sf::Seconds delay?
« on: August 24, 2012, 03:09:34 am »
Oh my god, I must have deleted it by mistake! I've been up all night, and haven't slept at all, so I can't think straight right now. Thank you so much, you saved me.

Now I have to get the original problem I was having solved. I need to delay the movement of the character. The earlier solution didn't help.

7
General / Re: sf::Seconds delay?
« on: August 24, 2012, 12:30:22 am »
I guess because I would have done it with the cords of each corner, and I thought that was the approach they were trying to do as well.

Okay, I'm literally pulling my hair out right now, trying to figure out why this isn't working. If you guys could tell me what's wrong I would be so happy.

The image I'm using (zoomed):
http://i.imgur.com/jAc3D.png

Not zoomed:
http://i.imgur.com/JNRGT.png

The source:

#include <SFML/Graphics.hpp>
#include <iostream>

int main()
{
        //Create window, and limit frame rate
        sf::RenderWindow window (sf::VideoMode(800, 600, 32), "Game", sf::Style::Default);
        window.setFramerateLimit(30);

        //Declare image
        sf::Texture texture;
        //Load image
        if(!texture.loadFromFile("Sprites/main.png"))
        {
                return 1;
        }

        //Creates and places the main sprite
        sf::Sprite sprite;
        sprite.setPosition(400, 300);

        //Defines the rects that will be used to switch character view
        sf::IntRect front(2, 2, 17, -22);
        sf::IntRect back (22, 2, 16, 21);
        sf::IntRect left (2, 27, 16, 23);
        sf::IntRect right (23, 27, 16, 23);

        //Starts clock
        sf::Clock clock;

        //Main window loop
        while(window.isOpen())
        {
                sf::Event event;

                sf::Time time = clock.restart();

                while(window.pollEvent(event))
                {
                        if(event.type == sf::Event::Closed)
                        {
                                window.close();
                        }

                        if(event.key.code == sf::Keyboard::Insert)
                        {
                                sf::Image screenshot = window.capture();
                                screenshot.saveToFile("Screenshot.png");
                        }
                }

                //Movement
                if(sf::Keyboard::isKeyPressed(sf::Keyboard::Up))
                {
                        sprite.setTextureRect(front);
                        sprite.move(0, -14 * time.asSeconds());
                }

                else if(sf::Keyboard::isKeyPressed(sf::Keyboard::Down))
                {
                        sprite.setTextureRect(back);
                        sprite.move(0, 14 * time.asSeconds());
                }

                else if(sf::Keyboard::isKeyPressed(sf::Keyboard::Right))
                {
                        sprite.setTextureRect(right);
                        sprite.move(16 * time.asSeconds(), 0);
                }

                else if(sf::Keyboard::isKeyPressed(sf::Keyboard::Left))
                {
                        sprite.setTextureRect(left);
                        sprite.move(-16 * time.asSeconds(), 0);
                }
               
                //Draw sequence
                window.clear(sf::Color(255, 0, 0)); //(Red, Green, Blue, (optional) Alpha) Alpha is transperency

                //Draw....

                window.draw(sprite);

                window.display();
        }
        return 0;
}
 

8
General / Re: sf::Seconds delay?
« on: August 24, 2012, 12:24:28 am »
Yeah, this was not the clearest explanation :P

The first is the  X coordinate of the left edge, the second is the Y coordinate of the top edge.

Ah, thank you. That makes a lot more sense. I'll try it out in a sec.

9
General / Re: sf::Seconds delay?
« on: August 24, 2012, 12:20:07 am »
I'm sorry, what? The first agrument is for the top-left corner, and the 2nd is for the left-top corner?

10
General / Re: sf::Seconds delay?
« on: August 23, 2012, 11:52:55 pm »
   
sf::Rect< T >::Rect     (       T       rectLeft,
                T       rectTop,
                T       rectWidth,
                T       rectHeight
        )              

That's from the documentation. How do I pass in 4 cords with only 4 integers? Should I be passing in 4 vectors instead, because they store an x and a y cord? Also, I'm not understanding the first two params.

11
General / Re: sf::Seconds delay?
« on: August 23, 2012, 11:30:57 pm »
Sorry, I just didn't want to have it take up so much room here, so I decided to put it else where. And sorry about the not choosing C++, silly mistake. I'll take a look at it again, and see if I can fix it.

Oh, quick question. With "sprite.setTextureRect(), the first two arguments are for the cords of the top left corner of the selection, correct? Or, you could just link me to the documentation, because I have a hard time finding the write page   :-[

12
General / Re: sf::Seconds delay?
« on: August 23, 2012, 11:19:53 pm »
Alright, well I did what you said, but now the Sprite isn't showing up.

Source:

http://pastebin.com/SePTHHNh

13
General / Re: sf::Seconds delay?
« on: August 23, 2012, 07:10:04 pm »
Ok, I'm starting to understand now. But when I use your code, the sprite is only moving 1 pixle per 1 second. Why is that?

Source:

http://pastebin.com/YgMCYtYs

EDIT: When I change the value of how much it moves to a much larger number, there's no delay at all. It moves whenever I press the key. And if I hold it down, the sprite freezes, but when I release it move really far.

14
General / Re: sf::Seconds delay?
« on: August 23, 2012, 06:36:46 pm »
Well if you want framerate depended movement then you'll have to do what Groogy proposed.

Something like:
sf::Sprite sprite;
sf::Vector2i direction(0, -1);
sf::Vector2f speed(0, 14);
sf::Clock clock;
while(window.isOpen())
{
    sf::Time dt = clock.restart();

    sf::Event event;
    while(window.pollEvent(event))
    {
        if(even.type == sf::Event::Closed)
            window.close();
    }
    if(sf::Keyboard::isKeyPressed(sf::Keyboard::Up))
    {
        sprite.move(0, direction.y * speed.y * dt.asSeconds());
    }
}

The sf::Clock will get restarted every frame thus, it will capture the time between two frames aka delta time or dt.
If you now take the velocity (speed) and multiply it by dt then you get the speed for that short time period and you don't apply the fully velocity for every frame. The direction variable is just a help to easily swap directions without having to change the actual velocity value.
It's adviced to use window.setFramerateLimit and use a fixed timestep (dt) to match the framerate (i.e. dt = 1/FPS).

I'm not quite understanding what exactly this code is doing. For example, why are you multiplying the direction by the speed, and the time? What does that accomplish? Also, why do you have a vector "speed" , and multiplying that by -1. Why not just get rid of the vector and just have the sprite move -14 pixles. It would kill two birds with one stone.

Again, sorry if these are stupid questions, I simply want a better understanding of this.

15
General / Re: sf::Seconds delay?
« on: August 23, 2012, 05:38:00 pm »
For the purpose of a moving character I think that using the delta time between the frames can be used for that.

if(sf::Keyboard::isKeyPressed(sf::Keyboard::W)==true)
  movement.y -= 1 * delta_time );

Now you'll have to change it depending on how your implementation works but this is the most common thing to do. Though the other ways proposed have it's benefits as well. But this one works with least amount of code and least amount of trouble.

If I am unclear I can give you more hints on how to do this ;)

I'm having a bit of trouble thinking of how that actually works. I was thinking that I would start a clock, then I would have an if statement like so:

if(sf::Keyboard::isKeyPressed(sf::Keyboard::Up) && clock.getElapsedTime > sf::Seconds(.25))
{
    sprite.move(0, -14);
}
 

But when I do that, and run the program, the sprite doesn't even move. What's wrong with that?

Pages: [1] 2 3