work on engine exe tests

This commit is contained in:
Tuomas Katajisto 2026-03-25 19:26:47 +02:00
parent 9f647ea5c5
commit 1c8f9bc46e
44 changed files with 115462 additions and 171 deletions

View File

@ -211,7 +211,8 @@ wasm_build :: (opts: Build_Options, trueno_opts: Trueno_Build_Options) {
opt := get_build_options(); opt := get_build_options();
trueno_opts := build_options_from_args(opt.compile_time_command_line); trueno_opts := build_options_from_args(opt.compile_time_command_line);
compile_shaders(); compile_shaders();
create_pack(); is_test_exe := trueno_opts.test_exe_engine || trueno_opts.test_exe_game;
create_pack(is_test_exe, ifx is_test_exe then "./test_packs" else "./packs");
if trueno_opts.wasm_build { if trueno_opts.wasm_build {
wasm_build(opt, trueno_opts); wasm_build(opt, trueno_opts);

View File

@ -1,4 +1,4 @@
master_volume 1 master_volume 1
music_volume 0.2 music_volume 1
sfx_volume 1 sfx_volume 1
fullscreen 1 fullscreen 0

View File

@ -97,7 +97,7 @@ fetch_callback :: (res: *sfetch_response_t) #c_call {
fallback_req : Fetch_Request; fallback_req : Fetch_Request;
fallback_req.type = .WORLD; fallback_req.type = .WORLD;
fallback_req.world_name = req.world_name; fallback_req.world_name = req.world_name;
fallback_req.path = sprint("./game/resources/worlds/%/index.world", req.world_name); fallback_req.path = sprint("%/worlds/%/index.world", GAME_RESOURCES_DIR, req.world_name);
fallback_req.should_block = true; fallback_req.should_block = true;
array_add(*g_asset_manager.fetch_queue, fallback_req); array_add(*g_asset_manager.fetch_queue, fallback_req);
return; return;
@ -116,7 +116,7 @@ fetch_callback :: (res: *sfetch_response_t) #c_call {
chunks_req : Fetch_Request; chunks_req : Fetch_Request;
chunks_req.type = .WORLD_CHUNKS; chunks_req.type = .WORLD_CHUNKS;
chunks_req.world_name = req.world_name; chunks_req.world_name = req.world_name;
chunks_req.path = sprint("./game/resources/worlds/%/chunks.bin", req.world_name); chunks_req.path = sprint("%/worlds/%/chunks.bin", GAME_RESOURCES_DIR, req.world_name);
chunks_req.should_block = true; chunks_req.should_block = true;
chunks_req.world_json_data = json_copy; chunks_req.world_json_data = json_copy;
array_add(*g_asset_manager.fetch_queue, chunks_req); array_add(*g_asset_manager.fetch_queue, chunks_req);
@ -189,7 +189,7 @@ fetch_callback :: (res: *sfetch_response_t) #c_call {
lookup_path: string; lookup_path: string;
chunk_ptr := table_find_pointer(*curworld.world.chunks, req.chunk_key); chunk_ptr := table_find_pointer(*curworld.world.chunks, req.chunk_key);
if chunk_ptr != null && chunk_ptr.rdm_lookup_path.count > 0 { if chunk_ptr != null && chunk_ptr.rdm_lookup_path.count > 0 {
lookup_path = sprint("./game/resources/worlds/%/%", req.world_name, chunk_ptr.rdm_lookup_path); lookup_path = sprint("%/worlds/%/%", GAME_RESOURCES_DIR, req.world_name, chunk_ptr.rdm_lookup_path);
} else { } else {
lookup_path = rdm_chunk_filename(req.world_name, req.chunk_key, "rdm_lookup"); lookup_path = rdm_chunk_filename(req.world_name, req.chunk_key, "rdm_lookup");
} }
@ -447,7 +447,7 @@ load_world :: (name: string) {
req : Fetch_Request; req : Fetch_Request;
req.type = .WORLD; req.type = .WORLD;
req.world_name = sprint("%", name); req.world_name = sprint("%", name);
req.path = sprint("./game/resources/worlds/%/world.json", name); req.path = sprint("%/worlds/%/world.json", GAME_RESOURCES_DIR, name);
req.should_block = true; req.should_block = true;
array_add(*g_asset_manager.fetch_queue, req); array_add(*g_asset_manager.fetch_queue, req);
} }
@ -456,7 +456,7 @@ load_pack :: (name: string, shouldBlock: bool = true, shouldBlockEngine: bool =
req : Fetch_Request; req : Fetch_Request;
req.type = .PACK; req.type = .PACK;
req.pack_name = sprint("%", name); req.pack_name = sprint("%", name);
req.path = sprint("./packs/%.pack", name); req.path = sprint("%/%.pack", PACK_DIR, name);
req.should_block = shouldBlock; req.should_block = shouldBlock;
req.should_block_engine = shouldBlockEngine; req.should_block_engine = shouldBlockEngine;
array_add(*g_asset_manager.fetch_queue, req); array_add(*g_asset_manager.fetch_queue, req);

View File

@ -31,7 +31,7 @@ rdm_loader_enqueue_world :: (world: *World) {
req.world_name = world.name; req.world_name = world.name;
req.chunk_key = chunk.coord; req.chunk_key = chunk.coord;
if chunk.rdm_atlas_path.count > 0 { if chunk.rdm_atlas_path.count > 0 {
req.path = sprint("./game/resources/worlds/%/%", world.name, chunk.rdm_atlas_path); req.path = sprint("%/worlds/%/%", GAME_RESOURCES_DIR, world.name, chunk.rdm_atlas_path);
} else { } else {
req.path = rdm_chunk_filename(world.name, chunk.coord, "rdm_atlas"); req.path = rdm_chunk_filename(world.name, chunk.coord, "rdm_atlas");
} }

View File

@ -10,5 +10,5 @@ RDM_File_Header :: struct {
RDM_FILE_MAGIC :: u32.[0x4D445254][0]; // "TRDM" as little-endian u32 RDM_FILE_MAGIC :: u32.[0x4D445254][0]; // "TRDM" as little-endian u32
rdm_chunk_filename :: (world_name: string, chunk_key: Chunk_Key, suffix: string) -> string { rdm_chunk_filename :: (world_name: string, chunk_key: Chunk_Key, suffix: string) -> string {
return sprint("./game/resources/worlds/%/%_%_%.%", world_name, chunk_key.x, chunk_key.y, chunk_key.z, suffix); return sprint("%/worlds/%/%_%_%.%", GAME_RESOURCES_DIR, world_name, chunk_key.x, chunk_key.y, chunk_key.z, suffix);
} }

View File

@ -1,3 +1,11 @@
#if FLAG_TEST_EXE_ENGINE {
PACK_DIR :: "./test_packs";
GAME_RESOURCES_DIR :: "./test_game/resources";
} else {
PACK_DIR :: "./packs";
GAME_RESOURCES_DIR :: "./game/resources";
}
g_asset_pack : Load_Package; g_asset_pack : Load_Package;
#scope_export #scope_export

View File

@ -1,14 +1,65 @@
Loading_Screen_Config :: struct { Loading_Screen_Config :: struct {
background_color : Vector4 = .{ 0.05, 0.05, 0.05, 1.0 }; loading_text : string = "LOADING";
bar_bg_color : Vector4 = .{ 0.15, 0.15, 0.15, 1.0 };
bar_fill_color : Vector4 = .{ 0.3, 0.7, 1.0, 1.0 };
} }
loading_screen_config : Loading_Screen_Config; loading_screen_config : Loading_Screen_Config;
#scope_file
Loading_Screen_State :: struct {
font : *Font;
last_screen_h : s32;
}
ls_state : Loading_Screen_State;
update_font :: () {
_, h := get_window_size();
if h == ls_state.last_screen_h then return;
ls_state.last_screen_h = h;
ls_state.font = get_font_at_size(max(cast(s32)(cast(float)h * 0.055), 20));
}
#scope_export
set_loading_screen_config :: (config: Loading_Screen_Config) { set_loading_screen_config :: (config: Loading_Screen_Config) {
loading_screen_config = config; loading_screen_config = config;
} }
draw_loading_screen :: () { draw_loading_screen :: () {
update_font();
w, h := get_window_size();
fw := cast(float) w;
fh := cast(float) h;
vc := g_voxel_theme_config;
t := cast(float) get_time();
set_shader_for_color();
immediate_quad(.{0, 0}, .{fw, 0}, .{fw, fh}, .{0, fh}, vc.bg_color);
immediate_flush();
bar_w := fw * 0.3;
bar_h := max(2.0, fh * 0.007);
bar_x := (fw - bar_w) * 0.5;
bar_y := fh * 0.62;
track_col := Vector4.{vc.bg_color.x + 0.06, vc.bg_color.y + 0.06, vc.bg_color.z + 0.08, 1.0};
immediate_quad(.{bar_x, bar_y}, .{bar_x + bar_w, bar_y},
.{bar_x + bar_w, bar_y + bar_h}, .{bar_x, bar_y + bar_h}, track_col);
sweep := (sin(t * 1.8) + 1.0) * 0.5;
seg_w := bar_w * 0.35;
seg_x := bar_x + sweep * (bar_w - seg_w);
immediate_quad(.{seg_x, bar_y}, .{seg_x + seg_w, bar_y},
.{seg_x + seg_w, bar_y + bar_h}, .{seg_x, bar_y + bar_h}, vc.primary_color);
immediate_flush();
if ls_state.font {
prepare_text(ls_state.font, loading_screen_config.loading_text);
draw_prepared_text(ls_state.font,
xx ((fw - cast(float)gPreppedTextWidth) * 0.5),
xx (fh * 0.52),
vc.primary_color);
}
} }

View File

@ -37,6 +37,7 @@ stbi :: #import "stb_image";
#load "audio/audio.jai"; #load "audio/audio.jai";
#load "assets/asset_manager.jai"; #load "assets/asset_manager.jai";
#load "settings_menu.jai"; #load "settings_menu.jai";
#load "loading_screen.jai";
#load "ui/demo.jai"; #load "ui/demo.jai";
#if !FLAG_TEST_EXE_ENGINE { #if !FLAG_TEST_EXE_ENGINE {
@ -163,6 +164,7 @@ init_after_core :: () {
// Let the game configure engine settings before full init. // Let the game configure engine settings before full init.
game_engine_config(); game_engine_config();
init_world_system();
// We want to do this last. // We want to do this last.
game_init(); game_init();
@ -183,9 +185,19 @@ frame :: () {
add_frame_profiling_point("After asset manager tick"); add_frame_profiling_point("After asset manager tick");
if !mandatory_loads_done() then return; if !mandatory_loads_done() {
input_per_frame_event_and_flag_update();
return;
}
if show_loading_screen() { if show_loading_screen() {
input_per_frame_event_and_flag_update();
if init_after_core_done {
fonsClearState(state.fons);
draw_loading_screen();
render();
reset_temporary_storage();
}
return; return;
} }
@ -210,7 +222,10 @@ frame :: () {
should_tick_game := #ifx FLAG_RELEASE_BUILD then true else !in_editor_view; should_tick_game := #ifx FLAG_RELEASE_BUILD then true else !in_editor_view;
if should_tick_game then delta_time_accumulator += delta_time; if should_tick_game {
delta_time_accumulator += delta_time;
if delta_time_accumulator > (4.0/60.0) then delta_time_accumulator = 4.0/60.0;
}
if should_tick_game && !settings_menu_blocks_game() { if should_tick_game && !settings_menu_blocks_game() {
while delta_time_accumulator > (1.0/480.0) { while delta_time_accumulator > (1.0/480.0) {

View File

@ -1,6 +1,7 @@
#import "String"; #import "String";
should_ignore_file :: (name: string) -> bool { should_ignore_file :: (name: string) -> bool {
if name.count > 0 && name[0] == #char "." return true;
ok, left, right := split_from_right(name, #char "."); ok, left, right := split_from_right(name, #char ".");
if right == "aseprite" { if right == "aseprite" {
@ -48,14 +49,19 @@ file_visit_handler :: (info: *util.File_Visit_Info, user_data: bool) {
add(packPtr, fileName, filedata); add(packPtr, fileName, filedata);
} }
create_pack :: () { create_pack :: (include_test_resources: bool = false, pack_dir: string = "./packs") {
#import "Simple_Package"; #import "Simple_Package";
#import "File"; #import "File";
util.visit_files("./resources", true, true, file_visit_handler); util.visit_files("./resources", true, true, file_visit_handler);
util.visit_files("./game/resources", true, true, file_visit_handler); if include_test_resources {
util.visit_files("./test_game/resources", true, true, file_visit_handler);
} else {
util.visit_files("./game/resources", true, true, file_visit_handler);
}
make_directory_if_it_does_not_exist(pack_dir);
for pack, key : packs { for pack, key : packs {
write(*pack, tprint("./packs/%.pack", key)); write(*pack, tprint("%/%.pack", pack_dir, key));
} }
} }

View File

@ -37,9 +37,9 @@ _hotreload_visitor :: (info: *File_Util.File_Visit_Info, packs: *Table(string, P
recreate_packs_on_disk :: () { recreate_packs_on_disk :: () {
packs: Table(string, Pack_Writer.Create_Package); packs: Table(string, Pack_Writer.Create_Package);
File_Util.visit_files("./resources", true, *packs, _hotreload_visitor); File_Util.visit_files("./resources", true, *packs, _hotreload_visitor);
File_Util.visit_files("./game/resources", true, *packs, _hotreload_visitor); File_Util.visit_files(GAME_RESOURCES_DIR, true, *packs, _hotreload_visitor);
for pack, key: packs { for pack, key: packs {
Pack_Writer.write(*pack, tprint("./packs/%.pack", key)); Pack_Writer.write(*pack, tprint("%/%.pack", PACK_DIR, key));
log_info("Hot-reload: wrote pack '%'", key); log_info("Hot-reload: wrote pack '%'", key);
} }
} }

View File

@ -195,7 +195,7 @@ save_particle_defs :: () {
#if OS != .WASM { #if OS != .WASM {
file :: #import "File"; file :: #import "File";
json := Jaison.json_write_string(g_emitter_defs, " "); json := Jaison.json_write_string(g_emitter_defs, " ");
file.write_entire_file("./game/resources/game_core/particles.json", json); file.write_entire_file(tprint("%/game_core/particles.json", GAME_RESOURCES_DIR), json);
log_info("Saved % particle definitions", g_emitter_defs.count); log_info("Saved % particle definitions", g_emitter_defs.count);
} }
} }

View File

@ -76,7 +76,7 @@ save_post_process :: () {
save.lut_name = LUT_list[g_current_lut_texture_index].name; save.lut_name = LUT_list[g_current_lut_texture_index].name;
} }
json := Jaison.json_write_string(save, " "); json := Jaison.json_write_string(save, " ");
file.write_entire_file("./game/resources/game_core/postprocess.json", json); file.write_entire_file(tprint("%/game_core/postprocess.json", GAME_RESOURCES_DIR), json);
} }
} }

View File

@ -2,12 +2,13 @@
Random :: #import "Random"; Random :: #import "Random";
TRANSITION_SPEED :: 7.0; TRANSITION_SPEED :: 7.0;
MAX_BLOBS :: 32; MAX_BLOBS :: 32;
VOLUME_STEP_INITIAL :: 0.1; CONFIG_PATH :: "settings.cfg";
VOLUME_STEP_HELD :: 0.3;
VOLUME_HOLD_DELAY :: 0.35; VOL_STEP_INIT :: 0.05;
CONFIG_PATH :: "settings.cfg"; VOL_STEP_HELD :: 0.25;
VOL_HOLD_DELAY :: 0.4;
Settings_Page :: enum { Settings_Page :: enum {
MAIN; MAIN;
@ -28,11 +29,6 @@ Settings_State :: struct {
vol_hold_time : float = 0.0; vol_hold_time : float = 0.0;
vol_hold_dir : s32 = 0; vol_hold_dir : s32 = 0;
mouse_hover : s32 = -1;
mouse_moved : bool = false;
last_mouse_x : float = -1;
last_mouse_y : float = -1;
blobs : [MAX_BLOBS]Blob; blobs : [MAX_BLOBS]Blob;
blob_count : s32 = 0; blob_count : s32 = 0;
} }
@ -72,7 +68,7 @@ page_parent :: () -> Settings_Page {
page_hint :: () -> string { page_hint :: () -> string {
if g_settings.page == .MAIN return "Up/Down navigate Enter select"; if g_settings.page == .MAIN return "Up/Down navigate Enter select";
if g_settings.page == .SETTINGS return "Up/Down navigate Enter select Esc back"; if g_settings.page == .SETTINGS return "Up/Down navigate Enter select Esc back";
if g_settings.page == .AUDIO return "Up/Down navigate Left/Right adjust Esc back"; if g_settings.page == .AUDIO return "Up/Down navigate Left/Right or drag to adjust Esc back";
if g_settings.page == .GRAPHICS return "Enter toggle Esc back"; if g_settings.page == .GRAPHICS return "Enter toggle Esc back";
return ""; return "";
} }
@ -90,20 +86,6 @@ audio_set :: (i: s32, v: float) {
if i == 2 then g_mixer.config.soundEffectVolume = clamp(v, 0.0, 1.0); if i == 2 then g_mixer.config.soundEffectVolume = clamp(v, 0.0, 1.0);
} }
get_item_label :: (page: Settings_Page, index: s32) -> string {
items := page_items();
if index < 0 || index >= items.count then return "";
if page == .AUDIO {
pct := cast(s32)(audio_get(index) * 100.0 + 0.5);
return tprint("% %", items[index], make_volume_bar(pct));
}
if page == .GRAPHICS && index == 0 {
return tprint("%: %", items[index], ifx sapp_is_fullscreen() then "On" else "Off");
}
return items[index];
}
rand_range :: (lo: float, hi: float) -> float { rand_range :: (lo: float, hi: float) -> float {
return lo + Random.random_get_zero_to_one() * (hi - lo); return lo + Random.random_get_zero_to_one() * (hi - lo);
} }
@ -218,28 +200,33 @@ navigate_to :: (page: Settings_Page) {
} }
go_back :: () { go_back :: () {
if g_settings.page == .AUDIO || g_settings.page == .GRAPHICS then save_settings();
if g_settings.page == .MAIN { if g_settings.page == .MAIN {
save_settings();
g_settings.open = false; g_settings.open = false;
} else { } else {
navigate_to(page_parent()); navigate_to(page_parent());
} }
} }
handle_enter :: () { handle_enter :: (index: s32 = -1) {
i := ifx index >= 0 then index else g_settings.cursor;
if g_settings.page == { if g_settings.page == {
case .MAIN; case .MAIN;
if g_settings.cursor == 0 then g_settings.open = false; if i == 0 { save_settings(); g_settings.open = false; }
if g_settings.cursor == 1 then navigate_to(.SETTINGS); if i == 1 then navigate_to(.SETTINGS);
if g_settings.cursor == 2 { save_settings(); sapp_request_quit(); } if i == 2 { save_settings(); sapp_request_quit(); }
case .SETTINGS; case .SETTINGS;
if g_settings.cursor == 0 then navigate_to(.AUDIO); if i == 0 then navigate_to(.AUDIO);
if g_settings.cursor == 1 then navigate_to(.GRAPHICS); if i == 1 then navigate_to(.GRAPHICS);
case .GRAPHICS; case .GRAPHICS;
if g_settings.cursor == 0 then sapp_toggle_fullscreen(); if i == 0 then sapp_toggle_fullscreen();
} }
} }
empty_slider_format :: (prefix: string, suffix: string, value: float64, theme: *GR.Slider_Theme, state: *GR.Slider_State, mode: GR.Slider_Format_Text_Mode) -> string {
return "";
}
#scope_export #scope_export
Phosphene_Config :: struct { Phosphene_Config :: struct {
@ -257,15 +244,9 @@ Phosphene_Config :: struct {
} }
Settings_Menu_Config :: struct { Settings_Menu_Config :: struct {
game_title : string = "TRUENO"; game_title : string = "TRUENO";
credits : string = "Trueno engine by Tuomas Katajisto 2026"; credits : string = "Trueno engine by Tuomas Katajisto 2026";
bg_color : Vector4 = .{0.04, 0.04, 0.06, 1.0}; phosphenes : Phosphene_Config;
title_color : Vector4 = .{1.0, 1.0, 1.0, 1.0};
item_color : Vector4 = .{0.45, 0.45, 0.45, 1.0};
selected_color : Vector4 = .{1.0, 0.95, 0.65, 1.0};
hint_color : Vector4 = .{0.45, 0.45, 0.45, 1.0};
credits_color : Vector4 = .{0.3, 0.3, 0.3, 1.0};
phosphenes : Phosphene_Config;
} }
set_settings_config :: (config: Settings_Menu_Config) { set_settings_config :: (config: Settings_Menu_Config) {
@ -308,37 +289,22 @@ tick_settings_menu :: () {
count := cast(s32) page_items().count; count := cast(s32) page_items().count;
mx := input_mouse_x;
my := input_mouse_y;
g_settings.mouse_moved = (mx != g_settings.last_mouse_x || my != g_settings.last_mouse_y);
g_settings.last_mouse_x = mx;
g_settings.last_mouse_y = my;
if g_settings.mouse_moved && g_settings.mouse_hover >= 0 && g_settings.mouse_hover < count {
g_settings.cursor = g_settings.mouse_hover;
}
up := cast(bool)(input_button_states[Key_Code.ARROW_UP] & .START); up := cast(bool)(input_button_states[Key_Code.ARROW_UP] & .START);
down := cast(bool)(input_button_states[Key_Code.ARROW_DOWN] & .START); down := cast(bool)(input_button_states[Key_Code.ARROW_DOWN] & .START);
if up then g_settings.cursor = (g_settings.cursor - 1 + count) % count; if up then g_settings.cursor = (g_settings.cursor - 1 + count) % count;
if down then g_settings.cursor = (g_settings.cursor + 1) % count; if down then g_settings.cursor = (g_settings.cursor + 1) % count;
enter := cast(bool)(input_button_states[Key_Code.ENTER] & .START); enter := cast(bool)(input_button_states[Key_Code.ENTER] & .START);
click := cast(bool)(input_button_states[Key_Code.MOUSE_BUTTON_LEFT] & .START);
if click && g_settings.mouse_hover >= 0 && g_settings.mouse_hover < count {
g_settings.cursor = g_settings.mouse_hover;
enter = true;
}
if enter then handle_enter(); if enter then handle_enter();
if g_settings.page == .AUDIO { if g_settings.page == .AUDIO {
left := cast(bool)(input_button_states[Key_Code.ARROW_LEFT] & .START); left := cast(bool)(input_button_states[Key_Code.ARROW_LEFT] & .START);
right := cast(bool)(input_button_states[Key_Code.ARROW_RIGHT] & .START); right := cast(bool)(input_button_states[Key_Code.ARROW_RIGHT] & .START);
left_held := cast(bool)(input_button_states[Key_Code.ARROW_LEFT] & .DOWN); left_held := cast(bool)(input_button_states[Key_Code.ARROW_LEFT] & .DOWN);
right_held := cast(bool)(input_button_states[Key_Code.ARROW_RIGHT] & .DOWN); right_held := cast(bool)(input_button_states[Key_Code.ARROW_RIGHT] & .DOWN);
if left { audio_set(g_settings.cursor, audio_get(g_settings.cursor) - VOLUME_STEP_INITIAL); g_settings.vol_hold_time = 0; g_settings.vol_hold_dir = -1; } if left { audio_set(g_settings.cursor, audio_get(g_settings.cursor) - VOL_STEP_INIT); g_settings.vol_hold_time = 0; g_settings.vol_hold_dir = -1; }
if right { audio_set(g_settings.cursor, audio_get(g_settings.cursor) + VOLUME_STEP_INITIAL); g_settings.vol_hold_time = 0; g_settings.vol_hold_dir = 1; } if right { audio_set(g_settings.cursor, audio_get(g_settings.cursor) + VOL_STEP_INIT); g_settings.vol_hold_time = 0; g_settings.vol_hold_dir = 1; }
dir : s32 = 0; dir : s32 = 0;
if left_held then dir = -1; if left_held then dir = -1;
@ -346,8 +312,8 @@ tick_settings_menu :: () {
if dir != 0 && dir == g_settings.vol_hold_dir { if dir != 0 && dir == g_settings.vol_hold_dir {
g_settings.vol_hold_time += dt; g_settings.vol_hold_time += dt;
if g_settings.vol_hold_time > VOLUME_HOLD_DELAY { if g_settings.vol_hold_time > VOL_HOLD_DELAY {
audio_set(g_settings.cursor, audio_get(g_settings.cursor) + cast(float)dir * VOLUME_STEP_HELD * dt); audio_set(g_settings.cursor, audio_get(g_settings.cursor) + cast(float)dir * VOL_STEP_HELD * dt);
} }
} else if dir == 0 { } else if dir == 0 {
g_settings.vol_hold_time = 0; g_settings.vol_hold_time = 0;
@ -356,7 +322,7 @@ tick_settings_menu :: () {
} }
} }
draw_settings_menu :: (theme: *GR.Overall_Theme) { draw_settings_menu :: () {
t := g_settings.transition; t := g_settings.transition;
if t < 0.001 then return; if t < 0.001 then return;
@ -364,13 +330,14 @@ draw_settings_menu :: (theme: *GR.Overall_Theme) {
fh := vh * 100.0; fh := vh * 100.0;
bar_h := t * fh * 0.5; bar_h := t * fh * 0.5;
vc := g_voxel_theme_config;
cfg := *g_settings_config; cfg := *g_settings_config;
set_shader_for_color();
immediate_quad(.{0, 0}, .{fw, 0}, .{fw, bar_h}, .{0, bar_h}, cfg.bg_color); set_shader_for_color();
immediate_quad(.{0, 0}, .{fw, 0}, .{fw, bar_h}, .{0, bar_h}, vc.bg_color);
immediate_flush(); immediate_flush();
bottom_y := fh - bar_h; bottom_y := fh - bar_h;
immediate_quad(.{0, bottom_y}, .{fw, bottom_y}, .{fw, fh}, .{0, fh}, cfg.bg_color); immediate_quad(.{0, bottom_y}, .{fw, bottom_y}, .{fw, fh}, .{0, fh}, vc.bg_color);
immediate_flush(); immediate_flush();
if t > 0.5 { if t > 0.5 {
@ -384,31 +351,78 @@ draw_settings_menu :: (theme: *GR.Overall_Theme) {
return .{base.x, base.y, base.z, base.w * a}; return .{base.x, base.y, base.z, base.w * a};
} }
title_col := apply_alpha(cfg.title_color, content_alpha); title_col := apply_alpha(vc.primary_color, content_alpha);
item_col := apply_alpha(cfg.item_color, content_alpha); hint_col := apply_alpha(.{vc.text_color.x, vc.text_color.y, vc.text_color.z, 0.6}, content_alpha);
sel_col := apply_alpha(cfg.selected_color, content_alpha); credits_col := apply_alpha(.{vc.text_color.x, vc.text_color.y, vc.text_color.z, 0.4}, content_alpha);
hint_col := apply_alpha(cfg.hint_color, content_alpha);
credits_col := apply_alpha(cfg.credits_color, content_alpha);
prepare_text(g_settings.title_font, cfg.game_title); prepare_text(g_settings.title_font, cfg.game_title);
draw_prepared_text(g_settings.title_font, xx ((fw - cast(float)gPreppedTextWidth) * 0.5), xx (fh * 0.22), title_col); draw_prepared_text(g_settings.title_font, xx ((fw - cast(float)gPreppedTextWidth) * 0.5), xx (fh * 0.22), title_col);
items := page_items(); vt := get_voxel_theme();
item_h := cast(float)(g_settings.item_font.character_height) * 1.7;
total_h := cast(float)items.count * item_h;
start_y := fh * 0.5 - total_h * 0.5;
g_settings.mouse_hover = -1; btn_h := cast(float)(g_settings.item_font.character_height) * 1.8;
for i: 0..items.count-1 { btn_w := fw * 0.28;
col := ifx cast(s32)i == g_settings.cursor then sel_col else item_col; row_gap := btn_h * 0.25;
label := get_item_label(g_settings.page, cast(s32)i);
prepare_text(g_settings.item_font, label);
x := (fw - cast(float)gPreppedTextWidth) * 0.5;
row_y := start_y + cast(float)i * item_h;
draw_prepared_text(g_settings.item_font, xx x, xx row_y, col);
if input_mouse_y >= row_y && input_mouse_y < row_y + item_h { if g_settings.page == .AUDIO {
g_settings.mouse_hover = cast(s32)i; lbl_w := fw * 0.22;
sld_w := fw * 0.28;
col_gap := fw * 0.015;
sld_h := btn_h * 0.65;
row_h := sld_h + row_gap;
total_h := cast(float)AUDIO_LABELS.count * row_h - row_gap;
start_y := fh * 0.48 - total_h * 0.5;
row_w := lbl_w + col_gap + sld_w;
lbl_x := (fw - row_w) * 0.5;
sld_x := lbl_x + lbl_w + col_gap;
sld_theme := vt.slider_theme;
sld_theme.foreground.font = g_settings.item_font;
sld_theme.format_text_float = empty_slider_format;
for i: 0..AUDIO_LABELS.count-1 {
row_y := start_y + cast(float)i * row_h;
lbl_r := GR.get_rect(lbl_x, row_y, lbl_w, sld_h);
sld_r := GR.get_rect(sld_x, row_y, sld_w, sld_h);
is_focused := cast(s32)i == g_settings.cursor;
lbl_theme := t_label_left(*vt);
lbl_theme.text_color = apply_alpha(
ifx is_focused then vc.primary_color else vc.text_color,
content_alpha
);
lbl_theme.font = g_settings.item_font;
val := audio_get(cast(s32)i);
pct := cast(s32)(val * 100.0 + 0.5);
GR.label(lbl_r, tprint("%: %\%", AUDIO_LABELS[i], pct), *lbl_theme);
changed, _ := GR.slider(sld_r, *val, 0.0, 1.0, VOL_STEP_INIT, *sld_theme,
identifier = cast(s64)i);
if changed then audio_set(cast(s32)i, val);
}
} else {
items := page_items();
total_h := cast(float)items.count * (btn_h + row_gap) - row_gap;
start_y := fh * 0.48 - total_h * 0.5;
start_x := (fw - btn_w) * 0.5;
for i: 0..items.count-1 {
r := GR.get_rect(start_x, start_y + cast(float)i * (btn_h + row_gap), btn_w, btn_h);
is_selected := cast(s32)i == g_settings.cursor;
bt := t_button_ghost(*vt);
bt.text_color = apply_alpha(ifx is_selected then vc.primary_color else vc.text_color, content_alpha);
bt.text_color_over = apply_alpha(vc.primary_color, content_alpha);
bt.label_theme.font = g_settings.item_font;
bt.label_theme.alignment = GR.Text_Alignment.Center;
label := items[i];
if g_settings.page == .GRAPHICS && i == 0
label = tprint("Fullscreen: %", ifx sapp_is_fullscreen() then "On" else "Off");
pressed, _, _ := GR.button(r, label, *bt, identifier = cast(s64)i);
if pressed then handle_enter(cast(s32)i);
} }
} }
@ -452,17 +466,3 @@ draw_phosphenes :: (fw: float, fh: float, time: float, fade: float) {
} }
immediate_flush(); immediate_flush();
} }
make_volume_bar :: (pct: s32) -> string {
STEPS :: 10;
filled := (pct + 5) / STEPS;
builder : String_Builder;
append(*builder, "[ ");
for i: 0..STEPS-1 {
if i < filled then append(*builder, "=");
else append(*builder, "-");
}
append(*builder, tprint(" %\%%", pct));
append(*builder, " ]");
return builder_to_string(*builder,, allocator = temp);
}

View File

@ -1,5 +1,21 @@
engine_exe_tests_add :: () { engine_exe_tests_add :: () {
start_test_suite("Pause menu"); start_test_suite("Settings menu");
start_test("Esc opens pause menu"); start_test("Esc opens and closes settings menu");
add_command(.{type = .WAIT}); add_command(.{type = .WAIT, wait_seconds = 0.5});
add_command(.{type = .KEYPRESS, key = .ESCAPE});
add_command(.{type = .WAIT, wait_seconds = 0.2});
add_command(.{type = .CHECK, check = () -> bool { return settings_menu_blocks_game(); }});
add_command(.{type = .KEYPRESS, key = .ESCAPE});
add_command(.{type = .WAIT, wait_seconds = 0.2});
add_command(.{type = .CHECK, check = () -> bool { return !settings_menu_blocks_game(); }});
start_test_suite("World creation");
start_test("Create world via console");
add_command(.{type = .WAIT, wait_seconds = 0.5});
add_command(.{type = .OP, op = () -> void {nworld("test_world");}});
add_command(.{type = .OP, op = () -> void {sworld();}});
for 0..5 {
add_command(.{type = .OP, op = () -> void {lworld("test_world");}});
add_command(.{type = .WAIT, wait_seconds = 0.5});
}
} }

View File

@ -15,11 +15,17 @@ Exe_Test :: struct {
Exe_Test_Command_Type :: enum { Exe_Test_Command_Type :: enum {
INVALID; INVALID;
WAIT; WAIT;
KEYPRESS; KEYPRESS;
CHECK;
OP;
} }
Exe_Test_Command :: struct { Exe_Test_Command :: struct {
type : Exe_Test_Command_Type = .INVALID; type : Exe_Test_Command_Type = .INVALID;
wait_seconds : float = 0;
key : Key_Code;
check : () -> bool;
op : () -> void;
} }
start_test_suite :: (name: string) { start_test_suite :: (name: string) {

View File

@ -1,11 +1,95 @@
Exe_Runner :: struct {
suite_idx : int;
test_idx : int;
cmd_idx : int;
wait_until : float64;
test_failed : bool;
test_started : bool;
done : bool;
}
g_exe_runner : Exe_Runner;
run_exe_tests :: () { run_exe_tests :: () {
for g_test_runner_state { r := *g_exe_runner;
print("SUITE: %\n", it.name); if r.done then return;
for it.tests { if g_test_runner_state.count == 0 {
print(" TEST: %\n", it.name); r.done = true;
for it.cmds { return;
print(" CMD: %\n", it.type); }
}
if r.suite_idx >= g_test_runner_state.count {
print("[exe tests] All suites complete.\n");
r.done = true;
sapp_request_quit();
return;
}
suite := *g_test_runner_state[r.suite_idx];
if r.test_idx >= suite.tests.count {
print("[exe tests] Suite '%' complete.\n", suite.name);
r.suite_idx += 1;
r.test_idx = 0;
r.cmd_idx = 0;
r.test_failed = false;
return;
}
test := *suite.tests[r.test_idx];
if !r.test_started {
print("[exe tests] Starting '%' / '%'\n", suite.name, test.name);
r.test_started = true;
}
if r.cmd_idx >= test.cmds.count {
if r.test_failed {
print("[exe tests] FAIL '%' / '%'\n", suite.name, test.name);
} else {
print("[exe tests] PASS '%' / '%'\n", suite.name, test.name);
} }
r.test_idx += 1;
r.cmd_idx = 0;
r.test_failed = false;
r.test_started = false;
return;
}
if r.test_failed {
r.cmd_idx += 1;
return;
}
cmd := test.cmds[r.cmd_idx];
if cmd.type == {
case .WAIT;
if r.wait_until == 0 {
r.wait_until = get_time() + cast(float64) cmd.wait_seconds;
}
if get_time() >= r.wait_until {
r.wait_until = 0;
r.cmd_idx += 1;
}
case .KEYPRESS;
input_button_states[cmd.key] = input_button_states[cmd.key] | .START | .DOWN;
r.cmd_idx += 1;
case .CHECK;
if cmd.check == null || cmd.check() {
r.cmd_idx += 1;
} else {
print("[exe tests] CHECK failed in '%' / '%' (cmd %)\n", suite.name, test.name, r.cmd_idx);
r.test_failed = true;
r.cmd_idx += 1;
}
case .INVALID;
r.cmd_idx += 1;
case .OP;
if cmd.op != null {
cmd.op();
r.cmd_idx += 1;
}
} }
} }

View File

@ -120,7 +120,7 @@ striles :: () {
#if OS != .WASM { #if OS != .WASM {
file :: #import "File"; file :: #import "File";
json := Jaison.json_write_string(triles, " "); json := Jaison.json_write_string(triles, " ");
file.write_entire_file("./game/resources/game_core/triles.json", json); file.write_entire_file(tprint("%/game_core/triles.json", GAME_RESOURCES_DIR), json);
} }
} @Command } @Command

View File

@ -37,3 +37,20 @@ t_button_color :: (theme: *GR.Overall_Theme, color: Vector4) -> GR.Button_Theme
t.surface_color = color; t.surface_color = color;
return t; return t;
} }
t_button_ghost :: (theme: *GR.Overall_Theme) -> GR.Button_Theme {
t := theme.button_theme;
t.surface_color = .{0, 0, 0, 0};
t.surface_color_over = .{0, 0, 0, 0};
t.surface_color_down = .{0, 0, 0, 0};
t.surface_color_flash = .{0, 0, 0, 0};
t.frame_color = .{0, 0, 0, 0};
t.rectangle_shape.frame_thickness = 0;
return t;
}
t_button_selected :: (theme: *GR.Overall_Theme) -> GR.Button_Theme {
t := t_button_ghost(theme);
t.text_color = theme.text_color;
return t;
}

View File

@ -2,6 +2,7 @@ GR :: #import "GetRect_LeftHanded"()(Type_Indicator = Ui_Type_Indicator);
Input :: #import "Input"; Input :: #import "Input";
#load "component_themes.jai"; #load "component_themes.jai";
#load "voxel_theme.jai";
#load "autoedit.jai"; #load "autoedit.jai";
// vw is 1/100 of view width // vw is 1/100 of view width
@ -424,18 +425,17 @@ font_boundary :: () {
} }
render_ui :: () { render_ui :: () {
proc := GR.default_theme_procs[0]; voxel_theme := get_voxel_theme();
my_theme := proc(); GR.set_default_theme(voxel_theme);
GR.set_default_theme(my_theme);
#if !FLAG_RELEASE_BUILD { #if !FLAG_RELEASE_BUILD {
draw_editor_ui(*my_theme); draw_editor_ui(*voxel_theme);
if !in_editor_view then game_ui(*my_theme); if !in_editor_view then game_ui(*voxel_theme);
draw_console(*my_theme); draw_console(*voxel_theme);
} else { } else {
game_ui(*my_theme); game_ui(*voxel_theme);
} }
#if FLAG_DEMO_BUILD { if !in_editor_view then draw_demo_ui(*my_theme); } #if FLAG_DEMO_BUILD { if !in_editor_view then draw_demo_ui(*voxel_theme); }
draw_settings_menu(*my_theme); draw_settings_menu();
} }
ui_pass :: () { ui_pass :: () {

137
src/ui/voxel_theme.jai Normal file
View File

@ -0,0 +1,137 @@
Voxel_Theme_Config :: struct {
primary_color : Vector4 = .{1.0, 0.95, 0.65, 1.0}; // accent, selection, slider fill
on_primary_color : Vector4 = .{0.08, 0.06, 0.03, 1.0}; // text on primary-colored surfaces
text_color : Vector4 = .{0.55, 0.65, 0.7, 1.0}; // normal text
bg_color : Vector4 = .{0.05, 0.08, 0.12, 1.0}; // large backgrounds
surface_color : Vector4 = .{0.13, 0.16, 0.22, 1.0}; // widget panel / button BG
frame_color : Vector4 = .{0.25, 0.30, 0.38, 0.5}; // widget borders
}
g_voxel_theme_config : Voxel_Theme_Config;
set_voxel_theme_config :: (cfg: Voxel_Theme_Config) {
g_voxel_theme_config = cfg;
}
#scope_file
voxel_shape_framed : GR.Rectangle_Shape;
voxel_shape_bare : GR.Rectangle_Shape;
apply_voxel_btn :: (t: *GR.Button_Theme, cfg: Voxel_Theme_Config, with_frame: bool) {
shape := ifx with_frame then voxel_shape_framed else voxel_shape_bare;
surface_over := Vector4.{cfg.surface_color.x + 0.07, cfg.surface_color.y + 0.07, cfg.surface_color.z + 0.07, 1.0};
surface_down := Vector4.{cfg.surface_color.x * 0.7, cfg.surface_color.y * 0.7, cfg.surface_color.z * 0.7, 1.0};
frm_over := Vector4.{cfg.primary_color.x, cfg.primary_color.y, cfg.primary_color.z, 0.6};
t.rectangle_shape = shape;
t.surface_color = cfg.surface_color;
t.surface_color_over = surface_over;
t.surface_color_down = surface_down;
t.surface_color_flash = surface_over;
t.frame_color = cfg.frame_color;
t.frame_color_over = frm_over;
t.frame_color_down = frm_over;
t.frame_color_flash = frm_over;
t.text_color = cfg.text_color;
t.text_color_over = cfg.primary_color;
t.text_color_pressed = cfg.primary_color;
}
#scope_export
get_voxel_theme :: () -> GR.Overall_Theme {
cfg := g_voxel_theme_config;
voxel_shape_framed.roundedness = 0.0;
voxel_shape_framed.frame_thickness_type = .ABSOLUTE_FROM_THEME_FIELD;
voxel_shape_framed.frame_thickness = 1.0;
voxel_shape_bare.roundedness = 0.0;
voxel_shape_bare.frame_thickness_type = .ABSOLUTE_FROM_THEME_FIELD;
voxel_shape_bare.frame_thickness = 0.0;
base_proc := GR.default_theme_procs[0];
t := base_proc();
apply_voxel_btn(*t.button_theme, cfg, true);
// Propagate button theme to checkbox and dropdown before per-widget overrides
t.checkbox_theme.button_theme = t.button_theme;
t.checkbox_theme.button_color_selected = cfg.primary_color;
t.checkbox_theme.text_color = cfg.text_color;
t.checkbox_theme.text_color_over = cfg.primary_color;
t.checkbox_theme.text_color_pressed = cfg.primary_color;
apply_voxel_btn(*t.dropdown_theme.theme_for_current_value, cfg, true);
apply_voxel_btn(*t.dropdown_theme.theme_for_each_choice, cfg, true);
apply_voxel_btn(*t.dropdown_theme.theme_for_current_choice, cfg, true);
t.dropdown_theme.theme_for_current_choice.surface_color = cfg.primary_color;
t.dropdown_theme.theme_for_current_choice.surface_color_over = cfg.primary_color;
t.dropdown_theme.theme_for_current_choice.text_color = cfg.on_primary_color;
t.dropdown_theme.theme_for_current_choice.text_color_over = cfg.on_primary_color;
// Slider
apply_voxel_btn(*t.slider_theme.foreground, cfg, false);
t.slider_theme.foreground.surface_color = cfg.primary_color;
t.slider_theme.foreground.surface_color_over = cfg.primary_color;
t.slider_theme.foreground.surface_color_down = cfg.primary_color;
t.slider_theme.foreground.surface_color_flash = cfg.primary_color;
t.slider_theme.foreground.frame_color = .{0, 0, 0, 0};
t.slider_theme.foreground.frame_color_over = .{0, 0, 0, 0};
t.slider_theme.foreground.text_color = cfg.on_primary_color;
t.slider_theme.foreground.text_color_over = cfg.on_primary_color;
t.slider_theme.foreground.text_color_pressed = cfg.on_primary_color;
sld_bg := Vector4.{cfg.bg_color.x + 0.05, cfg.bg_color.y + 0.05, cfg.bg_color.z + 0.07, 1.0};
apply_voxel_btn(*t.slider_theme.background, cfg, true);
t.slider_theme.background.surface_color = sld_bg;
t.slider_theme.background.surface_color_over = sld_bg;
t.slider_theme.background.surface_color_down = sld_bg;
t.slider_theme.background.surface_color_flash = sld_bg;
t.slider_theme.background.frame_color = cfg.frame_color;
t.slider_theme.background.frame_color_over = cfg.frame_color;
apply_voxel_btn(*t.slider_theme.spinbox_theme, cfg, true);
t.slider_theme.surface_style = .EXTEND_FROM_LEFT;
t.slider_theme.surface_margin = 0.08;
t.slider_theme.use_spinboxes = false;
t.slider_theme.text_editable = false;
// Scrollable region
srt := *t.scrollable_region_theme;
apply_voxel_btn(*srt.scrollbar_nib_theme, cfg, false);
srt.scrollbar_nib_theme.surface_color = cfg.surface_color;
srt.scrollbar_nib_theme.surface_color_over = Vector4.{cfg.surface_color.x + 0.07, cfg.surface_color.y + 0.07, cfg.surface_color.z + 0.07, 1.0};
srt.scrollbar_nib_theme.surface_color_down = cfg.primary_color;
srt.scrollbar_nib_theme.surface_color_flash = cfg.primary_color;
srt.scrollbar_nib_theme.frame_color = cfg.frame_color;
srt.scrollbar_nib_theme.frame_color_over = .{cfg.primary_color.x, cfg.primary_color.y, cfg.primary_color.z, 0.6};
srt.scrollbar_nib_theme.rectangle_shape.roundedness_type = .ABSOLUTE_FROM_THEME_FIELD;
srt.scrollbar_nib_theme.rectangle_shape.roundedness = 0;
srt.region_background.color = cfg.bg_color;
srt.region_background.frame_color = cfg.frame_color;
srt.region_background.shape.roundedness_type = .ABSOLUTE_FROM_THEME_FIELD;
srt.region_background.shape.roundedness = 0;
srt.region_background.shape.rounding_flags = 0;
scroll_bar_bg := Vector4.{cfg.bg_color.x + 0.04, cfg.bg_color.y + 0.04, cfg.bg_color.z + 0.05, 1.0};
srt.scrollbar_background.color = scroll_bar_bg;
srt.scrollbar_background.frame_color = cfg.frame_color;
srt.scrollbar_background.shape.roundedness_type = .ABSOLUTE_FROM_THEME_FIELD;
srt.scrollbar_background.shape.roundedness = 0;
srt.scrollbar_background.shape.rounding_flags = 0;
// Label
t.label_theme.text_color = cfg.text_color;
t.background_color = cfg.bg_color;
t.background_color_bright = Vector4.{cfg.bg_color.x + 0.05, cfg.bg_color.y + 0.05, cfg.bg_color.z + 0.07, 1.0};
t.text_color = cfg.text_color;
t.title_bar_color = Vector4.{cfg.surface_color.x, cfg.surface_color.y, cfg.surface_color.z + 0.05, 1.0};
t.title_bar_color_hilit = Vector4.{cfg.primary_color.x*0.3, cfg.primary_color.y*0.25, cfg.primary_color.z*0.15, 1.0};
return t;
}

View File

@ -126,34 +126,33 @@ lworld :: (name: string) {
load_world(name); load_world(name);
} @Command; } @Command;
init_world_system :: () {
Pool.set_allocators(*current_world.pool);
}
unload_current_world :: () { unload_current_world :: () {
if current_world.valid { if !current_world.valid then return;
rdm_loader_cancel_all(); rdm_loader_cancel_all();
for *chunk: current_world.world.chunks { for *chunk: current_world.world.chunks {
// Release RDM GPU resources. if chunk.rdm_valid {
if chunk.rdm_valid { sg_destroy_image(chunk.rdm_atlas);
sg_destroy_image(chunk.rdm_atlas); sg_destroy_image(chunk.rdm_lookup);
sg_destroy_image(chunk.rdm_lookup); #if !FLAG_RELEASE_BUILD {
#if !FLAG_RELEASE_BUILD { if chunk.rdm_lookup_cpu.data then free(chunk.rdm_lookup_cpu.data);
if chunk.rdm_lookup_cpu.data then free(chunk.rdm_lookup_cpu.data); chunk.rdm_lookup_cpu = .{};
chunk.rdm_lookup_cpu = .{};
}
chunk.rdm_atlas = .{};
chunk.rdm_lookup = .{};
chunk.rdm_valid = false;
} }
for *group: chunk.groups { chunk.rdm_atlas = .{};
array_free(group.instances); chunk.rdm_lookup = .{};
} chunk.rdm_valid = false;
array_free(chunk.groups);
} }
deinit(*current_world.world.chunks); for *group: chunk.groups {
Pool.reset(*current_world.pool); array_free(group.instances);
current_world.valid = false; }
} else { array_free(chunk.groups);
print("Setting allocators on current world!!\n");
Pool.set_allocators(*current_world.pool);
} }
deinit(*current_world.world.chunks);
Pool.reset(*current_world.pool);
current_world.valid = false;
} }
set_loaded_world :: (world: World) { set_loaded_world :: (world: World) {
@ -328,7 +327,7 @@ sworld :: () {
#if OS != .WASM { #if OS != .WASM {
file :: #import "File"; file :: #import "File";
name := current_world.world.name; name := current_world.world.name;
dir := tprint("./game/resources/worlds/%", name); dir := tprint("%/worlds/%", GAME_RESOURCES_DIR, name);
file.make_directory_if_it_does_not_exist(dir, recursive = true); file.make_directory_if_it_does_not_exist(dir, recursive = true);
json_data, bin_data := save_world(*current_world.world); json_data, bin_data := save_world(*current_world.world);
file.write_entire_file(tprint("%/world.json", dir), json_data); file.write_entire_file(tprint("%/world.json", dir), json_data);
@ -703,7 +702,7 @@ draw_world_picker :: (r_in: GR.Rect, theme: *GR.Overall_Theme) {
} }
} }
File_Utilities.visit_files("./game/resources/worlds", true, *world_names, dir_visitor); File_Utilities.visit_files(tprint("%/worlds", GAME_RESOURCES_DIR), true, *world_names, dir_visitor);
count := 0; count := 0;
for name: world_names { for name: world_names {

View File

View File

@ -0,0 +1,227 @@
[
{
"name": "ball_emitter",
"animation_name": "game_core.ball",
"emission_rate": 200,
"lifetime_min": 0.936768,
"lifetime_max": 1.209992,
"velocity": {
"x": 0,
"y": 1.5,
"z": 0,
"xy": {
"x": 0,
"y": 1.5,
"component": [
0,1.5
]
},
"yz": {
"x": 1.5,
"y": 0,
"component": [
1.5,0
]
},
"component": [
0,1.5,0
]
},
"velocity_spread": {
"x": 0.1,
"y": 0,
"z": 0.1,
"xy": {
"x": 0.1,
"y": 0,
"component": [
0.1,0
]
},
"yz": {
"x": 0,
"y": 0.1,
"component": [
0,0.1
]
},
"component": [
0.1,0,0.1
]
},
"position_spread": {
"x": 0.3,
"y": 0,
"z": 0.3,
"xy": {
"x": 0.3,
"y": 0,
"component": [
0.3,0
]
},
"yz": {
"x": 0,
"y": 0.3,
"component": [
0,0.3
]
},
"component": [
0.3,0,0.3
]
},
"size_start": 2.375121,
"size_end": 0.705114,
"color_start": {
"x": 1,
"y": 0.03,
"z": 0.05,
"w": 1,
"xy": {
"x": 1,
"y": 0.03,
"component": [
1,0.03
]
},
"yz": {
"x": 0.03,
"y": 0.05,
"component": [
0.03,0.05
]
},
"zw": {
"x": 0.05,
"y": 1,
"component": [
0.05,1
]
},
"xyz": {
"x": 1,
"y": 0.03,
"z": 0.05,
"xy": {
"x": 1,
"y": 0.03,
"component": [
1,0.03
]
},
"yz": {
"x": 0.03,
"y": 0.05,
"component": [
0.03,0.05
]
},
"component": [
1,0.03,0.05
]
},
"yzw": {
"x": 0.03,
"y": 0.05,
"z": 1,
"xy": {
"x": 0.03,
"y": 0.05,
"component": [
0.03,0.05
]
},
"yz": {
"x": 0.05,
"y": 1,
"component": [
0.05,1
]
},
"component": [
0.03,0.05,1
]
},
"component": [
1,0.03,0.05,1
]
},
"color_end": {
"x": 1,
"y": 0,
"z": 0,
"w": 0,
"xy": {
"x": 1,
"y": 0,
"component": [
1,0
]
},
"yz": {
"x": 0,
"y": 0,
"component": [
0,0
]
},
"zw": {
"x": 0,
"y": 0,
"component": [
0,0
]
},
"xyz": {
"x": 1,
"y": 0,
"z": 0,
"xy": {
"x": 1,
"y": 0,
"component": [
1,0
]
},
"yz": {
"x": 0,
"y": 0,
"component": [
0,0
]
},
"component": [
1,0,0
]
},
"yzw": {
"x": 0,
"y": 0,
"z": 0,
"xy": {
"x": 0,
"y": 0,
"component": [
0,0
]
},
"yz": {
"x": 0,
"y": 0,
"component": [
0,0
]
},
"component": [
0,0,0
]
},
"component": [
1,0,0,0
]
},
"gravity": -1.295925,
"blend_mode": "ADDITIVE"
}
]

View File

@ -0,0 +1,31 @@
{
"exposure": 1.521459,
"contrast": 1.162166,
"saturation": 1.123811,
"gamma": 1.739475,
"tonemap": 1,
"ssao": 3.628121,
"ssao_size": 2,
"dilate_separation": 1.56422,
"dilate_size": 2,
"dilate_min": 1,
"dilate_max": 0.900875,
"dof_blur_size": 3,
"dof_min": 5.60385,
"dof_max": 46.724617,
"dof_point": 7.567525,
"bloom_size": 2,
"bloom_separation": 1.549736,
"bloom_treshold": 0.905397,
"bloom_amount": 1.006605,
"vignette_intensity": 0.121926,
"vignette_radius": 0.799004,
"scanlines_intensity": 0,
"scanlines_density": 0.998773,
"chromatic_aberration_intensity": 0,
"film_grain_intensity": 0,
"barrel_distortion_intensity": -0.039946,
"lut_mode": 2,
"dither_intensity": 0.626757,
"lut_name": "utiltex/neutral.colorgrade.png"
}

View File

@ -0,0 +1,702 @@
{ "frames": [
{
"filename": "animsheet 0.aseprite",
"frame": { "x": 0, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 120
},
{
"filename": "animsheet 1.aseprite",
"frame": { "x": 50, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 2.aseprite",
"frame": { "x": 100, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 3.aseprite",
"frame": { "x": 150, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 4.aseprite",
"frame": { "x": 200, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 5.aseprite",
"frame": { "x": 250, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 6.aseprite",
"frame": { "x": 300, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 120
},
{
"filename": "animsheet 7.aseprite",
"frame": { "x": 350, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 90
},
{
"filename": "animsheet 8.aseprite",
"frame": { "x": 400, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 9.aseprite",
"frame": { "x": 450, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 10.aseprite",
"frame": { "x": 500, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 11.aseprite",
"frame": { "x": 550, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 12.aseprite",
"frame": { "x": 600, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 13.aseprite",
"frame": { "x": 650, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 14.aseprite",
"frame": { "x": 700, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 90
},
{
"filename": "animsheet 15.aseprite",
"frame": { "x": 750, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 16.aseprite",
"frame": { "x": 800, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 17.aseprite",
"frame": { "x": 850, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 18.aseprite",
"frame": { "x": 900, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 19.aseprite",
"frame": { "x": 950, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 20.aseprite",
"frame": { "x": 1000, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 21.aseprite",
"frame": { "x": 1050, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 22.aseprite",
"frame": { "x": 1100, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 23.aseprite",
"frame": { "x": 1150, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 24.aseprite",
"frame": { "x": 1200, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 25.aseprite",
"frame": { "x": 1250, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 26.aseprite",
"frame": { "x": 1300, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 27.aseprite",
"frame": { "x": 1350, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 28.aseprite",
"frame": { "x": 1400, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 29.aseprite",
"frame": { "x": 1450, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 30.aseprite",
"frame": { "x": 1500, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 31.aseprite",
"frame": { "x": 1550, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 32.aseprite",
"frame": { "x": 1600, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 33.aseprite",
"frame": { "x": 1650, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 34.aseprite",
"frame": { "x": 1700, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 35.aseprite",
"frame": { "x": 1750, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 36.aseprite",
"frame": { "x": 1800, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 37.aseprite",
"frame": { "x": 1850, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 120
},
{
"filename": "animsheet 38.aseprite",
"frame": { "x": 1900, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 39.aseprite",
"frame": { "x": 1950, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 40.aseprite",
"frame": { "x": 2000, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 41.aseprite",
"frame": { "x": 2050, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 42.aseprite",
"frame": { "x": 2100, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 43.aseprite",
"frame": { "x": 2150, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 120
},
{
"filename": "animsheet 44.aseprite",
"frame": { "x": 2200, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 90
},
{
"filename": "animsheet 45.aseprite",
"frame": { "x": 2250, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 46.aseprite",
"frame": { "x": 2300, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 47.aseprite",
"frame": { "x": 2350, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 48.aseprite",
"frame": { "x": 2400, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 49.aseprite",
"frame": { "x": 2450, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 50.aseprite",
"frame": { "x": 2500, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 51.aseprite",
"frame": { "x": 2550, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 90
},
{
"filename": "animsheet 52.aseprite",
"frame": { "x": 2600, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 53.aseprite",
"frame": { "x": 2650, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 54.aseprite",
"frame": { "x": 2700, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 55.aseprite",
"frame": { "x": 2750, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 56.aseprite",
"frame": { "x": 2800, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 57.aseprite",
"frame": { "x": 2850, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 58.aseprite",
"frame": { "x": 2900, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 59.aseprite",
"frame": { "x": 2950, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 60.aseprite",
"frame": { "x": 3000, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 61.aseprite",
"frame": { "x": 3050, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 62.aseprite",
"frame": { "x": 3100, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 63.aseprite",
"frame": { "x": 3150, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 64.aseprite",
"frame": { "x": 3200, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 65.aseprite",
"frame": { "x": 3250, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 66.aseprite",
"frame": { "x": 3300, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 67.aseprite",
"frame": { "x": 3350, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 68.aseprite",
"frame": { "x": 3400, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 69.aseprite",
"frame": { "x": 3450, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 70.aseprite",
"frame": { "x": 3500, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 71.aseprite",
"frame": { "x": 3550, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 72.aseprite",
"frame": { "x": 3600, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
},
{
"filename": "animsheet 73.aseprite",
"frame": { "x": 3650, "y": 0, "w": 50, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 50, "h": 48 },
"sourceSize": { "w": 50, "h": 48 },
"duration": 75
}
],
"meta": {
"app": "http://www.aseprite.org/",
"version": "1.3.15.5-x64",
"image": "animsheet.png",
"format": "RGBA8888",
"size": { "w": 3700, "h": 48 },
"scale": "1",
"frameTags": [
{ "name": "player_idle", "from": 0, "to": 6, "direction": "forward", "color": "#000000ff" },
{ "name": "player_walk", "from": 7, "to": 14, "direction": "forward", "color": "#000000ff" },
{ "name": "player_run", "from": 15, "to": 22, "direction": "forward", "color": "#000000ff" },
{ "name": "player_stop", "from": 23, "to": 24, "direction": "forward", "color": "#000000ff" },
{ "name": "ball", "from": 27, "to": 27, "direction": "forward", "color": "#000000ff" },
{ "name": "jump_up", "from": 28, "to": 28, "direction": "forward", "color": "#000000ff" },
{ "name": "jump_top", "from": 29, "to": 29, "direction": "forward", "color": "#000000ff" },
{ "name": "jump_down", "from": 30, "to": 30, "direction": "forward", "color": "#000000ff" },
{ "name": "jump_land", "from": 31, "to": 32, "direction": "forward", "color": "#000000ff" },
{ "name": "slide", "from": 33, "to": 36, "direction": "forward", "color": "#000000ff" },
{ "name": "red_idle", "from": 37, "to": 43, "direction": "forward", "color": "#000000ff" },
{ "name": "red_walk", "from": 44, "to": 51, "direction": "forward", "color": "#000000ff" },
{ "name": "red_run", "from": 52, "to": 59, "direction": "forward", "color": "#000000ff" },
{ "name": "red_jump_up", "from": 65, "to": 65, "direction": "forward", "color": "#000000ff" },
{ "name": "red_jump_top", "from": 66, "to": 66, "direction": "forward", "color": "#000000ff" },
{ "name": "red_jump_down", "from": 67, "to": 67, "direction": "forward", "color": "#000000ff" },
{ "name": "red_jump_land", "from": 68, "to": 69, "direction": "forward", "color": "#000000ff" },
{ "name": "red_slide", "from": 70, "to": 73, "direction": "forward", "color": "#000000ff" }
],
"layers": [
{ "name": "Layer 1", "opacity": 255, "blendMode": "normal" }
],
"slices": [
]
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@ -0,0 +1,267 @@
{ "frames": [
{
"filename": "scoresheet 0.aseprite",
"frame": { "x": 0, "y": 0, "w": 96, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 96, "h": 48 },
"sourceSize": { "w": 96, "h": 48 },
"duration": 100
},
{
"filename": "scoresheet 1.aseprite",
"frame": { "x": 96, "y": 0, "w": 96, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 96, "h": 48 },
"sourceSize": { "w": 96, "h": 48 },
"duration": 100
},
{
"filename": "scoresheet 2.aseprite",
"frame": { "x": 192, "y": 0, "w": 96, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 96, "h": 48 },
"sourceSize": { "w": 96, "h": 48 },
"duration": 100
},
{
"filename": "scoresheet 3.aseprite",
"frame": { "x": 288, "y": 0, "w": 96, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 96, "h": 48 },
"sourceSize": { "w": 96, "h": 48 },
"duration": 100
},
{
"filename": "scoresheet 4.aseprite",
"frame": { "x": 384, "y": 0, "w": 96, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 96, "h": 48 },
"sourceSize": { "w": 96, "h": 48 },
"duration": 100
},
{
"filename": "scoresheet 5.aseprite",
"frame": { "x": 480, "y": 0, "w": 96, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 96, "h": 48 },
"sourceSize": { "w": 96, "h": 48 },
"duration": 100
},
{
"filename": "scoresheet 6.aseprite",
"frame": { "x": 576, "y": 0, "w": 96, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 96, "h": 48 },
"sourceSize": { "w": 96, "h": 48 },
"duration": 100
},
{
"filename": "scoresheet 7.aseprite",
"frame": { "x": 672, "y": 0, "w": 96, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 96, "h": 48 },
"sourceSize": { "w": 96, "h": 48 },
"duration": 100
},
{
"filename": "scoresheet 8.aseprite",
"frame": { "x": 768, "y": 0, "w": 96, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 96, "h": 48 },
"sourceSize": { "w": 96, "h": 48 },
"duration": 100
},
{
"filename": "scoresheet 9.aseprite",
"frame": { "x": 864, "y": 0, "w": 96, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 96, "h": 48 },
"sourceSize": { "w": 96, "h": 48 },
"duration": 100
},
{
"filename": "scoresheet 10.aseprite",
"frame": { "x": 960, "y": 0, "w": 96, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 96, "h": 48 },
"sourceSize": { "w": 96, "h": 48 },
"duration": 100
},
{
"filename": "scoresheet 11.aseprite",
"frame": { "x": 1056, "y": 0, "w": 96, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 96, "h": 48 },
"sourceSize": { "w": 96, "h": 48 },
"duration": 100
},
{
"filename": "scoresheet 12.aseprite",
"frame": { "x": 1152, "y": 0, "w": 96, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 96, "h": 48 },
"sourceSize": { "w": 96, "h": 48 },
"duration": 100
},
{
"filename": "scoresheet 13.aseprite",
"frame": { "x": 1248, "y": 0, "w": 96, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 96, "h": 48 },
"sourceSize": { "w": 96, "h": 48 },
"duration": 100
},
{
"filename": "scoresheet 14.aseprite",
"frame": { "x": 1344, "y": 0, "w": 96, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 96, "h": 48 },
"sourceSize": { "w": 96, "h": 48 },
"duration": 100
},
{
"filename": "scoresheet 15.aseprite",
"frame": { "x": 1440, "y": 0, "w": 96, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 96, "h": 48 },
"sourceSize": { "w": 96, "h": 48 },
"duration": 100
},
{
"filename": "scoresheet 16.aseprite",
"frame": { "x": 1536, "y": 0, "w": 96, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 96, "h": 48 },
"sourceSize": { "w": 96, "h": 48 },
"duration": 100
},
{
"filename": "scoresheet 17.aseprite",
"frame": { "x": 1632, "y": 0, "w": 96, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 96, "h": 48 },
"sourceSize": { "w": 96, "h": 48 },
"duration": 100
},
{
"filename": "scoresheet 18.aseprite",
"frame": { "x": 1728, "y": 0, "w": 96, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 96, "h": 48 },
"sourceSize": { "w": 96, "h": 48 },
"duration": 100
},
{
"filename": "scoresheet 19.aseprite",
"frame": { "x": 1824, "y": 0, "w": 96, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 96, "h": 48 },
"sourceSize": { "w": 96, "h": 48 },
"duration": 100
},
{
"filename": "scoresheet 20.aseprite",
"frame": { "x": 1920, "y": 0, "w": 96, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 96, "h": 48 },
"sourceSize": { "w": 96, "h": 48 },
"duration": 100
},
{
"filename": "scoresheet 21.aseprite",
"frame": { "x": 2016, "y": 0, "w": 96, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 96, "h": 48 },
"sourceSize": { "w": 96, "h": 48 },
"duration": 100
},
{
"filename": "scoresheet 22.aseprite",
"frame": { "x": 2112, "y": 0, "w": 96, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 96, "h": 48 },
"sourceSize": { "w": 96, "h": 48 },
"duration": 100
},
{
"filename": "scoresheet 23.aseprite",
"frame": { "x": 2208, "y": 0, "w": 96, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 96, "h": 48 },
"sourceSize": { "w": 96, "h": 48 },
"duration": 100
},
{
"filename": "scoresheet 24.aseprite",
"frame": { "x": 2304, "y": 0, "w": 96, "h": 48 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 96, "h": 48 },
"sourceSize": { "w": 96, "h": 48 },
"duration": 100
}
],
"meta": {
"app": "http://www.aseprite.org/",
"version": "1.3.16.1-x64",
"format": "RGBA8888",
"size": { "w": 2400, "h": 48 },
"scale": "1",
"frameTags": [
{ "name": "lscore_0", "from": 0, "to": 0, "direction": "forward", "color": "#000000ff" },
{ "name": "lscore_1", "from": 1, "to": 1, "direction": "forward", "color": "#000000ff" },
{ "name": "lscore_2", "from": 2, "to": 2, "direction": "forward", "color": "#000000ff" },
{ "name": "lscore_3", "from": 3, "to": 3, "direction": "forward", "color": "#000000ff" },
{ "name": "lscore_4", "from": 4, "to": 4, "direction": "forward", "color": "#000000ff" },
{ "name": "lscore_5", "from": 5, "to": 5, "direction": "forward", "color": "#000000ff" },
{ "name": "lscore_6", "from": 6, "to": 6, "direction": "forward", "color": "#000000ff" },
{ "name": "lscore_7", "from": 7, "to": 7, "direction": "forward", "color": "#000000ff" },
{ "name": "lscore_8", "from": 8, "to": 8, "direction": "forward", "color": "#000000ff" },
{ "name": "lscore_adv", "from": 9, "to": 9, "direction": "forward", "color": "#000000ff" },
{ "name": "rscore_0", "from": 10, "to": 10, "direction": "forward", "color": "#000000ff" },
{ "name": "rscore_1", "from": 11, "to": 11, "direction": "forward", "color": "#000000ff" },
{ "name": "rscore_2", "from": 12, "to": 12, "direction": "forward", "color": "#000000ff" },
{ "name": "rscore_3", "from": 13, "to": 13, "direction": "forward", "color": "#000000ff" },
{ "name": "rscore_4", "from": 14, "to": 14, "direction": "forward", "color": "#000000ff" },
{ "name": "rscore_5", "from": 15, "to": 15, "direction": "forward", "color": "#000000ff" },
{ "name": "rscore_6", "from": 16, "to": 16, "direction": "forward", "color": "#000000ff" },
{ "name": "rscore_7", "from": 17, "to": 17, "direction": "forward", "color": "#000000ff" },
{ "name": "rscore_8", "from": 18, "to": 18, "direction": "forward", "color": "#000000ff" },
{ "name": "rscore_adv", "from": 19, "to": 19, "direction": "forward", "color": "#000000ff" },
{ "name": "score_middle", "from": 20, "to": 20, "direction": "forward", "color": "#000000ff" },
{ "name": "score_board", "from": 21, "to": 21, "direction": "forward", "color": "#000000ff" },
{ "name": "score_board_l", "from": 22, "to": 22, "direction": "forward", "color": "#000000ff" },
{ "name": "score_board_r", "from": 23, "to": 23, "direction": "forward", "color": "#000000ff" },
{ "name": "logo", "from": 24, "to": 24, "direction": "forward", "color": "#000000ff" }
],
"layers": [
{ "name": "Layer 1", "opacity": 255, "blendMode": "normal" }
],
"slices": [
]
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

File diff suppressed because it is too large Load Diff

View File

View File

@ -0,0 +1,44 @@
{
"version": 4,
"name": "test",
"config": {
"skyBase": [
0.38,0.81,0.95
],
"skyTop": [
0.17,0.4,0.95
],
"sunDisk": [
1,1,1
],
"horizonHalo": [
1,1,1
],
"sunHalo": [
1,1,1
],
"sunLightColor": [
1,1,1
],
"sunPosition": [
0.371391,0.557086,0.742781
],
"sunIntensity": 21.856287,
"skyIntensity": 0.898204,
"hasClouds": 1,
"planeHeight": 0,
"animatePlaneHeight": 1,
"waterColor": [
0,0.131282,1
],
"deepColor": [
0.000151,0.065439,0.999937
]
},
"chunks": [
],
"emitters": [
],
"notes": [
]
}

View File

@ -0,0 +1,44 @@
{
"version": 4,
"name": "test_world",
"config": {
"skyBase": [
0.38,0.81,0.95
],
"skyTop": [
0.17,0.4,0.95
],
"sunDisk": [
1,1,1
],
"horizonHalo": [
1,1,1
],
"sunHalo": [
1,1,1
],
"sunLightColor": [
1,1,1
],
"sunPosition": [
0.371391,0.557086,0.742781
],
"sunIntensity": 2,
"skyIntensity": 1,
"hasClouds": 1,
"planeHeight": 0,
"animatePlaneHeight": 1,
"waterColor": [
1,1,1
],
"deepColor": [
1,1,1
]
},
"chunks": [
],
"emitters": [
],
"notes": [
]
}

BIN
test_packs/.DS_Store.pack Normal file

Binary file not shown.

BIN
test_packs/boot.pack Normal file

Binary file not shown.

BIN
test_packs/core.pack Normal file

Binary file not shown.

BIN
test_packs/game_core.pack Normal file

Binary file not shown.

Binary file not shown.

BIN
test_packs/triles.json.pack Normal file

Binary file not shown.

BIN
test_packs/utiltex.pack Normal file

Binary file not shown.

BIN
test_packs/worlds.json.pack Normal file

Binary file not shown.