Ray Chung

@ray1422

Joined on Jun 17, 2019

  • 2024-05-23 08-55-05 Today I implemented the path locking system allowing car merging into one lane without crashing into each other. Each car needs to propose its intent, and a god (temporarily called schedule_intents) will review each intent, and approve, trim, or reject them. This implementation is a little bit naive and only scheduling by priorities. Here's the simplied psuedocode for those systems:
     Like  Bookmark
  • image (I'm using Bevy 0.13) Today I add the mesh to the curve. let mut vertices: Vec<Vec3> = Vec::new(); for p in new_curve.iter_positions(1024) { vertices.push(p); } for p in new_curve_r.iter_positions(1024) {
     Like  Bookmark
  • Fix curve intersection detection (本來的實作有問題) 然後實作了 Beizer Curve + offset, 會往法向量推過去。之後的道路以及碰撞都會基於這個 trait (CageCurve) 渲染。 應該就快要可以寫主要 Road System 的部分了。 image Road System 今天思考了下,road system 還是維持 locked 以及 intent. intent 或許加入個 field 叫做 must_together, 就是這個 intent 必須一起被鎖定。
     Like  Bookmark
  • 這個系列主要是想用 Rust 寫一個類似 Cities: Skyline 的遊戲,希望透過比較高效能的編程語言 (i.e. Rust) 去做比較精細、真實的模擬。目前使用 Bevy 框架,以及他的 ECS 框架來實作。 Roadmap 短期 Implement traffic system with predefined car spawning point and dispawning point Implement pedestrian Implement road editor 中期 Split into server and client so we can play it remotely.
     Like  Bookmark
  • 安裝Docker https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html#docker 官方的 docker 安裝腳本不支援 Arch Linux,所以直接使用 pacman 提供的。 sudo pacman -S docker sudo systemctl enable --now docker sudo gpasswd -a $USER docker 安裝 aur/nvidia-container-toolkit
     Like  Bookmark
  • NV顯示卡 Arch Linux下畫面撕裂 === 首先,編輯 `/etc/modprobe.d/nvidia-graphics-drivers.conf` 加入以下行: ```bash options nvidia_drm modeset=2 ``` 接下來打這個更新 ```bash sudo mkinitcpio -p linux ``` 重起後即可。 ###### tags: `Arch Linux` `Nvidia`
     Like  Bookmark