Complete it

This commit is contained in:
flameyosflow 2025-12-19 18:57:43 +02:00
commit ad868c0c25

View file

@ -1,3 +1,126 @@
Wildered
wildered.da.programmer
Online
Masashi
— 5:27 PM
ill add both
Wildered — 5:27 PM
and allow for using variables obv
duh
ii love you
not in the homo way
xd
Masashi
— 5:27 PM
okok
love u too bro (no homo)
Wildered — 5:28 PM
lol
Masashi
— 5:32 PM
fuck
nishi's new version of libfishsoup
broke our compiler
:despair:
bitwise added
now arrays
Masashi
— 5:39 PM
@Wildered
Wildered — 5:40 PM
yes
Masashi
— 5:40 PM
because of the way our typesystem works
we DONT have null
ull need to do [Option::None; size]
is that okay?
and whatever ur using just make it Option::Some
oh wait
enums dont work
................
@Wildered what do we do
wait we can do this
say u want an array of type T
u make struct TWrapper
with val: T and is_used: bool
how's the idea
Wildered — 5:45 PM
hi
yes
that's fine
Wildered — 5:46 PM
this is ok
no worries
Masashi
— 5:46 PM
homemade Option 😭
Wildered — 5:46 PM
lmao\
Masashi
— 5:46 PM
doesnt work
Masashi
— 5:46 PM
.
Wildered — 5:46 PM
im fine w it
what's the syntax for it
Masashi
— 5:46 PM
w
fn main() -> int do
let arr: [int; 5] = [42; 5];
let x = arr[2];
x
end
Wildered — 5:47 PM
so 42 is the default
Masashi
— 5:47 PM
correct
Wildered — 5:47 PM
that's brilliant yay
:D
Masashi
— 5:48 PM
:3
Masashi
— 6:47 PM
progress?
Wildered — 6:55 PM
almost done
sneakpeak
Image
Starting import resolution...
[parsing] game/client.sui
Error: Parse error in game/client.sui: Unexpected token in pattern: KeywordElse. Expected variable names, struct patterns like Struct { field }, or enum patterns like Enum::Variant
34 | else
| ~~~~
| ^
fn main() -> int do
suic_init_window(1280, 720, "Soup - Voxel Battle Royale");
suic_enable_msaa_4x();
let current_screen = 0;
let player_name = "Player";
let server_host = "127.0.0.1";
Expand
message.txt
5 KB

fn main() -> int do fn main() -> int do
suic_init_window(1280, 720, "Soup - Voxel Battle Royale"); suic_init_window(1280, 720, "Soup - Voxel Battle Royale");
suic_enable_msaa_4x(); suic_enable_msaa_4x();
@ -29,24 +152,18 @@ fn main() -> int do
let mouse_y = suic_get_mouse_y() as int; let mouse_y = suic_get_mouse_y() as int;
let is_mouse_clicked = suic_is_mouse_button_pressed(MOUSE_BUTTON_LEFT); let is_mouse_clicked = suic_is_mouse_button_pressed(MOUSE_BUTTON_LEFT);
if mouse_x >= 450 && mouse_x <= 830 && mouse_y >= 320 && mouse_y <= 400 do if mouse_x >= 450 && mouse_x <= 830 && mouse_y >= 320 && mouse_y <= 400 && is_mouse_clicked != 0 do
if is_mouse_clicked != 0 do
current_screen = 1; current_screen = 1;
end end
end
if mouse_x >= 450 && mouse_x <= 830 && mouse_y >= 430 && mouse_y <= 510 do if mouse_x >= 450 && mouse_x <= 830 && mouse_y >= 430 && mouse_y <= 510 && is_mouse_clicked != 0 do
if is_mouse_clicked != 0 do
current_screen = 2; current_screen = 2;
end end
end
if mouse_x >= 450 && mouse_x <= 830 && mouse_y >= 540 && mouse_y <= 620 do if mouse_x >= 450 && mouse_x <= 830 && mouse_y >= 540 && mouse_y <= 620 && is_mouse_clicked != 0 do
if is_mouse_clicked != 0 do
break; break;
end end
end end
else
if current_screen == 1 do if current_screen == 1 do
suic_draw_text("MATCHMAKING", 450, 100, 60, 100, 200, 255, 255); suic_draw_text("MATCHMAKING", 450, 100, 60, 100, 200, 255, 255);
suic_draw_text("Connecting to server...", 400, 250, 30, 200, 200, 200, 255); suic_draw_text("Connecting to server...", 400, 250, 30, 200, 200, 200, 255);
@ -62,12 +179,10 @@ fn main() -> int do
let mouse_y = suic_get_mouse_y() as int; let mouse_y = suic_get_mouse_y() as int;
let is_mouse_clicked = suic_is_mouse_button_pressed(MOUSE_BUTTON_LEFT); let is_mouse_clicked = suic_is_mouse_button_pressed(MOUSE_BUTTON_LEFT);
if mouse_x >= 100 && mouse_x <= 250 && mouse_y >= 630 && mouse_y <= 690 do if mouse_x >= 100 && mouse_x <= 250 && mouse_y >= 630 && mouse_y <= 690 && is_mouse_clicked != 0 do
if is_mouse_clicked != 0 do
current_screen = 0; current_screen = 0;
end end
end end
else
if current_screen == 2 do if current_screen == 2 do
suic_draw_text("SETTINGS", 450, 100, 60, 100, 200, 255, 255); suic_draw_text("SETTINGS", 450, 100, 60, 100, 200, 255, 255);
suic_draw_text("Player Name:", 250, 200, 24, 200, 200, 200, 255); suic_draw_text("Player Name:", 250, 200, 24, 200, 200, 200, 255);
@ -90,13 +205,10 @@ fn main() -> int do
let mouse_y = suic_get_mouse_y() as int; let mouse_y = suic_get_mouse_y() as int;
let is_mouse_clicked = suic_is_mouse_button_pressed(MOUSE_BUTTON_LEFT); let is_mouse_clicked = suic_is_mouse_button_pressed(MOUSE_BUTTON_LEFT);
if mouse_x >= 450 && mouse_x <= 750 && mouse_y >= 550 && mouse_y <= 620 do if mouse_x >= 450 && mouse_x <= 750 && mouse_y >= 550 && mouse_y <= 620 && is_mouse_clicked != 0 do
if is_mouse_clicked != 0 do
current_screen = 0; current_screen = 0;
end end
end end
end
end
suic_end_drawing(); suic_end_drawing();
end end