Search found 9 matches

by ElasticSpandex
Thu Aug 17, 2017 8:21 pm
Forum: Support and Development
Topic: [SOLVED] love.window.hasFocus() on Android
Replies: 10
Views: 8068

Re: [SOLVED] love.window.hasFocus() on Android

Nixola wrote: Thu Aug 17, 2017 8:05 pm Maybe LÖVE treats it as if it was one huge update, with dt measuring the time the app wasn't focused?
That would be very interesting, and actually make sense!
by ElasticSpandex
Thu Aug 17, 2017 3:00 pm
Forum: Support and Development
Topic: [SOLVED] love.window.hasFocus() on Android
Replies: 10
Views: 8068

Re: love.window.hasFocus() on Android

Alright... I figured it out! love.window.hasFocus() doesn't work on Android. But love.focus does. This works: function love.focus(f) if not f then if game.state == "playing" then game.state = "paused" end end end I appreciate all the help from you guys! :awesome: Although I'm sti...
by ElasticSpandex
Thu Aug 17, 2017 1:41 pm
Forum: Support and Development
Topic: [SOLVED] love.window.hasFocus() on Android
Replies: 10
Views: 8068

Re: love.window.hasFocus() on Android

My problem is that i have no way of testing this for Android. Something like love.window.hasFocus() Make a small program that prints a random number in an in-window console every second or so. Exit the app on android, wait a few seconds and go back into the app - if any new numbers appeared, then t...
by ElasticSpandex
Thu Aug 17, 2017 8:04 am
Forum: Support and Development
Topic: [SOLVED] love.window.hasFocus() on Android
Replies: 10
Views: 8068

Re: love.window.hasFocus() on Android

All I would like to do, is test if the user is actually in the game on Android. That way i can make a "pausescreen" or something else. love.system.getOS Thanks for the reply! I apologize for the bad wording, but I meant if the user is "In Game", like actaully playing, and intera...
by ElasticSpandex
Thu Aug 17, 2017 7:12 am
Forum: Support and Development
Topic: [SOLVED] love.window.hasFocus() on Android
Replies: 10
Views: 8068

Re: love.window.hasFocus() on Android

Does the timer use love.timer.getTime, os.time, or love.update? If one of the former two, they just query the system for the time and that system counter doesn't pause when your game is paused. I'm not sure you understood, my wording wasn't very good. if game.state == "paused" then the ga...
by ElasticSpandex
Wed Aug 16, 2017 6:42 pm
Forum: Support and Development
Topic: [SOLVED] love.window.hasFocus() on Android
Replies: 10
Views: 8068

[SOLVED] love.window.hasFocus() on Android

So I've made a neat little game, and I want to port it to Android. Everything works perfectly, except for when you press the home button, or switch to another app, while the game is running. My game "kind of" runs in the background, but not in the way it should. I have a simple timer that ...
by ElasticSpandex
Sun Nov 06, 2016 8:57 am
Forum: Support and Development
Topic: I need help with bump.lua
Replies: 4
Views: 2864

Re: I need help with bump.lua

The code you have shown seems correct. The problem is likely somewhere else - probably the handling of the word:move collision. But I can't know for sure without looking at the whole code. Can you upload a .love file exemplifying the problem? I have uploaded a .love file. It's just your demo, where...
by ElasticSpandex
Sun Nov 06, 2016 7:27 am
Forum: Support and Development
Topic: I need help with bump.lua
Replies: 4
Views: 2864

Re: I need help with bump.lua

The code you have shown seems correct. The problem is likely somewhere else - probably the handling of the word:move collision. But I can't know for sure without looking at the whole code. Can you upload a .love file exemplifying the problem? I have uploaded a .love file. It's just your demo, where...
by ElasticSpandex
Sat Nov 05, 2016 4:59 pm
Forum: Support and Development
Topic: I need help with bump.lua
Replies: 4
Views: 2864

I need help with bump.lua

So this is actually pretty embarrassing to ask. Because im sure this is extremly simple... But; How do you offset a collision box relative to an object? What i am trying to do it make the collisionbox half the height of the player. It has to cover the bottom half of it. collisionWorld:add(self, self...