Compare commits

..

7 commits

Author SHA1 Message Date
griffi-gh 672007ac7b reduce default render distanc 2023-11-25 16:32:05 +01:00
griffi-gh 9ba3b42991 trigger workflow 2023-11-25 16:23:19 +01:00
griffi-gh a1307b1abc fix ci, hopefully 2023-11-25 16:22:44 +01:00
griffi-gh feac14c79c uwu 2023-11-25 16:19:16 +01:00
griffi-gh f7f0ca4547 ui.ui -> ui.kui 2023-11-25 16:18:40 +01:00
griffi-gh cb22f4db59 . 2023-11-25 16:17:47 +01:00
griffi-gh 72a12b5ad9 upd. readme 2023-11-25 15:55:40 +01:00
5 changed files with 24 additions and 8 deletions

View file

@ -32,7 +32,9 @@ jobs:
- name: Build
run: cargo build
--release
--package kubi
--bin kubi
--package kubi-server
--bin kubi-server
- name: Create artifact
shell: bash

View file

@ -87,6 +87,8 @@ cargo apk run -p kubi --lib --no-default-features
<h2>touch controls</h2>
warn: multitouch got broken after switching to `android-activity`, I'm still looking for a fix.
<img src=".readme/touch_controls.png" alt="touch control scheme" width="300">
- Left side: **Movement**
@ -118,4 +120,16 @@ seed = 0xfeb_face_dead_cafe # worldgen seed to use
name = "Kubi Server" # server name
```
<h2>"In-house" libraries</h2>
- [`kubi-ui`](kubi-ui): semi-imm.mode backend-agnostic ui system\
mostly ready to use, it has already replaced the Kubi legacy ui
- [`kubi-pool`](kubi-pool): very early work-in-progress work-stealing threadpool system\
aiming to replace `rayon` threadpool that's currently used inside the kubi client (for more control over task priority)
- [`kubi-logging`](kubi-logging) fancy-ass custom formatter for `env-logger`
deprecated:
~~`kubi-udp`~~ was a huge pita to work with and eventually got replaced by `uflow` (https://github.com/lowquark/uflow) in #5
<h6 align="right"><i>~ uwu</i></h6>

View file

@ -4,7 +4,7 @@ use crate::rendering::{Renderer, RenderTarget, WindowSize};
#[derive(Unique)]
pub struct UiState {
pub ui: KubiUi,
pub kui: KubiUi,
pub renderer: GliumUiRenderer,
}
@ -13,7 +13,7 @@ pub fn kubi_ui_init(
) {
let renderer = storages.borrow::<NonSendSync<UniqueView<Renderer>>>().unwrap();
storages.add_unique_non_send_sync(UiState {
ui: KubiUi::new(),
kui: KubiUi::new(),
renderer: GliumUiRenderer::new(&renderer.display)
});
}
@ -21,16 +21,16 @@ pub fn kubi_ui_init(
pub fn kubi_ui_begin(
mut ui: NonSendSync<UniqueViewMut<UiState>>
) {
ui.ui.begin();
ui.kui.begin();
}
pub fn kubi_ui_end(
mut ui: NonSendSync<UniqueViewMut<UiState>>
) {
let ui: &mut UiState = &mut ui;
let UiState { ui, renderer } = ui;
ui.end();
let (upload_needed, plan) = ui.draw_plan();
let UiState { kui, renderer } = ui;
kui.end();
let (upload_needed, plan) = kui.draw_plan();
if upload_needed {
renderer.update(plan);
}

View file

@ -21,7 +21,7 @@ fn render_progressbar(
let total = world.chunks.len();
loaded as f32 / total as f32
};
ui.ui.add(
ui.kui.add(
ProgressBar { value, ..Default::default() },
size.0.as_vec2()
);

View file

@ -30,7 +30,7 @@ impl Default for GameSettings {
render_distance: match true {
cfg!(debug_assertions) => 5,
cfg!(target_os = "android") => 6,
#[allow(unreachable_patterns)] _ => 8,
#[allow(unreachable_patterns)] _ => 7,
},
mouse_sensitivity: 1.,
debug_draw_current_chunk_border: false, //cfg!(not(target_os = "android")) && cfg!(debug_assertions),