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 ... 720
31
I highly recommend to use the SFML CMake Template: https://www.sfml-dev.org/tutorials/2.6/start-cmake.php

Not only will you not have to build SFML separately anymore, but it also provides a valid and ready to use CMake file.

One of the strength of CMake is that you can provide configuration files for your library, so that any users don't have to manually specify include directories or library file names, instead they can work with targets and have the config do all the heavy lifting, which additionally makes it platform unspecific CMake code.

If you don't want to use the CMake template, you should really be calling find_package and set the SFML_DIR to point to the lib/cmake/SFML directory or SFML_ROOT to point to the SFML root directory.
Then you don't have specify an include directory and you can just have target_link_libraries(MyProject sfml-graphics sfml-audio)

32
SFML projects / Re: Tail Smash! - Arcade driving game
« on: March 04, 2024, 12:39:47 pm »
That's a pretty cool mechanic! :)

Without having to dig through the code, what math did you use for the tail physics?

33
Graphics / Re: How sf::VertexArray works OpenGL-wise?
« on: March 01, 2024, 11:53:48 am »
VertexArray is basically just a container with some extra information, the actual magic with OpenGL happens in the draw method of the RenderTarget. Hope that helps.

34
System / Re: Installing SFML to Xcode
« on: February 27, 2024, 12:55:23 pm »
What are the issues and errors you're encountering?

35
General / Re: Casual Stuttering Problem
« on: February 27, 2024, 10:58:32 am »
Note that you've limited your physics frametime to 60fps, yet the rendering is set to 144fps.
What you usually want is a higher physics frametime than the rendering frame, so your calculations are more precise than what you end up rendering.

Looks like you got the first part of the famous Fix Your Timestep! article implemented, what's missing is the crucial part to make it smooth and that is the interpolation.

If you go frame by frame in the video, you can see how the circle sometimes remains two frames in the same location and then it makes a big jump, which your eyes (or rather brain) will read as a stutter.
This might be due to the frame rate discussion above (not enough updates), or might be amplified because of the recording, or it might be because of the lack of interpolation.

The underlying problem is that you're not getting a consistent position calculated for the current frame, so it might be late in one frame and then cause a frame to not update or the update is smaller than other frames. Our brain is very sensitive and detects uneven spacing in the movement as stutter. So even if you're always moving forward, if the distance traveled per frame or rather over time (framerate could drop or increase), we  can perceive it as an uneven movement.

36
General / Re: Unresolved External symbol (followed tutoriall)
« on: February 26, 2024, 08:48:49 am »
The error message shown would mean that you didn't define SFML_STATIC while linking SFML statically. You can see that because it was trying to resolve _declspec(dllimport) symbols, which are symbols from a DLL and thus not from a static library.

37
Window / Re: how to go about player movement?
« on: February 25, 2024, 01:12:38 pm »
Events are a great way to implement movement, but you might need to store some states, so you can check multiple keys at the same time.
Meaning, store the state of a key, whether it's pressed (true) or released (false). Then outside the event loop you can check the state of multiple keys at the same time.

SFML 1.6's sf::Input was replaced by sf::Keyboard / sf::Mouse / sf::Joystick, but events are superior and work the best across platforms.

38
Window / Re: full screen
« on: February 25, 2024, 01:09:00 pm »
It's a known issue, for which we currently don't have a solution for: https://github.com/SFML/SFML/issues/2300

Not very useful, but you could hard code the resolution, at least for your device.

39
Your texture needs to be kept alive for the whole duration of the rendering, including the display call, so you can't/shouldn't create it locally inside a function.

Try to load the texture as member of the Level class.

Additionally, if you plan to inherit from sf::Drawable keep in mind that draw() is actually defined as const, so you can't modify e.g. the Level class itself.

40
Feature requests / Re: Addng video and audio editing in sfml
« on: February 22, 2024, 12:15:29 am »
I appreciate the enthusiasm, but it seems like you have little understanding of the complexities of audio and video editing, capturing and encoding. This is not a trivial task at all and has so many possibilities, that it would be hard to even find a simple subset, plus it would still not fit the scope of SFML.

There is plenty of capturing software out there (e.g. OBS Studio) and even more video or audio editing software (DaVinci, Audacity, etc.). I'd claim that it's easier to use a capturing software, than to try and write your own video encoder from your animation.

41
General / Re: Linking issue with SFML 2.6.1
« on: February 21, 2024, 11:46:33 pm »
I know, that was just a funny remark ;)

What about the other question?

42
Graphics / Re: Flickering sprite on high resolutions
« on: February 21, 2024, 08:34:11 am »
I don't really see a flicker, or do you mean that the character vanishes?

Is the whole thing intentionally very faded/barely visible?

43
Are you using any SFML resources (like a texture or window) at a global scope?

44
General / Re: Linking issue with SFML 2.6.1
« on: February 16, 2024, 04:33:36 pm »
How did you install SFML? Did you build it from source?

What's FSML? ;D ;D

45
General / Re: MineCraft.. Where to start?
« on: February 16, 2024, 07:53:27 am »
If you have to ask, you're not ready, i.e. lack the knowledge and experience, for the amount of work required to build something like a Minecraft clone.
You're probably better of using some engine that already has some templates that are Minecraft-like.

Otherwise you'll have to learn about 3D rendering with OpenGL, as SFML doesn't provide support for that. Then you need to learn about all the details of how Minecraft works. Find out how to optimize chunk loading and rendering. Apply lighting to everything. And yet, you'll still just be at the very beginning. Mining, crafting, red stone, NPC, fight system, etc. etc.

There are a few people who implemented some basic Minecraft version using SFML, you can find them by just using a web search engine with the terms: "SFML minecraft"

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