Hi guys!
I am almost done with a game I am developing, and everything is working fine on windows.
However when I tested out the game on Android, there were some bugs:
-
In my game I needed to draw a line from one fixed point to a variable point so I thought of using render.draw_line
On Android: the line isn’t showing -
In my game I need to create multiple game objects in different random positions. On windows, it is working perfectly fine
On Android: All objects are being spawned in the same location
Note: I am using the following
math.randomseed(os.time()* 1000000 * math.random() * math.random())
local yPos = math.random(267, 700)
Note: the android device I’m using is Sony Xperia Z2
EDIT: I was able to solve the following issue: The problem was that I was checking for both mouse click and multi-touch event when checking for user input (i.e: if (action_id == hash(“click”)) or (action_id == hash(“touch”)) then) I removed the mouse trigger action and the problem was solved!
Solved issue: In my game there’s an option to buy multiple items, and when the user chooses to do so a message is sent to deduct coins from the player’s coins.
On Android: the message is being sent twice (However, this is working perfectly fine when I tested it in the Defold Editor)