Search found 4 matches

by Mr Mie
Mon Dec 23, 2019 1:29 am
Forum: Support and Development
Topic: In need of example code of this matter
Replies: 4
Views: 3144

Re: In need of example code of this matter

Well since you're making a mobile game you might as well use mobile controls - touchscreen and gyroscope. It should be pretty easy to control paddle position directly using phone tilt or finger position on the screen. To answer your question, you simply check if touch coordinates are within certain...
by Mr Mie
Mon Dec 23, 2019 1:26 am
Forum: Support and Development
Topic: In need of example code of this matter
Replies: 4
Views: 3144

Re: In need of example code of this matter

Maybe something like this? PointInBox = function( point, box ) local x, y, w, h = unpack( box ) local px, py = point[1], point[2] if px>=x and px<=x+w and py>=y and py<=y+h then return true end return false end touch = function( box ) local mx, my = love.mouse.getPosition( ) if love.mouse.isDown( 1...
by Mr Mie
Fri Dec 20, 2019 3:51 am
Forum: Support and Development
Topic: In need of example code of this matter
Replies: 4
Views: 3144

In need of example code of this matter

Hello. This is my 1st week of playing with love2d. i recently learning making Pong game from cs50 course. i code my game 100% on my old samsung note 3 phone with help of love2d app from playstore and code editor from market. since pong tutorial teach about keyboard press, so it's impossible to repli...
by Mr Mie
Wed Dec 18, 2019 7:49 am
Forum: General
Topic: Forum etiquette
Replies: 39
Views: 744840

Re: Forum etiquette

hello.. i'm new to Love2d and lua as well.. atm following harvard cs50 pong tutorial. hope can learn a lot about love2d and lua as well.