#archived-modding-development
1 messages · Page 144 of 1
the function is probably very similar to the float / double one
There's this one from stackoverflow with some fancy optimization
int IntPow(int x, uint pow)
{
int ret = 1;
while ( pow != 0 )
{
if ( (pow & 1) == 1 )
ret *= x;
x *= x;
pow >>= 1;
}
return ret;
}```
meh no thanks I don't care that much
just super concerned with perf because people getting lag in infinite grimm is bad
but I suspect it's just memory leaking combined with HK being 32 bit on windows causing it to be super laggy after... say... 6 hours
how can hk memory leak it has pooled prefabs 
idk all I know is it doesn't happen on my pc and I'm on 64 bit
and also don't have background programs updating and scanning for viruses 24/7
Given how dedicated DLKurosh is to playing IG I wouldn't be shocked if he installs the lightest and most minimal OS that can run HK 64 bit just to get around it.
is it even 64 bit
has anyone ever run steam on it
maybe he can be the first
set it to a realtime prio (-21)
load game into ramdisk
get 64GB of ram
that one 32 core cpu
just bypass steam
oh uh kdt, not to knock your code or anything
but I just rewrote your NGG spike position controller to run hundreds of times less often and 10s of times faster
so you made it 10times less efficient per call 🤔
hmm
...no
10s of times faster refering to per call
but
I wouldn't put it past myself to make it less efficient
I added it as a method run only when NKG is casting the spikes instead of every frame and because I did this I could get rid of both:
float zAxis = (grimmFSM.ActiveStateName == "AD Antic" || grimmFSM.ActiveStateName == "AD Fire" ||
grimmFSM.ActiveStateName == "AD Edge" || grimmFSM.ActiveStateName == "GD Antic" ||
grimmFSM.ActiveStateName == "G Dash Recover" ||
grimmFSM.ActiveStateName == "G Dash") ? -1.0f : 1.0f)```
and
`if (spike.ActiveStateName != "Dormant") continue;`
do you look at the code via dnspy rather than the github 🤔
no
but I inverted the if, and wrote out float zAxis so you'd know what I was talking about
you're talking about this
for( int i = 0; i < 15; i++ ){
if ( spikeFsms[i].ActiveStateName == "Dormant" )
{
spikes[i].transform.position = new Vector3((float)(66 + (2.5 * i) + (random.NextDouble() * 2.8)), 4.5f, (fsm.ActiveStateName == "AD Antic" || fsm.ActiveStateName == "AD Fire" || fsm.ActiveStateName == "AD Edge" || fsm.ActiveStateName == "GD Antic" || fsm.ActiveStateName == "G Dash Recover" || fsm.ActiveStateName == "G Dash") ? -1.0f : 1.0f);
//spikes[i].transform.localScale = new Vector3((float)(65 + (3 * i) + (random.NextDouble() * 3.0)), 4.5f, 0.0f);
PlayMakerFSM sFsm = FSMUtility.LocateFSM(spikes[i], "damages_hero");
//sFsm.FsmVariables.GetFsmInt("damageDealt").Value = 1;
}
}
yes
I got rid of the if statement and can safely set the z axis to 1.0f always without the string compare
and uh also got rid of that unused line right below that
thats atleast 7 operations per frame saved
oh and it only runs when he actually casts his spikes instead of every frame
in NGG that's on the order of 100 times less often and in normal grimm it's on the order of 1000
if you want it to be more efficent edit the actual spike fsm state that starts the antic
then you only need to set it once, instead of twice (once vanilla and one modded)
and you dont need to keep references constantly
oh yeah I forgot to mention I also got rid of the vanilla position setting thing
why'd you not just change it to be random
also instead of making spikes go back and forth
if you're editing fsms
just make the fire spawn in the back
thats the only reason that code is there is so spikes spawn infront of fire
so just move the fire back
or just make the spikes spawn in front always
the sprites aren't designed for it and it looks weird sometimes
although it does stop the knight from obscuring them
wait why didn't you just edit the other GameObjects z axis positions
i have no idea what position it is at nor if they are active and have been moved
I assume they are pooled
and they are only created when he does his dash
fun fact
unlike spikes which are permanently active
they're all just gameobjects in the scene
and also
they're all at z=0.0
including the spikes
so you could have just done
spike.z = -0.0001
My point is when you set the spike position you could have just always set their z axis to -0.0001 instead of conditionally setting it to -1 or 1
no
because then it'd be behind the fire
and you can't see it
it has to be infront of the fire when fire is out
what? I'm like pretty sure the z axis is backwards no
but preferably behind the ground so you can't see the bottom of the sprite
well either way, then it'd probably be infront of the ground + player
showing the bottom of the sprite
preferably it'd be at the back, with the fire further back
or move the ground up
maybe
How would I connect two objects with 10 evenly spaced identical 'links'. I tried assigning each link an ID from 0 - 9 and then setting their x position to the (((X of obj 1) - (X of obj2) / (5/ID of the link)) + X of obj 2) and it kind of works but some of the links seem to be missing and they're bunched up closer to one object than the other rather than being evenly spaced
Sorry if i formatted that horribly
what you want to put 10 objects spaced evenly between 2 points?
Yeah
division happens first is why your code is broken
but you can just do Vector3.Lerp(a,b, fraction);
so 10% of the way from a to b is Vector3.Lerp(a,b, 0.1f);
Ok but the thing is I'm doing this in Clickteam fusion 2.5 and not a real coding language so I needed to create a mathematical function for myself 

float lerp(float v0, float v1, float t) {
return (1 - t) * v0 + t * v1;
}
apparently
uh
well then not surprised it isn't working?
but uh yeah do what kdt posted
it's a weighted average
and a thing I've absolutely abused to death in my code
I'd marry weighted averages if they weren't already taken
if your language does orders of operations wrong its
return ((1 - t) * v0) + (t * v1);
tbh it's clickteam fusion so I don't have high hopes
neither can any other successful game devs
I need a like straight math way of doing this
at least going by HK
I gave you one
(x*(1-s)) + (s*y)
although x+s(y-x) works fine too 
I dunno if I can go anymore maths
Would you mind letting me know what those variables represent 
I actually have no idea what I'm doing
v0 or x is the first point
v1 is the second point
t is some value from 0 - 1
what you do for say 10 equally distant points between 0 and 1 is apply that formula and for t insert 0, 1/9, 2/9, ... 1
Thanks a bunch
FNAF was made in Clickteam fusion, how could it not be a great program 

Yeah I think so
Very basic game though just flipping through still images basically
lmao it was written in english dumb cubmaan
Lmao
programming with Microsoft Excel
No Clickteam fusion is actually pretty good, I'm obviously gonna start using a real language once I learn em but it's a usable program
ok but what if you learned a real language now so you don't have to use clickteam fusion
Ok but what if im really fucking lazy
And also paranoid that I'll start learning the wrong language 
Also I don't have wifi for the next week so I actually don't have a choice atm
I'm not gonna try to learn a programming language on data
do you have ethernet
anyway idk if it's the best tool in the world but if you wanna make at least 2d games and have the power of both fsms, scripting, and real code in your hands I'd recommend Godot.
Never heard of it
ethernet's a great invention
i've heard the name godot like twice
it's pretty dang good
I don't have ethernet no
Didn't even see that
Only access to the interwebs I have right now is my mobile data
I also don't know how much I have left
it uses c# as backend, and basically everything is a node with is either a component or a gameobject or some combination of both. And it has a graphical scripting language which is pretty easy to use and work with that lets you string together behaviors.
pygame is obviously the best engine
ncurses
actually ren'py
but uh anyway it's on steam and the entire engine is only like a gig including the mono stuff so I'd give it a try if you want
What about scratch 
We have to teach the kids how to use it at the comp sci summer camps that I help with and every time I use it it's worse than I remember
scratch makes netlogo look good
also that reminds me, I entered a computer programming challenge like a year or so ago and my team was one of four to not use netlogo for our project
we made a ecology simulator in c++ and a very simple sfml rendering engine
and we used numpy to graph the results
there were like 2 other teams using numpy and you can tell because their graphs also looked sexy
(and also exactly the same formatting wise since we all used the defaults)
What's a nor gate?
So none or both?
true only if neither a nor b are true
Oh just none
both is and
it's the mirror of the and gate (not the opposite but the mirror)
if that makes any sense
Oh
this is two inputs
and if both are false
and only if both are false
returns true
Ok got it
In electronics, a logic gate is an idealized or physical device implementing a Boolean function; that is, it performs a logical operation on one or more binary inputs and produces a single binary output. Depending on the context, the term may refer to an ideal logic gate, one...
And xor is one or the other but not both right?
Sorry you guys take less data than google
Ok
Also I've always wondered why you need two =
= is for setting
Yeah I'm already gone
not checking equivilance
ok do me a favor and remind yourself to do this the next time you're gone for more than 3 days without internet
And go download wikipedia http://www.kiwix.org/
O shit
trust me it's 100% worth it
Had no idea that was a thing
although == will attempt to cast things to check
like true == "1" may work on some languages like javascript
but true === "1" wouldn't
Wait no I understood a second ago and now you're talking about casting and theres 3 = and I've lost it
things have types
in certain languages
the languages will try to make the types the same
e.g javascript
so true == "1"
would be true
but === in these languages
a = b // this sets a to be the same value as b
a == b //this checks if a and b are the same value
a === b //this checks if a and b are the same value and type
so 1 == 1f but 1 === 1f doesn't
Watch the wat video
Ok cool, was not expecting the explanation to make that much sense to me
Also as a person who has kiwix, there isn't an so download and wikiversity/books has barely anything on programming
the full download is like 26gb, right?
last I checked
no pictures it's around 10GB
with pictures it gets up into the 80s
how much to download all of my favourite h site
So about 20 for non pics
much more important question
woah I didn't know this website existed https://en.wikisource.org/wiki/Main_Page
look at all these books
why
cuz I like writing bad code that's easy
over writing good code that's probably easier in the long run
wow is this tc
delegates 🤔
I mean if you really want to use unity events
its UnityEvent / AddListener / Invoke
nah this is playmaker events
I'm just copying the code from the playmaker SendEvent function
r u ok
let's just say I'm a monster
PlayMakerFSM.BroadcastEvent ?
I'm making normal infinite grimm more like NGG
public static void BroadcastEvent(FsmEvent fsmEvent)
{
List<PlayMakerFSM> list = new List<PlayMakerFSM>(PlayMakerFSM.FsmList);
foreach (PlayMakerFSM playMakerFSM in list)
{
if (!(playMakerFSM == null) && playMakerFSM.Fsm != null)
{
playMakerFSM.Fsm.ProcessEvent(fsmEvent, null);
}
}
}
which just does this
I'm making infinite grimm classic and infinite grimm modern
this is the new modern one
so if you know what fsm you're trying to broadcast too
yeah
I'm changing a lot of stuff
like there's a cap on the maximum number of hits to stun
at 30 for now
make it faster
but it's gonna get a LOT harder
yeah that's coming too
you can do playmakerFsm.ProcessEvent(FsmEvent.GetFsmEvent(eventName), null);
which is probably way faster
than iterating over every fsm
oh I'm not doing either of those
my code is
SendEventByName spikeAtk = grimmFSM.getState("Spike Attack").getActionsOfType<SendEventByName>()[0];
spikeAtk.Fsm.Event(spikeAtk.eventTarget, spikeAtk.sendEvent.Value);
spikeAtk.Finish();
the last two would be run in the SendEventByName method
but that method isn't getting run anymore
oh wow this is a keyword you don't see a lot
public static FsmEvent GetFsmEvent(string eventName)
{
FsmEvent result;
lock (FsmEvent.syncObj)
{
for (int i = 0; i < FsmEvent.EventList.Count; i++)
{
FsmEvent fsmEvent = FsmEvent.EventList[i];
if (string.CompareOrdinal(fsmEvent.Name, eventName) == 0)
{
return PlayMakerGlobals.IsPlaying ? fsmEvent : new FsmEvent(fsmEvent);
}
}
FsmEvent fsmEvent2 = new FsmEvent(eventName);
result = (PlayMakerGlobals.IsPlaying ? fsmEvent2 : new FsmEvent(fsmEvent2));
}
return result;
}

Why have I done this
vys just got wr
nice
isnt it his bday
Is dat sum new IG?
not quite yet it's still wip
aka play it
but it's gonna have everything you wanted and also be a lot harder
My hand was forced after someone found a way to cheese infinite grimm
and got 250k
That quick heal shape of uun too good!
after 6 hours
Easy 50k
Lol who got 250k?? Haha
Kurosh
I'm done with this fight. There were a few major mistakes every now and then, but that's to be expected from a 6 hour fight, so overall I'm happy with it. Al...
Just disable charms, problem solved
Haha
Make Grimm do more damage with every 5k
that's not happening. Grimm's actually getting more lenient with damage and stuns but faster
so individual mistakes are punished less
but mistakes will be a lot easier
I made this choice because I felt it was too harsh for the game to stutter and someone to lose because of it
but did you fix quick focus
I haven't yet
time to get 10k easy
.... good luck with that
Also I wanna play with the actual game timescale too
so that's gonna be really fun
1.5x is really fun
I might not go that far but I'm thinking 1.25x on top of grimm's increased speed in every other way
also imo make ReduceLagInGrimmFight the default
its not a problem on normal mode and also there's now two reduce lag settings
isn't it even easier to get to 10k+ on normal
well if you turn on lag reduction yes.
hmm
maybe I should make it default because it makes the fight easier just because it increases the contrast
but it ruins the asthetic so no
why do i still have a background
there's two reduce lag settings
gdi
its for testing. I'ma get rid of the first one eventually
and rename the second one to the first one
hmm
not ig
debugmod or modding api then?
it shouldn't be ig
yes
well
basically I have various difficulty increases that happen at certain damage thresholds
that would be especially evil because who wants to fight grimm for 200000 dmg... well besides that one guy
wait how much geo would that be
too much
angle what have you done
right isn't it like way too hard and way too hard out of nowhere?
hey 56
I told you
do you have a save with a ded Nailsmooth
if you can somehow
somehow
find the 6 flame save
that got unpinned from discussion
that one had a dead nailsmith
wait, why was it pinned?
what kind of save was that?
literally ngg
ima slow it down a lot and by slow it down a lot I mean make the spikes take like a second before they actually pop up
got a little under 5k on my first attempt
well guess what
might need a build swap
and not ruin the fun by being too good for the bosses
the only positive
is my code is slightly less shit than NGG code
wait
nvm
no it isn't
well, if it makes you feel any better, have you looked at my code?
some of your code is actually pretty elegant all things considered
...examples?
I mean
you know you can set max delta time
it'd be better served by a switch
will that make the same slow down instead of lag
also I need to make that Moss Prophet guy do the not alive
like 0.4 or something
ok that's kinda high for a single player game
alright I know what I'll do
reduce lag 1 - gets rid of all the gameobjects and stuff
reduce lag 2 - does that
idk though people could cheat with that I think
imagine fighting NGG on especially shitty hardware
gonna have to look at boss rush source code
never even looked at that mod's source before
tbh I know GnG is coming out in a month but I'm sad boss rush never got ported
what kind of mods are in hollow knight?
assembly mods. This ain't like skyrim where 95% of mods are just retextures
what are the other 5% of skyrim mods?
with the actual game time
yeah but those aren't assembly mods usually
unless they're made in skse
ok
although I'd just do it manually and require video verification tbqh
nothing stopping people from using debug to cheat
meh IDC that much about the leaderboard and I'm not really worried about people intentionally cheating as much as people playing on crappy hardware and doing much better than they should because of that
and that's fine
if you keep the score to yourself or play against yourself
nice
nothing happens past the NGG spikes yet
I wanna add a few more changes
5 probably
consider
not putting ngg spikes during pufferfish
until later
for my sanity
thanks
good idea
also the real thing I need to do
is make them very slow on coming up
so you have lots of time to dodge them
at least at first
because I want the spikes to be mildly annoying
not something that is the worst part of the fight
Radiance style spikes where it covers half the arena periodically
heh
see that's another cool idea
but no spikes
it would be fire
so you can't pogo it
and because fire
at 250k The Radiance joins in
can you even pogo at the regular nkg spikes?
yes
ye
w h a t
you can also pogo the radiance spikes
^
i know the radiance spikes but didnt know about the nkg ones being pogoable
nkg spikes being pogable is extremely annoying
I was gonna make the edges of the arena death actually
well not death
but like -2 masks
and ofc I need to speed up the speed that firebats move if I wanna make unn not viable
extend hitbox downwards
maybe but no
as evil as hardmode is gonna be I really don't want to mess with that much established muscle memory
I want people who are good at NKG to be good at IG
with that said
I might get rid of the bat attack but make bats fly in from either side of the screen
since I'm making the sides death
ofc all this is subject to change if any of it becomes unfun
you could make a pillar spawn tbh
doubt you can slug out of the way in time
also if you want annoying spikes without being cancer
you could make them activate way quicker, but in succession instead of all at once
then it'd act similar to radiances pillars
7zip moving stuff into zips is great
never going to unzip to update something ever again
well, I killed the Nailsmith
next challenge is the prophet
who just doesn't want to die
is his trigger the infection of the crossroads?
just delete everything on scene load
@leaden hedge
what's Unn's room called?
anyway I'll figure it all out tomorrow. for now my brain's not in the right space to code anymore
also I'll do the flames better trust me 56
I'll pick better colors
oh I an't sleeping yet
just can't mod anymore
it's in greenpath
why don't you have a thing logging the room you're in papers
debug mod
wow 56 sleeping, this is new
all the greenpath rooms are fungal rooms
homo
fungus1, fungus2, fungus3
btw 56 is shitmodst still happening
ask 753 to release source
or ask him if i can just decompile it and re-release it
cuz i really want to add the "you equip 5 random charms every 10 seconds" addon
damn right
and make it api
Shitmodst Supreme edition
so people can install all of them
oh yeah
also speaking of boss rush the last commit was 8months ago wtf
by a modder who makes closed source mods
ugh this.... kdt... guy really needs to update his mods
has it actually been 8 months of gng soon
yes
was the source code for lightbringer out before you asked him about it
yes
ok
i didn't ask him about it
i just did it
then asked him later after actually wanting to finish the port
inb4 dmca 56 and he has to escape on a different country under the name 78 just to avoid the law
i mean dmca is just take down and its solved 🤔
The plantif... some numbers... hereby charges the defense... some other numbers... with stealing source code
what say you defense
uhh i mean oh ok
setting my git to lf was a mistake
rip
anyway when's your shitmodst happening ttacco
I made mine in a day
and it's really shit
actually believe it or not I stole code from my shitmodst
because it did something good
I steal code from all my mods
and all your mods
not even a full shitmodst i just really want try out random charms every 10 secs, inb4 it crashes on charm unequip while using it 
tbh mine is just dashes
so it's not full either
most of the time was spent getting the advertising working
it mostly works
no it's shitmothst
Ok, this should have removed Unn
hk shitposts are so 2017
celeste shitposts are what is cool https://gfycat.com/WelltodoMajesticAngelfish
this type of file will harm your computer, are you sure you want to keep shitmothst
i mean, hes not wrong about the harm your computer part
WHAT THE
kdt this is art
isn't that the thing you asked a dev about
i asked how his distortion shader worked
56 whats the most efficient way of crashing hollow knight in game
busy loop
crash(true)
oh yeah while loops in a heroupdatehook will crash it
reading unsafe memory has gotten me crashes
multiple times
just make your code unsafe
and do unsafe things
nice
don't read unsafe memory
thats boring
write unsafe memory
its like the lottery if it works
@compact sedge speeding up the game slightly makes it WAY more fun I feel and I think 100% you should do it. I would say after messing around with it a lot that 1.25 is perfect. Its enough to notice the flow of the game increase bit not enough so that the speed alone increase difficulty of the game. Once you get to 1.3 the game starts to get harder and less fun (unless you specifically want the challenge)
1.5
https://gfycat.com/GiganticSpotlessAsp also double shitpost 
also this FSM viewer is really great tbh
Yeah that's definitely one of the things I'll be playing with for making grimm harder
is this 1a dashless
If I ever made a full game mod like Lightbringer one of the features would be 1.25 game speed. Its really fun.
If I make a large mod one of the features will probably be talking to yourself, considering how lonely you are, abandoned in what remains of Hallownest
also pls it would be fun
oh wait
wait is dream nail considered to be a spell FSM?
rebalance charms first big thank
yeah make Heavy Blow not useless
no make fury good
After GnG is out and HK is all finished up, I'll ask TC if I can make an unofficial "mod" using their stuff
give +25% range so spitless is rta viable
They might let me
send tc's stuff
HK Official Modding tools 🔜™
modding tools 🤔
I want to make a "Graig Edit" with rebalanced charms, boss HP, etc
its called unity editor
Also path of Graig lol
Hollow Knight Rebalanced
Hollow Knight Remastered
Hollow Knight: Reeeeeeeeeeeee
Hollow Knight Lifeblood
FUK NO
Fluke Knights yes pls
only 3?!
make people do this but in hk https://gfycat.com/YawningLikelyAdouri
I demand at least 7 per room
isn't that like
make Celeste, but HK
10 frame perfect inputs
per second
or something
i don't remember what you had said
agony
e
tbh these look like those really unfun super mario romhacks kdt
I'd love to make a flying enemy/dark gate platforming bit where its cycle based. And you perfectly get in the rhythm to pogo, void dash, pogo pogo void dash through all the gates
this is my nightmare
if you hate yourself enough then it might be fun
And if you mess it up, your fucked cos the cool down will desync
you have to dash up on the correct frame, jump on a specific frame, grab the frame after you jump, press down and release on the same frame and hold left for 14 frames then tap right and hold down repeat
like 12 times
sounds good
technically theres an rta way to do it
shitmodst is like 10 lines of code
dang I put way more effort into mine then lol
putting alot of effort on a shitpost is something everyone should strive for tbh
I never got to try AA's redwing shitmod
I fixed bugs in it. Like what kind of stupid person would do that
ShitMothds
you mean like having someone ask you to make darkmod
nvm it's like 40
then you spend like 4 days trying to 107% it 
well link's here if you scroll up and in the redwing server so
no excuse not to try
after spending literally 5 minutes making it
Did you ever ToF darkmod?
no sounds cancer
Don't need for 107% m8
become one with the swords, so much that you can predict their location
ok so as far as i can tell
shitmodst is just
the text
blue flash when you attack
stupid sword range
ToF can probably be done
and 999 nail damage
there's also the geo when you die
stuff spawns at consistent places
also 1.1 timescale
but other than that yeah
this would take 10s to port
but I never do ToF in vanilla
note to self: no more effort in shitposts
wtf
I didn't know the nail actually did 999 tho
might be 9999 idk
less effort in shitpost = higher quality
oh nvm found some more stuff
see this is what I'm learning
here I put like, multivariable calculus into mine
now thats alot of bools
you know what would be a shitpost
yes
hollow knight but everytime the knight gets hit it goes faster
hmmm
Y E S
How fast can u boiz data mine GnG????
depends
5
VERY
on how many layers of fsms its on
gng confirmed to be left in beta
aa get looking
u ever just
find ./ -type f -exec dos2unix {} \;
Early 2018 is just anything before August 24 for Australian time
Dec 20
Oh yeah
it'd probably go a lot faster if someone setup a script to figure out differences
btw how easy is it to alter time scale
Use sanic.dll
you can look at my dll
Easy :p
if you want source I can show it
otherwise you can just check if the player is in inactive and just freeze time unless he moves
and you can call it a Super... Super... Superwarm Mod
ive seen several other mods trying to implement Superhot's mechanic
https://hastebin.com/orumucoxah.cpp not sure why it thinks its cpp
nice
ignore the input.getkeydown stuff
globalsettings are read only for some reason
you can probably check what state the player is in to check if they are idle
Mfw i thought hastebin was a typo for pastebin and click the link and it was real 
and set speed to 0
yee
it's hastebin because its fast
hastebin > pastebin
because sonic
syntax highlighting
shitmodst supreme here we go
excuse me what the fuck
also you don't need a lot of that code if all you want is 0 at idle
as most of that code is ensuring the multiplier applied to the lerped slowdown on hit
and you can't be being hit and being idle at the same time
for some reason 
🤔
Glass Soul, but every time you get hit you die
darkmod but everytime you get hit, it gets darker
STEEL SOUL EXCEPT WHEN YOU DIE YOU DIE IRL
Hollow Knight but everytime a day passes GnG release gets closer
Hollow Knight except GnG will actually be released
HK but all OSTs will be released in Steam
Why would you use a vpn for everyday stuff when it slows down your download/upload speeds
privacy?
You think someone is going to be able to track your home addres by your IP
As far as I know the closest thing you can track by an IP is the city you live in
still 
Mystery lives in a city?!
no i'm a machine orchestrating your reality
either that or a shitpost bot
both work
Uh this is dnspy and nothing is broken it's just bad code
isn't that slower than try get value as well
Yes
Best way to do this function would be
Textures.textures.TryGetValue(s, out int i) ? i : -1;
Which I'm sure would compile to something much less clean
Yeah it compiled to this
int i;
if (!Textures.textures.TryGetValue(s, out i))
{
return -1;
}
return i;```
Wait I just realized something
They have a Dictionary<string, int> for texture idx from name
Then a Texture[] to use the index on
Why not just use Dictionary<string, Texture>
that'd be too logical
Wow you can't directly modify fields on things in lists
Can't believe I've never tried that before now
Annoying
Anyone have a image of basic kinematics equations and tension equation 
Are you asking for help with physics homework?
No I'm still working on the same thing as yesterday
Making a ball swing on a chain
I just have no idea how to affect the change in yspeed, cause it can't be constant
So I was gonna look at physics for help
Like how fast should it be falling at the top of a swing compared to the bottom
why
wut
What looks and feels good in a game is not the same as what's accurate to real life physics
^
Just mess with values until it's good
I know, but I can't just say constantly move down by 5
Because when it gets to the bottom it shouldn't be moving down anymore
So what do
If you set bounds for it based on the rope length that's not an issue
Yeah that's what I did but then it stops short at the bottom cause it doesn't want to move up and looks gross
but in that case, if the ball is constantly being pushed downwards, will it ever swing properly?
yeah
Yeah that's my issue
So if it hits the bounds convert some of its speed to the opposite direction
Just mess with it until it looks good
that makes sense, I guess
@tranquil glen do you still want equations for realistic motion
Not hard to look up if he really wants them
^
I do gradow
I can't get this to work
I want super advanced equasions for fluid dynamics in air
in my game about bugs fighting
I'm not trying to model it exactly off real life
I just want the equations so I know how the speed something falls at is affected by a string
Oh whoops
Verulean apparently
Gravity is the only force affecting the speed of which a mass falls
Nothing else
If there's a string pulling up on something it'll fall slower won't it
well
air resistance 🤔
if the string is uncompressable, then it's easy to get the formulas
You dont account for air resistance, usually
And gradow I have gravity for my character but not universally
The ball currently has nothing because I keep retrying new things
Make generic ball physics first as a stepping stone if you're really struggling this much
wtf
It's a 1600 line function for drawing characters
Idk how it works because it's actually impossible to decipher this
But it probably works in a bad way
why tho
this is failing to hypnotize me
Yeah, like I have a ball, that will fall and then if it extends past the length of the chain it bounces back up to equilibrium but I don't know how to make it swing if it's at the length of the chain and not straight vertical
Convert some arbitrary amount of y speed to x speed
Change arbitrary amount until it looks good
Should make it depend on the current angle of the chain too
so, calculating speed is ((original speed) - (some formula based on down))?
what angle is down?
Idk what you're asking
Yeah
what angle is it considered when it's pointing down?
so, you can just add the angle's distance from zero? (no idea what that was called, the |-7| = 7 the thing I don't know what it's called in english)
Absolute value
Mhm
And yeah you could try that and see how it works but it's pretty simplistic
well, isn't a simple solution better than overly complicated formulas?
I wouldn't call it a solution if it looks like crap in motion
How should I stop it from going outside the bounds of the chains?
Create a loop that raises it up if it goes below?
No that's bad
O
If you're aware it's out of the circle bounds you know where the circle bounds are
So just set it back in them
But where in them
Depends on the direction it left from
@blissful burrow
@tranquil glen
//Base assumptions, get these from whatever you already have for the ball/chain
Vector2 center = new Vector2(0, 0);
Vector2 ballPos = new Vector2(12, 3);
float radius = 5f;
//Basic distance checking to see if it's inbounds still
float dist = (float)Math.Sqrt(Math.Pow(center.x - ballPos.x, 2) + Math.Pow(center.y - ballPos.y, 2));
if (dist > radius)
{
//Calculate the angle between the center of the bounding circle and the ball
//Atan2 takes y first for some reason
float angle = (float)Math.Atan2(ballPos.y - center.y, ballPos.x - center.x);
//Calculate the closest inbounds position from that angle
float newX = center.x + radius * (float)Math.Cos(angle);
float newY = center.y + radius * (float)Math.Sin(angle);
//Do something to set the ball back to that
ballPos = new Vector2(newX, newY);
}```
This is good enough but for complete accuracy you'd want to take into account the speed of the ball as well for finding where it left the circle
Reee #speedrunning is leaking into #archived-modding-development
Kill all speedrunners imo
?rank speedrunner
null
Oh ok
No
Guess I'll die
