Search found 73 matches

by keharriso
Thu May 02, 2019 7:54 pm
Forum: Support and Development
Topic: Rotating in love.graphics.rectangle [SOLVED]
Replies: 2
Views: 402

Re: Rotating in love.graphics.rectangle

Try this:

Code: Select all

for i, v in ipairs(projectiles) do
	love.graphics.push()
	love.graphics.translate(v.x + v.w/2, v.y + v.h/2)
	love.graphics.rotate(v.angle)
	love.graphics.translate(-v.w/2, -v.h/2)
	love.graphics.rectangle("fill", 0, 0, v.w, v.h)
	love.graphics.pop()
end
by keharriso
Wed May 01, 2019 4:45 pm
Forum: Support and Development
Topic: Mouse functions not working correctly [SOLVED]
Replies: 3
Views: 454

Re: Mouse functions not working correctly

Add this to player.lua:

Code: Select all

function love.mousepressed(x, y, button, istouch, presses)
  mouseX = love.mouse.getX()
  mouseLeft = mouseX < love.graphics.getWidth() / 2
  mouseRight = mouseX > love.graphics.getWidth() / 2
end
by keharriso
Sat Apr 13, 2019 1:26 pm
Forum: General
Topic: [HELP] Drawable disappears the first frame
Replies: 3
Views: 6362

Re: [HELP] Drawable disappears the first frame

Hello everyone! I'm gonna get straight into it, in this project I'm currently working on my drawable image in "player.lua" disappears as soon as the program starts. I'm a bit at a loss about what I should do. Usually, my solution is to set the color to white after I've drawn something but for some ...
by keharriso
Fri Apr 12, 2019 1:44 pm
Forum: Support and Development
Topic: Networking between devices on the same wifi connection
Replies: 7
Views: 6005

Re: Networking between devices on the same wifi connection

Try changing your server code to this: local socket = require "socket" local udp = socket.udp() udp:settimeout(0) udp:setsockname('0.0.0.0', 12345) local data, ip, port function love.update(dt) local msg msg, ip, port = udp:receivefrom() if msg then data = msg end end function love.draw() if data th...
by keharriso
Thu Apr 11, 2019 11:06 pm
Forum: Support and Development
Topic: Networking between devices on the same wifi connection
Replies: 7
Views: 6005

Re: Networking between devices on the same wifi connection

How about you upload a .love of the most basic case you can make that doesn't work. There might be a problem in the way you're doing things that we have no way of knowing about.
by keharriso
Thu Apr 11, 2019 8:43 pm
Forum: Support and Development
Topic: Networking between devices on the same wifi connection
Replies: 7
Views: 6005

Re: Networking between devices on the same wifi connection

You either need to make a note of your phone and laptop's IP addresses or use the broadcast address "255.255.255.255". "localhost" and "127.0.0.1" both refer to the local machine (your phone in this example).
by keharriso
Wed Apr 10, 2019 4:02 pm
Forum: Libraries and Tools
Topic: LÖVE-Nuklear - a lightweight immediate mode GUI
Replies: 61
Views: 61307

Re: LÖVE-Nuklear - a lightweight immediate mode GUI

Question that i cant seem to find via google. Does nuklear supports touchscreens (mobiles or tablets)? Just clicking the buttons or others widgets and such. I've never tried it. My (completely unjustified) guess is that simple widgets like buttons would work, but text input might not work. If you e...
by keharriso
Sun Apr 07, 2019 9:49 pm
Forum: Support and Development
Topic: GUI with good keyboard/gamepad support?
Replies: 5
Views: 1367

Re: GUI with good keyboard/gamepad support?

I'd been using love-nuklear this last few days and it seems super nice and complete. The binding for Love https://github.com/keharriso/love-nuklear The original repo in C you can check images of what the library is capable of to. https://github.com/vurtun/nuklear/tree/181cfd86c47ae83eceabaf4e640587...
by keharriso
Fri Apr 05, 2019 9:32 pm
Forum: Libraries and Tools
Topic: LÖVE-Nuklear - a lightweight immediate mode GUI
Replies: 61
Views: 61307

Re: LÖVE-Nuklear - a lightweight immediate mode GUI

Excellent! I'll update the build scripts and instructions, then officially release v2.5.1. Thanks for your help in debugging this.
by keharriso
Fri Apr 05, 2019 9:19 pm
Forum: Libraries and Tools
Topic: LÖVE-Nuklear - a lightweight immediate mode GUI
Replies: 61
Views: 61307

Re: LÖVE-Nuklear - a lightweight immediate mode GUI

Can you build successfully with just cmake -DCMAKE_BUILD_TYPE=Release ../love-nuklear if you install libluajit-5.1-dev?