Search found 191 matches

by nice
Sun Dec 23, 2018 4:00 pm
Forum: General
Topic: [help] with rotating multiple randomized sprites using a table
Replies: 3
Views: 2385

Re: [help] with rotating multiple randomized sprites using a table

If all you want is visual rotation, you can use the rotation parameter in love.graphics.draw. You will also need to use the offset parameter to control the rotation centre. You probably want it at half the image's width and height but that's not something I can tell for sure without seeing the imag...
by nice
Fri Dec 21, 2018 2:09 pm
Forum: General
Topic: [help] with rotating multiple randomized sprites using a table
Replies: 3
Views: 2385

[help] with rotating multiple randomized sprites using a table

Hello everyone! It's been a while since I last was on this forum and I've recently got back to scripting with Löve/Lua and I'm currently attempting to recreate a game I did 5 years ago with Löve2D as part of relearning Lua and make the game playable again. A little backstory So for this project, I'v...
by nice
Fri Jan 12, 2018 5:43 pm
Forum: General
Topic: [HELP]Rotating circles around the middle and not corner
Replies: 4
Views: 2854

Re: [HELP]Rotating circles around the middle and not corner

If you insist on 0,0 being the center of the window: w, h = love.graphics.getDimensions() love.graphics.translate(w/2, h/2) Also, you probably should offset your circles by a half too: love.graphics.draw(circle, sunX, sunY, 0, 1, 1, circleW/2, circleH/2) Lastly it's always a good idea to program yo...
by nice
Fri Jan 12, 2018 5:40 pm
Forum: General
Topic: [HELP]Rotating circles around the middle and not corner
Replies: 4
Views: 2854

Re: [HELP]Rotating circles around the middle and not corner

That it's rotating around the upper left corner is good because it's the origin(x=0 and y=0). Just translate the origin to the desired position the way you're doing it. Or if you wanna have rotation and translation in the same line: planetX = math.cos(angle) * rotation_radius + rotation_center_offs...
by nice
Fri Jan 12, 2018 2:41 pm
Forum: General
Topic: [HELP]Rotating circles around the middle and not corner
Replies: 4
Views: 2854

[HELP]Rotating circles around the middle and not corner

Hello everyone! I'm currently making a "solarsystem" for fun and to get a better understanding of how Löve2D works. I've just hit a roadblock in where I try to make my planets rotate around a point that's supposed to be in the middle of the screen and for some reason the rotation is set in...
by nice
Tue Oct 03, 2017 7:28 pm
Forum: General
Topic: [Help] Collision detection isn't working as it should
Replies: 2
Views: 2253

Re: [Help] Collision detection isn't working as it should

crystal wrote: Sun Oct 01, 2017 5:18 pm replace your "distanceBetween" function with this
https://love2d.org/wiki/DistanceBasedCollision

and change this line to

Code: Select all

if distanceBetween(z.X, z.Y, player.X , player.Y,30,30) then
hope that helps ^^
I'll check it out when I have time
Thanks!
by nice
Sun Oct 01, 2017 12:43 pm
Forum: General
Topic: [Help] Collision detection isn't working as it should
Replies: 2
Views: 2253

[Help] Collision detection isn't working as it should

Hello everyone! I'm currently following a tutorial to create a "Zombie-shooting-survival" game on Udemy that I think is kinda good. But I have a problem where my "zombies" are supposed to delete themselves when they collide with the player but sometimes it works but more than oft...
by nice
Sat Jul 01, 2017 11:48 am
Forum: General
Topic: [help] with collision detection on a Pong remake.
Replies: 6
Views: 12381

Re: [help] with collision detection on a Pong remake.

Nevermind this part of the post, I moved "return ball" to the bottom of the script and at least it runs now Right now I'm attempting to use BoundingBox to try to collision and this is what I have right now: local Player = require("player") function love.load() Player:setup() end...
by nice
Sat Jul 01, 2017 9:17 am
Forum: General
Topic: [help] with collision detection on a Pong remake.
Replies: 6
Views: 12381

Re: [help] with collision detection on a Pong remake.

thedaemon wrote: Fri Jun 30, 2017 9:36 pm https://love2d.org/wiki/BoundingBox.lua

This is what I am using for my Pong game. It's a good basic start.
Thanks I'll take a look at it later, but how do I/does it determine the height and width of my object?
by nice
Fri Jun 30, 2017 8:49 pm
Forum: General
Topic: [help] with collision detection on a Pong remake.
Replies: 6
Views: 12381

[help] with collision detection on a Pong remake.

Hello everyone! This might be a lengthy read but there's things that I want to explain thoroughly so I thank you for your patience. :P I'm currently in the process of relearning/learning Löve2D/lua and to learn I'm remaking some older games and in this case: Pong. What I have so far So far I have tw...