Search found 39 matches

by milk
Wed Oct 26, 2016 2:28 am
Forum: Support and Development
Topic: bump.lua bounce
Replies: 8
Views: 6433

bump.lua bounce

Hey! I've been trying to make a small pong game using kikito's bump.lua bounce filter but I can't seem to get it to work, I've got collision working, but the ball just sticks on the paddle :c Essentially what I'm trying to do is on collision with the paddle (player or ai) the ball inverts its veloci...
by milk
Fri Oct 21, 2016 2:28 pm
Forum: Support and Development
Topic: "Questions that don't deserve their own thread" thread
Replies: 905
Views: 412113

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

raidho36 wrote:You can't access table until after it is created.
So what would I do?
by milk
Fri Oct 21, 2016 1:01 pm
Forum: Support and Development
Topic: "Questions that don't deserve their own thread" thread
Replies: 905
Views: 412113

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

Just a quick question about nested tables, I have this: msgbox = { padding = 10, container = { x = 10, y = screen.H/2, w = screen.W-msgbox.padding*2, h = screen.H/5-msgbox.padding, }, text = { x = msgbox.container.x, y = msgbox.container.y }, } I would assume that for msgbox.container.w, where w= sc...
by milk
Wed Aug 03, 2016 9:25 pm
Forum: Libraries and Tools
Topic: [module] ScaleInator
Replies: 2
Views: 2344

Re: [module] ScaleInator

I could kiss you for this.
by milk
Thu Jul 28, 2016 11:26 pm
Forum: Libraries and Tools
Topic: Simple Tiled Implementation - STI v1.2.3.0
Replies: 914
Views: 743577

Re: Simple Tiled Implementation - STI v0.16.0.2

You can use the map:convertPixelToTile method convert the player's position to a tile, and then determine which tiles it may be touching base don proximity. I'm using the bump.lua plugin and I was wondering if there is there any way to do this without having to use integers, for example this: love....
by milk
Mon Jul 18, 2016 4:16 pm
Forum: Support and Development
Topic: HUMP Camera help? [SOLVED]
Replies: 4
Views: 3564

Re: HUMP Camera help?

I decided against going for the example and instead used Camera.smooth.damped, so

Code: Select all

function love.load()
...
    camera = Camera(player.x, player.y, 5)
...
end

function love.update(dt)
...
	camera:lockPosition(player.x, player.y, Camera.smooth.damped(3))
...
end
by milk
Mon Jul 18, 2016 1:43 am
Forum: Support and Development
Topic: HUMP Camera help? [SOLVED]
Replies: 4
Views: 3564

Re: HUMP Camera help?

I think I understand what's going on now, the camera is moving according to player.x/y inputs, where player.x is actually the player co-ordinates, but its moving dt, therefore if the player is at x=10, y=20, it'll move +10, +20 per dt.
by milk
Sun Jul 17, 2016 10:56 pm
Forum: Support and Development
Topic: HUMP Camera help? [SOLVED]
Replies: 4
Views: 3564

Re: HUMP Camera help?

Okay so I've been fiddling with it, and it sorta works, except the camera drifts downwards for some reason, I'm assuming in the demo that player.pos.x = player.x, and therefore in the example player.x = player.xvel, which would also mean that cam.x = cam.xvel? Buuuut I'm not really sure about what c...
by milk
Sun Jul 17, 2016 8:04 pm
Forum: Support and Development
Topic: HUMP Camera help? [SOLVED]
Replies: 4
Views: 3564

HUMP Camera help? [SOLVED]

Hey everyone, I've been trying to make use of hump.cameras player lock, but it always returns `attempt to call method ''lockX' (a nil value)` The part I need help with is in love.update, here's the code snippet and .love attached. (Sorry for the messy code) local Camera = require "libs.hump.cam...