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

Pages: 1 2 3 [4] 5 6 ... 720
46
Graphics / Re: Perspective distortion issue
« on: February 16, 2024, 12:09:33 am »
Waiting for Hapax to mention Elastic Sprite that "fixes" exactly this issue ;)

https://github.com/Hapaxia/SelbaWard/wiki/Elastic-Sprite

47
Graphics / Re: setFrameLimit - curious effect
« on: February 15, 2024, 09:36:03 pm »
You said it's inside the event loop, which means it will only be called if there are events to be processed.
As such the function won't be called every iteration. Not sure that's what you're seeing.

48
Graphics / Re: setFrameLimit - curious effect
« on: February 15, 2024, 04:24:47 pm »
The framerate limit isn't restricted to only SFML functions, but it affects the whole game loop.
Technically speaking display() will suspend the thread for a certain period of time, meaning this is a blocking operation and nothing else in the program (on the same thread) will be executed.

As such everything that is in the game loop will be limited by the set framerate limit.

49
Graphics / Re: Load From File
« on: February 14, 2024, 02:06:57 pm »
SFML uses stb_image for loading images. If you're using SFML 2.6 you should have the latest version.
Not sure what it considers corrupt exactly. If you're on an older version, it might simply be a bug in stb_image that has already been solved (e.g. 8-bit png wasn't supported for a while).

Here's the supported (and unsupported) formats from stb_image directly:

      JPEG baseline & progressive (12 bpc/arithmetic not supported, same as stock IJG lib)
      PNG 1/2/4/8/16-bit-per-channel

      TGA (not sure what subset, if a subset)
      BMP non-1bpp, non-RLE
      PSD (composited view only, no extra channels, 8/16 bit-per-channel)

      GIF (*comp always reports as 4-channel)
      HDR (radiance rgbE format)
      PIC (Softimage PIC)
      PNM (PPM and PGM binary only)
 

50
Graphics / Re: Load From File
« on: February 14, 2024, 12:36:50 pm »
Are you mixing debug and release version (e.g. building in debug while using SFML release libraries)?

Try some other image to be sure.

51
General / Re: SFML with Sublime Text
« on: February 13, 2024, 08:16:10 am »
I don't know what sublime text provides, but I'm sure you can just web search on how to configure a C++ project.

If it supports CMake, I also highly recommend to use the SFML CMake Template

52
General / Re: Still gets undefined everytime can you guys help me ;D
« on: February 13, 2024, 08:11:50 am »
Don't define SFML_STATIC if you're linking the dynamic libraries (the ones without -s suffix).

Any reason you're using SFML 2.4 when 2.6 is the latest?
Did you ensure that the compiler is 100% the same as the one used to build SFML? There are download links on the download page.

53
General / Re: SFML Including
« on: February 12, 2024, 10:25:32 am »
Yes, it's possible. You need to tell your compiler where to find the necessary files.

54
Graphics / Re: Running into errors with using SFML on WSL
« on: February 12, 2024, 08:41:02 am »
Hmm odd. It works fine for me, but I'm also on Windows 11 and not 10

Any specific reason you want to develop under WSL2 with SFML?

55
DotNet / Re: Mouse Scroll Direction
« on: February 09, 2024, 09:31:58 am »
I don't quite understand what the issue.

This example programs works fine for me.
If I scroll up, it shows "Vertical Up 1" for example and if I scroll down it shows "Vertical Down 2" for example.

Does this not work for you?

using SFML.Graphics;
using SFML.Window;

var window = new RenderWindow(new VideoMode(400, 300), "SFML Test");
window.SetFramerateLimit(30);

var font = new Font("C:/Windows/Fonts/Arial.ttf");
var text = new Text("Test", font);

window.Closed += (sender, _) => ((RenderWindow)sender).Close();
window.MouseWheelScrolled += (sender, eventArgs) =>
{
    var wheel = eventArgs.Wheel switch
    {
        Mouse.Wheel.VerticalWheel => "Vertical",
        _ => "Horizontal"
    };

    var direction = eventArgs.Delta switch
    {
        > 0 => "Up",
        < 0 => "Down",
        _ => "??"
    };
   
    text.DisplayedString = $"{wheel} {direction} {eventArgs.Delta}";
};

while (window.IsOpen)
{
    window.DispatchEvents();
    window.Clear();
    window.Draw(text);
    window.Display();
}

56
Graphics / Re: Running into errors with using SFML on WSL
« on: February 09, 2024, 08:45:12 am »
What do you get when you run wsl --version?

57
DotNet / Re: Mouse Scroll Direction
« on: February 07, 2024, 10:29:10 am »
The zooming itself works just fine, with one exception:
It doesnt matter where i scroll, the way it scroll is kind of random (meaning i haven't found a pattern)
You mean the direction is random?

58
General / Re: Can't get SFML on VS 2022
« on: February 07, 2024, 08:48:42 am »
Make sure to not just follow the pictures, but also what's written in the tutorial.

Personally, I can very much recommend using the CMake Template Project, as it will setup and link SFML automatically and you don't have to fiddle with IDE configurations.

59
This is really cool! :)
Always good when project spiral out of control into something great! ;D

Do you have any specific goal with it, or just continue playing around?

Btw. for screen recording I highly recommend using OBS Studio, it's free and it's not just for streaming, but also great to just capture some video and doesn't add any watermark

60
General discussions / Re: iOS and ANdroid support?
« on: February 05, 2024, 09:41:24 am »
There have been lots of improvements for both platforms, but as Erid said, we're still stuck on OpenGL ES 1 and thus you won't get shader support, the rest should be working pretty good.

Pages: 1 2 3 [4] 5 6 ... 720
anything