Big blob of references of good things to know when dealing with game networking
For testing poor network conditions https://github.com/tylertreat/comcast https://github.com/jagt/clumsy
| #!/bin/sh | |
| set -e; | |
| while true | |
| do | |
| sleep 1; | |
| for i in *.mov; | |
| do |
| [patch.crates-io] | |
| bevy = {git = "https://github.com/aceeri/bevy"} | |
| bevy_animation = {git = "https://github.com/aceeri/bevy"} | |
| bevy_app = {git = "https://github.com/aceeri/bevy"} | |
| bevy_asset = {git = "https://github.com/aceeri/bevy"} | |
| bevy_audio = {git = "https://github.com/aceeri/bevy"} | |
| bevy_core = {git = "https://github.com/aceeri/bevy"} | |
| bevy_core_pipeline = {git = "https://github.com/aceeri/bevy"} | |
| bevy_derive = {git = "https://github.com/aceeri/bevy"} | |
| bevy_diagnostic = {git = "https://github.com/aceeri/bevy"} |
Big blob of references of good things to know when dealing with game networking
For testing poor network conditions https://github.com/tylertreat/comcast https://github.com/jagt/clumsy
| use bevy::prelude::*; | |
| use bevy::ecs::component::Component; | |
| use std::marker::PhantomData; | |
| use std::ops::{Deref, DerefMut}; | |
| use fxhash::FxHashMap; | |
| #[derive(Clone, Debug)] | |
| pub struct Relations<T> |
| static C:&str="println!(\"static C:&str={:?};\",C); println!(\"fn main(){{{}}}\",C);"; | |
| fn main(){println!("static C:&str={:?};",C); println!("fn main(){{{}}}",C);} |
| #[derive(Debug, Copy, Clone)] | |
| enum Direction { | |
| Top = 0, | |
| Right = 1, | |
| Bottom = 2, | |
| Left = 3, | |
| } | |
| #[derive(Debug, Copy, Clone)] | |
| enum ConnectionError { |
| for { | |
| select { | |
| case msg, ok := <-responseChan: | |
| if !ok { | |
| break | |
| } | |
| if msg == nil { | |
| break | |
| } | |
| message = msg |
| func (statsd *StatsdProvider) ParsePacket(packet []byte) (*Depth, error) { | |
| var depth Depth | |
| parser := PacketParser{ | |
| buffer: packet, | |
| index: 0, | |
| } | |
| word, err := parser.TakeUntilDelimiter(".") | |
| if err != nil { |
| watched=() | |
| pids=() | |
| contains() { | |
| local value=$1; | |
| for pod in "${watched[@]}" | |
| do | |
| if [[ $pod == $value ]] | |
| then | |
| echo "1" | |
| fi |
| pods='\n' read -r -a array <<< $(kubectl get pods -l app=$1 -o name | sed 's/pods\///g') | |
| rm ~/kubefifo | |
| mkfifo ~/kubefifo | |
| for pod in "${array[@]}" | |
| do | |
| kubectl logs $pod -f > ~/kubefifo & echo "$pod following"; | |
| done | |
| cat ~/kubefifo |