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

Pages: 1 [2] 3
16
Hi guys,

https://github.com/SFML/SFML/pull/1517

I can see this pull reques is currently closed, but also on the discussion board for SFML 2.6 (and a very worthwhile feature). Lets discuss.

Is this a feature we want for 2.6 given the recently reduced scope, and what exactly is the current state of the PR (testing or review)?

17
General discussions / Concerned and Eager
« on: May 26, 2020, 04:52:27 pm »
Hi guys,

I would like to share some thoughts that have been plaguing me a bit recently.

I am a huge fan of SFML and I feel quite heavily invested in the project, but I am a bit concerned about how the library will continue to keep up with changes in the industry. I have been lurking around here for long enough to have seen discussions on all of the things that concern me. Two of my main concerns are:

Rendering Backend - OpenGL deprecation is going to be an issue at some stage, support for multiple rendering backends has been discussed/prototyped which is great!

C++ Standard Integration - There are classes in SFML that have been made obsolete by features added in newer C++ standards (mostly thread related). There are also some concepts, such as move semantics, that really should be implemented.

While neither of these are actually a real issue at this very moment, I am concerned about how long it will take to adapt the library when they do become immediate issues. I know that the library is maintained by the devs in their spare time, and the dedication you all have is incredible. However, I know SFML 3.0 is far beyond the horizon and I am not sure that the official plans even encompass the pending rendering backend issue?

I guess that what I am trying to articulate is that I am concerned about SFML being left behind by the industry. These concerns may be completely unreasonable, but I know some others share the same (see Elias blog post about moving away from SFML in favour of SDL for similar concerns), but I have them none-the-less.

Instead of worrying about this, the better thing to do would be to help contribute. I have already said that I was going to work on implementing move semantics for the library, but I am having second thoughts because I don’t think move semantics are on your critical path (making it a low-priority pull-request).

With that said, what can I do to help SFML with something more immediate that would help push towards 2.6 or 3.0? I am keen af.

Any thoughts or suggestions?

18
General / Re: UI click detection
« on: May 26, 2020, 04:31:38 am »
Quote
If my textbox is actually placed outside of the rect of its parent (either the whole textbox or even a part of it) then I will never be able to focus it since I always check from top to bottom in the UI hierarchy. This could be fixed if I forced child UI elements to be inside their parent's rect but I don't like that restriction since it takes away too much flexibility.

Might be an overly simplistic solution here, but what if you resized a parent elements "mouse-click-detection" bounding box to include the bounds of its children? If the parent element needs to be resized due to a child being added or removed then it could propegate the event up the tree so all parents could be adjusted accordingly.

19
SFML development / Re: SFML Move Semantics
« on: April 18, 2020, 01:15:52 am »
Alright, I will take this on then  :D

Before I start, I would just like to clarify my intentions would be to implement explicit move constructor and move assignment operators for classes that inherit from sf::NonCopyable.

Also, is there a place that the SFML devs usually discuss development when required, or is this forum post appropriate enough?

[EDIT]:

Oh gosh, I just noticed the lengthy discussion on sf::NonCopyable. Am I safe to assume we keep sf::NonCopyable and leave it untouched?

https://en.sfml-dev.org/forums/index.php?topic=21781.15

20
SFML development / SFML Move Semantics
« on: April 14, 2020, 01:40:18 am »
Hi guys,

I was hoping to find some information about the status of move-semantic implementation in SFML. I have seen a bit of discussion regarding C++ standard support and plans on the SFML roadmap, but I am not sure if any concrete decisions have been made, or if anyone is already working on it?

My motivation for asking is because I would be more than happy to work on implementing move semantics for SFML, but only if it fits with SFML's current plans and would be taken seriously / reviewed for merging.

Much love!

21
General / Re: CMake SFML Private Linkage
« on: January 19, 2020, 11:51:13 am »
Ah right, that's pretty fundamental C++. Thanks so much Laurent!

22
General / CMake SFML Private Linkage
« on: January 19, 2020, 03:02:37 am »
Howdy pardners

Throughout my time using SFML I have built up a library of common utility classes that I like to include in all of my projects (as I am sure most of us have). I am using CMake to generate build files for my projects (Linux), which works great, but something bugs me that I dont understand and I am hoping someone here may be able to explain.

Consider the following minimised CMakeLists.txt example

cmake_minimum_required(VERSION 3.12)
project(my_lib)

# Set project paths.
set(EXE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/example)
set(INC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include)
set(SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src)

# Find SFML.
find_package(SFML 2.5 COMPONENTS graphics system window REQUIRED)

# Build library.
file(GLOB_RECURSE LIB_SRC ${SRC_DIR}/*.cpp)
add_library(${PROJECT_NAME} STATIC ${LIB_SRC})

# Set include directories publicly.
target_include_directories(${PROJECT_NAME} PUBLIC ${INC_DIR})

# Link library to SFML privately.
target_link_libraries(${PROJECT_NAME} PRIVATE sfml-graphics sfml-system sfml-window)

# Build test
add_executable(my_exe ${EXE_DIR}/Test.cpp)

# Link test to library
target_link_libraries(my_exe ${PROJECT_NAME})


This script does the following:
  • Finds SFML
  • Builds my llibrary
  • Links my llibrary to SFML
  • Builds my executable
  • Links my executable to my library

What bugs me here is that I link my library to SFML manually, but my executable also gets linked SFML automatically, despite the fact that I am using the PRIVATE keyword while linking my library to SFML. This happens regardless of whether my library and executable are defined in the same CMake script, or seperate scripts with the executable adding the library via the add_subdirectory command.

This logic doesn't hold in other similar situations, which leads me to believe it might have something to do with the SFML cmake config? Can anyone explain the logic to me?

23
Thank you for posting on this, I was having the same issue using VsCode. I added the SFML "dylibs" to the input monitoring whitelist but wasn't having any luck. I didn't think it would be VsCode itself that needed to be whitelisted.

24
General discussions / Movement Scripting
« on: September 12, 2019, 05:51:17 am »
Hi guys,

Just wanted to start a general conversation about how you have implemented movement scripting in your games, i.e. how do you define a path for an entity to follow. Has anyone implemented this in a generic way?

I recently created a class called Trajectory, which allows you to add time-stamped position/rotation points, then a getter function that returns interpolated position/rotations based on an input time value.

This works well enough for my use case, but I can imagine better solutions exist for motion that ought to be smoothed using splines or something like that.

25
General / Re: SFML 2.5 CMake Migration
« on: May 17, 2019, 02:47:14 pm »
I figured out what my problem was and wanted to post the solution in case anyone else has the same issue. The problem was that I had downloaded the 64-bit version of SFML but VS was configured to produce a 32-bit executable. I downloaded the 32-bit version and the CMake error I described is no more.

26
General / Re: SFML 2.5 CMake Migration
« on: May 10, 2019, 03:45:19 pm »
Hi Guys,

I am trying to build an SFML 2.5 application using CMake in Visual Studio 2019. The CMake process is failing on the find package command with the error message shown in the attached image.

It seems that Visual Studio is having no problems locating the SFMLConfig.cmake file, but is rejecting the file because the version is not compatible. This error message remains regarless of the version number I use, or if I supply one at all.

Does anyone know what the issue might be here?

27
SFML projects / Procedural Pacman
« on: March 01, 2019, 12:56:50 pm »
Hi guys,

I have recently started developing my first proper game using SFML, it is going to be a Pacman clone that uses procedural generation to produce randomised maps. At this stage I have just finished working on the map generation algorithm which consists of three stages:

The Obstacle Map - uses recursive backtracker to produce a grid of number-clusters.
The Collision Map - treats number clusters as obstacles, adds traversable paths between them.
The Game Map - Assigns type to path cells (i.e. dot/intersection/player/etc).

I created a generic tile set image that contained all of the possible obstacle shape segments and wrote a nearest-neighbour algorithm to dynamically build a tile map to match the collision map data. The results of the algorithm can be seen in the attached image.

I am now moving into the game logic itself, which I will post updates on. Part of my motivation for this project is to gain experience with some programming patterns that i will need to know for another project in the future, so I expect this game to be very over-engineered by the end.

28
Graphics / Re: Superfluous Transformations in Sprite Batch
« on: February 27, 2019, 02:11:52 pm »
Oh nice, I didn't realise that the final transformation was applied through OpenGL. Thank you very much for the reply!

29
General discussions / Re: Bisqwit using SFML
« on: February 24, 2019, 10:41:55 pm »
He also used SFML Audio to make a speech synthesizer recently, this guy is really something else...


30
General discussions / Re: What pain points do you experience using SFML?
« on: February 21, 2019, 03:25:59 am »
I might be a bit late to the party here. I would like to second FRex's gripe with the having no access to the vertices of SFML'S entities. Creating batch systems would be less painful if we could copy vertices from existing entities to render in more suitable ways when needed. I assume that hiding the internal state of these entities is to ensure that objects are only used as intended without ambiguity, but I feel like a getVertices function would go a long way.

Pages: 1 [2] 3
anything