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 ... 58
1
SFML projects / Re: Dispersio 2
« on: Today at 04:43:21 pm »
Hello

I only played in hard and am a breathtaking treasure hunter after 4h30. 8)
I think hard mode made the game more tedious than hard though. :(
The game experience is probably a bit different if one plays in easy/normal.

I'll put my gripes in spoilers because it's spoilery.
(click to show/hide)

2
General / Re: Can't stop the sprite from moving
« on: January 24, 2021, 02:32:11 pm »
Hey.
They are not random numbers, they are very tiny numbers written in scientific notation.
3.22666e-12 means 3.22666 * 10^-12 which means 0.00000000000322666...

Set your velocity to 0 when it is very close to 0 and isMoving is false.
Something like < to 0.01 and > to -0.01 or whatever feels good to your game.

3
You could check the status of your sound and not play it if it is already "Playing"

4
Are you calling playItemChime every frame and thus calling play every frame while m_IsColliding is true?

When you call play on a sound that is already playing it restarts it from the beginning, so if that's what you're doing your sound is restarting every frame so you never have enough time hear it.

WTF, why do you use a picture to show text?

5
Graphics / Re: Textures not loading, and I tried EVERYTHING
« on: December 08, 2020, 04:49:47 am »
Random symbols in the console usually happens when you're mixing debug and release. (when you're using the release version of SFML but compiling in debug mode, or debug version and compiling in release mode)

6
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

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

8
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?

9
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

10
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

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

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

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

14
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

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


Pages: [1] 2 3 ... 58