Search found 98 matches
- Sat Jun 18, 2022 12:17 am
- Forum: General
- Topic: Need help creating a specific function
- Replies: 12
- Views: 4880
Re: Need help creating a specific function
Thank you for your help, I will try to """""convert"""""" it for my code ! I understand how it works mostly, i'll give updates when things starts to look better than a blue screen :D No problem! And please do post updates, I love to see what ot...
- Fri Jun 17, 2022 11:47 pm
- Forum: General
- Topic: Need help creating a specific function
- Replies: 12
- Views: 4880
Re: Need help creating a specific function
What you want is a function that acts across frames to move your enemy to the desired location over a period of time. Unfortunately, this is not possible. No matter what you do, you need to have *something* in love.update that moves the enemy frame by frame. You can take my code as an example and ad...
- Fri Jun 17, 2022 11:10 pm
- Forum: General
- Topic: Mega Moonlight Mania - Art
- Replies: 6
- Views: 2497
Re: Mega Moonlight Mania - Art
Nice job, great art! Is that cake a lie, or am I just seeing things?
- Fri Jun 17, 2022 10:45 pm
- Forum: General
- Topic: Need help creating a specific function
- Replies: 12
- Views: 4880
Re: Need help creating a specific function
Maybe this can help you get started? local enemy = { origin = {x = 100, y = 100}, -- pixels destination = {x = 400, y = 200}, duration = 1.0, -- seconds elapsed = 0.0 } local function lerp(from, to, t) return {x = from.x + (to.x - from.x) * t, y = from.y + (to.y - from.y) * t} end function love.upda...
- Sun Jun 12, 2022 2:08 pm
- Forum: Libraries and Tools
- Topic: LÖVE-MoonScript
- Replies: 3
- Views: 4530
LÖVE-MoonScript
Hello, everyone! Long time no post (I was getting my hands dirty with Unity and Godot). I'm back to the awesomest engine out there, and I have a project to share with you. :awesome: Have you heard of MoonScript before? If so, you should be excited. If not, you really should take a look at it. Great ...
- Thu May 02, 2019 7:54 pm
- Forum: Support and Development
- Topic: Rotating in love.graphics.rectangle [SOLVED]
- Replies: 2
- Views: 2918
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
- Wed May 01, 2019 4:45 pm
- Forum: Support and Development
- Topic: Mouse functions not working correctly [SOLVED]
- Replies: 3
- Views: 2896
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
- Sat Apr 13, 2019 1:26 pm
- Forum: General
- Topic: [HELP] Drawable disappears the first frame
- Replies: 3
- Views: 9459
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...
- Fri Apr 12, 2019 1:44 pm
- Forum: Support and Development
- Topic: Networking between devices on the same wifi connection
- Replies: 7
- Views: 10819
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() ...
- Thu Apr 11, 2019 11:06 pm
- Forum: Support and Development
- Topic: Networking between devices on the same wifi connection
- Replies: 7
- Views: 10819
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.