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

Pages: 1 2 [3] 4
Window / Re: sf::RenderWindow issues on SFML (2.4.2)
« on: March 21, 2017, 12:21:32 pm »
Exploiter, I do know that for 2.4.1 it was a clean build and didn't work.

Turbine, I do want to update to 2.4.2 but I need my game to run on those computers with outdated drivers for now. I do think for a major steam release, updating to 2.4.2 could be better, but fixing the issue would just be the best of both versions, so I'd rather have that (obviously).

EDIT: 2.4.2 does work properly, I hadn't changed the .dll files. It's 2.4.1 that has this problem.

Normally the values you receive should be between -100 and 100.
If you want to separate them, consider -100 to 0 to be one trigger, and 0 to 100 to be the other.
This is the case in the PS4 controller, but I don't know if it's the same on X360.

Window / Re: sf::RenderWindow issues on SFML (2.4.2)
« on: March 20, 2017, 03:05:53 pm »
Ok, the full argument is:

I use SFML 2.3.2 to compile my game. This makes it so that computers with old drivers will be able to run it without updating anything. Obviously, this is much nicer than having to update your drivers.
If I were to use SFML 2.4.2, this would not be the case. People would have to update their drivers, and instead of doing so, most people would be quick to refund the game by assuming that it simply does not work on their system.

I don't update my drivers because I want to be able to see this issue.
Some people don't even know what a driver is nor how to update it, and so I'd like for this issue to be fixed so that I can switch to 2.4.2 in the future and not have any issues.

Window / Re: sf::RenderWindow issues on SFML (2.4.2)
« on: March 20, 2017, 02:46:42 pm »
Well I'm actually working with SFML 2.3.2, and I don't really care because that version works on this computer.
My problem is that I don't want to switch to 2.4.2 due to this issue.

The computer I'm using for programming can handle 2.4.2 just fine, too. I'm just on another computer that has this issue.

You're doing setString("0") or setString("1") which will set the string to EXACTLY "0" or "1".
If you want to add numbers afterwards, you need to do text.setString(text.getString() + "whatevertextyouwanthere").

Also, PLEASE do not do

if (booleanVariable == true)

just do

if (booleanVariable)

It's just cleaner.

Window / sf::RenderWindow issues on SFML (2.4.2) [Solved]
« on: March 20, 2017, 09:45:31 am »
Outdated drivers might be the cause considering they haven't been updated in about 4-5 years.

Code & issue:

Note that I've set framerate limit to 1 because the "failed to activate the window's context" will repeat with every clear and display.
Also, this computer has been able to both compile and run my game on SFML 2.3.2 with no issues.
The issue also happens with SFML 2.4.1.

Driver info:
Graphics card is NVIDIA GeForce GT 520
Last updated on 15/10/2011
Version is

Computer info:
Windows 7

EDIT: Solved, 2.4.2 does NOT have this issue, only 2.4.1 does. I hadn't changed the .dll files around the .exe and so the problem stuck even after compiling in 2.4.2.

General / Re: [WIN/NVidia] Context issues after context-refactoring
« on: December 05, 2016, 10:21:40 am »
What's the driver version? from 15/10/2011

General / Re: [WIN/NVidia] Context issues after context-refactoring
« on: December 05, 2016, 09:51:34 am »
Having this issue with SFML 2.4.1, with the only code being:

        sf::RenderWindow window(sf::VideoMode(800, 600), "Test");


        while (window.isOpen())

        return 0;

Getting the same errors as bluecobold, up until the line "Failed to activate the window's context", after which there is nothing else.

Graphics card is NVidia GeForce GT 520, and according to windows, it has the latest drivers. I've searched nvidia's site for drivers and 520 has none.

Feature requests / Re: Add .setSmooth() for text
« on: November 01, 2016, 07:58:00 pm »
In that case, it would be possible to make sf::Font have a constructor that determines if smoothing is enabled or not, so that glyphs are generated correctly.

As for the font, any "pixel" font will do, such as this one: http://www.dafont.com/coders-crux.font

I mean... code is straight forward. Only details I assume you want to know would be view zoom (which is x3), and yes the text is drawn at integer positions. Between those two screenshots below the first post, the only different is the smoothing.
The issue is the same as this thread:

Feature requests / Add .setSmooth() for text
« on: November 01, 2016, 07:04:30 pm »
I've had to use a "hack" to turn off smoothing on sf::Text (or, more specifically, sf::Font, which is where the textures are stored):

  sf::Font font;
  unsigned int characterSizeUsed = 10;
  // Load the font //
  sf::Texture& texture = const_cast<sf::Texture&>(font.getTexture(characterSizeUsed));

This will fix smoothing for that font size (10).

My (preferred) fix would be to add:

sf::Font::setSmooth(bool smooth)

Another option would be to add:

sf::Font::setSmooth(unsigned int fontSize, bool smooth)

Which would smooth only certain font sizes.

Result: http://puu.sh/s33mw/8901a9d811.png
Instead of: http://puu.sh/s3014/a33fcfabe9.png

General / Re: [FIXED] Flashing screen on loading/alt-tab
« on: February 25, 2016, 03:07:53 pm »
Fixed, by updating SFML 2.0 to SFML 2.3 (I don't know how I had 2.0 either).

However the print screen problem still happens, but the screen does not flicker anymore.

Either make a way to detect the tiles to the sides of the player or make a "ghost" player that moves to the tile before the player does, and if it detects a collision, then it would return to the player, otherwise, it would trigger the player movement.

This is a huge, quite stupid workaround tho, I really suggest you simply code a way to detect tiles on the sides.
To do this simply do player.position.x + 1 and that should give you the position on the right, if your player and tiles use the same system of position. Otherwise, adjust it accordingly.

General / Re: Flashing screen on loading/alt-tab
« on: February 19, 2016, 12:33:18 am »
He set it to false so it's OK. ;)
I was tired :P
You're right, of course. I was wrong there. Well, I was right in what I said but wrong in the reasons I used to say it.  ;D

So no idea of what it is ;w;?

General / Re: Moving without using diagonal movement.
« on: February 18, 2016, 10:40:47 pm »
You need to make a system that determines if a key is pressed or not. This is very easy:

EDIT: In case this is not clear, "rightKey" must be stored, and so must "movement"

On key press event:
rightKey = true;
On key released event:
rightKey = false;

After that, you can use the event to overwrite the data:
movement = "right";

And to ACTUALLY check movement, do:
if (movement == "right" && rightKey) { move(whatever,0); }

You also need to add a case in case the "movement" key is actually not pressed. This would happen when you press 2 keys but release the last one -you need to add code to revert "movement" to the previous key.

General / Re: Moving without using diagonal movement.
« on: February 18, 2016, 07:27:18 pm »
Yeah, everytime you press a key make it overwrite a variable.

So for instance, when you press right, you set
direction = "right"
and then after that if you press left you overwrite with
direction = "left"

And when you release a key you can check which keys are still pressed and overwrite with one of them, or alternatively you can store the overwritten keypress on an array and release them back in order. But this is a bit overdoing it.

Pages: 1 2 [3] 4