"Questions that don't deserve their own thread" thread

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Locked
User avatar
furi
Citizen
Posts: 73
Joined: Sat Feb 26, 2011 8:15 pm

Re: "Questions that don't deserve their own thread" thread

Post by furi »

Zilarrezko wrote:
DaedalusYoung wrote:192.168.0.0 is the ip address for your router. You can only connect to other computers on the home network with this. You will need to open and/or forward the appropriate port in your router's configuration if you want the internet to be able to connect to your computer. Additionally, you may need to disable the firewall on the same port.
Okay so, I use the 192.168? yadda yadda? or use the one i've been using... which is the one you get from this site. But I know how to portforward, that's not hard. Is there a recommended port to forward? or shall I just choose my own?
Use the ipchicken address, and as far as I know, any port that isn't 80 should be fine.
User avatar
rmcode
Party member
Posts: 454
Joined: Tue Jul 15, 2014 12:04 pm
Location: Germany
Contact:

Re: "Questions that don't deserve their own thread" thread

Post by rmcode »

Last edited by rmcode on Sat Sep 06, 2014 1:56 pm, edited 1 time in total.
User avatar
Zilarrezko
Party member
Posts: 345
Joined: Mon Dec 10, 2012 5:50 am
Location: Oregon

Re: "Questions that don't deserve their own thread" thread

Post by Zilarrezko »

If you explicitly set the filter for each image to say anything other than nearest, nearest... than yes.
User avatar
rmcode
Party member
Posts: 454
Joined: Tue Jul 15, 2014 12:04 pm
Location: Germany
Contact:

Re: "Questions that don't deserve their own thread" thread

Post by rmcode »

Zilarrezko wrote:If you explicitly set the filter for each image to say anything other than nearest, nearest... than yes.
So it should be enough to set it once in love.load()? Any idea why the sprites look as bad as they do?
User avatar
DaedalusYoung
Party member
Posts: 407
Joined: Sun Jul 14, 2013 8:04 pm

Re: "Questions that don't deserve their own thread" thread

Post by DaedalusYoung »

Zilarrezko wrote:
DaedalusYoung wrote:192.168.0.0 is the ip address for your router. You can only connect to other computers on the home network with this. You will need to open and/or forward the appropriate port in your router's configuration if you want the internet to be able to connect to your computer. Additionally, you may need to disable the firewall on the same port.
Okay so, I use the 192.168? yadda yadda? or use the one i've been using... which is the one you get from this site. But I know how to portforward, that's not hard. Is there a recommended port to forward? or shall I just choose my own?
192.x.x.x will only work in a private home network, so if you want a friend to connect to you via the internet, you will have to use the ip you find on that (or similar) site.
I think you can choose any port in between 49152 and 65535. All ports below that are reserved (although will still work), if I'm correct.
User avatar
IceQB
Citizen
Posts: 67
Joined: Sat Nov 03, 2012 1:11 pm

Re: "Questions that don't deserve their own thread" thread

Post by IceQB »

Hi all.
Im writing my first lighting shader but it doesnt work properly.
Where i made mistake?

Code: Select all


position_x = 0.5  --if i try to use player.x value then screes goes black
position_y = 0.5

extern float position_x;
extern float position_y;

vec4 effect( vec4 color, Image texture, vec2 texture_coords, vec2 screen_coords )
   {
vec4 pixel = Texel(texture, texture_coords );
 
float distance = sqrt((position_x-texture_coords.x)*(position_x-texture_coords.x))+((position_y-texture_coords.y)*(position_x-texture_coords.y));

pixel.r = pixel.r - distance;
pixel.g = pixel.g - distance;
pixel.b = pixel.b - distance;

return pixel * color;
}
It presents like that:
Image
User avatar
Zilarrezko
Party member
Posts: 345
Joined: Mon Dec 10, 2012 5:50 am
Location: Oregon

Re: "Questions that don't deserve their own thread" thread

Post by Zilarrezko »

try this

Code: Select all

extern float x;
extern float y;
extern float dist;

vec4 effect( vec4 color, Image tex, vec2 tc, vec2 sc )
{
	vec4 pixel;
	float root = sqrt(16*(x-tc.x)*(x-tc.x)/9+(y-tc.y)*(y-tc.y));
	{pixel = Texel(tex, vec2( tc.x, tc.y ) );
	pixel.r = clamp(pixel.r-0.65*root/dist,0,1);
	pixel.g = clamp(pixel.g-0.65*root/dist,0,1);
	pixel.b = clamp(pixel.b-0.65*root/dist,0,1);
	pixel.a = 0.5;}
	return pixel;
}
Pulled it out of one of Ref's posts, I'm assuming you're going for the, only have stuff show up around the player?

In that case, just remember to pass the player's x and y position along with a distance you feel suited to you into the shader through the send function.
User avatar
IceQB
Citizen
Posts: 67
Joined: Sat Nov 03, 2012 1:11 pm

Re: "Questions that don't deserve their own thread" thread

Post by IceQB »

I noticed that my shader works properly with rendered single image, but when i put it to the game then doing strange things like on screenshot.
Shader changes sprites, not that what is rendered.
User avatar
Zilarrezko
Party member
Posts: 345
Joined: Mon Dec 10, 2012 5:50 am
Location: Oregon

Re: "Questions that don't deserve their own thread" thread

Post by Zilarrezko »

IceQB wrote:I noticed that my shader works properly with rendered single image, but when i put it to the game then doing strange things like on screenshot.
Shader changes sprites, not that what is rendered.
Maybe replace all the texture coords with screen coords,

Eh, just tried it and none of this makes sense in my head. Probably how my textures and their UV's are set up. but I did make some funky looking stuff happen, but nothing that you're looking for. But I've never accomplished anything with shaders. One of the higher ups are going to have to help ya man, sorry.
User avatar
IceQB
Citizen
Posts: 67
Joined: Sat Nov 03, 2012 1:11 pm

Re: "Questions that don't deserve their own thread" thread

Post by IceQB »

I think problem isn't shader, look at my map drawing script:

Code: Select all

for y = 1, #map do
		local xy = map[y]
	for x = 1, #xy do
		local number = xy[x]
	local number = xy[x]
		if number ~= 1  then
		
	  love.graphics.draw(tileset, Quads[number], (x-1)*tileW, (y-1)*tileH)
	  
	  
		end
	end
end
Probably problem is combining these two things.
Locked

Who is online

Users browsing this forum: No registered users and 230 guests