Compare commits

..

32 Commits

Author SHA1 Message Date
70ba220d45 use minted crates 2024-09-30 10:34:08 -07:00
760771ff5a ugly but correct fix 2024-09-30 09:44:30 -07:00
4b74ea8acf time travel warning is more descriptive 2024-09-27 12:26:34 -07:00
dd7e48350d TODO: fix this properly 2024-09-27 12:26:16 -07:00
9bdb3ff403 typo 2024-09-27 11:27:23 -07:00
4eda90e178 floor(x+1)==floor(x)+1 2024-09-26 18:44:12 -07:00
72c91558e7 use one type def for dt ratio 2024-09-26 18:43:11 -07:00
9453ef17fb uniquely identify test 2024-09-26 18:04:58 -07:00
7425f1cd01 fix tests 2024-09-26 18:04:49 -07:00
682fa44741 fix fart 2024-09-26 16:39:32 -07:00
84b364313b debug things 2024-09-26 16:39:32 -07:00
6005485789 fix face_nd 2024-09-26 16:09:37 -07:00
2fc1fcfa80 Revert "det unused"
This reverts commit 6b897620e9.
2024-09-26 16:07:46 -07:00
8a1e713170 column major 2024-09-26 15:08:50 -07:00
a685c4ebe2 point to commit 2024-09-25 14:55:36 -07:00
0150bb977d optimize is_empty_volume 2024-09-25 10:18:38 -07:00
f280b65fc9 fix is_empty_volume test 2024-09-25 10:00:24 -07:00
327ba10fb4 already 8 2024-09-17 15:56:26 -07:00
6b897620e9 det unused 2024-09-17 15:06:12 -07:00
a5efbe6574 plumb time ratio everywhere and make a special spot for it in internal instructions 2024-09-16 15:05:11 -07:00
a64b81f05e precise time ratio 2024-09-16 15:04:38 -07:00
462950d526 ignore precision 2024-09-16 15:03:52 -07:00
c5f9a30c1b graphics 2024-09-16 15:03:18 -07:00
1d4a79b15e graphics: wip 2024-09-16 13:05:49 -07:00
4556bc8741 do face crawler 2024-09-16 13:05:09 -07:00
215dfab8a9 write body extrapolation from time ratio using ridiculous trait bounds 2024-09-16 13:05:09 -07:00
d6e15dea05 fix errors 2024-09-13 14:01:13 -07:00
ec8c89de9c many work 2024-09-13 13:51:33 -07:00
33c9fb0399 wip 2024-09-12 13:49:48 -07:00
bbc9a89ad7 physics.rs cleared 2024-09-12 13:49:42 -07:00
fc7d4b7e0c more wip 2024-09-12 13:12:19 -07:00
60bd926ce1 wip wip 2024-09-12 13:09:25 -07:00
6 changed files with 246 additions and 485 deletions

681
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
[package]
name = "strafe-client"
version = "0.10.5"
version = "0.10.3"
edition = "2021"
repository = "https://git.itzana.me/StrafesNET/strafe-client"
license = "Custom"
@ -18,17 +18,17 @@ roblox = ["dep:strafesnet_deferred_loader", "dep:strafesnet_rbx_loader"]
bytemuck = { version = "1.13.1", features = ["derive"] }
configparser = "3.0.2"
ddsfile = "0.5.1"
glam = "0.29.0"
glam = "0.28.0"
id = { version = "0.1.0", registry = "strafesnet" }
parking_lot = "0.12.1"
pollster = "0.3.0"
strafesnet_bsp_loader = { version = "0.2.1", registry = "strafesnet", optional = true }
strafesnet_common = { version = "0.5.2", registry = "strafesnet" }
strafesnet_deferred_loader = { version = "0.4.0", features = ["legacy"], registry = "strafesnet", optional = true }
strafesnet_rbx_loader = { version = "0.5.1", registry = "strafesnet", optional = true }
strafesnet_bsp_loader = { version = "0.1.3", registry = "strafesnet", optional = true }
strafesnet_common = { version = "0.5.0", registry = "strafesnet" }
strafesnet_deferred_loader = { version = "0.3.1", features = ["legacy"], registry = "strafesnet", optional = true }
strafesnet_rbx_loader = { version = "0.3.2", registry = "strafesnet", optional = true }
strafesnet_snf = { version = "0.2.0", registry = "strafesnet", optional = true }
wgpu = "22.1.0"
winit = "0.30.5"
wgpu = "22.0.0"
winit = "0.30.4"
[profile.release]
#lto = true

View File

@ -22,7 +22,7 @@ impl std::error::Error for ReadError{}
pub enum DataStructure{
#[cfg(feature="roblox")]
Roblox(strafesnet_rbx_loader::Model),
Roblox(strafesnet_rbx_loader::Dom),
#[cfg(feature="source")]
Source(strafesnet_bsp_loader::Bsp),
#[cfg(feature="snf")]
@ -66,16 +66,13 @@ pub fn load<P:AsRef<std::path::Path>>(path:P)->Result<strafesnet_common::map::Co
#[cfg(feature="snf")]
DataStructure::StrafesNET(map)=>Ok(map),
#[cfg(feature="roblox")]
DataStructure::Roblox(model)=>{
let mut place=model.into_place();
place.run_scripts();
DataStructure::Roblox(dom)=>{
let mut loader=strafesnet_deferred_loader::roblox_legacy();
let (texture_loader,mesh_loader)=loader.get_inner_mut();
let map_step1=strafesnet_rbx_loader::convert(
&place,
&dom,
|name|texture_loader.acquire_render_config_id(name),
|name|mesh_loader.acquire_mesh_id(name),
);
@ -113,7 +110,7 @@ pub fn load<P:AsRef<std::path::Path>>(path:P)->Result<strafesnet_common::map::Co
|name|mesh_loader.acquire_mesh_id(name),
);
let prop_meshes=mesh_loader.load_meshes(bsp.as_ref());
let prop_meshes=mesh_loader.load_meshes(&bsp.as_ref());
let map_step2=map_step1.add_prop_meshes(
//the type conflagulator 9000

View File

@ -757,7 +757,7 @@ impl MinkowskiMesh<'_>{
//WARNING! d outside of *2
//WARNING: truncated precision
for dt in Fixed::<4,128>::zeroes2(((n.dot(relative_body.position))*2-d).fix_4(),n.dot(relative_body.velocity).fix_4()*2,n.dot(relative_body.acceleration).fix_4()){
if Ratio::new(Planar64::ZERO,Planar64::EPSILON).le_ratio(dt)&&dt.lt_ratio(best_time)&&n.dot(relative_body.extrapolated_velocity_ratio_dt(dt)).is_negative(){
if Ratio::new(Planar64::ZERO,Planar64::ONE).le_ratio(dt)&&dt.lt_ratio(best_time)&&n.dot(relative_body.extrapolated_velocity_ratio_dt(dt)).is_negative(){
best_time=dt;
best_edge=Some(directed_edge_id);
break;

View File

@ -877,7 +877,8 @@ impl Body{
T1:integer::Fix<Planar64>,
{
// a*dt + v
self.acceleration.map(|elem|(dt*elem).divide().fix())+self.velocity
self.acceleration.map(|elem|dt*elem)
.map(|elem|elem.divide().fix())+self.velocity
}
pub fn advance_time_ratio_dt(&mut self,dt:model_physics::GigaTime){
self.position=self.extrapolated_position_ratio_dt(dt);

View File

@ -100,19 +100,19 @@ impl WindowContext<'_>{
if let Some(input_instruction)=match keycode{
winit::keyboard::Key::Named(winit::keyboard::NamedKey::Space)=>Some(InputInstruction::Jump(s)),
winit::keyboard::Key::Character(key)=>match key.as_str(){
"w"|"W"=>Some(InputInstruction::MoveForward(s)),
"a"|"A"=>Some(InputInstruction::MoveLeft(s)),
"s"|"S"=>Some(InputInstruction::MoveBack(s)),
"d"|"D"=>Some(InputInstruction::MoveRight(s)),
"e"|"E"=>Some(InputInstruction::MoveUp(s)),
"q"|"Q"=>Some(InputInstruction::MoveDown(s)),
"z"|"Z"=>Some(InputInstruction::Zoom(s)),
"r"|"R"=>if s{
"w"=>Some(InputInstruction::MoveForward(s)),
"a"=>Some(InputInstruction::MoveLeft(s)),
"s"=>Some(InputInstruction::MoveBack(s)),
"d"=>Some(InputInstruction::MoveRight(s)),
"e"=>Some(InputInstruction::MoveUp(s)),
"q"=>Some(InputInstruction::MoveDown(s)),
"z"=>Some(InputInstruction::Zoom(s)),
"r"=>if s{
//mouse needs to be reset since the position is absolute
self.mouse=strafesnet_common::mouse::MouseState::default();
Some(InputInstruction::ResetAndRestart)
}else{None},
"f"|"F"=>if s{Some(InputInstruction::PracticeFly)}else{None},
"f"=>if s{Some(InputInstruction::PracticeFly)}else{None},
_=>None,
},
_=>None,