

this but unironically I love reading source of of things I’m using when I am coding against them, I always get good ideas for how to make my code better.
i’m back
this but unironically I love reading source of of things I’m using when I am coding against them, I always get good ideas for how to make my code better.
my therapist today told me that things seem good for me and that we should take a break from appointments if I don’t have any specific goals… never thought I’d just be “good” but I think she’s right
update: its WORKING, and i cant even remember what i did to fix it late last night! oh right, git history, yeah my SummedAabb
function is a mess now, as it responds to the addition of an Aabb
somewhere in the code with a re-summing of the parents. weird for sure. at some point i should probably make it recursive, and look into whether I really need a newtype for Aabb
(SummedAabb(Aabb)
) or if I can just use Aabb
without screwing up frustrum culling (since that’s what its used for apparently)
i guess its time to read the bevy source code again, i love open source (not sarcastic)
my corner of the internet feels so quiet today
I spent like 3.5 hours trying to make doors work in my game last night, nearly got it but had to write some glue code to get collisions on children remapped to a collision on the parent, and also sum bounding boxes to make proximity colliders idk I’m close though, pretty much everything else is working! Only 300 lines of code after a few iterations
Luckily we can reuse the very thorough checklists from last year!
Yeah appointments in October, the only thing really stopping me is the req for electrolysis, general surgery risk and recovery time, but it’d be nice not to tuck, take less meds, and other reasons too.
defs gonna steal this too
beep boop i am the update robot
its ok we’ll figure it out. last time was copious amounts of checklists and we only almost got trapped in a city we don’t know anyone in overnight and only 3 of the four flights were rescheduled. but apparently there are puppies at my parents’ house … i just like being at home and hate travelling.
apparently i got an email yesterday from the clinic that wants to book me so now i need to figure that out - is it really gonna be worth all the pain for me? who knows … lots to think about, like also having to get electrolysis done for like a year beforehand, ugh
i just kinda clicked some buttons in blender to make a simple idle animation for the shitty sword in my game, and then loaded it into Bevy. the animation stuff in Bevy took me a while to grasp (why does AnimationGraph::from_clip(...)
return a tuple of (graph, node_index)
instead of a single value, for instance? it finally made sense once I got it working of course, the node appears to always be 1 since there’s only one clip inside the graph I’m making, and it points to the point in the graph that the clip was put to. confusing at first, not really well documented IMO, i am very excited for the official Bevy Book to be not a secret link and also have a section on animation.
anyway i can’t figure out how to post the video but now when you pick up the dumb test sword it has an idle animation that just bobs a bit, and the animation set is defined in the spec i showed before. of course, all the animations will be living on the viewmodel (for first person animations) so referencing them by index is right out, but it turns out that the Gltf
type has a named_animations
field so I can iterate through those and build a little HashMap
to store them:
#[derive(Resource, Default)]
struct ViewModelAnimations(HashMap<String, (Handle<AnimationGraph>, AnimationNodeIndex)>);
fn build_animation_lut(
mut er_loaded_viewmodel: EventReader<AssetEvent<Gltf>>,
handle: Res<ViewModelHandle>,
gltf_assets: Res<Assets<Gltf>>,
mut graphs: ResMut<Assets<AnimationGraph>>,
mut view_model_animations: ResMut<ViewModelAnimations>,
) {
for event in er_loaded_viewmodel.read() {
let AssetEvent::LoadedWithDependencies { id } = *event else {
continue;
};
if id != handle.0.id() {
continue;
}
let gltf_asset = gltf_assets.get(id).unwrap();
for (name, clip_handle) in &gltf_asset.named_animations {
info!("discovered named animation {name}");
let (graph, index) = AnimationGraph::from_clip(clip_handle.clone());
let graph_handle = graphs.add(graph);
view_model_animations
.0
.insert(name.to_string(), (graph_handle.clone(), index));
}
}
}
then it’s a trivial matter to actually play them later using the AnimationPlayer
added to the scene automatically by Bevy (since it has an Armature)
I hear librarians like it when you are in the library and shout “Books” to get their attention (community reference)
If you’re worreid about your house catching fire when you’re gone take a pic of your stove being off.
genius! dont know why i never thought of this!
flying is just a thing for me, and of course all the planning.
I hate travelling and the idea of travelling. My mom told me she wants me to visit this year and now I feel like I’m gonna scream.
Airports are so scary, and it’s expensive, and what if the house lights on fire while I’m gone and what if some file I need is at home and what if I get arrested at the airport for some reason like being stupid and what if I don’t pack enough clothes or medications and how do you travel with ADHD meds and oh god oh god oh god I have to use vacation time for something so stressful???
weird that food and rent aren’t on this chart
deleted by creator
thank you for sharing your story, i’m glad things are better now, and tbh its ridiculous in the year of 2020 that anyone can treat their family like that. i feel like i could say more but i’ll leave it for a second post as it’s more about me
also this one time i accidentally right clicked in blender and accidentally selected a menu item that made the entire view the outliner:
and I didn’t know how to get it back and I nearly cried, even saving and loading didn’t fix it. anyway turns out I had clicked this:
The fun thing about working with Rust (or maybe Bevy?) is that every silly little thing feels like such a huge accomplishment. It’s like studying the arcane arts, I’m deep into Bevy source code or sparse documentation and when 0.17 comes out some of my code will probably need to change (for the better, of course), and occasionally if you cancel compilation at the wrong time it corrupts your build directory.
Anyway, I present to you, loading .ron files from a folder to populate item stats! This is probably a one-liner in Unity, lol, but that just ain’t me.
The file structure:
InventoryItem(
id: "sword_test",
friendly_name: "Test Sword",
scene_path: "sword_test.glb",
item_type: Weapon(
slot: PrimaryHand,
two_handed: false,
damage: ({
Slash: 2
})
)
)
And partial code to actually deal with async loading:
#[derive(Resource, Default)]
pub struct ItemRegistry(Handle<LoadedFolder>, HashMap<String, InventoryItem>);
fn load_items(asset_server: Res<AssetServer>, mut item_registry: ResMut<ItemRegistry>) {
// Preload everything in the folder.
item_registry.0 = asset_server.load_folder("items");
}
fn folder_loaded(
mut er_loaded_folder: EventReader<AssetEvent<LoadedFolder>>,
folders: Res<Assets<LoadedFolder>>,
items: Res<Assets<InventoryItem>>,
mut item_registry: ResMut<ItemRegistry>,
) {
for event in er_loaded_folder.read() {
let AssetEvent::LoadedWithDependencies { id } = *event else {
continue;
};
if id != item_registry.0.id() {
continue;
}
let folder = folders.get(&item_registry.0).unwrap();
for file in &folder.handles {
let item = items.get(&file.clone().typed()).unwrap().clone();
info!("discovered item {}", &item.id);
item_registry.1.insert(item.id.clone(), item);
}
}
}
I am not sure at this point whether I’ll keep the “stripping the InventoryItem out of the Handle,” it doesn’t seem necessary but it might be handy to not have the items cloned into player inventories - to ensure all instances of an item are the same, but if I want to do item XP or anything like that that kind of precludes it.
Of course, all this is to say nothing of the actual design of the game which uh looks like this.
And once again, I am very proud of the view model, which is apparently a somewhat standard term for the view of the player’s hands and weapons in first-person (although I just resized the window and its no longer visible, so that’s a problem lol oh no). Several confused rounds in Blender as the co-ordinate systems are weird and I basically had to set up the camera view to roughly match the game by eyesight in Blender. Oh, and I guess the 5-hour donut tutorial paid off because look at that HIGH-DEF ART.
Thank you very much for your kind words and I appreciate that you can relate/understand the feeling, it’s nice to hear from you again too! I have to say I am not currently planning on actually getting back into that Matrix account at least for now since I’m trying to take things pretty slow, so for now I’ll be around here haha
ps. if you sent me a matrix message this year i couldn’t read it they were all encrypted by the time i actually got my password back this weekend
i don’t really have anyone that i can really be myself around other than my partner. my irl friends are cis mostly and I don’t talk at all about real stuff to them when I see them like once every few months. i tend to isolate myself when i’m stressed and i struggle to really open up to people in general and even if i do i tend to turtle after because i fear later rejection. in some ways its way easier to just post here and hope people respond or at least upbear because i don’t ever have to worry if i’m being too imposing or clingy or otherwise burdensome on individual people. i spent a lot of my life being an outsider and being rejected without really understanding why and i think it fundamentally broke my brain chemistry and its possible that normal friendships are just beyond me now. so i’m reclaiming this space i guess
i’m back btw
work has been ridiculously stressful. i started adhd meds which made me more productive and are generally helping me a lot. i can stick with things now that i want to be doing, so that’s neat. i got through a major release and such that was stupid and stressful and afterwards the residual stress was so bad I had to take a couple sick days. lol.
i’ve been back on making games. i experimented with making a Minecrap clone in rust+bevy and got super deep into the terrain generation, so now I am a font of knowledge about how Minecraft 1.18+ terrain gen works, ask me anything about density functions and octaves and shit, I guess. One of the most satisfying things was improving the performance of the algorithms and rendering since it was Very Slow at several stages.
I ended up settling on a system that would:
I found that actually building the mesh for a given chunk would take ~2ms, but that doesn’t include generation time (which I moved to an async task pool).
For actually generating chunks, there’s so much information out there about how Minecraft actually does this stuff that it was really easy to solve these problems. Things I liked were the talk by one of the devs on the wiki about terrain generation and the basics of how it works, the wiki which explained density functions, the fact that the worldgen code is literally just json files inside the jar, and of course the mostly-working Deepslate JavaScript library https://github.com/misode/deepslate which had a close-enough noise implementation (although yikes I think the naming of the deeply nested noise classes is not great, not that I could do much better) which helped take a lot of the difficulties of the documentation on the wiki and turn it into code implementation, and led me down the path of using the Visitor pattern for actually handling the deeply nested web of complex operations that involve determining the final density of a given block.
It was slow, so I tried to get SIMD working and struggled with the FastNoise2 library (which has rust bindings, which is nice, but I had to symlink some files to get it to work right as it would build the library in the wrong folder for some reason) and once I did suddenly it was fast, but as is typical with optimization, a complete refactor was necessary. Lots of hours.
Eventually, I decided to move on to other things as I felt like I was neglecting other skills I needed to actually be a competent game dev like modelling, mechanics design, etc. stuff like that that’s a lot more nebulous and way outside of my skill set. So my partner and I did a 5 hour Blender tutorial about making donuts and animating them, and while I think I learned a lot from it I still feel totally lost on how to take the mess of ideas in my head and turn them into a compelling game without getting lost or burnt out along the way. So I’m taking some time off from creation to read Tynan Sylvester’s Designing Games to see if having a bit of a more solid framework will help make it all make sense.
I still feel totally lost in a lot of ways, but I’m trying to take it easy and just idk be kind to myself.
yeah it’s definitely a factor for me, I’m pretty sensitive to smell as is so when sharing space with people it’s difficult to want to be close to someone who I don’t like the smell of.
most of the time with friends it’s not about natural scent tho, it’s about some hair product or laundry detergent or cream or deoderant they use that is very strong.
with romantic partners it’s a huge factor and a prereq to sharing a bed, some people just don’t smell good (their natural scent which I’m sensitive to) to me even if they are very hygienic.