Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5184064a26 | |||
| 6a43363539 | |||
| b9195fbbad | |||
| f715ad2176 |
@@ -1,5 +1,6 @@
|
|||||||
# Dusk
|
# Documentation
|
||||||
RPG Game Project, small and able to run on a PSP.
|
- [Scripting](docs/SCRIPTING.md) — writing gameplay logic in JavaScript.
|
||||||
|
- [UI](docs/UI.md) — building buttons/menus/etc from engine/game C code.
|
||||||
|
|
||||||
# Building
|
# Building
|
||||||
Each build target has different requirements. You can take a look at the git
|
Each build target has different requirements. You can take a look at the git
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,47 @@
|
|||||||
|
var Actions;
|
||||||
|
var camera, cameraPosition;
|
||||||
|
var cube, cubePosition, cubeRenderable, cubeMesh;
|
||||||
|
var ground, groundPosition, groundRenderable;
|
||||||
|
|
||||||
|
// init() is called via scriptManagerCallGlobal(), which pumps the asset
|
||||||
|
// system + job queue until any promise it returns settles - so it's safe
|
||||||
|
// to await include() here even though this runs before the main loop.
|
||||||
|
async function init() {
|
||||||
|
Actions = await include("input.js");
|
||||||
|
|
||||||
|
camera = new Entity();
|
||||||
|
cameraPosition = camera.add(POSITION);
|
||||||
|
camera.add(CAMERA);
|
||||||
|
cameraPosition.position = new Vec3(3, 3, -6);
|
||||||
|
cameraPosition.lookAt(new Vec3(0, 0, 0));
|
||||||
|
|
||||||
|
cube = new Entity();
|
||||||
|
cubePosition = cube.add(POSITION);
|
||||||
|
cubeRenderable = cube.add(RENDERABLE);
|
||||||
|
cubeMesh = Mesh.createCube();
|
||||||
|
cubeRenderable.mesh = cubeMesh;
|
||||||
|
cubeRenderable.color = Color.red();
|
||||||
|
|
||||||
|
ground = new Entity();
|
||||||
|
groundPosition = ground.add(POSITION);
|
||||||
|
groundRenderable = ground.add(RENDERABLE);
|
||||||
|
groundRenderable.mesh = Mesh.createCube();
|
||||||
|
groundRenderable.color = Color.dark_gray();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Runs every frame (including dynamic/interpolation frames) - use for
|
||||||
|
// smooth, purely presentational animation.
|
||||||
|
function update() {
|
||||||
|
cubePosition.rotation.y += TIME.delta * 1.5;
|
||||||
|
cubePosition.rotation.x += TIME.delta * 0.7;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Runs once per fixed timestep only - use for gameplay logic that should
|
||||||
|
// be deterministic and independent of display refresh rate.
|
||||||
|
function fixedUpdate() {
|
||||||
|
}
|
||||||
|
|
||||||
|
function deinit() {
|
||||||
|
cube.dispose();
|
||||||
|
camera.dispose();
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
// Binds physical buttons to abstract actions, then exports the action
|
||||||
|
// constants so other scripts don't need to know raw INPUT_ACTION_* names.
|
||||||
|
Input.bind("w", INPUT_ACTION_UP);
|
||||||
|
Input.bind("s", INPUT_ACTION_DOWN);
|
||||||
|
Input.bind("a", INPUT_ACTION_LEFT);
|
||||||
|
Input.bind("d", INPUT_ACTION_RIGHT);
|
||||||
|
Input.bind("space", INPUT_ACTION_ACCEPT);
|
||||||
|
Input.bind("escape", INPUT_ACTION_RAGEQUIT);
|
||||||
|
|
||||||
|
if(typeof INPUT_GAMEPAD !== "undefined") {
|
||||||
|
Input.bind("gamepad_up", INPUT_ACTION_UP);
|
||||||
|
Input.bind("gamepad_down", INPUT_ACTION_DOWN);
|
||||||
|
Input.bind("gamepad_left", INPUT_ACTION_LEFT);
|
||||||
|
Input.bind("gamepad_right", INPUT_ACTION_RIGHT);
|
||||||
|
Input.bind("gamepad_a", INPUT_ACTION_ACCEPT);
|
||||||
|
Input.bind("gamepad_start", INPUT_ACTION_RAGEQUIT);
|
||||||
|
}
|
||||||
|
|
||||||
|
module = {
|
||||||
|
UP: INPUT_ACTION_UP,
|
||||||
|
DOWN: INPUT_ACTION_DOWN,
|
||||||
|
LEFT: INPUT_ACTION_LEFT,
|
||||||
|
RIGHT: INPUT_ACTION_RIGHT,
|
||||||
|
ACCEPT: INPUT_ACTION_ACCEPT,
|
||||||
|
CANCEL: INPUT_ACTION_CANCEL,
|
||||||
|
RAGEQUIT: INPUT_ACTION_RAGEQUIT
|
||||||
|
};
|
||||||
+2
-66
@@ -1,66 +1,2 @@
|
|||||||
msgid ""
|
msgid "test.string"
|
||||||
msgstr ""
|
msgstr "This is a test string"
|
||||||
"Project-Id-Version: ExampleApp 1.0\n"
|
|
||||||
"Language: en\n"
|
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
|
||||||
"Plural-Forms: nplurals=4; plural=(n==1 ? 0 : n==2 ? 1 : (n<7 ? 2 : 3));\n"
|
|
||||||
|
|
||||||
#: ui/menu.c:10
|
|
||||||
msgid "ui.title"
|
|
||||||
msgstr ""
|
|
||||||
"Welcome"
|
|
||||||
|
|
||||||
#: src/dusk/ui/frame/settings/uisettings.c
|
|
||||||
msgid "ui.settings.tabs.general"
|
|
||||||
msgstr "General"
|
|
||||||
|
|
||||||
#: src/dusk/ui/frame/settings/uisettings.c
|
|
||||||
msgid "ui.settings.tabs.input"
|
|
||||||
msgstr "Input"
|
|
||||||
|
|
||||||
#: src/dusk/ui/frame/settings/uisettings.c
|
|
||||||
msgid "ui.settings.tabs.display"
|
|
||||||
msgstr "Display"
|
|
||||||
|
|
||||||
#: src/dusk/ui/frame/settings/uisettings.c
|
|
||||||
msgid "ui.settings.tabs.audio"
|
|
||||||
msgstr "Audio"
|
|
||||||
|
|
||||||
msgid "ui.settings.input.deadzone"
|
|
||||||
msgstr "Deadzone"
|
|
||||||
|
|
||||||
#: src/dusk/ui/frame/settings/uisettingsgeneral.c
|
|
||||||
msgid "ui.settings.general.language"
|
|
||||||
msgstr "Language"
|
|
||||||
|
|
||||||
msgid "ui.settings.general.language_detail"
|
|
||||||
msgstr "Takes effect after restarting the application."
|
|
||||||
|
|
||||||
#: src/dusk/ui/frame/settings/uisettings.c
|
|
||||||
msgid "ui.settings.apply"
|
|
||||||
msgstr "Apply"
|
|
||||||
|
|
||||||
#: src/dusk/ui/frame/uiconfirm.c
|
|
||||||
msgid "ui.confirm.discard_changes"
|
|
||||||
msgstr "Discard unsaved changes?"
|
|
||||||
|
|
||||||
#: src/dusk/ui/frame/game/uigamemenu.c
|
|
||||||
msgid "ui.game_menu.characters"
|
|
||||||
msgstr "Characters"
|
|
||||||
|
|
||||||
#: src/dusk/ui/frame/game/uigamemenu.c
|
|
||||||
msgid "ui.game_menu.items"
|
|
||||||
msgstr "Items"
|
|
||||||
|
|
||||||
#: src/dusk/ui/frame/game/uigamemenu.c
|
|
||||||
msgid "ui.game_menu.settings"
|
|
||||||
msgstr "Settings"
|
|
||||||
|
|
||||||
msgid "item.potion.name"
|
|
||||||
msgstr "Potion"
|
|
||||||
|
|
||||||
msgid "item.potato.name"
|
|
||||||
msgstr "Potato"
|
|
||||||
|
|
||||||
msgid "item.apple.name"
|
|
||||||
msgstr "Apple"
|
|
||||||
@@ -1,70 +0,0 @@
|
|||||||
msgid ""
|
|
||||||
msgstr ""
|
|
||||||
"Project-Id-Version: ExampleApp 1.0\n"
|
|
||||||
"Language: es\n"
|
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
|
||||||
"Plural-Forms: nplurals=2; plural=(n==1 ? 0 : 1);\n"
|
|
||||||
|
|
||||||
#: ui/menu.c:10
|
|
||||||
msgid "ui.title"
|
|
||||||
msgstr ""
|
|
||||||
"Bienvenido"
|
|
||||||
|
|
||||||
#: src/dusk/ui/frame/settings/uisettings.c
|
|
||||||
msgid "ui.settings.tabs.general"
|
|
||||||
msgstr "General"
|
|
||||||
|
|
||||||
#: src/dusk/ui/frame/settings/uisettings.c
|
|
||||||
msgid "ui.settings.tabs.input"
|
|
||||||
msgstr "Entrada"
|
|
||||||
|
|
||||||
#: src/dusk/ui/frame/settings/uisettings.c
|
|
||||||
msgid "ui.settings.tabs.display"
|
|
||||||
msgstr "Pantalla"
|
|
||||||
|
|
||||||
#: src/dusk/ui/frame/settings/uisettings.c
|
|
||||||
msgid "ui.settings.tabs.audio"
|
|
||||||
msgstr "Audio"
|
|
||||||
|
|
||||||
msgid "ui.settings.input.deadzone"
|
|
||||||
msgstr "Deadzone"
|
|
||||||
|
|
||||||
#: src/dusk/ui/frame/settings/uisettingsgeneral.c
|
|
||||||
msgid "ui.settings.general.language"
|
|
||||||
msgstr "Idioma"
|
|
||||||
|
|
||||||
#: src/dusk/ui/frame/settings/uisettingsgeneral.c
|
|
||||||
msgid "ui.settings.general.language_detail"
|
|
||||||
msgstr "Se aplica después de reiniciar la aplicación."
|
|
||||||
|
|
||||||
#: src/dusk/ui/frame/settings/uisettings.c
|
|
||||||
msgid "ui.settings.apply"
|
|
||||||
msgstr "Aplicar"
|
|
||||||
|
|
||||||
#: src/dusk/ui/frame/uiconfirm.c
|
|
||||||
msgid "ui.confirm.discard_changes"
|
|
||||||
msgstr "¿Descartar los cambios no guardados?"
|
|
||||||
|
|
||||||
#: src/dusk/ui/frame/game/uigamemenu.c
|
|
||||||
msgid "ui.game_menu.characters"
|
|
||||||
msgstr "Personajes"
|
|
||||||
|
|
||||||
#: src/dusk/ui/frame/game/uigamemenu.c
|
|
||||||
msgid "ui.game_menu.items"
|
|
||||||
msgstr "Objetos"
|
|
||||||
|
|
||||||
#: src/dusk/ui/frame/game/uigamemenu.c
|
|
||||||
msgid "ui.game_menu.settings"
|
|
||||||
msgstr "Configuración"
|
|
||||||
|
|
||||||
#: src/dusk/rpg/item/item.json
|
|
||||||
msgid "item.potion.name"
|
|
||||||
msgstr "Poción"
|
|
||||||
|
|
||||||
#: src/dusk/rpg/item/item.json
|
|
||||||
msgid "item.potato.name"
|
|
||||||
msgstr "Papa"
|
|
||||||
|
|
||||||
#: src/dusk/rpg/item/item.json
|
|
||||||
msgid "item.apple.name"
|
|
||||||
msgstr "Manzana"
|
|
||||||
@@ -1,70 +0,0 @@
|
|||||||
msgid ""
|
|
||||||
msgstr ""
|
|
||||||
"Project-Id-Version: ExampleApp 1.0\n"
|
|
||||||
"Language: ja\n"
|
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
|
||||||
"Plural-Forms: nplurals=1; plural=(0);\n"
|
|
||||||
|
|
||||||
#: ui/menu.c:10
|
|
||||||
msgid "ui.title"
|
|
||||||
msgstr ""
|
|
||||||
"歓迎"
|
|
||||||
|
|
||||||
#: src/dusk/ui/frame/settings/uisettings.c
|
|
||||||
msgid "ui.settings.tabs.general"
|
|
||||||
msgstr "一般"
|
|
||||||
|
|
||||||
#: src/dusk/ui/frame/settings/uisettings.c
|
|
||||||
msgid "ui.settings.tabs.input"
|
|
||||||
msgstr "入力"
|
|
||||||
|
|
||||||
#: src/dusk/ui/frame/settings/uisettings.c
|
|
||||||
msgid "ui.settings.tabs.display"
|
|
||||||
msgstr "表示"
|
|
||||||
|
|
||||||
#: src/dusk/ui/frame/settings/uisettings.c
|
|
||||||
msgid "ui.settings.tabs.audio"
|
|
||||||
msgstr "オーディオ"
|
|
||||||
|
|
||||||
msgid "ui.settings.input.deadzone"
|
|
||||||
msgstr "デッドゾーン"
|
|
||||||
|
|
||||||
#: src/dusk/ui/frame/settings/uisettingsgeneral.c
|
|
||||||
msgid "ui.settings.general.language"
|
|
||||||
msgstr "言語"
|
|
||||||
|
|
||||||
#: src/dusk/ui/frame/settings/uisettingsgeneral.c
|
|
||||||
msgid "ui.settings.general.language_detail"
|
|
||||||
msgstr "アプリケーションを再起動すると適用されます。"
|
|
||||||
|
|
||||||
#: src/dusk/ui/frame/settings/uisettings.c
|
|
||||||
msgid "ui.settings.apply"
|
|
||||||
msgstr "適用"
|
|
||||||
|
|
||||||
#: src/dusk/ui/frame/uiconfirm.c
|
|
||||||
msgid "ui.confirm.discard_changes"
|
|
||||||
msgstr "未保存の変更を破棄しますか?"
|
|
||||||
|
|
||||||
#: src/dusk/ui/frame/game/uigamemenu.c
|
|
||||||
msgid "ui.game_menu.characters"
|
|
||||||
msgstr "キャラクター"
|
|
||||||
|
|
||||||
#: src/dusk/ui/frame/game/uigamemenu.c
|
|
||||||
msgid "ui.game_menu.items"
|
|
||||||
msgstr "アイテム"
|
|
||||||
|
|
||||||
#: src/dusk/ui/frame/game/uigamemenu.c
|
|
||||||
msgid "ui.game_menu.settings"
|
|
||||||
msgstr "設定"
|
|
||||||
|
|
||||||
#: src/dusk/rpg/item/item.json
|
|
||||||
msgid "item.potion.name"
|
|
||||||
msgstr "ポーション"
|
|
||||||
|
|
||||||
#: src/dusk/rpg/item/item.json
|
|
||||||
msgid "item.potato.name"
|
|
||||||
msgstr "ジャガイモ"
|
|
||||||
|
|
||||||
#: src/dusk/rpg/item/item.json
|
|
||||||
msgid "item.apple.name"
|
|
||||||
msgstr "リンゴ"
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"mesh": "meshes/buildings/house_1_1.dmf",
|
|
||||||
"color": [255, 0, 255, 255]
|
|
||||||
}
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"mesh": "meshes/buildings/house_1_2.dmf",
|
|
||||||
"color": [255, 0, 255, 255]
|
|
||||||
}
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"mesh": "meshes/buildings/house_1_3.dmf",
|
|
||||||
"color": [255, 0, 255, 255]
|
|
||||||
}
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"mesh": "meshes/buildings/house_1_4.dmf",
|
|
||||||
"color": [255, 0, 255, 255]
|
|
||||||
}
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"mesh": "meshes/buildings/house_1_5.dmf",
|
|
||||||
"color": [255, 0, 255, 255]
|
|
||||||
}
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"mesh": "meshes/buildings/house_1_6.dmf",
|
|
||||||
"color": [255, 0, 255, 255]
|
|
||||||
}
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"mesh": "meshes/buildings/house_1_7.dmf",
|
|
||||||
"color": [255, 0, 255, 255]
|
|
||||||
}
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"mesh": "meshes/buildings/house_1_8.dmf",
|
|
||||||
"color": [255, 0, 255, 255]
|
|
||||||
}
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"mesh": "meshes/buildings/house_2_1.dmf",
|
|
||||||
"color": [255, 0, 255, 255]
|
|
||||||
}
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"mesh": "meshes/buildings/house_2_2.dmf",
|
|
||||||
"color": [255, 0, 255, 255]
|
|
||||||
}
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"mesh": "meshes/buildings/house_2_3.dmf",
|
|
||||||
"color": [255, 0, 255, 255]
|
|
||||||
}
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"mesh": "meshes/buildings/house_2_4.dmf",
|
|
||||||
"color": [255, 0, 255, 255]
|
|
||||||
}
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"mesh": "meshes/buildings/house_2_5.dmf",
|
|
||||||
"color": [255, 0, 255, 255]
|
|
||||||
}
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"mesh": "meshes/buildings/house_2_6.dmf",
|
|
||||||
"color": [255, 0, 255, 255]
|
|
||||||
}
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"mesh": "meshes/buildings/house_2_7.dmf",
|
|
||||||
"color": [255, 0, 255, 255]
|
|
||||||
}
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"mesh": "meshes/buildings/house_2_8.dmf",
|
|
||||||
"color": [255, 0, 255, 255]
|
|
||||||
}
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"mesh": "meshes/buildings/house_3_1.dmf",
|
|
||||||
"color": [255, 0, 255, 255]
|
|
||||||
}
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"mesh": "meshes/buildings/house_3_2.dmf",
|
|
||||||
"color": [255, 0, 255, 255]
|
|
||||||
}
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user