ニコニコ新市場 製作お役立ちメモ
2019年9月27日 D.M 著
皆さんこんにちは。D.Mです。
ニコニコ新市場の自作ゲームを制作する時に使う技を軽くまとめてみました。
もし、この他に忘れがちなものありましたら、コメントで教えていただきたいです。
目次
=====宣伝=====
この記事をご覧の皆様は下記のマイリストの動画を全て再生いただければ。
https://www.nicovideo.jp/mylist/63018181
============
1.コマンド編
・テンプレートを製作する
akashic init
width:640、height:360、fps:30
・アセット(画像)を読み込ませる
akashic scan asset
・ローカルサーバー起動
akashic serve
・ローカルサーバー停止
Ctrl+C はい
・zip出力
akashic export html --output atsumaru.zip --atsumaru
2.game.json
・シングル(放送者用)ゲーム
"environment": {
"sandbox-runtime": "2",
"niconico": {
"supportedModes": [
"single", // シングル(放送者)用
"ranking" // ランキング用
"multi" // マルチゲーム用
]
}
}
3.スクリプト
・更新適用
koushinsitai.invalidate();
・シーンに追加する
scene.append(koushinsitai);
・画像の表示範囲を変更 + inv
sprite.srcX = 0;
srcHeight: 64,
srcWidth: 64,
width: 64,
height: 64
・エンティティ内タグ
tag:{
tag1:false,
tag2:false
}
・エンティティ親
parent: charactor
4.スクリプトテンプレート
・文字
// フォント生成
var font = new g.DynamicFont({
game: g.game,
fontFamily: g.FontFamily.Serif,
size: 30
});
// 文字ラベル
var label = new g.Label ({
scene: scene,
font: font,
text: "",
fontSize: 15,
textColor: "black",
x: 10,
y: 32
});
・画像ボタン
var sprite = new g.Sprite({
scene: scene,
src: scene.assets["image1"],
x: 64,
y: 0,
width: 48,
height: 48,
local: true,
touchable: true,
});
・毎フレーム実行
sprite.update.add(function () {
});
2019年9月27日 D.M 著
皆さんこんにちは。D.Mです。
ニコニコ新市場の自作ゲームを制作する時に使う技を軽くまとめてみました。
もし、この他に忘れがちなものありましたら、コメントで教えていただきたいです。
目次
=====宣伝=====
この記事をご覧の皆様は下記のマイリストの動画を全て再生いただければ。
https://www.nicovideo.jp/mylist/63018181
============
1.コマンド編
・テンプレートを製作する
akashic init
width:640、height:360、fps:30
・アセット(画像)を読み込ませる
akashic scan asset
・ローカルサーバー起動
akashic serve
・ローカルサーバー停止
Ctrl+C はい
・zip出力
akashic export html --output atsumaru.zip --atsumaru
2.game.json
・シングル(放送者用)ゲーム
"environment": {
"sandbox-runtime": "2",
"niconico": {
"supportedModes": [
"single", // シングル(放送者)用
"ranking" // ランキング用
"multi" // マルチゲーム用
]
}
}
3.スクリプト
・更新適用
koushinsitai.invalidate();
・シーンに追加する
scene.append(koushinsitai);
・画像の表示範囲を変更 + inv
sprite.srcX = 0;
srcHeight: 64,
srcWidth: 64,
width: 64,
height: 64
・エンティティ内タグ
tag:{
tag1:false,
tag2:false
}
・エンティティ親
parent: charactor
4.スクリプトテンプレート
・文字
// フォント生成
var font = new g.DynamicFont({
game: g.game,
fontFamily: g.FontFamily.Serif,
size: 30
});
// 文字ラベル
var label = new g.Label ({
scene: scene,
font: font,
text: "",
fontSize: 15,
textColor: "black",
x: 10,
y: 32
});
・画像ボタン
var sprite = new g.Sprite({
scene: scene,
src: scene.assets["image1"],
x: 64,
y: 0,
width: 48,
height: 48,
local: true,
touchable: true,
});
・毎フレーム実行
sprite.update.add(function () {
});
コメント
コメントはまだありません
コメントを書き込むにはログインしてください。