Search found 1415 matches

by ivan
Mon Apr 22, 2019 6:25 am
Forum: Support and Development
Topic: How to check if touch press is in a triangle
Replies: 2
Views: 205

Re: How to check if touch press is in a triangle

Point in triangle is a relatively simple check:
https://2dengine.com/?p=intersections#P ... e_triangle
If you want the touch area to be larger (circle) then it's slightly more complicated:
https://2dengine.com/?p=intersections#C ... s_triangle
by ivan
Wed Apr 10, 2019 4:30 am
Forum: Support and Development
Topic: How to create "darker" version of image?
Replies: 3
Views: 2245

Re: How to create "darker" version of image?

Your code looks fine in theory but drawing a black rectangle over the image might look incorrect if the texture is partially transparent. You could just use "setColor(0.5,0.5,0.5,1)" for the particular image.
by ivan
Tue Apr 02, 2019 4:31 pm
Forum: General
Topic: [SOLVED] Applying velocity (on X-axis) to a physics body
Replies: 5
Views: 2757

Re: [HELP] Applying velocity (on X-axis) to a physics body

How should I avoid setting the position of the body directly? applyImpulse and applyForce setLinearVelocity could work but it will make the collision resolution look unnatural if you use it all the time should I prefer Impulse over Force when moving the player object? applyImpuse is for instant cha...
by ivan
Tue Apr 02, 2019 10:46 am
Forum: General
Topic: [SOLVED] Applying velocity (on X-axis) to a physics body
Replies: 5
Views: 2757

Re: [HELP] Applying velocity (on X-axis) to a physics body

With box2d you don't want to set the position directly because it teleports the body (which is kind of pointless since it circumvents the physics system). Ideally you should use impulses and forces, this way your body will be able to react to collisions with other bodies. Furthermore, what you have ...
by ivan
Sun Mar 24, 2019 2:49 pm
Forum: General
Topic: Why Lua2d netWorking Examples doesn't working on my Android mobile
Replies: 5
Views: 1220

Re: Why Lua2d netWorking Examples doesn't working on my Android mobile

You might be correct, I have used a wifi router to connect between computers and it does work - it depends on the router and you may have to disable the internet connection. It's not really the "opposite" of what I was saying, which is that you cannot connect directly to machines that are behind a N...
by ivan
Mon Mar 18, 2019 8:21 pm
Forum: General
Topic: Why Lua2d netWorking Examples doesn't working on my Android mobile
Replies: 5
Views: 1220

Re: Why Lua2d netWorking Examples doesn't working on my Android mobile

I mean that your home router translates the ports so that multiple devices can share the same external IPs. Furthermore, routers block incoming ports to protect your devices.
So devices on the same Wifi network cannot connect to each other directly.
by ivan
Mon Mar 18, 2019 7:21 pm
Forum: General
Topic: Why Lua2d netWorking Examples doesn't working on my Android mobile
Replies: 5
Views: 1220

Re: Why Lua2d netWorking Examples doesn't working in my Android mobile

Is your Android device connected to the internet using Wifi?
You cannot connect directly to a device behind a home router.
by ivan
Mon Mar 18, 2019 9:25 am
Forum: General
Topic: Is the proper name löve or love2d?
Replies: 14
Views: 4362

Re: Is the proper name löve or love2d?

You can type any unicode character regardless of your keyboard layout (on Windows).
First enable NumLock on your keyboad.
Hold Left Alt and type the umlat code 0214 on the numpad.
Ö will appear when you release Left Alt.
Either that or you can just copy/paste it which is often faster.
by ivan
Mon Mar 11, 2019 12:51 pm
Forum: Support and Development
Topic: How i can permanently ban someone by their ip from the server? [SOLVED]
Replies: 17
Views: 2276

Re: How i can permanently ban someone by their ip from the server? [SOLVED]

When the server receives a login request, let it sit idle and sleep for a little while before it sends its response. Like 1 to 3 seconds. This makes any attempt at brute-forcing passwords completely futile. Even if the response is delayed, somebody could still queue a lot of requests therefore the ...
by ivan
Fri Mar 08, 2019 5:20 pm
Forum: Support and Development
Topic: Using vector images in Love?
Replies: 5
Views: 1555

Re: Using vector images in Love?

I want to avoid using love.graphics.scale on raster images where possible to avoid the quality loss- and there are obviously a lot of resolutions = a lot of raster images of different sizes for each asset, which feels a bit clunky. Having different texture sizes is not bad, I use that technique mys...