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

Pages: 1 [2]
16
SFML projects / Re: SFML Light System - Let There Be Light
« on: September 09, 2013, 11:44:02 pm »
AABB is the quadtree limits, and im pretty sure the quadtree works well :)

17
SFML projects / Re: SFML Light System - Let There Be Light
« on: September 09, 2013, 10:24:47 pm »
Yes, i had this problem too. You can fix it by setting the AABB to larger than your screen size(i put mine to 20000x20000) in this code

lightSystem(AABB(Vec2f(-10000.0f, -10000.0f), Vec2f(20000,20000)), &rw, "data/shaders/lightFin.png", "data/shaders/lightAttenuationShader.frag")

18
SFML projects / Re: SFML Light System - Let There Be Light
« on: September 08, 2013, 03:38:44 pm »
My bad, my bad! The size of my light was set way too high which caused the light to overlap the hull  :P. Thank you very much for the reply anyway!

19
SFML projects / Re: SFML Light System - Let There Be Light
« on: September 08, 2013, 01:24:16 pm »
These are all in debug mode, the last one without any lighting. I noticed that if i the light gets really close to the hull, it seems to render correctly.

20
SFML projects / Re: SFML Light System - Let There Be Light
« on: September 08, 2013, 01:03:37 am »
Hi, i've been trying to implement this into my game, but i have a problem with it. Has anyone gotten a bug looking like the one in this picture?

I changed the shader.bind() to sf::Shader::bind(shader) and texture.bind() to sf::Texture::bind(texture) as someone posted, but i cant figure this bug out. Help is very much appreciated!

Edit: the below ground he is standing on is not a convexHull, but the one above it is. The light is shining through the left part of it and there is a shading part on the right part of the screen which should not be there.

21
SFML projects / Re: [LandS] SFML Jam Game
« on: September 03, 2013, 10:13:52 pm »
Thanks!

22
SFML projects / Re: [LandS] SFML Jam Game
« on: September 02, 2013, 03:37:55 am »
Like it! It could be improved by fixing the choppy collision though :) Is there any chance you would like to share the source? I am very interested in the shading part.

23
Network / Re: Blocking/unblocking sockets
« on: July 17, 2013, 01:27:24 am »
Thanks for the reply!

I just tested it and found out it was my bad, the tcpSocket does return the right status code. I forgot to set every new tcp socket to nonblocking mode after it had connected so that the program froze when it received something.

Also i want to thank the people working with sfml, i find it extremely fun to code with sfml and c++  :D

24
Network / Blocking/unblocking sockets
« on: July 16, 2013, 07:35:51 pm »
I have been trying to set up a tcp and udp network, and i want to use nonblocking sockets. However i noticed that when i'm using nonblocking sockets the return code for udpSocket.bind() and tcpSocket.connect() doesnt return sf::Socket::Done even if the operation was successful. My workaround was doing this:

tcpSocket.setBlocking(true);
if (tcpSocket.connect(ip,port, sf::seconds(3) ) != sf::TcpSocket::Done){
   std::cout<<"Failed to connect TCP"<<std::endl;
   tcpSocket.setBlocking(false);
}

Is this intended and is this a good or a bad way to do it?

EDIT: tcpSocket.receive() also returns sf::Socket::Done when it doesn't receive anything in nonblocking mode

25
SFML projects / Re: GLLight2D
« on: July 06, 2013, 07:06:29 pm »
Thank you so much for this! Me and a friend are making a game and it would be awesome if we could use this for lightening  :)

Edit:

I (Think i) have correctly opened the project and linked it, but when its starts, the console thingy opens up and i get an error box saying:

---------------------------
The Game.exe - Application Error
---------------------------
The application was unable to start correctly (0xc000007b). Click OK to close the application.
---------------------------
OK   
---------------------------

Any clue why this happens?

Pages: 1 [2]