Search found 7 matches

by PunchyBreloom
Sat Mar 25, 2017 9:17 pm
Forum: Support and Development
Topic: Collisions in my game.
Replies: 6
Views: 7840

Re: Collisions in my game.

Awesome! I did this and then discovered exactly why it was so bugged, the rectangles were way off. I need to render the sprite properly and will do this now. Thanks a ton! Edit: I rendered the sprite like this now: love.graphics.draw(player.img, player.x - player.w/2, player.y - player.h/2, player.w...
by PunchyBreloom
Sat Mar 25, 2017 2:02 pm
Forum: Support and Development
Topic: Collisions in my game.
Replies: 6
Views: 7840

Re: Collisions in my game.

Firstly, I scaled the sprite down a lot for the game, until the height was about 145 and the width about 45. I just put the player size at 32*32 just to see if that would fix it.
How do I do render the outline of my collisions and the sprite, and then how can I offset it?
by PunchyBreloom
Fri Mar 24, 2017 11:02 pm
Forum: Support and Development
Topic: Collisions in my game.
Replies: 6
Views: 7840

Collisions in my game.

I used goature's tutorial on how to make a platformer in love2d. https://www.youtube.com/watch?v=Mz6E9A8Xm84 Linked here. In this tutorial he makes the player a black square (32x32 px), and set the collisions to work with a map made in Tiled. I changed this once I had finished to work with an image,...
by PunchyBreloom
Thu Mar 23, 2017 10:48 pm
Forum: Support and Development
Topic: How to time keypresses
Replies: 9
Views: 6909

Re: How to time keypresses

Well thanks guys, I'll give these suggestions a try!

EDIT: I used airtruck's method and it worked fine, thanks!
by PunchyBreloom
Thu Mar 23, 2017 11:23 am
Forum: Support and Development
Topic: How to time keypresses
Replies: 9
Views: 6909

Re: How to time keypresses

I've had an issue with my code, this line returns an error- "attempt to index local 'tbl' (a number value)" I updated to the newest version of Love. if tbl.state == 3 then Also, did I do this right? juump is just what i called my shorter jump. local keys = {state = 0, held = 0} keys.up = {...
by PunchyBreloom
Thu Mar 23, 2017 11:07 am
Forum: Support and Development
Topic: How to time keypresses
Replies: 9
Views: 6909

Re: How to time keypresses

Ok, I'll try this! Thank you!
by PunchyBreloom
Thu Mar 23, 2017 1:26 am
Forum: Support and Development
Topic: How to time keypresses
Replies: 9
Views: 6909

How to time keypresses

I am a newbie at coding in love and am trying to make a semi-basic platformer as my first project. I wanted to code the ability to use a 'short hop', pushing the jump button down for a shorter time in order to do a shorter jump. Is this possible, and if so could you explain to me how to do it? I hav...