8000 GitHub - mukae1997/finalProject: cocos期末项目 a simple music game
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

mukae1997/finalProject

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 

Repository files navigation


TODO【7/9】:

  • GameScene
    • 精制谱面
  • ResultScene

已完成:

  • GameScene
    • 谱面速度控制
    • GLOBAL类设置为单例模式
    • 敲击检测
    • 敲击监听
  • SelectScene
  • PauseScene

主要组成:

  1. GameScene 游玩界面
  2. SelectScene 选择界面
  3. ResultScene 结果界面
  4. 一个管理全局办法的类Global
  5. VisibleRect 用来设置各种位置的,目前是在类里设置一个实例使用

长条判定:


玩家可设定的参数: note落下的速度


键盘设置

4K: DFJK


游玩逻辑: update函数中按照谱面时间码和当前时间计数器的时 创造note。note只是一个存储信息的容器,并不是sprite。


判定逻辑: 从上到下4个box

|good box |perfect box |good box |miss box

击中前三个则note的sprite的tag设置为HIT(1),否则为MISS(0)

note监听按键事件,按下对应键时检测note和哪个判定box发生了碰撞 miss box需要监听是否有note擦过它。


谱面使用的jsoncpp来写入的,不做谱面就不用装了。

【】谱面记录格式】 谱面结构:

{ "array":
      [   
      /*这里是一个实际谱面信息的数组*/
      ]
}

数组里面每一个元素都是这样的:

{
   "time" : 1896,  //  时间戳
   "tracks" : [    // 一个数组,包括每个轨道在这个时间戳会有什么note落下来
      {
         "length" : 1,   // note持续时间,主要是设计给长条用的
         "num" : 0,   // 轨道号码
         "type" : "tap"  // tap就是点一下
      },
      {
         "length" : 0,
         "num" : 1,
         "type" : "none" // none表示这个时刻这个轨道不会有note掉落
      },
      {
         "length" : 1,
         "num" : 2,
         "type" : "tap"
      },
      {
         "length" : 0,
         "num" : 3,
         "type" : "none"
      }
   ]
}

时间单位:10ms,即0.01s,因为设计为1ms的话刷新跟不上


About

cocos期末项目 a simple music game

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages

0