[ Android ] Game running extremely slow

it should not behave like that. If you want, add me to your project and I’ll see if I can figure something out. My address is mikael@sicher.org

1 Like

A quick update; Strange, I just threw together a simple game object with your script but I can’t recreate what you are experiencing. Added a hacky elapsed-time-calculation from it starts falling to object reaches y<0 and it seems to report about the same time on Windows, OSX and iOS. I don’t have a Android to test on at the moment sadly.

If you would like to check this yourself, I added these to init():

self.start = socket.gettime()
self.start_pos = go.get_position()

And at the end of update():

if (pos.y < 0) then
	local fin = socket.gettime()
	print(fin - self.start)
	
	-- reset
	self.start = fin
	go.set_position(self.start_pos)
	self.velocity = vmath.vector3(0, 0, 0)
end
1 Like

Great! I got access to your project but you need to sync (File > Synchronize) to upload your changes to the server.

1 Like

Done.
I should have known this before. Sorry :smile:.

No worries. I’ve tested the game and can’t reproduce. No slowdown when resizing the game (on OS X). What OS are you running on? We’ll see if we can test on a Moto G2 as well.

OS: Windows 7 Ultimate
System type: 64-bit
Ram: 2,00 GB
Processor: Pentium® Dual-Core CPU E5400 @2.7GHz

I don’t know if it’s important too, but:

Could you run on a Moto G2? I’m really interested in solving this problem…

Hi,
Some additional suggestions:

You should be applying dt to your position addition (not so sure you want to apply dt to velocity like you do now, you can experiment with that). Likely, you’ll need to adjust your hard coded values (to larger) doing so.

Can you also check that on_message doesn’t get spammed with other messages because right now you are resetting velocity to -0.02 if the message isn’t “tap” and tapped == false. Do a simple printout or even easier, comment out the else … end velocity reset for testing.

1 Like