1
0
mirror of https://github.com/xiaopeng12138/MaiDXR.git synced 2024-11-15 00:27:36 +01:00
This commit is contained in:
xpeng 2022-04-02 00:53:27 +02:00
commit 7b8e50f91d
3 changed files with 107 additions and 61 deletions

56
.vscode/settings.json vendored
View File

@ -1,56 +0,0 @@
{
"files.exclude":
{
"**/.DS_Store":true,
"**/.git":true,
"**/.gitignore":true,
"**/.gitmodules":true,
"**/*.booproj":true,
"**/*.pidb":true,
"**/*.suo":true,
"**/*.user":true,
"**/*.userprefs":true,
"**/*.unityproj":true,
"**/*.dll":true,
"**/*.exe":true,
"**/*.pdf":true,
"**/*.mid":true,
"**/*.midi":true,
"**/*.wav":true,
"**/*.gif":true,
"**/*.ico":true,
"**/*.jpg":true,
"**/*.jpeg":true,
"**/*.png":true,
"**/*.psd":true,
"**/*.tga":true,
"**/*.tif":true,
"**/*.tiff":true,
"**/*.3ds":true,
"**/*.3DS":true,
"**/*.fbx":true,
"**/*.FBX":true,
"**/*.lxo":true,
"**/*.LXO":true,
"**/*.ma":true,
"**/*.MA":true,
"**/*.obj":true,
"**/*.OBJ":true,
"**/*.asset":true,
"**/*.cubemap":true,
"**/*.flare":true,
"**/*.mat":true,
"**/*.meta":true,
"**/*.prefab":true,
"**/*.unity":true,
"build/":true,
"Build/":true,
"Library/":true,
"library/":true,
"obj/":true,
"Obj/":true,
"ProjectSettings/":true,
"temp/":true,
"Temp/":true
}
}

View File

@ -1,6 +1,8 @@
# MaiDXR
Open Source VR Arcade Simulator
[Chinese 中文 README](https://github.com/xiaopeng12138/MaiDXR/blob/main/README_zh)
## About this project
- This project is an update of https://github.com/xiaopeng12138/MaiMai-VR.
- Support DX version or above
@ -21,9 +23,10 @@ Open Source VR Arcade Simulator
- https://github.com/hecomi/uWindowCapture
- https://github.com/Sucareto/Mai2Touch
## Requirements
- https://www.nuget.org/packages/InputSimulator
- https://github.com/hecomi/uWindowCapture
## Build requirements
- Current Unity version: 2020.3.30f1
- [InputSimulator](https://www.nuget.org/packages/InputSimulator) (You need to extract the .dll file and put it in to assets folder)
- [uWindowCapture](https://github.com/hecomi/uWindowCapture) (just import/install it on your unity project)
## Supported platform
- All SteamVR device
@ -39,13 +42,14 @@ Open Source VR Arcade Simulator
Please see Changes.md
## How to use
- Get game somehow and make sure it will run properly. (DO NOT ASK ANYTHING THAT IS DIRECTLY RELATED TO THE GAME IT SELF)
- Download [latest version of MaiDXR](https://github.com/xiaopeng12138/MaiDXR/releases)
- Download and install [com0com](https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/powersdr-iq/setup_com0com_W7_x64_signed.exe)
- Configure com0com to bind COM3 and COM5 (it must be these two ports), COM4 and COM6 is optional (bind them will make your startup process faster).
- You must enable the enable buffer option in com2com on both ports of all pairs. Otherwise, your MaiDXR will crash after the Unity logo.
- Disable somehow DummyTouchPanel.
- Disable DummyTouchPanel in xxxx.ini.
- If you need button light, pls bind COM21 to COM51 (it must be these two ports)(Do not disable DummyLED!).
- Run the game in window mode and make sure there is no black bar. Recommend setting for 1080p display: "xxxxxx.exe -screen-fullscreen 0 -screen-width 1170 -screen-height 1050"
- Run the game in window mode by adding [Unity Standalone Player command line arguments](https://docs.unity3d.com/Manual/PlayerCommandLineArguments.html) in xxxxx.bat and make sure there is no black bar. Recommend setting for 1080p display: "xxxxxx.exe -screen-fullscreen 0 -screen-width 1170 -screen-height 1050"
- Start MaiDXR.
- Enable somehow Test mod then exit Test mode.
@ -90,3 +94,5 @@ SelectButton and Button(1-4: top to bottom): Pls see [VK Code](https://docs.micr
- √ support 1p only capture
Huge thanks to HelloKS and derole1
If you want to add any function pls commit PR, I will accept it as soon as possible and make a new build/release.

96
README_zh Normal file
View File

@ -0,0 +1,96 @@
# MaiDXR
一个开源的VR街机模拟器框体
## 关于这个项目
- 本项目是https://github.com/xiaopeng12138/MaiMai-VR 的重置更新
- 支持DX版本或以上
- 模型几乎与DX框体比例一致
- 支持原生触摸输入和灯光输出
- 支持90hz或120hz捕获Bitblt感谢@Thalesalex的推荐
- 可调整的震动反馈
- 支持第三人称和平滑相机
- 4个可自定义的按钮(+1个选择按钮)
- 只有1p
## 灵感
- https://github.com/derole1/MaiMai-VR
- https://github.com/HelloKS/MaiMai-VR
##使用的仓库
- https://github.com/HelloKS/MaiMai-VR
- https://github.com/hecomi/uWindowCapture
- https://github.com/Sucareto/Mai2Touch
## 编译要求
- 当前Unity版本2020.3.30f1
- [InputSimulator](https://www.nuget.org/packages/InputSimulator) (需要解压缩nuget包然后找到.dll文件并把它放到assets文件夹中)
- [uWindowCapture](https://github.com/hecomi/uWindowCapture) (要在你的unity项目中导入它)
## 支持的平台
- 所有SteamVR设备
- 所有的Oculus设备
- 使用Oculus Link原生和通过SteamVR和ALVR通过SteamVR在Quest 2上测试过。手的位置是默认为Quest 2控制器调整的其他控制器可能需要手动调整获得最佳体验
## 声明
- 本项目为非营利性项目,部分资源来自互联网!
- 虽然存储库是在MIT许可下的但不要在商业/盈利的情况下使用它!
- 如果可以的话,请支持你本地的机厅!
## 更改日志
请参见 Changes.md
## 如何使用
- 确保游戏本体可以正常游玩。(不要询问任何与游戏本身直接相关的问题!)
- 下载[MaiDXR的最新版本](https://github.com/xiaopeng12138/MaiDXR/releases)
- 下载并安装[com0com](https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/powersdr-iq/setup_com0com_W7_x64_signed.exe)
- 配置com0com绑定COM3和COM5必须是这两个端口COM4和COM6是可选的绑定会让启动变快
- 必须在com2com的两个端口上启用缓冲区选项enable buffer不然MaiDXR会在显示完Unity标志后崩溃
- 在 xxxx.ini中禁用DummyTouchPanel
- 如果你想要灯效请将COM21和COM51绑定必须是这两个端口并且不要禁用DummyLED
- 通过在xxxx.bat中添加[Unity Standalone Player command line arguments](https://docs.unity3d.com/Manual/PlayerCommandLineArguments.html)使本体在窗口模式下运行并且确保没有任何黑边。1080p显示屏推荐的设置"xxxxx.exe -screen-fullscreen 0 -screen-width 1170 -screen-height 1050"
- 启动MaiDXR。
- 进一遍维护模式(按下测试键),然后退出维护模式。
## 设置
在MaiDXR窗口中按M键来开关移动。
编辑根目录下的Settings.json文件。在MaiDXR窗口中按F5刷新或重新选中MaiDXR的窗口也能刷新。
HandSize手大小, HandPosition手位置偏移, PlayerHigh玩家高度: 单位为厘米
CaptureFrameRate捕获帧率, TouchRefreshRate触摸帧率单位为为帧
Capture1PlayerOnly仅捕获1p: "true" (捕获9:16长宽比) 或 "false" (默认) (两倍的9:16长宽比也就是18:16)
CameraSmooth摄像机平滑0.0 到 1.0, 1.0 = 无平滑度
CameraFOV相机视野以度为单位
CameraPosition相机位置偏移以米为单位
启用第三人称模式将CameraSmooth设置为0然后把头显移动到你相机想放在的位置。最后刷新MaiDXR窗口以锁定位置。通过启用以下设置可以在第三人称中显示你的头部位置
ShowHeadCube显示头部方块: "true" 或 "false" (默认)
HapticDuration手柄震动时长: 以秒为单位
HapticAmplitude手柄震动幅度: 0.0 - 1.0, 1.0 = 最大振动
SelectButtonButton选择按钮和按钮1-4从上到下格式请看[VK代码](https://docs.microsoft.com/windows/win32/inputdev/virtual-key-codes),有些键不需要在开头加上 "VK_"
## 预览
![Image Capture](https://github.com/xiaopeng12138/MaiDXR/blob/main/PreviewImage/MaiDXR_PreviewImage.png?raw=true)
## ToDo
- √ 添加用户可调整的设置(控制器位置等)
- √ 添加非VR窗口和摄像机的平滑度
- √ 添加按钮灯光
- √ 添加按钮振动
- √ 添加第三人称摄像机
- 添加2p
- √ 添加自定义按钮
- √ 支持只捕捉1p
非常感谢HelloKS和derole1
如果你想添加任何功能欢迎提交PR我将尽快查看并光速打包新版本。