No problem, can happen to anyone, also that part of the docs where really confusing to me too, they are described right, but it is hard to imagine it hahaha. Good luck with that! It's looking rather niceTurtleP wrote: Thanks, I must have read the documentation wrong or something.
love-android-sdl2 (native, 0.9.2)
- Positive07
- Party member
- Posts: 1014
- Joined: Sun Aug 12, 2012 4:34 pm
- Location: Argentina
Re: love-android-sdl2 (native, 0.9.0)
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
Re: love-android-sdl2 (native, 0.9.0)
Thanks! Yeah I made my own touch screen controls (and used Hugo's android analog library too) for this. It's going to detect mobile mode (Android/iOS) or desktop mode (PC/Mac/Linux) and apply various settings when needed.Positive07 wrote:No problem, can happen to anyone, also that part of the docs where really confusing to me too, they are described right, but it is hard to imagine it hahaha. Good luck with that! It's looking rather niceTurtleP wrote: Thanks, I must have read the documentation wrong or something.
One other problem, however, is that enemies are spawned as such (and only breaks in fullscreen mode!) and thus the game does not position things correctly for each device during the online co-op due to the scale and screen resolutions. Any advice on how to fix that?
Re: love-android-sdl2 (native, 0.9.2)
While your post doesn't quite make it clear exactly what the problem is, it sounds like you're sending positions (of enemies and such) in pixel coordinates. Don't do that! Anything going over a network should be in resolution-independent coordinates that work on any client.
My game called Hat Cat and the Obvious Crimes Against the Fundamental Laws of Physics is out now!
Re: love-android-sdl2 (native, 0.9.2)
Yeah, that's probably my issue. Any tips on how to fix the issue?T-Bone wrote:While your post doesn't quite make it clear exactly what the problem is, it sounds like you're sending positions (of enemies and such) in pixel coordinates. Don't do that! Anything going over a network should be in resolution-independent coordinates that work on any client.
These are snippets of my code, I'm not asking for you to change it for me, but just let me know why it's wrong (obviously using l.w.getWidth is one thing) and all positions are scaled on drawing, never during update functions.
My code for enemies (using cron for the timer):
Code: Select all
enemyclock = cron.every(cron_time, function() newenemy(love.math.random(5, (love.window.getWidth()/scale)-32), 0) end)
Code: Select all
boss:new((love.window.getWidth())/2-(bossimg:getWidth()*scale)/2, -60)
Yeah the code looks pretty bad, but it's old from around the first few revisions of the game.
- Ranguna259
- Party member
- Posts: 911
- Joined: Tue Jun 18, 2013 10:58 pm
- Location: I'm right next to you
Re: love-android-sdl2 (native, 0.9.2)
How to I change the screen's orientation ? I've tried changing it in AndroidManifest.xml but when I repack and install I get an error saying that the app couldn't be installed.
Can you compile version 0.9.2b in portrait mode and post it here ?
Can you compile version 0.9.2b in portrait mode and post it here ?
Re: love-android-sdl2 (native, 0.9.2)
Weird, I remember changing the orientation (and other things, too!) in the file manually without issues. How and on what system are you doing this?
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
- Ranguna259
- Party member
- Posts: 911
- Joined: Tue Jun 18, 2013 10:58 pm
- Location: I'm right next to you
Re: love-android-sdl2 (native, 0.9.2)
I'm doing this on windows and I'm using apktool 2.0.1 with the following commands:
Then I change the orientation to portrait in the xml and run this command:
After that I move newlove0.9.2a.apk to my phone but it fails to install.
Here's the modified apk.
Code: Select all
apktool d LOVE_for_android_0.9.2a.apk
Code: Select all
apktool b LOVE_for_android_0.9.2a -o newlove0.9.2a.apk
Here's the modified apk.
- Ranguna259
- Party member
- Posts: 911
- Joined: Tue Jun 18, 2013 10:58 pm
- Location: I'm right next to you
Re: love-android-sdl2 (native, 0.9.2)
https://love2d.org/imgmirrur/hmS3snB.png
So ive followed the detailed step by step. Exact but the /tools/ant.build.xml
Fails my build everytime at 538. While running the .bat command in the correct sdl2 root folder
MinSdkVersionOut I believe is around that line using notepad++
Unable to resolve project target Android-19
Probably a simple mistake that needs changing of targets, ive only made hello worlds before
So ive followed the detailed step by step. Exact but the /tools/ant.build.xml
Fails my build everytime at 538. While running the .bat command in the correct sdl2 root folder
MinSdkVersionOut I believe is around that line using notepad++
Unable to resolve project target Android-19
Probably a simple mistake that needs changing of targets, ive only made hello worlds before
Re: love-android-sdl2 (native, 0.9.2)
Hey you all!
I just jumped aboard the Lövetrain <3
After successfully running "official" Löve for Android on my phone and booting my game, I decided I'd rather portrait mode than landscape. So I changed the AndroidManifest setting and repacked and installed and the game ran again, but ran into a few small things.
First off, I couldn't run games from /sdcard/lovegame. It worked when I used adb to push it and then run the shell, but not when normally running the app on my phone, which is peculiar. It lieu of a quicker workflow, I've returned to the official so I can make some progress quicker, hoping someone here could potentially know what's wrong with that?
Second, when I put it in portrait mode, the touchpressed, released and moved seemed to return x and y in terms of pixels rather than the usual [0,1] and I cannot for the life of me guess why that is.
Any thoughts?
Thanks!
I just jumped aboard the Lövetrain <3
After successfully running "official" Löve for Android on my phone and booting my game, I decided I'd rather portrait mode than landscape. So I changed the AndroidManifest setting and repacked and installed and the game ran again, but ran into a few small things.
First off, I couldn't run games from /sdcard/lovegame. It worked when I used adb to push it and then run the shell, but not when normally running the app on my phone, which is peculiar. It lieu of a quicker workflow, I've returned to the official so I can make some progress quicker, hoping someone here could potentially know what's wrong with that?
Second, when I put it in portrait mode, the touchpressed, released and moved seemed to return x and y in terms of pixels rather than the usual [0,1] and I cannot for the life of me guess why that is.
Any thoughts?
Thanks!
Who is online
Users browsing this forum: No registered users and 3 guests