Welcome, Guest. Please login or register. Did you miss your activation email?

Recent Posts

Pages: 1 ... 3 4 [5] 6 7 ... 10
41
Graphics / Re: Unabled to load file problem - loadFromFile.
« Last post by ram.ggi191 on December 05, 2024, 03:05:57 pm »
Oh yes, the path was the problem, the engine didn't recognised the folder path then I copied my asset file to the project file, linked it and then it works!

Still I need to figure out why it doesn't recognised the path of the directory yet.   
42
Graphics / Re: Unabled to load file problem - loadFromFile.
« Last post by Hapax on December 04, 2024, 02:48:17 pm »
Have you tried absolute paths to make sure the image is able to be loaded?
Presumably it's not loading because it can't find it but it might not be able to read it.

If it can't find it, it would likely be due to local paths and where your IDE is looking for them. How to change this depends on the IDE.
43
SFML projects / Re: Dispersio 3
« Last post by achpile on December 04, 2024, 08:49:14 am »
Hi again and it's great to see you back at it!

I'll be interested to see your progress throughout.

Thanks mate!  ;)
44
SFML projects / Blupi Bouncers! A Desktop Pet Game.
« Last post by Me-Myself-And-I on December 04, 2024, 03:12:30 am »
Hi all! I've been working on implementing winapi with an SFML window and have been having one success after another. For example: I've learned how to make a SFML window that supports dragging-n-dropping files into it. This specific time I have figured out how to make a transparent window that allows clicking through it where there is no color.

This is the code I used to accomplish a transparent window:

    WindowHandle handle = mainwindow.getSystemHandle();

    SetWindowLongPtrA(handle, GWL_EXSTYLE, WS_EX_LAYERED | WS_EX_TOOLWINDOW);//Most important to set the window as WS_EX_LAYERED to allow the third function "SetLayeredWindowAttributes".
   
    SetWindowPos(handle, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);//This is just to set the window on-top of other windows. Not necessary
   
    SetLayeredWindowAttributes(handle, RGB(255, 0, 255), 0,LWA_COLORKEY);//The color purple is chosen to be removed from the window. The last thing to do is clear the window with the color purple.

   


 



Blupi Bouncers is a fangame for the 90's game "Speedy Eggbert". It features the ability to play around with many different modes and types of blupis on your desktop like a desktop pet. The number of blupis you can have on your screen is only limited by your computers performance. Don't worry though. The program doesn't freeze your computer if it can't handle a bunch of blupis.




I have Blupi Bouncers on itch.io and the source code is on github for anyone who's interested.

https://fishleteer.itch.io/blupi-bouncers

https://github.com/Happy-Flappy/Blupi-Bouncers
 
45
Graphics / Re: Unabled to load file problem - loadFromFile.
« Last post by ram.ggi191 on December 04, 2024, 01:32:40 am »
Thanks for your reply!

However, I still get the dead white screen, even when I fix the additional dependencies to fit as the right mode (like using non -d.lib for the release -d.lib for  debugger mode)

here is the picture of my dependencies set up below in the release mode.
46
SFML projects / Re: Dispersio 3
« Last post by Hapax on December 03, 2024, 11:04:11 pm »
Hi again and it's great to see you back at it!

I'll be interested to see your progress throughout.
47
Graphics / Re: Unabled to load file problem - loadFromFile.
« Last post by eXpl0it3r on December 03, 2024, 03:24:27 pm »
You're likely linking SFML release libraries (without -d suffix) in debug mode or SFML debug libraries (with -d suffix) in release mode.

Make sure to use the SFML debug libraries in debug mode (e.g. sfml-graphics-d.lib) and the SFML release libraries in release mode (e.g. sfml-graphics.lib).
48
Graphics / [SOLVED] Unabled to load file problem - loadFromFile.
« Last post by ram.ggi191 on December 03, 2024, 12:02:42 pm »
Hi!

I got a big white square on the screen once I run the code with the error message "Unable to load file"

I assume it is IDE setting problem, which the difference of execution directory and debug directory but not sure how should I adjust those IDE directions on the project option. I posted the error message in the console and my project settings

source code
        Labyrinth.loadFromFile("asset/labyrinth.png");

        int index = 0;
        for (int i = 0; i < 8; i++)
        {
                for (int j = 0; j < 4; j++)
                {
                        LabyrinthPieces[index] = new sf::Sprite(Labyrinth, sf::IntRect(i * 8, j * 8, 8, 8));
                        LabyrinthPieces[index]->setScale(2.0f, 2.0f);
                        index++;
                }
        }

        Players.loadFromFile("asset/players.png");
49
Window / Re: SFML shows only white screen
« Last post by kojack on December 03, 2024, 11:25:27 am »
One important thing when using GCC (G++) is the version of the compiler you use to build the app must be identical to the version used to build SFML.
The only prebuilt SFML downloads for GCC are for version 13.1.0. So you must get that compiler (not 14.2.0) or you need to build SFML from source yourself using 14.2.0.

(Visual Studio used to have a similar issue with versions, but they don't any more).
50
Window / [SOLVED] SFML shows only white screen
« Last post by dimon98165 on December 01, 2024, 08:15:58 am »
Hello there, today i reinstalled the window after getting a virus. But i found out the project had stopped being compiled normally. Both G++(Compiler) and Collect2(Linker) doesn't show any both problems and issues there.

heres code:
```
#include <SFML/Graphics.hpp>
#include <parent_directory_finder_win64.hpp>
#include <fstream>
#include <filesystem>
#include <vector>
#include <main_functions.hpp>
#include <thread>
#include <functional>
#include <boost/asio.hpp>
#include <map>

int main(int argc, char** argv)
{
    P_Directory_Finder_win64 path(argc, argv);
    sf::RenderWindow window(sf::VideoMode(400, 400), "utail checker", sf::Style::Titlebar);
    window.setFramerateLimit(60);

    while (window.isOpen())
    {
        //главная часть
        sf::Event event;
        while (window.pollEvent(event))
        {
            if (event.type == sf::Event::Closed){
                window.close();
                exit(0);
            }
        }

        window.clear(sf::Color::Black);
        window.display();
    };
    return 0;
}
```

but heres script of .bat file:
```
g++ -I"client/win64/libraries/SFML-2.6.1/include" -static -c "client/win64/source/utail_client.cpp" -I"client\win64\libraries\headers" -I"client/win64/libraries/boost_1_86_0"

g++ -static -o "client/win64/utail_client.exe" "utail_client.o" "assets/icon.o" -L"client/win64/libraries/SFML-2.6.1/lib" -l:libsfml-window.a -l:libsfml-system.a -l:libsfml-graphics.a -l:libstdc++.a -l:libgcc.a -lws2_32
```

everything worked fine until i got viruses.... I had to reinstall OS... And the main problem is that SFML library doesnt show any images in it, but also just getting closed after a few seconds with error level: "-1073740940". I think its problem of version of new compiler which i downloaded earlier, because i havent changed anything in my project before reinstalling windows os. The fact is my project worked correctly until this. The version of new compiler which i downloaded is 14.2.0.

i checked my programm with GDB(GNU DEBUGGER) and it says that:
```
Starting program: C:\Users\сшсюэ\Desktop\utail_v0.9\client\win64\utail_client.exe
[New Thread 4436.0x36e0]
[New Thread 4436.0x38a4]
[New Thread 4436.0x2ba0]
warning: while parsing target library list: not well-formed (invalid token)
warning: while parsing target library list: not well-formed (invalid token)
warning: while parsing target library list: not well-formed (invalid token)
warning: while parsing target library list: not well-formed (invalid token)
warning: while parsing target library list: not well-formed (invalid token)
warning: while parsing target library list: not well-formed (invalid token)
warning: while parsing target library list: not well-formed (invalid token)
warning: while parsing target library list: not well-formed (invalid token)
warning: while parsing target library list: not well-formed (invalid token)
[New Thread 4436.0x1b24]
warning: while parsing target library list: not well-formed (invalid token)
warning: while parsing target library list: not well-formed (invalid token)
warning: while parsing target library list: not well-formed (invalid token)
warning: while parsing target library list: not well-formed (invalid token)
warning: while parsing target library list: not well-formed (invalid token)
warning: while parsing target library list: not well-formed (invalid token)
warning: while parsing target library list: not well-formed (invalid token)
warning: while parsing target library list: not well-formed (invalid token)
[New Thread 4436.0xb98]
warning: while parsing target library list: not well-formed (invalid token)
warning: while parsing target library list: not well-formed (invalid token)
warning: while parsing target library list: not well-formed (invalid token)
warning: while parsing target library list: not well-formed (invalid token)
warning: while parsing target library list: not well-formed (invalid token)
warning: while parsing target library list: not well-formed (invalid token)
warning: while parsing target library list: not well-formed (invalid token)
warning: while parsing target library list: not well-formed (invalid token)
warning: while parsing target library list: not well-formed (invalid token)
warning: while parsing target library list: not well-formed (invalid token)
warning: while parsing target library list: not well-formed (invalid token)
warning: while parsing target library list: not well-formed (invalid token)
warning: while parsing target library list: not well-formed (invalid token)
[New Thread 4436.0x27b0]
[New Thread 4436.0x2d50]
[Thread 4436.0xb98 exited with code 0]
[Thread 4436.0x27b0 exited with code 0]
[Thread 4436.0x2d50 exited with code 0]
[New Thread 4436.0x22b8]
[New Thread 4436.0x3b00]
warning: while parsing target library list: not well-formed (invalid token)
warning: while parsing target library list: not well-formed (invalid token)
warning: while parsing target library list: not well-formed (invalid token)
warning: while parsing target library list: not well-formed (invalid token)
warning: while parsing target library list: not well-formed (invalid token)
warning: while parsing target library list: not well-formed (invalid token)
warning: while parsing target library list: not well-formed (invalid token)
warning: while parsing target library list: not well-formed (invalid token)
warning: while parsing target library list: not well-formed (invalid token)
[New Thread 4436.0x167c]
warning: while parsing target library list: not well-formed (invalid token)
warning: while parsing target library list: not well-formed (invalid token)
warning: while parsing target library list: not well-formed (invalid token)
warning: while parsing target library list: not well-formed (invalid token)
warning: while parsing target library list: not well-formed (invalid token)
warning: while parsing target library list: not well-formed (invalid token)
warning: while parsing target library list: not well-formed (invalid token)
warning: while parsing target library list: not well-formed (invalid token)
warning: while parsing target library list: not well-formed (invalid token)
warning: while parsing target library list: not well-formed (invalid token)
warning: while parsing target library list: not well-formed (invalid token)
warning: while parsing target library list: not well-formed (invalid token)
warning: while parsing target library list: not well-formed (invalid token)
warning: while parsing target library list: not well-formed (invalid token)
warning: while parsing target library list: not well-formed (invalid token)
warning: while parsing target library list: not well-formed (invalid token)
warning: while parsing target library list: not well-formed (invalid token)
[New Thread 4436.0x30a8]
warning: while parsing target library list: not well-formed (invalid token)
warning: while parsing target library list: not well-formed (invalid token)
[New Thread 4436.0x3690]
warning: while parsing target library list: not well-formed (invalid token)
warning: while parsing target library list: not well-formed (invalid token)
warning: while parsing target library list: not well-formed (invalid token)
warning: while parsing target library list: not well-formed (invalid token)
[New Thread 4436.0x36a4]
warning: while parsing target library list: not well-formed (invalid token)
warning: while parsing target library list: not well-formed (invalid token)
warning: while parsing target library list: not well-formed (invalid token)
warning: HEAP[utail_client.exe]:
warning: Invalid address specified to RtlFreeHeap( 00000000006D0000, 0000000000F641C0 )

Thread 1 received signal SIGTRAP, Trace/breakpoint trap.
0x00007ffd7d096f0f in ?? ()
```

solve:
i just needed to download the G++ of version 13.1.0 whish can be downloaded from SFML website. So it finnaly works for me... thankfully it does....
Pages: 1 ... 3 4 [5] 6 7 ... 10
anything