Skip to content

RFC : support touch messages #43

@cloudwu

Description

@cloudwu

因为有了 wasm 版,iPad 上也可以运行游戏了。试试支持触摸屏消息。

9d29c48 这是第一个提交,因为不影响其它部分,就直接提到主干上了。它导入了 sokol 提供的触摸屏消息。

但是,目前只导入了第一个触摸点。触摸是多点的,其它触摸点还想想好以怎样的形式提供。单点触摸应该可以先模拟一下鼠标。

触摸屏的操作和交互和鼠标有一些区别,不完全等价。我在过去手机游戏开发中有一些经验总结,见 https://blog.codingnow.com/2022/12/interaction.html

但目前,如果只是想先让游戏跑起来,可以先把 touch 消息在 deepfuture 仓库那里的 main.lua 中,简单的转换为 mouse 消息。

由于明天我计划出去野外攀岩,大约一周回来。@yuchanns 可以简单在 deepfuture 上改改,部分支持手机平板试试。下周我可以手机处理 pr ,但不方便写代码。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions