0 votes


The issue is experienced on Godotv3.0.6-stablewin64.
The game is a 2D platformer, exported to Android.
The issue is experienced:
- on my computer (Windows 10 64, CPU: 8700K, GPU: GTX 1060 6 GB, RAM: 16 GB), while testing it with F5
- on my smartphone (Xperia XA2, RAM: 3 GB), once exported and installed with the .apk
- on my friend's smartphone (Honor 8X, RAM: 4 GB), once exported and installed with the .apk

My project doesn't have much nodes. To keep it as simple as possible: a TileMap, and a KinematicBody2D with a Sprite, a CollisionShape2D and a custom camera (a Node2D).
I also made a new project to try to identify the issue, with literally 30 lines of code.

The problem in itself: the game will struggle for maybe 0.5 - 1 sec, every few seconds, looking like the FPS drop frequently... but when I print said FPS, everything seems alright (144 FPS with v-sync, and a lot more without).
The issue is reduced on my computer.
The issue is reduced with the "light" version.

I have been experiencing this issue for a week, I tried to modify some settings, I even tried with Godot 3.1 (alpha) to use the ESGL 2 option, but none of what I did actually solved it.

My code from the light version:

extends KinematicBody2D

const UP = Vector2(0, -1)
const SCREEN_LENGTH = 1024
const SPEED = 300
const GRAVITY = 40
const JUMP_HEIGHT = 800

var motion = Vector2()
var jump = false

func _ready():
    motion.x = SPEED

func _physics_process(delta):
    motion.y += GRAVITY

    if is_on_floor() && jump:
        motion.y -= JUMP_HEIGHT

    if position.x <= 16 || position.x >= SCREEN_LENGTH - 16:
        motion.x *= -1

    motion = move_and_slide(motion, UP)

func _input(event):
    if event is InputEventMouseButton:
        jump = event.pressed
asked Oct 28, 2018 in Engine by Ortcel (18 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.