As a hobbiest, even if visual fidelity isn't a concern I would use unreal over unity. Unity optimizes for making a block move around the screen, but becomes increasingly convoluted in design. Unreal doesn't feel like you are just hammering random different unrelated systems together as much. If I were to do a 2d game I would use godot though.