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

Pages: [1]
1
Graphics / Writing text in other languages.
« on: January 10, 2017, 11:18:15 pm »
Hello, i am trying to write text in russian and romanian, but the letters are shown as " ? " , how cand i write in other languages whith different letters, not only latins ?
a part of my code :
...
        sf::Text menu[MAX_NUMBER_OF_ITEMS];
...
        if (language == 0) { //romanian
                menu[0].setString(L"Joacă");
                menu[1].setString("Opțiuni");
                menu[2].setString("Ieșire");
        }
        if (language == 1) { //russian
                menu[0].setString("Играть");
                menu[1].setString("Настройки");
                menu[2].setString("Выити");
        }
...

 

2
Graphics / Re: Make blur sprites.
« on: January 05, 2017, 09:47:58 pm »
Gaussian blur. I want  when i press a key the entire window become blur.

3
Graphics / Make blur sprites.
« on: January 05, 2017, 08:37:52 pm »
How can i make all window blur ?

4
Graphics / Re: The sprite is moving very slow and with bugs.
« on: December 29, 2016, 03:20:20 pm »
you can see the code on https://github.com/DoubleNy/Demokratie-bringer, it's not a bunch of code.
p.s look at game.cpp
p.p.s I don't play games,I've played only cs 1.6  :D 3-4 years ago.

5
Graphics / Re: The sprite is moving very slow and with bugs.
« on: December 29, 2016, 12:42:59 pm »
I think the problem is caused by drawing "window.draw(map);", because if i don't draw the map, and only draw the player inside loop, fps are like >1000, if they both are drawn fps don't exceed 18. I create the map as it is done in this tutorial http://www.sfml-dev.org/tutorials/2.4/graphics-vertex-array.php#example-tile-map.

6
Graphics / Re: The sprite is moving very slow and with bugs.
« on: December 29, 2016, 11:53:19 am »
Mobile Intel(R) 45 Express Chipset Family(MSC - WDDM 1.1)

7
Graphics / Re: The sprite is moving very slow and with bugs.
« on: December 29, 2016, 12:48:34 am »
I have already read this part , but this doesn't work : (( 

8
Graphics / Re: The sprite is moving very slow and with bugs.
« on: December 28, 2016, 11:13:49 am »
even if I don't load texture in main loop the sprite is moving slow. Only if I erase "window.clear(); && window.draw(map);" it is moving smooth and fast, but in such case there remain parts of sprite in the back (smth like this : http://cdn2.theweek.co.uk/sites/theweek/files/styles/gallery_adv/public/2015/07/555.jpg?itok=Z4_O-uNe ). How can i draw only the part which will be fulfilled by sprite after his moving ?

9
Graphics / The sprite is moving very slow and with bugs.
« on: December 28, 2016, 01:06:23 am »
Hi , I am trying to learn SFML, but all I've done is a skeleton of a game.
1. I created a sprite and added it to window.
2. I create a map(tiled map) and added it, too.
But, when i move my sprite it is very slow and has a lot of lags, i don't now why...or i do, I think this is caused because I draw my map and sprite always after moving sprite. How can I change this thing? 'cause if I remove draw.map, the sprite is very smooth and fast.

This is a part of my code :
while (window.isOpen()){
                // handle events
                sf::Event event;
                while (window.pollEvent(event)){
                        if (event.type == sf::Event::Closed)
                                window.close();
                }
                        if (sf::Keyboard::isKeyPressed(sf::Keyboard::Key::Up)) {
                                x = 68;
                                player.move(0.0, -20.0);
                        }
                        if (sf::Keyboard::isKeyPressed(sf::Keyboard::Key::Down)) {
                                x = 0;
                                player.move(0.0, 20.0);
                        }
                        if (sf::Keyboard::isKeyPressed(sf::Keyboard::Key::Left)) {
                                x = 3 * 70;
                                player.move(-20.0, 0.0);
                        }
                        if (sf::Keyboard::isKeyPressed(sf::Keyboard::Key::Right)) {
                                x = 2 * 68;
                                player.move(20.0, 0.0);
                        }
                //texture.loadFromFile("tank.png", sf::IntRect(x, 0, 80, 65));
                //changed to
               player.setTextureRect(sf::IntRect(x, 0, 79, 63));
                window.clear();
                window.draw(map);
                window.draw(player);
                window.display();
}
 

Pages: [1]