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.


Topics - Edimartin

Pages: [1]
1
General / SFML with Steam SDK crash on linux.
« on: March 06, 2022, 11:33:25 pm »
Hi. I am developing my first game for steam. It's a 2D game with SFML and OpenGL in Linux.

I am developing in Linux Mint with XFCE:

OS: Linuxmint 20.3 una
Kernel: x86_64 Linux 5.4.0-100-generic
Uptime: 52m
Packages: 3127
Shell: bash
Resolution: 3286x1080
DE: Xfce
WM: Xfwm4
WM Theme: Mint-Y
GTK Theme: Mint-Y [GTK2]
Icon Theme: Mint-Y
Font: Ubuntu 10
Disk: 383G / 598G (68%)
CPU: Intel Core i5-3330 @ 4x 3.2GHz [51.0°C]
GPU: NVE4
RAM: 3675MiB / 15971MiB
 

I have one C++ project using the QTcreator IDE. I compile SFML for my linux and I am using the lates version 2.5.1.
I download the steam SDK from this link https://partner.steamgames.com/downloads/steamworks_sdk.zip and I attach the library in my QTcreator project.

The problem is when I add the steam lib it crash. In debug it crash when I declare the sf::RenderWindow window;

I create another project with just an SFML example:

#include <SFML/Graphics.hpp>

int main()
{
    // create the window
    sf::RenderWindow window(sf::VideoMode(800, 600), "My window");

    // run the program as long as the window is open
    while (window.isOpen())
    {
        // check all the window's events that were triggered since the last iteration of the loop
        sf::Event event;
        while (window.pollEvent(event))
        {
            // "close requested" event: we close the window
            if (event.type == sf::Event::Closed)
                window.close();
        }

        // clear the window with black color
        window.clear(sf::Color::Black);

        // draw everything here...
        // window.draw(...);

        // end the current frame
        window.display();
    }

    return 0;
}
 

And I attach the SFML and Steam SDK in my project using this command in project.pro:

LIBS += -lsfml-system -lsfml-window -lsfml-graphics

LIBS += -L$$PWD/lib/linux64/ -lsdkencryptedappticket -lsteam_api
 

It compiles very good, but when I run the project in debug mode, it crash exacly in this line:

sf::RenderWindow window(sf::VideoMode(800, 600), "My window");

Have someone try to make an SFML project with steam SDK in linux?
I try compile and run it in release mode but in crashes aready.

2
Hi.
I am using SFML to make a game where the player can write text. I am making a text field to get the pressed keys from keyboard. I am having some problem with my ABNT2 keyboard.

I write this code for test:
#include <SFML/Graphics.hpp>
#include <SFML/Config.hpp>

int main()
{
    // create the window
    sf::RenderWindow window(sf::VideoMode(800, 600), "My window");

    printf("\n%u %s %s SFML version == %u.%u.%u\n",__LINE__,__FILE__,__func__
           ,SFML_VERSION_MAJOR
           ,SFML_VERSION_MINOR
           ,SFML_VERSION_PATCH
           );fflush(stdout);

    // run the program as long as the window is open
    while (window.isOpen())
    {
        // check all the window's events that were triggered since the last iteration of the loop
        sf::Event event;
        while (window.pollEvent(event))
        {
            // "close requested" event: we close the window
            if (event.type == sf::Event::Closed)
                window.close();

            //read the key pressed
            if(event.type == sf::Event::KeyPressed){
                printf("\n%u %s %s Key Pressed code == %d",__LINE__,__FILE__,__func__
                       ,event.key.code
                       );fflush(stdout);
                if (sf::Keyboard::isKeyPressed(sf::Keyboard::Tilde)){
                    // left key is pressed: move our character
                    printf(" TILDE PRESSED");fflush(stdout);
                }
                if (sf::Keyboard::isKeyPressed(sf::Keyboard::Quote)){
                    // left key is pressed: move our character
                    printf(" QUOTE PRESSED");fflush(stdout);
                }
            }
        }

        // clear the window with black color
        window.clear(sf::Color::Black);

        // draw everything here...
        // window.draw(...);

        // end the current frame
        window.display();
    }

    return 0;
}
 

When I run the program, I press first the quote key '´' one time and then I press the tilde key '~' and I have this return:
$ ./helloSFML

9 main.cpp main SFML version == 2.5.1

28 main.cpp main Key Pressed code == -1 TILDE PRESSED
28 main.cpp main Key Pressed code == -1^C

Is this a problem with the last SFML version? Maybe I could try another old version.
How can I solve this problem?

I am using linux mint "4.15.0-20-generic #21-Ubuntu SMP Tue Apr 24 06:16:15 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux" with XFCE 4.12 with G++ "g++ (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0".

Thanks.

3
Graphics / JPEG error in Windows 64 bits
« on: February 24, 2015, 04:33:28 pm »
Hi. I am making a Game Engine for my Conclusion Work in College. To be multi-plataform I chose SFML to make Linux and Windows versions of the same game.

I create a simple plataform project to show the Game Engine features. I am using both JPEG and PNG files to create the game design.

In Linux 64 bits the game runs OK. In Windows I use the MinGW 32 and 64 for Windows 32 and 64 versions and I have this problem.

SFML return this error message in Windows 64 version:

Failed to load image from memory. Reason : JPEG format not supported (progressive)

Why?

Pages: [1]
anything