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 - G.

Pages: [1] 2 3 ... 63
1
General / Re: GPU usage jumping to 100% after changing resolution
« on: January 18, 2024, 05:46:19 am »
If you don't enable vsync (or don't set a framerate limit) it will take as many resources as it can to go as fast as possible.
I see you enable it at first, but you need to enable it again after you call create.

2
Graphics / Re: texture.loadFromFile string not working
« on: January 13, 2024, 12:58:23 am »
It's most likely that you mixed debug lib with release mode or mixed release lib with debug mode.
It is important to link to the libraries that match the configuration: "sfml-xxx-d.lib" for Debug, and "sfml-xxx.lib" for Release. A bad mix may result in crashes.

3
General / Re: Dragging a grid, *without* clicking on it
« on: November 11, 2023, 11:04:47 pm »
I'd register mouse position on MouseButtonPressed and set a bool "dragging" to true, check mouse position in MouseButtonReleased and set the "dragging" bool to false then if the 2 mouse positions are the same I activate the square.
On MouseMoved if dragging is true then I move the view. (I don't remember if the delta is inside the event data or if you have to compute it yourself)

That's pretty much how it works in your link. (if you manage to start and end you drag on the same position it activates the square)

4
Window / Re: ACCESS VİOLATİON ERROR?
« on: August 11, 2023, 04:51:20 pm »
Definitely need to initialize your pointer  ???

5
General / Re: Question
« on: August 10, 2023, 09:46:48 am »
Bare minimum for an input text box would be
sf::RectangleShape or sf::Sprite to display the box
sf::Text & sf::Font to display the the text
The TextEntered event to catch the text inputted by the user
and of course the mandatory basics of how to create a windows, a correct event and main loop

Could also use a GUI library like TGUI or SFGUI, but I don't know anything about them

6
General / Re: Difficulty with wall collision (FIXED)
« on: August 08, 2023, 09:50:43 pm »
Nothing, you can update the title with fixed or solved like you did but there's nothing more :)

7
General / Re: LNK2001 Error for unknown reason
« on: July 20, 2023, 04:05:00 pm »
That's literally not the same error though.

In one screenshot your path is c/libraries/sfml2.6, in the other one it's c/sfml2.6, is that right? ???

8
General / Re: LNK2001 Error for unknown reason
« on: July 19, 2023, 06:28:45 pm »
Looks like you also skipped the step where you configure the directories, at least the lib one.


9
General / Re: LNK2001 Error for unknown reason
« on: July 19, 2023, 11:15:47 am »
First, why are you posting a screenshot of you not linking the lib?
Looks nothing like the screenshot in the tutorial


It looks like you're compiling in x64 in your 2nd screenshot, but you show us your configuration for win32. Make sure you include the headers and link the lib for the x64 platform.

Follow the tutorial, pretty much.

10
General / Re: Can't compile project
« on: July 17, 2023, 10:03:10 am »
You didn't link the freetype dependency, not sure if that's the only problem.

11
SFML website / Re: SFML Website Design
« on: June 07, 2023, 06:51:19 pm »
That's a bit of an exaggeration. Maybe it would smell fishy/oldschool to the average tiktoker but I don't think any C++ developer would associate it with viruses of phising :o
Don't even look at the SDL website :D

12
General / Re: How to link everything statically
« on: May 29, 2023, 05:19:44 pm »
Wrong linking order isn't it? It's supposed to be dependencies last (dependencies are listed in the link provided by hapax)

13
Graphics / Re: Problem when zooming
« on: May 02, 2023, 06:12:11 pm »
Hello.
Yes, definitely make 2 different view, one where you draw the main game and apply the zoom, and another one with the UI, text and minimap.
Nothing is drawn unless you explicitely draw something, so views are transparent by default.

14
Graphics / Re: Can't load texture from file
« on: April 30, 2023, 09:57:37 pm »
Trash symbol in the console when you load a texture is most likely that you're mixing release library with debug compilation. (or vice versa)

If you want to compile in release mode, use the release version of the lib (sfml-graphics etc.)
If you want to compile in debug mode, use the debug version of the lib (sfml-graphics-d etc.)
As written in the VS tutorial

15
Graphics / Re: Access To Default Font.
« on: April 15, 2023, 12:12:36 pm »
There isn't any default font in SFML.

Pages: [1] 2 3 ... 63