Skip to content

Phigros模拟器使用Python和WebView / The Phigros emulator uses Python and WebView

License

Notifications You must be signed in to change notification settings

qaqFei/PhigrosPlayer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PhigrosPlayer

MIT License Language

简单的部分功能介绍

  • main.py: 谱面模拟器
  • tool-rpe2phi.py: rpe格式谱面转phi格式
  • tool-phi2rpe.py: phi格式谱面转rpe格式
  • tool-unpack.py: 自动解包 Phigros 游戏资源, 目前最新支持版本 3.11.0 (122)
  • tool-modpack.py: 自动改包 Phigros (rpe谱面也可以!!
  • tool-dump-global-metadata.py: 通过 libUnityPlugin.sogame.dat 生成 global-metadata.dat
  • tool-fv22fv3: 将 formatVersion 2 谱面转换为 formatVersion 3
  • tool-fv32fv2: 将 formatVersion 3 谱面转换为 formatVersion 2
  • tool-getPgrUrl.py: 通过 taptap API 获取 Phigros 下载直链
  • phigros.py: 还原Phigros游戏界面, (真的!

环境配置

  • Python 版本: 3.12.8
  • Windows
git clone https://github.com/qaqFei/PhigrosPlayer
cd PhigrosPlayer\src
pip install -r requirements.txt
python main.py <chart> [args] [kwargs]
  • Termux (运行 main.py 后访问 https://qaqfei.github.io/PhigrosPlayer/src/web_canvas.html 并触发 touchstart 连接 127.0.0.1 即可)
curl https://qaqfei.github.io/PhigrosPlayer/src/termux_install.sh -o install.sh
chmod 777 install.sh
./install.sh

cd PhigrosPlayer/src
python main.py <chart> --disengage-webview [args] [kwargs]
展开

与 gpu 通信人家 Windows 有 Dx, macOS 有 metal。 安卓上就他nnd gles和vulkan,gles老掉牙性能差,vulkan兼容性与代码复杂度都依托。新来的wgpu更没生态 kivy还在用gles2.0,那api、设计逻辑还跟web沾不上一点边 canvas2d又小众,什么跑网页跑JavaScript的nodejs, Chromium, edgeruntime全溜去桌面端。 仅有的几个支持安卓的项目,配上python高低得打一架 开发python+android+web的是这个 /xiyangyang-goooooood

使用 phigros.py

cd src
python tool-unpack.py <apk> --need-other-illu --need-other-res
python tool-make-pgrassets-byunpack.py .\unpack-result .\phigros_assets

python phigros.py

谱面兼容

  • phi
    • formatVersion
      • 1
      • 2
      • 3
    • offset
    • judgeLineList
      • bpm
      • notesAbove
      • notesBelow
      • speedEvents
      • judgeLineMoveEvents
      • judgeLineRotateEvents
      • judgeLineDisappearEvents
  • rpe
    • BPMList
    • META (无法获取info文件时读取)
      • RPEVersion (???, 参见 RPEVersion 特殊处理)
      • background
      • charter
      • composer
      • id
      • level
      • name
      • offset
      • song
    • judgeLineList
      • Texture
      • bpmfactor
      • father
      • isCover
      • isGif
      • eventLayers
        • gifEvents (???)
        • alphaEvents
        • moveXEvents
        • moveYEvents
        • rotateEvents
        • speedEvents
      • extended
        • colorEvents
        • inclineEvents (???)
        • scaleXEvents
        • scaleYEvents
        • paintEvents (???)
        • textEvents
      • notes
        • startTime
        • endTime
        • above
        • alpha
        • isFake
        • positionX
        • size
        • speed
        • type
        • visibleTime
        • yOffset
        • hitsound
        • tint (PhiZone)
        • tintHitEffects (PhiZone)
      • alphaControl (可能有bug)
      • posControl (可能有bug)
      • sizeControl (可能有bug)
      • skewControl (???)
      • yControl (可能有bug)
      • zOrder
  • pec
    • 读取转换为 rpe 格式
  • extra
    • bpm (仍然使用原谱面的 BPMList)
    • videos
      • path
      • time
      • scale
      • alpha
      • dim
      • zIndex (PhiZone)
      • attach (PhiZone)
    • effects
      • start
      • end
      • shader (由于 WebGL 与 OpenGL 的差异, 部分效果无法实现)
      • global
      • targetRange (PhiZone)
      • vars
  • phira resource pack
    • click.png
    • click_mh.png
    • drag.png
    • drag_mh.png
    • hold.png
    • hold_mh.png
    • flick.png
    • flick_mh.png
    • hit_fx.png
    • click.ogg
    • drag.ogg
    • flick.ogg
    • ending.mp3
    • info.yml
      • name
      • author
      • description
      • hitFx
      • holdAtlas
      • holdAtlasMH
      • hitFxDuration
      • hitFxScale
      • hitFxRotate
      • hitFxTinted
      • hideParticles
      • holdKeepHead
      • holdRepeat
      • holdCompact
      • colorPerfect
      • colorGood

声明

  • 此项目仅用于学习交流, 请勿用于商业用途

鸣谢

About

Phigros模拟器使用Python和WebView / The Phigros emulator uses Python and WebView

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages