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 ... 5 6 [7] 8 9 ... 63
91
Graphics / Re: Textures not loading, and I tried EVERYTHING
« on: December 08, 2020, 02:35:22 am »
Any error message? Something in the console? Have you tried checking the return value of loadFromFile?
WTF happens when you run your code... we don't know

92
Window / Re: First VideoMode is larger than my screen
« on: December 02, 2020, 09:16:53 am »
getFullscreenModes is the list of the video modes supported by your screen.
getDesktopMode is the current video mode of your screen.

93
General / Re: Write a text when an object/or shape is clicked
« on: November 23, 2020, 01:06:19 am »
What part do you have trouble with?
Detecting the click on your shape?
Capturing the keyboard inputs?
Writing a text on the screen?

94
Window / Re: Creating a fullscreen window doesn't hide the taskbar
« on: November 19, 2020, 11:47:49 am »
Is 320 200 a supported fullscreen resolution by your screen?
Can check if it's in getFullscreenModes or with isValid https://www.sfml-dev.org/documentation/2.5.1/classsf_1_1VideoMode.php#ad5e04c044b0925523c75ecb173d2129a

95
Window / Re: how scale window
« on: November 14, 2020, 08:16:32 am »
Use an sf::View of size 320*240, its content will be stretched to whatever your window size is.
https://www.sfml-dev.org/documentation/2.5.1/classsf_1_1View.php
https://www.sfml-dev.org/tutorials/2.5/graphics-view.php

96
Window / Re: Positioning Text in Window
« on: November 06, 2020, 02:23:34 am »
You don't have any font.
Before drawing any text, you need to have an available font, just like any other program that prints text.

97
General discussions / Re: Keeping PointLight shader centered on player
« on: October 30, 2020, 07:30:27 am »
Hey.

You can use mapCoordsToPixel to convert the position of your player in the world into its position in the window, thus getting the light position.

98
Graphics / Re: Sprite is blank after loading from texture
« on: October 18, 2020, 03:41:53 am »
https://www.sfml-dev.org/tutorials/2.5/graphics-sprite.php#the-white-square-problem
https://www.sfml-dev.org/faq.php#graphics-white-rect

Your texture is local to the Menu constructor, thus it is destroyed at the end of the constructor.
You could make it a member of Menu, or declare the variable in your main and pass it (by ref) to your constructor, or anything that doesn't destroy the texture while you still need it.

99
Graphics / Re: SFML Draw() won't draw sprite on Window
« on: October 14, 2020, 11:04:30 am »
Are you sure it's not drawn at the top of the screen?
Because 5 / 6 is equal to 0

100
Graphics / Re: I can't get the math right. [SOLVED]
« on: October 04, 2020, 09:53:12 am »
In trigonometry, 0 radians (or 0°) is on the right of the circle.


101
Graphics / Re: Rotations About Center of Circle
« on: October 04, 2020, 09:48:20 am »
Hey.

This has nothing to do with rotation, but with origin and position. Origin is not only the center of rotation, but also the anchor of its position.
If your origin and position are 0, 0 and 0, 0 then the circle top left "corner" will be in 0, 0
If your origin and position are 100, 100 and 0, 0 then the circle top left "corner" will be in -100, -100 thus you'll only see its bottom right quadrant.

(and your assumption is right, when you rotate a circle around its center, you won't see any change)

102
Graphics / Re: I can't get the math right.
« on: October 02, 2020, 07:50:51 pm »
std::cos and std::sin use radians

103
Graphics / Re: Unicode Text Appearing as Boxes With Question Marks
« on: September 13, 2020, 05:20:39 pm »
I think your font doesn't support japanese characters. 🤔
https://docs.microsoft.com/en-us/typography/font-list/consolas

104
General discussions / Re: SFML and Box2d
« on: September 05, 2020, 01:05:34 pm »
It's irrelevant.
SFML stays SFML, it doesn't convert into something else when you use another library with it.
You can use many libraries to eventually make a game engine, but each of these libraries aren't game engines.

105
        sprite.move(100.f, 100.f);
It's (100, 100)

Pages: 1 ... 5 6 [7] 8 9 ... 63
anything