#Saurian Sorcery
1 messages Β· Page 4 of 1
because all the non-blue wavelengths will be extinct as the rays travel far through the water
i want to be here
and I guess beaches look greener because the light can reflect off the sand before all the green/red is absorbed or scattered
and some beaches look greener in particular because the sand is lighter
or because there's algae in the water π³
yeah
btw do you think i should look into any other noises? i'm just using perlin with a power right now
maybe fbm to add layers of detail
yeap then
but i wonder about like
voronoi for one
it probably doesn't matter
the one nice thing about voronoi is that it doesn't tile at all unlike perlin
true
there's a person in the libnoise server (k.jpg) who seems to do a lot of research into noise algorithms
I can gib server invite if you desire
it's the discord server for the FastNoise lib in case you are ever interested
i could also use some sort of distorted noise
mayhaps you want domain warping
the fastnoise lib has a tool for quickly iterating noise combinations
a tool as in online, or in lib?
I think it's in here somewhere
https://github.com/Auburn/FastNoise2/releases/tag/v0.9.7-alpha
it's a standalone exe
called NoiseTool
ah i'll definitely try that then
it's pretty cool
the tool can export base64 strings that you can use directly from the API to generate noise
if only substance wasnt' fucked!
To #showcase with this!
you can make it tile
perlin shows grid artifacts
simplex doesn't really perceivably though, so that'd be another alternative
i didn't mean seamless tiling, i just meant it doesn't have those artifacts that i want to avoid
ic
this game's art style makes me think of yours
https://store.steampowered.com/app/1714040/Super_Auto_Pets/
le mao
hey also my pfp is kind of from that game
ye
thinking about using a bit of inheritence as an april fools joke
currently the only bit i use is to iterate on my editor scene types
it's kind of wacky, i haven't even consciously avoided inheritence, i just haven't ever thought to use it
theres definitely valid use cases for inheritance imo
one good example is some sort of logging interface you let users of your lib supply
any case where i've thought to use inheritence for this project has been better solved by lambdas, because it allows for composition
if there are multiple lambdas, mixing and matching
Yeah thats definitely fair, I do tend to avoid it if possible
Sometimes it's just the cleanest solution though
probably true
It's a bit weird in Rust though, there's no inheritance, just dyn Trait objects that are kind of like polymorphic classes but not really
also this made me realize my april fools joke is canceled

one of the harder parts of the game logic for this game is targeting code, so i'm trying to share more of it
so a big part of me getting 20 fps is the transform code i do
when there are like 2000 models for the level, the loop takes a good bit of time to even get the right memory
because my model structs aren't very lightweight, and none of it is cache coherent
so my choices are to either rework the models and by extension their transforms to be less dumb
or to just specialize the level assets to not use the main transformation system

Do you have a culling function?
nah, can't imagine culling ECS though
I dont know what ecs does but i think you Need some sort of culling
Dont render outside of a casting sphere
Just use raw arrays and screw ECS as a middleware abstraction
You absolutely can cull
i made a mistake
this is stupid, checking if transforms need to be updated is not something that could be culled regardless of whether or not ECS is being used
and this is nearly equivalent to giving someone a lobotomy because they wake up with headaches after a night of drinking
as a response to the problem i actually had anyways
currently on vacation, been thinking
i think the fruits are dead,,,
i do enjoy some level of coherence
also a lot of the art ive seen i do not think i can make fruits look as good as they should
instead i want to do a little spider robot that has a space for something on their back
and so theyll spawn in with a weapon, then go to an objective and drop the weapon to pick up a currency and try to bring it back
banana with a sword
i also wrote out a bunch of ability ideas that have me excited π

i got covid or something similar, teehee
sick programming (at work) has been kinda fun, i can only stay focused for like an hour, which is interesting because it's like the "see a bug? go on a walk to fix it" meme but constantly
i feel enlightened despite going at a snails pace π΄
do you feel, in this moment, euphoric?
nah man i feel like sweat and sleep
if your clothes don't feel like sandpaper and the food tastes like nothing or something disgusting you aren't getting the full covid experience
yeah idk if its actually covid and im too lazy to get tests
im also like extra vaxxed up so
i just have ye old bad fever & throat pain & cough
this do indeed be fixed
whoopsies, i forgot to commit for a while π
Heβs alive!
ya weekend project moment 
Stream on Apple Music & Spotify: https://platoon.lnk.to/isle-of-lofi-004
'Isle of Lofi' is PLATOON's monthly DJ Mix series, exploring the varied facets and themes of chill hip-hop beats. The airy Spring mix for the month of April will leave you feeling refreshed and inspired. Just close your eyes, imagine yourself on a floating Island, and let ...
i wonder how hard it would be to make something in this style
wonder if there's anything out there for converting simple depth based outlines into actual strokes/curves
i'm sure there is, pencil sketch shaders have gotta be pretty explored
random bikeshed thought
i wish transform wasn't a relatively long word
i would use xform but i really don't like shortenings like that
i.e. it feels like there's no "pos" equivalent , sad!
xform is a term used in some software, like 3DS Max, if that can reassure you a bit
yeah we use it at work too, just feels wrong to me for inexplainable reasons :)
I find it ugly too :p
going to invent a new word
going to get rid of scale and call it pose (i was on the phone forgive me for my math dictionary mistakes)
"the fuck"
yeah it's funny as a bonus
1K followers reached ! Thank you π₯³
#indiegame | #gamedev | #madewithunity
141
pretty similar to my levels, just done better
MONKE
opening my models in windows model viewer is a bit funny
its a bit buggy, but i have finally implemented both abilities of a character
and it forced me to fix the pathing so stuff no longer goes into the ramps
comfy aesthetic
yo the trap is so effective it stuns my whole game instead of just the enemy
tryin out some stuff
I think the flying thingy looks a bit weird but the others are cool
it was very temp made
Especially with some spider leg animations the last one could be really fun
i mostly considered the drone idea because it wouldn't need IK or even animations really
Yeah
A drone would be good to have too though
You can balance it around stuff that is better at dealing with flying units
And some things being unable to target them
the right side of the first image and the 2nd use the same base, so the idea with that would be to make 2 or 3 bases and swap out their weapon or what they're holding
Yeah thatβs smart
a nice little lever**
one of the things i wanted to do was add the snakey dragons, and have them affect the map, so like this guy but flying
then with this idea, the important objective could be a dragon egg
wraps up the protagonists vs antagonists in a clean little package, you control lizards, and you are defending dragons against guy with robots who want the dragon eggs
would imply a bunch of work with regards to the dragons though, so it's an idea, not a plan right now
yeah hoping for a countable amount of seconds of gameplay by end of year
sad discovery, gltf doesn't support bone IK constraints by default
granted, that'd be super specific, but still it means i will probably end up hard coding the IK with the code that loads models
i know the intent of gltf is to format data in a way that's easily uploadable essentially straight to gpu, but i wish it was just made relatively similarly with some slight tweaks to be an actual interchange format instead
my feeling is that any program which cares enough about the upload efficiency should be making their own format regardless
sugcon deez
lol
only took me 5 months to come up with that one
damn
algorithms are a lot easier to implement from a desmos graph than they are from a 42 page math paper
is FABRIK ik from anon/void's desmos graph, need to do constraints still tho
surely i wouldn't hard code only one type of constraint that just happens to be the only one i need for this model 
@dry monolith do you know if it matters if i apply the constraints in the backwards step?
it seems to work without https://www.desmos.com/calculator/helpyf3sfk
https://www.desmos.com/calculator/9fufbwdw9x
doing it in the backwards step also... works? but it's hard to tell which is better without more testing
i think conceptually it works better(not really?), so i might as well, just makes it more clamplicated
i see, so i'm locking yaw for certain joints, when i evaluate them forwards, i use (first - prev) instead of (second - first) as the line to move along for the x,y coordinates, and when i evauate backwards, i evaluate two forward instead of one forward, e.g. (third - first) for the x,y coordinates
evaluate z as normal, normalize the combined coordinates, i think that's all good
actually, i guess it's just look forward until there's not a yaw locked joint and use that as the target for the x,y coordinates
you need to apply two-way constraining, that's why it's called forwards AND backwards
though I think this is only for constraining the length, for rotations it's one way
this is technically a plane constraint so basically a rotation constraint
i think i should be able to implement it (with two way pitch exclusive or yaw exclusive constraint), just haven't had the time today yet to try beyond that desmos graph
i don't need to match this behavior exactly (it seems to roll a bit), just looking for the base hip joint to be the only one that changes the yaw of the leg
to make a hinge joint you need a function which would snap point B to the plane around A within min and max angles, so you actually need to define a 2d space within that plane for that you need a 3d basis, you find the projection onto the plane (like XY or XZ or YZ) within that basis and then convert position to polar coordinates, constrain the angle phi and convert back to the cartesian plane
i think this checks out
make a basis from the previous bone as forward, z in my case as up, can rotate the up vector by roll around the forward vector optionally (i wont), should work
weird that the purple joint doesn't affect anything
i didn't have a meaningful constraint to test that wasn't completely locking it, that wouldn't add unneeded complexity
downside of 2d
it's not very odd because it's completely ignored in the formulas, but it's not in my actual code because my actual code looks more like
static v3 constr_lock_xy(v3 x, v3 y, float length, v3 prev) {
return x + math::normalize(v3(prev.xy - x.xy, y.z - x.z)) * length;
}```
i.e. y is used for the z coordinate, but it's unused in constr2 (from desmos)
I dunno what you are talking about but I fixed it
https://www.desmos.com/calculator/abok3ktpht
I have no idea what was the purpose of constr2 and other functions
constr2 was locked to the previous angle
so i'm locking yaw for certain joints
key message, i could've annotated better tho
sounds like you might be doing something nonsensical but I'm not gonna try to dig into it
the desmos graph looked dumb
i don't believe what i'm doing is actually dumb though, i think i understand fabrik well enough now
hm i see
i didn't have exactly the same thing in mind as you, my planar projection idea was a lot more complicated
i'm going to do what i believe you're suggesting
probably good enuogh
i probably don't even need to add angle constraints, but i do need to convert these back to rotations
hmmm
nothing super simple comes to mind for how to improve the steps here
if i overshoot the step locations, i can fix the issue where the legs lag behind a little bit
but then i need some timer for non-moving so that i can adjust the step locations to nice resting positions if the IK is otherwise idle
that should be easy enough, maybe, but i also want to offset the legs so they don't move all at once
and if i just make it so only 2 legs can be in the air (i.e. moving to a new ik target) at the same time, i'm fairly certain that'll only result in more lag
it feels like i need to add in a concept of velocity perhaps
i bet this is something that has a couple of blog posts written about it but i'm not sure what to look for
you need to generate new positions for the feet once old one is out of optimal reach or too close to the body, and then animate it to quickly jump from old position to new while IK follows it
then if the body doesn't move for some time reset all positions to rest pose in random sequence one after another
this is implemented but has the lag problem
make stepping quicker
you can't have the quadruped move like a spider anyways
it will have to gallop or jump or step really quickly before it loses the balance and with really short steps
it's not about speed
it's about average location
if the four half-capsule shaped regions are the allowed IK region, and the dots in the center are optimal IK position, the legs only use the pink regions while moving up
the diagram clearly presents the solution as moving to the other side
but the legs moving offset from each other also needs to work within those constraints
i think i can implement the opposite leg lockout and just see what happens before i think too much about it though
the speed of the legs isn't up to me anyways
it's just a function of allowed IK positions, scale, and speed of whatever is moving
this is why i need the velocity concept :^)
when it changes directions, taking the offset of the pink line in the above diagram doesn't move in the direction it's going, so it crosses and does some zigzagging crap
what is "taking the offset of the pink like"?
new_ik_target = desired_ik_target + step_ahead_dist * normalize(desired_ik_target - current_ik_target)
let me write some drawing code for this
it hasn't done that for me with tear's π
maybe following is different than ones you just sent a message in? that'd be dumb though
actually it might have done that to me
reminds me of how my starred conversations in slack dissapear after like a week
like... i starred it...
slack doesnt even keep a full message history with their free plan iirc
oh they don't with the paid version either
wtf
it's like 3 months for DMs
what about public channels
those are permanent
at least thats good
wow
who knew visualizing what was happening would help debug things
i need to start telling people about this
i sort of wonder if i should just do a phase thing
since i think syncing the legs to have symmetrical movement is important visually
when you move forward one leg should go forward one stay
they do that but because they don't fill the entire cycle, it can be very
gallopy i guess? which isn't intended
which one should be chosen based on how close the current leg position is to the direction it would step to or at random if they have same distance
i just alternate, which is probably fine
this is a bit ranty, but also another reason i probably need to predict with velocity is because legs spend the majority in the back half of their available region, because the available region moves during the interpolation, so they could target a region ahead of what they actually have avialable at time of step location selection
e.g.
basically take dot product to tell which leg should reach forward first, then you could alternate them, but idk how exactly, I'd need to make a sim to design motion for a quadruped
they're already forced to alternate in this gif
I think they should alternate naturally because position is regenerated once a leg reaches the circle border and it is placed at the circle in the direction of movement
so it reaches for the new position instead of being placed at the center of the circle
and the other one is dragged until it gets to the border, then it steps on the circle border again in the direction of movement
lol
it's mostly fixed with velocity prediction, outside of corners, where i need to correct movement π
π
finished?
i need to fix it around corners, calculate the step duration, and make the code not a wreck, but proof of concept seems to be π
it's using delay to alternate legs?
legs 0 and 2 can't move while legs 1 and 3 are moving, and vice versa
i.e. no airtime is allowed
currently it's this shit ass block
This reminds me of something
https://youtu.be/mP4_uzb6M64
It has been 497 days since the last video on this channel. Anyway, this is just a higher quality mirror of this tweet. https://twitter.com/MaxLebled/status/1294300124441710597
... and if you don't know about the meme, this is where it originated from: https://twitter.com/pentaerythrit0l/status/1289820490312200192
Gman stick bug? Gman stick bug.
I love your little bug though
main thing i have left with regards to this is figuring out how to do height
i might just render512x512 or 1024x1024 and copy to CPU
height? render?
yeah
I don't get it
for IK?
is this in context of teh creature?
wait but render what exactly
ah you mean you want legs to actually step on the world
yeap thinkin ahead
why couldn't you just use raycast?
i don't have any physics
the most i have is a binary map of solid tiles so i can place objects on tiles without manually selecting height
can't you raycast graphical meshes in unity?
like without physics
bc pretty sure physics is usually done with proxy geometry anyways so having functionality to trace graphics is completely different use case
i have pixel picking but that's only because i'm already building a perspective render, i could technically CPU rasterize but that's a lot more work than just doing a transfer
wait this isn't unity right
I'm mixing things up real bad lmao
i see hehe
actually there will be a bit more struggle after figuring out step height values, because i wanna do some aligning to normal stuff too π
so when they walk at a 45 degree angle they don't look like shit
I guess you need raycast then /shrug
actually
if you do it like you said with a top down render, you could capture normals too
oh shit actually nah
no by the normal thing i just mean like... the plane from the four step locations
but it's pain because my IK math sucks
but actually i can't do the top down because i really want to be able to do overhangs
so imma just make a simple physics mesh then
but this approach with getting things from GPU to CPU sounds like asking for performance drop
aka add ramps to my voxels
i have a game transform that have a system that updates model transforms
there is an optional component called transform links that offset the model transform when it's set from the game transform
so when i consider setting normals, i can consider setting the game transform, or the model transform, or the link, and i'm not sure which i want to do yet
i'm saying that it's more of a gameplay implication question and i hadn't really thought about why it was confusing
Looks like abstract art
Btw, I found yet another random video that reminded me of your game π
but why
tbh there is a decent chance the first IK iteration of enemies could've looked like that
Looks kinda like the worms use IK lol
#1019758048912359525 message
#1019758048912359525 message
these two messages summarize it i think
i don't have any plans to make more bases for enemies, just this spider one
the variance in enemies will be entirely what is placed onto them
place fruits on them
i did consider that
unfortunately i have been distracted by trying to fix my outlining shader math
watermelon helmet
the whole spider robot idea started with me thinking about adding robot leges to the fruits
i have an issue
with overly academic resources
they make me too annoyed to put in the effort of understanding them
it feels like there's an incentive to make things sound more complicated than they actually are and obfuscate what is actually of interest
but i'm also not super sure of this take because it's not one i hear reasonable people complain about enough
here's an example, finding the actual formula that you can use to generate b splines with
is not easy, even though the formula is super easy, and how it's derived is actually relatively easy to understand as a followup too
i think the problem in this case is that b-splines are generalized to be n-order, even though that's not really a relevant generalization to me
i think most of what eric heitz does is communicated well
this is part of it i think, but what i take issue with is that i don't think the entirety of background is necessary in many cases
and it's not even the resources fault, because they're not necessarily trying to appeal to me or people like me
they're trying to appeal to people like them
which is fair, but it's also what i wish was different
cleaned up the outline effect a bit
it's less jagged now by a bit, and also thinner
the normals didn't get too much of a change, mostly just tuning and being a bit smarter how things are added together
the depth outline uses the classic (1+a^x)^-1 where x is the depth delta, and sums everything together
which works really nicely and is insanely simple
the spiders being really ugly prompted me to fix it, since they're like 60% outline, 40% mesh
i'm also gonna beef the spiders up some to help with that too though
more thoughts
i'm also considering writing some mesh combiner for my levels
currently adding tiles is relatively expensive to the frame cost, since each adds ~8 meshes
the cost of it is relatively flat since they're at least instanced, but i don't have MDI or anything
but i'm not a huge fan of the "single island" sort of look, i want to have a more complete and enclosed level, something more layed out like these
i don't ahaha, i got it off google images

web browser game?
yeah lol
cpu cost or gpu cost?
if cpu, maybe i could take a look
i haven't profiled it enough, i'm pretty sure i'm entirely cpu bottlenecked
could also be my code, let me see how much of an issue it actually is
spamming blocks 
i wonder how realistic it is to tolerate 5-10 FPS on debug builds with full maps
cause the usual case would be release build with full maps, and debug build with test maps
depends on why it is so slow π
if it is vuk, then I'd take a stab at improving it
painful
if it's the usual case, it's painful
why would vuk cause you to be CPU bound to begin with
bugs?
FPS tanking simulator
oopsies i built without tracy symbols, silly me >w<
am i dumb, why do i have stats but it doesn't show the zones in the main view
@severe spruce i'll spend one of these upcoming weekends trying to make a level that tests perf properly and profile it then, if i see time spent in vuk code i'll let you know
feels like this needs more plants
i'm still not super happy with the type of dwelling it is either, feels like lizard homes should be more swiss-cheesy and underground, or hut-like
so i might restart again
silly game idea
it's like what an auto-battler is for tactics games, but for a city builder instead
and auto city builder, where the only inputs you have are like... terraforming or something
u terraform a nice little planet and little guys come and populate it
That sounds pretty fun
get to it terrain boy
i expect to see it on steam four years from now
reproduced some concept art i ofund
i like it a lot, gonna see how i can slot it into the space i have
it is some of the more lizard-plausible architecture i've seen
can't say why though
unfortunately it's quite big, like 8x8 tiles
which is like... most of this map
yeah would have to be off-map
egg cup building
also another building, me finks im gonna go with this
egg cup building is a little weird because you can't see it from top down perspective, but meh
i am doing dumb, irresponsible things
started by refactoring the way that enemies move to their targets so that it'd work better with attachments on the spider bases
which is reasonable
but then i started fucking around with my ability system code, and now i'm fucking around with my timer code
what could go wrong with this relatively large scale code cleanup 
rubber ducking
entt lets you connect signals for construction/destruction of components
the signals have to take the form of void(entt::registry&, entt::entity), but can be member functions if an instance of the class is passed on connection of the signal
so if you need your game scene struct, you can for example
// my system file
void on_my_component_destruction(GameScene* scene, entt::entity) {
MyComponent& my_component = scene->registry.get<MyComponent>(entity);
cout << fmt::format("{} is being deleted", my_component) << endl;
}
// my game scene file
GameScene::GameScene() {
registry.on_destroy<MyComponent>().connect(&GameScene::on_my_component_destruction_forwarder)(*this);
}
void GameScene::on_my_component_destruction_forwarder(entt::registry& registry, entt::entity) {
on_my_component_destruction(this, entity);
}```
the question is how you can pollute your game scene class less, minimizing code change each time you want to add one of these signals 
i do not know, so i am going to ask in entt discord
hidden entt features resolved this π
what feature π
void on_enemy_death(Scene& scene, entt::registry& registry, entt::entity entity);
registry.on_destroy<Enemy>().connect<&on_enemy_death>(*this);
* When used to connect a free function with payload, its signature must be
* such that the instance is the first argument before the ones used to
* define the signal itself.```
it's not in the documentation pages, but documented in the code itsself
I only used the construction/destruction callbacks to log messages lol
yeah they become important :)
spider bases + functional attachments are different entities right now, i have to disconnect the attachments when the base dies
What would that look like then? Do you mean the system you proposed where instead of child/parent you just have components or
just handling child/parent relationship
so having a component that's just something like
entity_id parent;
vector<entity_id> children;
};```
in rust, and managing that
or only having one relationship if it's easier
Oh I see
entt at least has signals for when a component is destroyed, so you can kill children or remove your entity from it's parent child list
Would it not need:
entity_id parent;
entity_id self;
vector<entity_id> children;
};```
and when you're calculating your transform component's world transform, you check if it has a Relationship component and include it if so
you might, when you iterate with entt, the lib i'm used to, the system would look like this
for (auto [entity_id, relationship] : regsitry.view<Relationship>().each()) {
};```
so you always have access to it while iterating over those components
How do you spawn in βprefabsβ then?
What do you do when you need prebuilt hierarchies?
so
if you have a node, and you have both it's children and it's parents, and it's serialized
you're deserializing it, and you're wondering how you do you make sure that once it's done deserializing, everything has the right references
keeping both the parent and the children lets you do that without any searching, because when you add a node, you check if it's parent already exists, or if it's children already exist, and if so, you update those entities
i.e.
void deserialize_node(Registry registry, Node node, EntityID this_id) {
if (registry.exists(node.parent))
registry.get<Relationship>(parent).AddChild(this_id);
for (EntityID child : node.children)
if (registry.exists(child))
registry.get<Relationship>(child).AddParent(this_id);
}```
hmm ok i see now
if you're wondering how to serialize those entity handle's, you can store your own ids on disk, then when you're deserializing, just map id's to entity handles and convert as needed
it's kind of a pain, especially because a lot of this you need fully featured ECS to make reasonable
like if you're deleting a node, with entt you can use on_destroy signals to clean up the relationships
it's ok, with rust i will probably just surround everything with Arc<Mutex<...>> (i think Arc = shared_ptr in cpp?) and implement custom destructors
i am ok with heavy lock contention (there will not be more than 1000s of objects likely)
i could do this and fix the entities that reference the one being deleted
void on_relationship_destroy(Scene& scene, entt::registry& registry, entt::entity entity) {
Relationship& relationship = registry.get<Relationship>(entity);
cleanup_relationship(relationship);
}
void Scene::setup_registry() {
registry.on_destroy<Relationship>().connect<&on_relationship_destroy>(*this);
}```
if destructors work, sweet
the destruction actually doesn't seem too difficult to solve tbh, i think what's more tricky is how graphics data should be deserialized
i think the main issue that signal stuff solves is needing extra data when you destroy
like if you need a reference to the entity registry, but idk how all that works in rust
i will probably just surround the entire transform registry with a mutex and call it a day π
i wonder though, how do you work with this then? say you want to spawn the same object 3 times
you can't deserialize it 3 times, you actually deserialize it once (to not duplicate textures etc) and then spawn from this intermediate deserialized state
is this some kind of general problem as well or is it too niche to coment
this is detached from my ECS
i actually use file references lol
if you want to reference a texture in my engine, you reference it's file path, and it pulls it from cache or loads it if it needs to
ok that makes a lot of sense
so it's like lazy loading, that's smart
i kept thinking about loading everything into memory first, and then on spawn just ensuring it existed in memory already
yeah it's a bit weird for if you're avoiding hiccups
that's actually a really simple solution though, you can just force the load somehow at start maybe and that solves it (?)
maybe some kind of "dummy" spawn at map/level load time could fix it
my code for a tower defense spawner lol
entt::entity instance_prefab(Scene* scene, const SpawnerPrefab& spawner_prefab, v3i location) {
static int i = 0;
auto entity = scene->registry.create();
scene->registry.emplace<Name>(entity, fmt_("{}_{}", "spawner", i++));
scene->registry.emplace<LogicTransform>(entity, v3(location));
scene->registry.emplace<Spawner>(entity, spawner_prefab.level_spawn_info, SpawnStateInfo{}, scene->spawn_state_info);
scene->registry.emplace<FloorOccupier>(entity);
// Preload all of the enemies
for (auto& enemy_info : spawner_prefab.enemies) {
load_asset<ModelCPU>(load_asset<EnemyPrefab>(enemy_info->enemy_prefab_path).base_model_path);
}
return entity;
}```
a little hacky but it would work
specifically the "Preload all of the enemies" part
hahaha
actually it seems to fix a lot of issues, though
i could abstract this a lot, but it's all i need for now
i kind of shoehorned myself into thinking i needed an "intermediate struct" that i could call .spawn() on or something
but lazy loading is actually kind of perfect, ty for inspiration π§
unordered map 
https://github.com/cajallen/spellbook
my code is here, this is pretty outdated though
actually i can commit teehee
tyty
ok i'm gonna go play diablo 4 lmao
hahaha alright, ty for the file path lazy loading idea though ^_^
that's actually extremely clever never thought about it
i stole it but can't say from where π
it's not "lazy" at all π
my scheduled progress point for this weekend is adding the objective for the enemies
i.e. dragon egg, and having them pick it up and turn around
where is my profiling scene 
oh true i did make it
i mostly stopped with it because more of it was gameplay code than i realized and there was less perf problem than i realized
but i will try to get it set up anyways
no promises though because i might just spend 30 hours playing d4
@severe spruce you should be able to run the small level and the large level with this
though tracy indicates that a good portion of the frame is my responsibility
ah no apologies it's missing something
can switch between them like so
do you need anything else from me 
uhh there is a very real chance that i will too
nevertheless, this looks good, i'll let you know if i manage to get it going
π
the only problem i'd suspect you might run into would be on startup, but might just need to delete or edit the stuff in /user/
wait so i got a resources.zip
what else do i need
is there a specific branch or commit
just latest
i commit once every 6 weeks apparently so it should be fine for a while 
the editor saves some of the info about how the UI is configured, so it might try to reload some old data that i don't error handle properly, hence this
ok technically finished scheduled progress π
unfortunately, hard problems arose
not like super hard, but mostly figuring out how to handle enemies while the egg is being carried (i'm assuming they'll switch into heavy aggro mode)
basically...
if egg is not being carried, move to egg and try to pick it up, attack lizards on the way
if i am carrying egg, move to exit
if egg is being carried, either move to carrier or attack lizard (depending on weapon?)
need to do step 3
shrine looks way better
i just activated a first person camera
that i barely remember adding
have no clue how i activated it
and can't get out of it
this is funny to me
apparently it's F
why would i do that
F for phirst-person
Hehe it'd be funny if you made it so you could have a FPP view of enemies and towers
fly i guess
would need a bone π
i have eye bones for the lizards so i could just average them
ummmm
i think my game somehow supports running 2 instances at once?
or something?
i have no fucking clue what's going on
the entity viewer legit has a 1 and 2 overlayed
i accidentally double clicked play
and it looks like the time is jumping back and fourth every frame
what the fuck
the camera is also choppy like that even out of gif
actual progress update also contains bugs, but less catastrophic ones
i think instead of fixing the bugs though, i'm just gonna add another enemy type
though i will rant about something quick
because i added enemies colliding with each other so they wouldn't stack up, there's a non-bug isuse that happens where if two entities have the same target, and are approximately the same distance from it, they push each other away at the same rate and prevent each other from reaching it
that's what happens at the end of the gif (even though one of them is invisible)
i spent a while thinking about this a long time ago on an RTS i worked on for a while
and i think i was trying to be too smart about it
the way that it works now is the enemies have a list of waypoints, and they try to reach them one at a time by calculating the vector to them and moving in that direction, moving on to the next waypoint when they're within some threshold
instead of that, i think i'll just calculate their desired path every single frame, and move in the direction of a waypoint like 0.5 units ahead of the first grid aligned waypint
i was way too scared of recalculating the path, and i was also way too stuck on always moving to the nearest waypoint
so the old way is if i'm the green dot, green would be desired path
and it can lead to the weird scenario where it gets pushed to here
hmmm it can't be 0.5 units ahead of the nearest, it has to be in relation to the current position
maybe projection + x units ahead depending on config for how tight it should stick to the path
least scuffed game engine multithreading
i wonder if i could look ahead by however far i have to project to the path
funny thing is, realistically this case doesn't even fix the problem
since this is what the actual pathfinding would look like
maybe keeping the original path with the projection shit would actually work though
that RTS game had the problem that you could fully push things with units, so it had to handle cases where things got very far away, but i don't here
then it would actually provide this
instead of this
cool, </
> i think
got some more buggy ass gameplay
added 2 new enemy attachments, the first is the middle thing in the first wave which increases the armor of nearby bots
the second is the one that i manually spawn which is a mortar, and gives you some time to move your unit out of the way of it
one of the things i actually need to do relatively soon is preload a list of dependencies
i'm not sure how i want to do that yet
i'll probably just do it manually
so files can list dependencies, then when you load the map it recursively preloads them, probably all i need
it sort of depends on things i haven't figured out yet, like what will be accessible in shops per level, so i can't be too clever with it, and i don't want to do async loading
are you talking about asset dependencies?
for preloading yeah
as in like
not loading during the game, loading everything when the map loads or at least before it's needed
notice during the bow shot the stutter, its cause i just load everythign on demand
the stutter gives it a AAA quality
with my 4mb in actual assets 
im assuming this works in triple A usually by forcing asset references in scripts to be exposed and selected through editor, or scanning the script for them
i dont think theres any better indie solution, i know godot you can preload resources when the script is loaded, and you can recurse that way
in both solutions i cant do them because i dont have scripts
can't you shrimply preload all assets in your assets folder
since they easily fit in memory
maybe it would help to have a manifest to mark assets, then you can just scan that at startup
yes and no
maps for example are actually kind of big
like they take a while to parse/deserialize
and i could just load the strings into ram but eh
but also i have a sponza asset just chillin
I have a new idea
kick off an async loading job for every single asset at startup
then wait on the future when the asset is needed
yeeeeahhhh
i mean i should keep the assets folder relatively organized
so its probably fine
oh also they more gracefully handle unloaded assets ofc
but thats annoying to do
damn i've just been leakin memory for fun any time i make an emitter
payload is not used anywhere π€‘
damn, i'm also pretty close to having gameplay
naked new π±
the main thing stopping this from actually being gameplay is the bugs, but even with them this level is possible
if i moved him to one unit closer so that he could actually attack the start of the path, this wins
i have 6 others π€
i have almost no clue where that one came from though, i guess i was using the emitters to test my timers
the level of sound effects i need was not at all difficult π
i now have a button that i can click that plys a sound

Finally someone whose walls you can realistically live in
thas an old message
clep emerging from the mines
damn
having sounds makes things feel so weird
especially things not having sound
i have realized that i am certainly not a sound guy
when i look at things, it is easy for me to say "that looks good" or "that looks bad" and generally knowing how to fix it
but when i listen to things, i don't really have that same sense, it's kinda just all "eh?... it's okay i guess?"
not that i can't figure it out, just it's interestingly new
I kinda like it but perhaps because I like the shitty stock sfx in japanese games
#engine-dev message
well
turns out i wont care much about sound
cause this aint much fun
3d sound actually makes things sound a lot better
also whoopsies i just realized that the hit sound is in the wrong location, too much effort to remake a video though 
https://github.com/skypjack/entt/wiki/Crash-Course:-events,-signals-and-everything-in-between#signals
i can't tell if this is the most confusing thing i've read in my entire life or if i'm just tired
entt::sigh
it is such a bad name π
afaik this is basically a message bus
also using the term "signal" and "signal handler" interchangably
there is a "bus", on which signal handlers can be registered and signals can be sent (which the signal handlers receive)
skypjack does this thing in his entt docs where he brings up other sections of the library as if the user already knows all about them, but his library is a bit of an a la carte
the things i don't understand about it is what the point of the sink is, and wtf he's doing with the collector
i.e. is this a subscriber/notifier system or is this something that i haven't seen before
the sink is apparently the bus
I fink it's the former
the problem is that there are like 5 ways of referring to this stuff
yes and there are a shit ton of terms in this section π
what is the point of the bus then
i.e. why not have two objects, the object that is essentially a list of functions, and the functions themselves
the "list of functions" is the bus/sink
signals seems to accumulate events, hence the collect thingy with the lambda
If a collector is supplied to the signal when something is published, all the values returned by its listeners are literally collected and used later by the caller. Otherwise, the class works just like a plain signal that emits events from time to time.
the collect thing is optional
"collector" is also a concept that is explained in an entirely different section, which is what i was complaining about here
I feel like I'm on the cusp of understanding why I would want a collector
oh, is that just deferring the handling of the signal?
i don't π
If a collector is supplied to the signal when something is published, all the values returned by its listeners are literally collected and used later by the caller. Otherwise, the class works just like a plain signal that emits events from time to time.
wait okay so you'd like
i forgot that this shit supported returns
ok i think this is irrelevant because i never want to return things from signals, that sounds like a hellish mess of spaghetti
i do not have the IQ for it
i think theoretically you could have a signal in an RPG with a health damage event
I only barely comprehend it because I half-implemented my own event bus class at one point
where you emit the signal, and listeners can say "hey, take less or more damage"
and then back in the damage event, after emitting the signal, they collect, resolving how much damage is actually taken
interesting
wouldn't that rely on the events being processed in a specific order, if the final consumer of the damage event needed to go last
i.e., all the damage modifiers should be processed first
I wonder how RoR does it 
no
ROR bad code, do not consult
no i think it'd be more like
void damage(Scene* scene, entt::entity victim, float premit_amount) {
// get stuff
health.damage_taken_signal.publish(scene, victim, premit_amount);
float modifier = 0;
health.damage_taken_signal.collect([&modifier](float value) { modifier += value; });
health.value -= premit_amount + modifier;
}```
oh that's rather shrimple
i doubt ordering guarantees would be possible, you'd just use different signal handlers for different phases
maybe you could collect into a vector then sort it
but any sort of dependent ordering might require something a bit more bespoke
* A sink is used to connect listeners to signals and to disconnect them.
* The function type for a listener is the one of the signal to which it
* belongs.
*
* The clear separation between a signal and a sink permits to store the former
* as private data member without exposing the publish functionality to the
* users of the class.```
btw it's literally only connecting/disconnecting
with regards to that bottom paragraph:
i sleep, hopefully tomorrow i get turtles ability working
π¬π³
putting my immediate todo list here for fun
- update the healthbars
- add "bench" tiles
- add dependencies for preloading
- turn the attachments
did some tech-debt type stuff and rewrote how my skeleton assets are stored, ~1500KB -> 500KB which is mostly relevant because it's a lot less json parsing
wouldn't have done it just for that alone, but skeletons changed a lot during development so they ended up messy
example of cleanup π€
keeping this at the bottom for this weekend though π
clearing the skeletons out of the closet 
i think the funky shadows in the bottom left might be from a bug
unfortunately i remember the hqx reference being horrendous, and this code is not very readable 
hmmm, not a bug
fixable artifact of hqx me thinks, basically the ambiguity in how to resolve a checkerboard favors changing the pixel,
shows up in other implementations as well
dependencies are done
amazing stuff!
not sure yet
it might be very hard coded, or i've seen one that i liked
it'll probably be the shop, basic UI for currency & stage, and a level select
right yeah you might be able to homebrew it
i don't have any huge interest in UI programming
so it'll be as minimal as possible
who does tbh 
nuklear is what i looked at
i really only need imgui with skinning
so it'll probably be that or just hardcoded
the assassin character can't clear the test level because they have to be melee, but can't be tanky enough to just kill everything
thinking i might do something like not being targetable after getting hit for a couple seconds
everything else i can think of to help them possibly clear the level is basically just a tank in more steps
like reducing enemy damage dealt, not very assassin-y
these are their abilities for now
i liked this interface
i might try to do something similar this weekend, my entity inspection code is very messy
lol
new way to loop over an integer range just dropped
this one is also funny, but at least it claims to be for internal use, so it's ethically ignorable
entt in jack's own paraphrased words is a library full of things that he uses regularly
there are a lot of things that are just better implemented versions of things i've done, so like... fair to him i guess...
he also has a tag for enum classes that enables & | ^ operators
but not implicit conversion to bool or int
which like... i kind of get... but it feels unique to me
like this code
enum class Directions {
none = 0,
left = 0b1 << 0,
right = 0b1 << 1,
up = 0b1 << 2,
down = 0b1 << 3,
_entt_enum_as_bitmask
};
Directions my_dir = Directions::up | Directions::right;
if (bool(my_dir & Directions::down));
what is _entt_enum_as_bitmask
like how is it implemented
doesn't tell me what that thingy in the enum class is doing though
as to how it's implemented, you linked the source
that's all i know
template<typename Type>
struct enum_as_bitmask<Type, std::void_t<decltype(Type::_entt_enum_as_bitmask)>>: std::is_enum<Type> {};
this does it somehow
so usually you need to
template<>
struct entt::enum_as_bitmask<my_flag>
: std::true_type
{};```
and i guess that's automatically implemented with the enum member
some magic in https://skypjack.github.io/entt/enum_8hpp_source.html
nm that's what already been linked
then it uses std::enable_if and checks whether that template has been instanced?
i think i vaguely understand it, the exact details i do not though
wait lol
std::true_type is literally just a type representing true
I tried searching the repo for a definition of _entt_enum_as_bitmask and found nothing
it's here
what is Type::
are you asking me or the world
that line doesn't look like it defines _entt_enum_as_bitmask though
Type is the enum class
ah
what happens if Type doesnt' have _entt_enum_as_bitmask
well, i originally came into these entt examples thinking that i'd try to do an example for everything
but instead i think i'm just going to do examples for stuff that i have a nonzero chance of ever realistically using
do you even?
no
i feel like it's really easy to just use the registry
like i have no clue what the storage shit is right now, but i know that's a big part of the lib
I mean yeah I'm just using the registry stuff since that's all I wanted
ye, i think that's like 10% now xD
45red
- my cat
WHAT DOES THIS MEAN
ok but without despair, what does this actually mean
- i don't get the point of the "external generator"
- wtf is a hash value associated with a type
OH this is a header to the section i just linked, not a standalone section, ok fair
- it's useful for generic programming, when you want to identify a type at runtime
the standard library already has that so yeah idk
https://github.com/skypjack/entt/wiki/Crash-Course:-core-functionalities#unique-sequential-identifiers
what the hell is blud talkin about π₯ π₯
a lot of this
feels like it would only be useful to me if you were writing an ECS
it wouldn't surprise me if there were other use cases, but none that have ever come to me
this is cool though
entt::overloaded func{
[](int value) { /* ... */ },
[](char value) { /* ... */ }
};
func(42);
func('c');```
ok im about to stop reading this
because i am nearing the end of my sanity
but i need to know if this is written coherently
or if my reading comprehension has just gone out the window
i swear to god this documentation in a nutshell is... instead of trying to explain the thing, it's trying to explain the underlying beauty of the thing
ok, groups take ownership from the registry's automatic per-type storage and organize multiple components sequentially, so if you iterate over two components frequently, you can make a group for them and get memory coherency

you can also do it without ownership, but i don't think it matters much and feels like it should have a different name
hmmmm actually
the assassin can now do the first level, but she dies in the process
which sounds bad, but actually, the lizards respawn... so is it really?... π
correction, they're meant to, i haven't implemented it yet
I can't even parse the fourth sentence here (the automatism one)
skypjack is italian so some of the phrasing is weird sometimes
#707607952592470058 message

oh right that's another discord
tl;dr, entt processes have a pause/unpause function
but processes really aren't meant to be interacted with, you really just add them to the scheduler and then let them run, ex: their create function does not return a reference
so i do not understand how you're meant to unpause a process once it's paused
teehee
143 files changed, 804 insertions(+), 8493 deletions(-)
(for context i just moved my general code into a submodule so i could use it with a test project i'm making)
@main cosmos do you have a suggestion on a cmake reference
wdym
i've got
- vuk (and the examples)
- fwogfood
- deccer's template
there's also #1026467818943807579
that i am going to pick one of and copy the bits as i try to understand them
kk i will prob yoink fwogofoods then, since it's the most similar in scope
ok so in the libraries folder... (submodule edition)
- add_library with sources if there is no cmakelists
- add_subdirectory if there is a cmakelists
- target_include_directories for include paths, public if i'm trying to expose it to the main project, private if it's just an internal requirement
- target_link_libraries for any dependencies of the libraries
manually needing to list source files seems like a major flaw of this...
you can glob as well but I don't like it
glob seems very discouraged
Note: We do not recommend using GLOB to collect a list of source files from your source tree. If no CMakeLists.txt file changes when a source is added or removed then the generated build system cannot know when to ask CMake to regenerate.
π₯΄
its the same as forgetting to add the file to the list
yes, either
i don't really mind manually adding, i just would've thought avoiding that a major selling point of any potential build system
a good editor can automatically add files to the list btw
is this the right idea
ye i'll also be running through VS, just need to get used to the UI to know what's happening with that
ye
note: my cmake knowledge is from copying other projects
as long as the errors it gives me when i eventually try to run it aren't a never-ending cycle of torment because i wrote a cmakelists file that isn't even close to correct
well

does it matter if things are in a subdirectory vs root folder
what are "things"?
like i have
add_subdirectory(libs)
add_subdirectory(src)
target_include_directories(academy_editor PUBLIC libs)
target_include_directories(academy_editor PUBLIC src)```
and i kind of want the include directories to be part of the subdirectory
actually this is a better example
target_link_libraries(academy_editor PRIVATE entt fmt magic_enum tinygltf vuk glfw imgui lz4 dtoa)
i feel like libs should link the libs it handles, and this shouldn't be in the root folder
you can put include directories in the root dir
everything is w.r.t. the location of the CMakeLists.txt afaik
the paths?
ye
heres a diff question
if i declare a project in the root dir, project a, and add subdirectory b
can i do the add executable for a in b
or do the commands involving a need to stay in the root dir and i can only e.g. add libraries in subdirectories
uh I think when you do add_subdirectory(...), all the targets declared in that subdir become visible after that line
but not variables unless they are declared with PARENT_SCOPE or something
i would hope its like including a file in c, with the exception of the working dir for file paths
yeah it's kinda like includes but different 
https://cppalliance.org/slack/ there is cmake channel that is pretty good

this stinks
i feel like i need a lobotomy
ok so if i have
libs
libs/CMakeLists
src
src/renderer
src/renderer/CMakeLists
CMakeLists
i have two options i think?
- add the libraries in
libs/CMakeListsthen inrenderer/CMakeLists, i can link to them - i can make an interface library in
libs/CMakeListsand inrenderer/CMakeListsi can link to that interface
what seems to not be an option is - interface library in
libs/CMakeLists, then link in./CMakeLists, and expect that to recursively apply torenderer/CMakeLists
i.e. if i have a subdirectory that makes a library, i should not expect any libraries to be added from parent directories
https://github.com/cajallen/academy
has a working window now
i'm using this project to fuck around with networking whenever i'm feeling numb from gameplay code since i have a lot of that to do
it's partially tempted me to properly set up cmake with saurian sorcery, not because it was at all a pleasant experience, just because build times are quicker
@main cosmos do you have any suggestion/resources for how i set up the server/client executables? just multiple add_executable(s?
I made a library for shared stuff, then separate executables for the client and server
https://github.com/JuanDiegoMontoya/Galunga/blob/networking/CMakeLists.txt
I cannot stress enough how incomplete this is. The most networkingisms I got was sending strings back and forth between clients
but I did bikeshed the architecture a lot with deccer, so it's probably good 
i'm not gonna reference code at all yet
i need to try shit before i understand what i'm trying to solve
good idea
my code isn't good to copy anyways
just some of the ideas may or may not be worth pursuing (like the shared library one)
mine is already set up like add_executable(academy_editor src/main.cpp) so it should be shrimple
π€·
I was intentionally making a simple 2D game (Galaga) so I could focus on the networking stuff more
was thinking about doing something like this
p1 gets control over like 3 ducks that they can set the movement direction of, the other shoots them π
@main cosmos ok sorry one more thing
why did you need to fork enet? i'm having problems wit it
its got some funky installation instructions http://enet.bespin.org/Installation.html
said fork made it header-only iirc and also added ipv6 support and other thingies
and my fork fixed some warnings iirc
think using yours is a bad idea?
it's probably a good idea
does enet even use cmake? maybe that's another reason that I took a fork
it has a cmakelists
but i'm getting unresolved symbols
so i guess i am missing something with it
major bababooey moment
single header means it's probably impossible to screw up linking
hmmm
i have it running now
i wonder if i want to launch executables from an editor
especially when running from VS
cause like... i think i'd need multiple VS instances open otherwise?
interestingly
if i don't make a window, it shares terminals with the parent process
i should probably check how to force terminal creation, because i know msvc has that funkiness with project types
i will be gone a week, so no game progress
i am interested to see what my future self wants to work on π€
also sittin on 85 fps now on this big scene in debug with the help of martty, still a couple more things to do but past the usable benchmark
coincidentally my 100th commit too

tbf, if performance is only bad in debug i personally dont worry about it too much
unless its completely unacceptable then theres probably something wrong
it was ~8fps before
alright yeah thats annoying enough to fix :P
anything <30 feels really bad for me, and >60 just makes it feel nicer to be in π
it's probably not just me
i notice in the range of 0-20 fps, i don't perceive motion much (this is pretty well known)
but in the range of ~30-60 fps, my spatial perception is worse
things feel more 3d as you move a camera around when you go above that
which i haven't seen anyone talk about, only that tracking things is easier, which i guess this is a side effect of, but an unexpected one imo
this is definitely true yeah
30-60 is not comfortable
honestly even 60 feels off sometimes
depends on the context though
exactly yeah
i despise text editing in VS, and can't use rider with cmake, so i was setting up clion
which defaults the toolchain to x86 for some reason, with a drop down to change it
oddly, x64 was not in it, but there was an option to search
and i tried just typing x64 and pressing enter/apply
depsite nothing showing up, that worked?... i did not think there was a chance that would work
i don't think i've ever seen a drop down/text bar combo where you can actually enter things in the text bar that aren't in the drop down
huh, thats weird. ive never had that issue with clion
always worked out of the box for me
i am not the only one π
current thought, i am regretting not implementing a project-specific file path type earlier
i like type systems for ensuring that data that i'm managing is in a format i expect, which i was running into problems with from converting to cmake
since my working directory changed, and that should probably be supported anyways
i do things like hashing file paths, which means they always need to be in the same format (delimiters, absolute, no ..'s, etc.), and i always need to use relative paths when referencing assets
fixing up all instances of file path usage though is a lot, so it's one of the rare cases where i regret not doing something earlier, rather than just fixing it up when the problems arise
you mean a VFS? yeah I β€οΈ my VFS, one of the first things I did on my project
a virtual file system i need to do, but that's not specifically what i'm talking about
i just have a type that wraps a string, and has constructors for strings/filesystem::paths that force convert it to be a relative path, with forward delimiters, and normalizes .. usages
so i can do
FilePath("C:/spellbook/resources/test/my_resource.sbgen")
FilePath("resources/test/my_resource.sbgen")
FilePath("resources\\test/my_resource.sbgen")
and they're all converted to just "resources/test/my_resource.sbgen"
it's not important to construct in code (since why would you use absolute paths in code), but in-editor when you are inputting file paths, it is important
not even at the trying compilation stage
already at 60+ files
smallest geryu commit
this one isn't even me being irresponsible 
shrimply the consequences of changing what one of the core types of your engine is
i might become the joker before i finish this
First message link for pinning: #1019758048912359525 message
it's working again π©






