HSPポータル
サイトマップ お問い合わせ


HSPTV!掲示板


未解決 解決 停止 削除要請

2021
0727
ねんねこHSPでリズムゲームを作りたい3解決


ねんねこ

リンク

2021/7/27(Tue) 09:09:25|NO.93328

HSPでリズムゲームを作りたいんですけど、どう作ればいいのかわからなくて...



この記事に返信する


usagi

リンク

2021/7/27(Tue) 10:32:43|NO.93331

シンプルな物を一例ですが。

*GAME_INIT ; 初期化 notes = 1000,1500,2000,2500,3000,4000,5000,6000,6500,7000 musicEnd = 8000 curMs=0 text="" score = 0 *GAME_MAIN // タップ判定 stick tap,,0 if tap&16 { repeat length(notes) : note = notes.cnt timing = abs(note - curMs) if timing < 500 { if timing < 50 : text="Grate": score+=100 : break if timing < 150: text="Good" : score+=10 : break text="bad" : break } loop } // 曲終了判定 if curMS>musicEnd : goto *GAME_TITLE // 描画 redraw 0 color 255,255,255: boxf // ノーツ描画 color ,255 repeat length(notes) : note = notes.cnt x = note - curMs : x/=10 circle x,0,x+30,30,1 loop // タップ描画 color 255 if tap&16 { circle 0,0,30,30,1 pos 0,30: mes text } else { circle 0,0,30,30,0 } redraw 1 title strf("Score:%d Tap:%s :Time%d", score, text, curMs) await 32 curMs+=32 goto *GAME_MAIN *GAME_TITLE redraw 0 color 255,255,255: boxf color: pos 0,0: mes "スペースキーでスタート" await 16: redraw 1 stick tap,,0 if tap&16 : goto *GAME_INIT goto *GAME_TITLE



piyapipito

リンク

2021/7/27(Tue) 23:21:48|NO.93341

https://github.com/PiPiTO7273/XODA-project

いろんな理由で諦めたやつですが、よければどうぞ



ねんねこ

リンク

2021/7/30(Fri) 10:06:10|NO.93375

ありがとうございます。
参考にさせていただきます。



ONION software Copyright 1997-2023(c) All rights reserved.