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

Pages: [1] 2 3 ... 6
1
Graphics / Re: Can't directly type Korean
« on: February 09, 2018, 08:12:31 pm »
I think this question might be related:
https://stackoverflow.com/questions/434048/how-do-you-use-ime

From looking at this question, I think it might be impossible to do what I want with SFML.
I looked at SDL and it seems that SDL has what I want.
https://wiki.libsdl.org/Tutorials/TextInput

2
Graphics / Re: Can't directly type Korean
« on: February 09, 2018, 06:59:48 pm »
Other apps immediate display the Korean alphabets.
Like for example
Typing in notepad:

Typing in SFML app

3
Graphics / Re: Can't directly type Korean
« on: February 09, 2018, 03:28:35 pm »
I'm not sure this is directly related to SFML. Does this happen only with SFML apps? Can you show a minimal code that reproduces the problem?
I think this happens only with SFML apps. It doesn't happen with Google Chrome, MS word, Overwatch, etc.

int main()
{
sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");

while (window.isOpen())
{
        sf::Event event;
        while (window.pollEvent(event))
        {
                if (event.type == sf::Event::Closed)
                        window.close();
                if (event.type == sf::Event::TextEntered)
                {
                        std::cout << event.text.unicode << "\n";
                }
        }

        window.clear();
        window.display();
}
}
Do you use IME?
Yes, I'm using Microsoft IME for Korean.

This is how many (most?) CJK IMEs work and it's their intended way of working:  https://en.wikipedia.org/wiki/Input_method

If this happens in SFML then it has to be happening in all other apps too unless they forcibly turn IME off somehow, like via: https://msdn.microsoft.com/en-us/library/windows/desktop/dd318171(v=vs.85).aspx

If you don't want the pop ups then there are keyboard layouts you can turn on but I don't know Korean so I don't know if they get rid of the pop up:

I can't type in Korean at all if I call ImmAssociateContext(handle, nullptr)

4
Graphics / Can't directly type Korean
« on: February 09, 2018, 06:43:22 am »
Hi,
Whenver I type in Korean,I don't receive TextEntered events right away.
Instead a small popup appears and I must first type the text on that popup window and press enter to receive the events.
This makes it very frustrating to type.
How can I get rid of this??

I'm on windows 10, sfml 2.4.2.

5
SFML projects / Re: Screenshot Thread
« on: October 22, 2017, 10:42:23 pm »

6
SFML projects / Re: Screenshot Thread
« on: July 12, 2017, 09:11:42 am »
I've been trying to figure out how to write proper netcode for a fast paced multiplayer game forever and I think I finally got it right!
Time to focus on game mechanics and visual stuff!

7
Graphics / Re: Weird black line above sprite
« on: March 22, 2017, 06:51:21 am »
Hey I had a similar issue to yours.
http://en.sfml-dev.org/forums/index.php?topic=21668.0

8
Graphics / Re: Weird tilemap issue
« on: March 15, 2017, 09:58:26 pm »
Thank you.
I researched this issue further and solved it by applying the technique I saw from here:
https://github.com/fallahn/sfml-tmxloader/blob/c7c6f3da0397657409f35f754c84aa5a4785202e/src/MapLoaderPrivate.cpp#L687

9
Graphics / Weird tilemap issue
« on: March 15, 2017, 05:36:10 pm »
This is how it should look normally.


But sometimes when I move around the camera by using view.setCenter()

Weird artifacts appear.

I have tried adding (.5f, .5f) to the center position of view. Then the issue is mostly gone. But rarely, I can still see the artifacts.
I am using a gtx 1070.



10
Graphics / Weird stuttering issue
« on: February 12, 2017, 08:47:02 am »
Hello, I have a strange stuttering issue with this code.
#include "Core/MathUtility.h"
#include <SFML/Graphics.hpp>
int main()
{
        sf::RenderWindow window(sf::VideoMode(1000, 800), "SFML works!");
        sf::CircleShape shape(100.f);
        shape.setFillColor(sf::Color::Green);
       
        sf::Clock clock;
        sf::Time elapsed = sf::Time::Zero;
        sf::Vector2f pos;
        sf::Vector2f oldPos;


        while (window.isOpen())
        {
                elapsed += clock.restart();
                sf::Event event;
                while (window.pollEvent(event))
                {
                        if (event.type == sf::Event::Closed)
                                window.close();
                }
               
                while (elapsed >= sf::seconds(1 / 60.f))
                {
                        std::cout << "tick\n";
                        elapsed -= sf::seconds(1 / 60.f);
                        oldPos = pos;
                        if (sf::Keyboard::isKeyPressed(sf::Keyboard::Left))
                                pos.x -= 5.f;
                        if (sf::Keyboard::isKeyPressed(sf::Keyboard::Right))
                                pos.x += 5.f;
                }
                float t = elapsed.asSeconds() / sf::seconds(1 / 60.f).asSeconds();
                window.clear();
                sf::Vector2f renderPos = lerp(oldPos, pos, t);
                std::cout << "renderPos: " << renderPos.x << "\n";
                shape.setPosition(pos);
                window.draw(shape);
                window.display();
        }
        return 0;
}
 

I think the stutter comes from random high frametimes.
dt: 0.000104
renderPos: 298.681
dt: 0.038244
tick
tick
tick
renderPos: 310.154
dt: 0.000183
renderPos: 310.209
dt: 0.000158
renderPos: 310.257
dt: 0.037992
tick
tick
renderPos: 321.655
dt: 0.000206
renderPos: 321.716
dt: 0.000212
renderPos: 321.78

I'm using sfml 2.4.0, windows 10, i7 6700k/gtx 1070.
Sometimes if I reboot my computer, the stutter goes away.


What I don't understand is that stutter never seems to occur on my laptop with integrated graphics.

11
Window / Re: How to filter out weird characters in TextEntered event?
« on: April 27, 2016, 10:07:36 pm »
Sorry it's not that symbol. It's just a square.

For example, I press ctrl + a and display the character in sf::Text and I see a square.

12
Window / How to filter out weird characters in TextEntered event?
« on: April 27, 2016, 05:18:23 am »
Sometimes I get weird symbols like � through TextEntered
How to filter these out?

13
Graphics / I want to fit a text inside a box
« on: March 28, 2016, 07:37:43 am »
I'd like to make a textbox using sf::RectangleShape and sf::Text.
Rectangle has a fixed height.
My question is how to find the perfect character size and text position to fit the text in rectangleshape?

14
General discussions / Re: Why does sf::Packet convert to big endian?
« on: March 03, 2016, 01:19:01 am »
But as far as I know, as long as both sending and receiving sides use same endian for data, it doesn't matter.
Yes, just that the "as long" is not helpful if the code breaks occasionally. In reality you don't know the other's host endianess.
I don't really understand what you are saying. I'm talking specifically about sf::Packet. Users who use that class don't have to know anything about endianess. So why would the code suddenly break? Also, I just said that the platforms on which SFML runs on use little endian.

Since SFML's platform uses little endian, why is sf::Packet needlessly converting to big endian?
SFML's network sockets cannot just communicate to other SFML endpoints. They run TCP and UDP protocols which are ubiquituous, you can talk to anything that implements them. For example, I've once written a sf::UdpSocket that sends to a Java DatagramSocket.
SFML's UdpSocket and TcpSocket can talk to other UDP and TCP sockets, but sf::Packet is supposed to be used only within SFML.

15
General discussions / Re: Why does sf::Packet convert to big endian?
« on: March 02, 2016, 09:32:38 pm »
Network byteorder is big endian. But as far as I know, as long as both sending and receiving sides use same endian for data, it doesn't matter. Since SFML's platform uses little endian, why is sf::Packet needlessly converting to big endian?

Pages: [1] 2 3 ... 6
anything