Search found 20 matches

by ohai
Sat Feb 27, 2021 11:42 am
Forum: Games and Creations
Topic: A very simple snake game
Replies: 4
Views: 2794

Re: A very simple snake game

I thought that I made the best snake game, but I have to say that I will never achieve this level of innovation, playability, visuals and most of all, audio quality. A true hidden masterpiece!
by ohai
Wed Feb 24, 2021 3:18 pm
Forum: Support and Development
Topic: Attempt to index local 'self' (a number value)
Replies: 10
Views: 1962

Re: Attempt to index local 'self' (a number value)

Is it the right way? Seems correct at first glance. The simplest explanation I can think of: function test.x() -- you don't have access to "test" here. end If you want to access "test" in this function, you can write: function test.x(p) -- you can pass "test" as parame...
by ohai
Sat Feb 20, 2021 12:20 pm
Forum: General
Topic: What code editor do you use ?
Replies: 176
Views: 130891

Re: What code editor do you use ?

If you use IntelliJ like me, don't use the Lua plugin by sylvanaar. EmmyLua is much better IMO, I never looked back since I started using it.
I still use ZeroBrane for debugging though, as I can't be bothered to try and configure it on IntelliJ.
by ohai
Thu Feb 18, 2021 4:17 pm
Forum: Support and Development
Topic: Packaging an android game with ads for play store on an android device
Replies: 7
Views: 3193

Re: How to package an android game with ads for play store

Unfortunately I don't have any experience of building on android for android, so I can't really help you.
by ohai
Thu Feb 18, 2021 8:33 am
Forum: Support and Development
Topic: Packaging an android game with ads for play store on an android device
Replies: 7
Views: 3193

Re: How to package an android game with ads for play store

Hey, so I'm pretty confused on how to package an android game with ads. I have looked into it before making this post, I've seen admob , and from there I figured that I need to mess with the apk files of löve or something like that(which...confuses me, should I sign up somewhere on google for somet...
by ohai
Wed Feb 17, 2021 11:40 pm
Forum: Support and Development
Topic: Black screen on android. Bug?
Replies: 5
Views: 1483

Re: Black screen on android. Bug?

Your app definitely behaves better than mine.
I'm using a different base though, so maybe the problem is somewhere in there.
by ohai
Wed Feb 17, 2021 11:36 pm
Forum: Support and Development
Topic: How to make an object rotate towards the mouse position.
Replies: 5
Views: 1014

Re: How to make an object rotate towards the mouse position.

Works perfectly! Thanks for the help! Now that that's done I need to get the orientation of the sprite correct when it turns to face the mouse, but I can do that on my own. Thanks for the help, once again! Have a good day. :awesome: :awesome: :awesome: No problem! In the meantime I actually downloa...
by ohai
Wed Feb 17, 2021 11:24 pm
Forum: Support and Development
Topic: How to make an object rotate towards the mouse position.
Replies: 5
Views: 1014

Re: How to make an object rotate towards the mouse position.

I've looked at your code now and I think your problem is in turret.lua:18.
You are needlessly converting radians to degrees.
The draw function takes radians in the rotation parameter.
love2d wiki wrote: number r (0)
Orientation (radians).
by ohai
Wed Feb 17, 2021 11:12 pm
Forum: Support and Development
Topic: How to make an object rotate towards the mouse position.
Replies: 5
Views: 1014

Re: How to make an object rotate towards the mouse position.

I have not looked at your code, but this works for me:

Code: Select all

local dx = game.mouseX - x
local dy = -(game.mouseY - y)
love.graphics.draw(image, x, y, math.atan2(dx, dy), 1, 1, image:getWidth() / 2, image:getHeight() / 2)
by ohai
Wed Feb 17, 2021 8:23 pm
Forum: Support and Development
Topic: Black screen on android. Bug?
Replies: 5
Views: 1483

Re: Black screen on android. Bug?

uriid1 wrote: Wed Feb 17, 2021 7:55 pm I just built a game using android studio instead of apktool and it got rid of the black screen :)
Hmm... I'm building with android studio too. Maybe it's a different problem ¯\_(ツ)_/¯.