#code-talk
2 messages Β· Page 11 of 1
Or ', Python accepts both
Print("hello world")
Even better, if you name a variable without doind anything, it also prints, so:
X = "hello world"
X
But that only works on console commands afaik
@barren quarry do you know the conversion from map units to meters?
nevermind, i finally dug it up: length of a region is 1.89 km
width of a region is 2.184 km
surface area of a region is 3.09811 km
playable map length is 9.45 km
playable map width is 12.012 km
playable map surface area is 71.257 km
thanks for posting that previously
Its just a 2 hour walk from one sea to the other
Only language I can imagine enossaji's hello world line to have any meaning is some derivative of postscript
Or worse, a LaTeX rip-off, but primitive and the backslashes are normal slashes and {} has become ()
@long raft but does that answer the eternal question of 1 square's lenght?
1 square? like the in-game map? i am not concerned with that number, but it has been spoken before
people know exactly how big that one is
my next problem is how fast do trucks go. i saw it reported 22mph
how do u speedtest a foxhole vic
i dunno, i can measure distance, so i would assume just drive a large known distance and measure how long it takes
the larger the distance (without borders or hangups) the more accurate it would be
125
drive a fixed distance several times
take the average of that
thats how they did it in ancient times to find the paces and league's
if the height of the map is indeed 9.45km, it seems each square would be anywhere between 123 and 125 meters, since each square fits roughly 15 to 15.5 or so times vertically in a region
@long raft i dont know how fast a truck goes, but an overweight truck goes 75% speed relative to an unloaded truck
oh i read on the wiki its about 40% difference
Interesting, as I tested it for the wiki a week ago
the wiki says 20% faster for empty truck, 20% slower for loaded truck - is that incorrect?
Well, that statement would be mathematically incorrect
100Γ(100%+20%) = 120
120Γ(100%-20%) = 96
And 96β 100
what unreal engine version use the game the next patch?
what?
Dyno pls
Other Changes
Unreal Engine 4.24 Upgrade
The internal engine has been upgraded, bringing several immediate benefits and potential further improvements in the future
@vale ravine from dev branch notes ^
Oh nice thx
do we have the full drawn foxhole map (up to date) anywhere posted? I dont see the large image in the tile repository. I just want to try overlaying the deadlands map posted from the devblog and get ahead on it
@long raft I can stitch something together if you give me some time
we may have to do it again if there is a change, do you have a methodical way?
also i dont know if anyone else is attempting it right now
but yah we have time
skaj posted us the maps from devbranch, so we can have our maps updated before release even
methodical would be doing something with code, but that is outside what I know π
and maybe even the satellite maps
well it doesnt need to be code, im just hoping we have some way that can be repeated and doesn't take a surgeon's hands to do
Well my PSD file has a bunch of guides in it so all I have to do is drag and drop the hexes
π€ im going to try to write a script to automate it probably tomorrow
because it needs to be done a couple times i think. it might also be possible to update the satellite map
this one is 2x AI upscaled. its huge.
Here is the tiled version of the enhanced map, 6 levels this time, converted to webp format (lossless) @barren quarry @chilly burrow @pure sierra @young pilot
oh i guess its the same depth level as last time
I will tile it again with 1 extra zoom level
nope - i wont. its just too big to deal with tonight, gonna need to replace my image library to handle an image that big evidently, lol
it would seem mas production facilities did not get added to the api...
no i think i found it , icon type 51, just never put in the github
oh man skaj truly is foxhole prometheus
@long raft i cant seem to dl your world maps, can you share it for me
anyway that might workl
i uploaded the tiles already tho for the drawn one
sent it again, hopefully youre able to open original and then save it
anybody knows of a discord bot that would ping role X when a role Y is manually set to a player?
Have you tried googling that
the question is kinda specific adn google goes wild on the topic
Tbh, it wouldnt be that hard to program yourself
And that is what this channel is for π
i have 0 knowledge on that thing
Time to start then π
i'd need extensive guidance π
Not really; Discord.py (python toolbox) is quite learnable
and python itself is easy to read imo
But in all seriousness, this channel exists to help with coding (often regarding foxhole auxilerary programs like the arty calculator, websites and planning tools); there are also discords for various programming languages were people help you and you always have the stackoverflow site to help.
As a beginner you need to start small, but there are many programming language tutorials
the only real knowledge you need for this is program flows and certain operands
And some teeth to set into the subject
Ayone know how to make Tic Tac Toe in Pyhton using Ascii?
You need a 3x3 array to make a playing field and then be able to manipulate it per turn
yup
Do you mean how do you print out a tic tac toe board using ascii characters?
@woven plover I can help with some python
But you prolly just want to use a print command of a predetermined grid, then have some variable spots. It requires that your viewer has a constant width font, otherwise you need to be prepped to get messy
Is there a way to return the Team of a player when given their SteamID?
(On a per-WC basis)
you might be able to see which map theyre on and make assumptions
@balmy bridge no
@pure sierra If thereβs code that does it, it can be spoofed
The mods are doing it in-game
what are we doing?
maybe there is in game code/commands, but good luck convincing the game servers you're a mod
@summer bobcat Chat command to look up user data
err we get logs directly from devs, don't need to go in game for that
nah
void yousuck(int score) {
}
its really simple: every piece of code that does something has to be on a new line. ergo. you cant declare a function and open it on the same line.
its the natural order of things
doing it like that means it seems seperate rather than nested
I can read either. but I prefer coding my way π
you only really have a problem if your code has multiple statements on the same line
my method feels tidier
dont do that
that's a whole 'nother oof
except in a for loop. then it sok
it be mildly annoyed if someone typed
for(int x = 0;
x < 10;
x++;)
if you type cs at the top and then do the code on a new line you get fancy colors
ooh
also a for loop immediatly followed by another for loop is also nasty
even though technically correct
tfw someone uses other colors than you https://i.imgur.com/Mvpomz9.gif
What? Is this some kind of C joke I am too Python to understand?
@fervent spear you wanna go man?
don't suppose you guys have seen this? https://i.imgur.com/jYPdrzq.jpg
@languid harness python isnt a real coding languange, its just an interpreter
fight me
@coral sundial What you wanna do? {{}{{{}{}{}}}}{}{}{{{{}}}}?
@coral sundial your machine ass gon' get learnt
π
||| code courtesy of the tf source leak |||
Music: Lifeformed - Baryogenesis
custom files --- https://pastebin.com/raw/e32aG4nP
[ hud / crosshairs / hitsound / killsound / gfx cfg ]
bonus: https://drive.google.com/open?id=1FhFg7xIRBskwQkUhhQ4Ax22vKBDr8Wz3
FAQ:
Q: How did you...
Who tf was it that said you can't do something if there's not an API endpoint?
You're wrong 
You were working so hard on it to see whether you could, you never stopped to think whether your should
I've made a thing that shows differences between maps from current and previous WC: https://mungr.github.io/FMD/
don't look at the source if you don't want to see really bad code. i hacked it together form online examples. works only on PC, not responsive or anything
@chrome karma this is some quality shit
always good to see new brains in this channel
javascript inside html file
very oldschool way of doing things
but it does its job
i told you not to look. single file app π
i was more interested in proof-of-concept for graphical diff, and why are the bridges in godcrofts fucky
looks like it's all new stuff that's borked
and it seems every hex was somewhat altered between the published versions of maps on github
I've split it in 3 files, just to not hear the comment above again π
suggestion: Don't bother with what the war #s were if you are only comparing two wars. Something like Prev/Current sounds better
also being able to zoom in more would be awesome
or at all actually
maybe have map borders visible ?
i'm also making google maps for foxhole π
very much work-in-progress at the moment
@exotic steppe combining the 2 though ain't that trivial
@chrome karma Did you have to buy your own domain for that?
thanks. i'm hosting it on github pages so far. it will need it's own server and domain if it actually gets used
The worse code in the whole world
else if
And 1 man by the name of Alex mahon decicated his game code on it
He created one of the most un optimised game of all time
Yandere simulator
you dont like else if?
Didnt he hire a progrmamer and then bullied him for trying to fix it? @safe hinge
Wanna hear more cringe?
ngl, my current project is at least half hardcoded too, but it's not supposed to be a shippable product
Alex mahon is a wise man
He made a code so weird that even i cringe
And i dont know code
what?? python has no switch?
unbelieveable. but hey C and c++ dont have a switch case for strings either
oh thats not a string match, nevermind
but yah that could better be implemented with a table
@languid harness yep he did
Got mad cause the programmer he hired had a different code than him
I think it was tinybuild
True, python does for some reason not have a switch, but there are (slightly) wonky alternatives: https://data-flair.training/blogs/python-switch-case/
Personally, I never ran into the issue tbh
But then again, I used a table format to store data which just could have been a string, just because I could code the method quicker
Well he might not have that bad of a code
But 20 fps average after updates isnt good either
@zealous sonnet it would seem the api war state endpoint has not been updated. im guessing the game is in practise mode, but api (and deploy screen) suggest past war is still going
@native kernel
Oh also the API seems to show when Rocket sites are built up
So that's cool and good
what do you mean the deploy screen?
Well the API shows the state of rocket sites, and apparently it says if it's built up or not
Haven't seen it myself
OK, im guessing that is unnintended
Just heard from some people that they used it to know when they needed to be watchful for spotters
@pure sierra we havent started a new war yet. it's in resistance mode atm
but yeah the days of war is incorrect
Yeah supposedly nothing has changed here.... are the states giving you incorrect data?
justr double checking
@pure sierra it's always been called resistance. players labelled it practice mode at some point
you called it that
but whatever
im just going to have a look at my logic for interpreting this
it might be ok, could be just hiccup with rollover on my site.
will keep investigating
@pure sierra From the programmers:
there was a hiccup this morning with the API which may have produced incorrect data. An incorrect war id was reported and then the previous war id was reported after we fixed the issue
theres a war id?? 

Itβs just the number I think
Make sense why the major war updates donβt have names or something
Is increasing player count for region servers possible?
Right now player count should be 300 if im not mistaken
Is there a way to boost that to 500 without breaking anything?
Wait
180 for both teams?
I thought its like 150 for wardens 150 for colonials
300 total.
for both
no its like ... 75 or 80 for each faction
75 and then 5 reserved for people driving in from adjacent regions iirc
I think the current game serves 80ish per side @barren quarry
So my question stands
Is it possible to increase this number without breaking the game?
Yup.
Cannot be done currently
It wouldn't directly break the game
But it would cause a lot more lag and other issues
sweat is being produced in liters every day over this question
by mark and company
And as you added more and more players to the servers the lag would get worse and worse
And eventually literally fry the server stack
is an increase in limit planned before v 1.0 though
Well considering they've been consistently upping said limit during the entire development of the game
Sure?
Im asking because i feel like we hit the upper cap of players after seeing how laggy fronts are when full
Theyre borderline unplayable sometimes
yes, we do
The more people within a smaller area the harder the netcode has to work
So it's going to be laggier
Is it technically possible to fix this problem
By doing sone flashy coding which i dont know much about
There are some things which no one knows are possible until they are done
^
Nobody knew trenches would be possible
The easiest "fix" to this is to do a massive cleanup pass of everything
And reduce it's impacts by a ton
But that's pretty damn hard and time consuming
There is no easy way to fix this issue
thats why decay exists
No
Reducing the cost of assets
And of players moving
And of the AIs and stuff
So that the server can do more in the same amount of time and be able to have more peopl nearby
does player movement cost a lot on server?
Probably
Player movement is always hard
And since the server has to calculate position based off of inputs that may not be coming in due to packet loss of stuff like that it's even more complicated
Interesting. I never thought it would be since its a really simple process.
30 times a second you calculate where the player was and where did he move given he has speed X in azimuth Y
^
and also calculate all the interactions
And you need to keep his last position and where you think he's going to be at the next calculation so that if packets don't make it you can display where he's doing
No
No no no no
The first rule of any online game is to never trust anything the client sends
if you trust anything to client you get fucked by cheat engine real hard real fast
^
It's one of the reasons they don't tell the client where all structures are on a map
Can the lag problem be solved by just hosting with better servers
no
More capable and powerful
Nope
there is a limit to every technology
There's a point where you literally cannot scale faster
at least vertically
Did we reach that point
Uh btw
Do you guys think UE4 was the right choice
Or an "X" engine would be better?
What other engine?
whats X engine
UE4 is a good choice
im not qualified enough in game dev to say
It's pretty well known, you can edit the source code yourself if you want, people have experience with it, and it has good base systems to start off with
But yeah there may be better stuff I don't know about
as we say in russia good is the enemy of the perfect
perfect is the enemy of the good...?
its better to know UE4 now than wait for some mythical perfect engine
^^^
right
At the time they started (2016) UE4 was one of the only options out there
At least for what they wanted to do
Should they make an engine from scratch even though it would take like 6 years with a full dev team
Or is it just too unpractical
no
Making an engine from scratch is amazingly hard, takes a massive amount of time, and unless you're a triple A massive studio who can afford to hire 300 people to do it you're never going to get it done
they made red river
That's UE4 based
Red River is TP2 (right?) and it's a better netcode
They've said it's not very compatible
But that some of the things they learned from it have been implemented into Foxhole
if they implemented red river in the summer update im gonna have priapism
Yes
Foxhole is already a modded engine
They had to completely rebuild the UE4 terrain system to allow for trenches, as well as they've been writing and rewriting their own netcode system since the start
since they already changed the terrain
They should make terrain better
Its pretty glitchy rn
and im not saying to shittalk they should do this seriously since its one of the core mechanics in the game
Why u guys talking about stuff that could be in technical stuff
technical chat is for solving problems
yah i agree, if they ever implement a unified server we will all have priapism. Foxhole: Persistent Arousal
Foxhole: Persistent Arousal
( Ν‘Β° ΝΚ Ν‘Β°)
can someone help me with linux please ;_;
yee
I have 0 experience
So I'm trying to SSH but it's giving me a big warning about "unprotected private key file"
ok so I did chmod 400 [filename] and now it's just telling me the key is an invalid format
hmm
i dont know a lot about SSH, maybe this might help you if no one else answers https://www.youtube.com/watch?v=hQWRp-FdTpc
In this video we will learn the fundamentals of SSH along with some basic DevOps and Linux stuff. We will start with a local Ubuntu server on my network and then create a remote Digital Ocean Droplet to work with. We will create sets of SSH keys for those as well as Github. We...
(but yeah sorry 55min video)
there are multiple key formats ssh uses, some clients cant use them all
openssh insists they dont have open permissions, and you fixed that but you might have the wrong key format
might = almost for sure
theres 2 parts to the key, the private key (has both parts) and the certificate or pem file, this is basically only half the key that the server holds
make sure youre using the right one
@long raft I'm trying to connect to an AWS instance with just the .pem file, which is basically
---BEGIN RSA PRIVATE KEY---
key
---END RSA PRIVATE KEY---
i'm doing ssh -i key.pem ec2-user@[ip address], I know the last part is right
I'm just like, why won't it accept my key ;_;
I used PuTTY on Windows, following AWS's own instructions and it wouldn't work rofl
I'll look into this "pageant", thanks Kastow
pageant is a part of putty
you launch it
then add your key file
and this is how your key is used
Also i wish that you keep your sanity while descending into the abyss of AWS
it permanently warped my mind
Personally, I don't even understand the stuff they offer, the 50+ services I've never heard of really
EC2 is big yes, but like wtf kind of name is Elastic Beanstalk
and they offer a ground station if you have a satellite???
yah that look sright but usually the pem is the wrong side of the certificate, you need the private key not the cert generated from it
uhh i think pem can be both. so maybe youre totally doing it right
yah maybe its not the key that matches that username
Because of a recent convo here https://youtu.be/r97nq2h8k9M
Else if else if else if Else if else if else if Else if else if else if Else if else if else if Else if else if else if Else if else if else if Else if else if else if Else if else if else if Else if else if else if Else if else if else if Else if else if else if Else if else ...
ooooof
@languid harness ngl I was never made aware of switch statements until said convo, and I'm trying to graduate in programming

Totale angst hier
Tsh tsh tsh
Tbh, I never had a situation where I had to learn it as it usually could be fixed as quick by just hard coding it
But HBO is no excuse! Its higher education!
Not a fan of hardcoding, but tbh I've never written so much code that else if statements actually had an impact on performance
So I never noticed the detrimental effects either
But HBO is no excuse! Its higher education!
When I do graduate I'll still be googling like 3 out of 5 things
You will once you buy a Raspberry pi nano or similar 'for fun'
Used to have an arduino. Couldn't make heads or tails of C
Oh that googling is just life for any engineer. The internet is invented for exactly that lol.
First time I had my C# class I couldn't understand any of it, not even at the exam. It wasn't until I had to retake the class that it suddenly clicked on the first day.
C is shite
Funny image
Bottom text
This meme is made by someone who has had to endure 3 different languages in uni which are all worthless and outdated gang
inb4 turtle had to do cobol
h
I had to do 1 subject in a developmental programming languages where the only reference is the things directly supplied bu the subject as google could not help me at all
There was no documentation of any code to be found on the internet. Only people asking if someone can help with it, balantly unaware that it exists in a vacuum
Reminds me of the time we used Flutter
Sounds awfull already
It was only like 4 months old by then
So all we had was the official documentation and like 4 stack overflow posts
Lol
I also had to learn a specialist program from the 90s, which just got a visual interface like 10 years ago, but it is so poor that you have to type in every command instead. There are 3 courses using it extensivly and afaik it is barely used in companies
Or I say had, still have to do a course
The only thing worse is this
OP: "I have this problem, how do I fix it?"
1 reply, also OP: "nevermind I fixed it"
Well, don't keep us in suspense
last replied 2011
Talking about terrible interface, may I introduce you to SAP Business One?
And that even looks better than what I had to use
Timber, I am talking about a 3D rendering environment where if you want to select a node, you have to be pixel perfect
GodDAMN am I glad I didn't pick those classes
if you want to select a node, you have to be pixel perfect
Lol
tbh I can't even work with blender
Having to seperately select and move an item across each axis seperately (one after the other) is just awful and takes way longer than it should
I don't see how any 3d artist can put out a model in anything less than 3 weeks without finding a way to move an object across more than 1 axis at a time
Well, just measure it out lol
assuming said model is like 40 individual pieces and not a single sculpture
measure... it out?
Imagine building IKEA furniture in Blender
rip
I don't mean model it, I mean putting all the ready-made pieces together
inventor 2020?
@kind glacier you can move an object on a plane by using shift + the axis you dont want your object to be moved on
(after pressing g of course)
Inventor really isnt meant for modeling lmao
i think the worst one is when you google an error and only find a single thread that has replies of people trying to help but the OP ending by saying they found out the problem and fixed it without saying how they did so
you made me read this whole thread for nothing?!
the worst one is when 1 person poses your exact problem, there is no response except a moderator saying it's been closed due to inactivity
because obviously it hasnt been fixed if youre experiencing it
+[--->++<]>+.-[--->+<]>---.++++++++.---[++>---<]>..++[--->++<]>.--[->++++<]>+.----------.++++++.-[---->+<]>+++.++[->+++<]>+.++++++++.+++++.[---->+<]>+++.---[->++++<]>-.----.[--->+<]>-----.[->+++<]>++.+++++++++++++.+++.-------------.-.-[--->+<]>-.--[->++++<]>+.----------.++++++.-[---->+<]>+++.++[->+++<]>+.--.+++++++++.+++++++.------------.+++++.---------.+++++++.-[--->+<]>.-[---->+<]>++.+[->+++<]>+.+.--.++++++.-----.+.-.-[--->+<]>-.---[->++++<]>.-----.[--->+<]>-----.---[----->++<]>.-------------.----.+++.-[--->+<]>-.---[->++++<]>.------------.+.++++++++++.+[++>---<]>.
Brainkfuck
We dont speak about brainfuck
fuckbrain
holaaa
Feels like that one code that can only run if a comment was inserted somewhere in the middle as a sort of delay of the system
if you have a list of stuff you dont start a list at 0 π
Its fun when you code in different languages and they do it differently
Its more fun when some of those languages allow wrapping around when you go negative, and some don't
really helps my brain
tbh even though i've never used 1 as a start it's fairly stupid to start at 0 from a human user point of view
I dont think so, because you could reason the number is the amount of steps, with 0 being zero steps, aka the first place. Also, in some situations, like tables, the 0 is used for the title of a column
Both have arguments, and 0 would be logical for historical reasons
there are only 9 numbers
0 to 9
if you start from 1, you cant make a 10
the only reason ya'll start from 1 is because you dont start counting when you have nothing of something
if i index an array at array[9] that should be the 9th index not the 10th π
Imagine counting decimatic
Anyone knows the RGB for scorched towns? Can't find it in the readme
SC447RIMBDIM0300BLEDEEBIM-07BLE
@neat fossil I just match it with my eye in photoshop, do you still need an approximate color code?
I ended up doing that. Thanks
i give up on using this method of colour assignment
i really cant
i tried applying a mask on the colour layer and then blending it with the original but it still gives a scuffed image
var MapIconStaticBase1Col = MapIconStaticBase1.clone().composite(ColourColonial.clone().mask(MapIconStaticBase1, 0, 0), 0, 0, {mode: Jimp.BLEND_MULTIPLY});
if i try to use colour mixes i get this
guess ill just directly use an image of MapIconStaticBase1Colonial instead of trying to create my own using jimp..
Good attempt π
flashback to 1 year ago when i tried the same thing and gave up
you can use filters in css to apply color changes, but it might be tricky to dial it in perfect, an example:
filter: brightness(90%) sepia(25%) saturate(90)
brightness adjusts for some extra range, sepia gives it color (from white), and saturate adjusts that color
theres other filters available too, but yah it would be kind of tricky to nail it perfect, although its mathematically possible
theres contrast and hue-rotate also
After a fantastic campaign posting in every single channel, Otizzle fixes the game singlehandedly. Truly the man of the hour.
If unmoderated:
Moderate();
end
else:
panic();
syntax error
time to panic
if ServerLagAmount > Acceptable:
print(OMG Colonial bias all collies are cheaters) ;
Should have put a when
I almost can make a light blink with an arduino! π
Ide iirc
Because I want maximum spam
You won't be called before a loooooong time 
Nvm. Figered it out.
@coral sundial real men learn the assembly for their micros
True Chads do boolean logic
holyc
@frozen oriole hello im your resident arduino master
Shit gets real when you get to PWM logic
Whatβs your board if you dont mind me asking
please no PWM
because IDE is a weird C abstraction
made with a java based text editor
I am pretty sure the sole reason I dislike IDE is the fact that it lacks an autocomplete
my teachers always told me arduino IDE is just C++ plus
anyways yeah you can PWM
would be stupid if you couldn't do so when using an arduino board
its based on c/c++. infact if you change your compiler settings you can write c++ code for your microprocessor as well. its just that several functions dont work.
the way I understood it, is that arduino IDE is a layer of abstraction. like game engines/frameworks are to computer hardware. if you use C, youre closer to the hardware itself.
you can code directly to the functions of the microprocessors themselves with IDE though
it really depends how you use it
yeah, because IDE passes it through a c compiler anyway. after doing some optimizations of itself
i just realized that a discord bot is nothing more than a websocket room between the discord server and your server
if caca then caca = true
Is there a way to change a disk partition to rtfm or ntfs without completely erasing the data?
yes, let me find it
Converting a drive using these steps will preserve the files on the drive. We still recommend making sure you have backups of all files on the drive.
Find the letter of drive you want to convert. Open File Explorer, and in the left pane, look for the drive under "This PC" or "Computer."
Press the Windows logo key + R to open the Run dialog box.
Enter cmd to open the command prompt window.
At the command line prompt, type convert drive: /fs:ntfs
For example, if the letter of the drive you want to convert is e, you would type convert e: /fs:ntfs```
Relevant section
Thanks!
You shouldn't lose any data, but I still recommend a back up as always.
Haha it said fat
7 segment display I made with an arduino π
I need to write a function that just converts timer1 CTC mode from giving a frequency to a compare number
my math right now is off and it will never be truly a second
π€
Catch me letting remlly give my arduino a virus π€π€π€
Lmao
Hahahahahahahaha How The Frick Is Getting a Virus On Your Arduino Real Hahahaha Dude Just Reset Your Mini Computer Board Like Dude Just Spend 10 bucks On a New One Haha
You can't even send keyboard signals and mouse signals unless it's an arduino mini iirc
You just need a script which does
But an arduino should not perform on his own
For that you have stuff like arduino's
Raspberry pi?
you can definitely use inputs like a mouse for the arduino due
why you would want to do that for an arduino i have no idea
making a GUI for hardware on your computer, and using an arduino for control of the hardware
though that requires knowledge of how to communicate with the arduino of which I thus far havent found much
just use a library for that shit
yeah get me one that has both GUI support and serial communication support in preferably C and has an active community that can help me set up that shit because I DONT GET compiling shit
wait so are you just trying to communicate with the arduino or are you trying to use the arduino to interpret the hardware inputs?
communicate with
I wanted to display the position of a stepper motor on screen
with a graphic image that moves every step the motor takes
ive got a framework that works beatifully on the pc end. its just communicating with the arduino that wont help
mmmh i did something related to that once
i had to use a normal stepper motor library for the arduino (actually it was a teensy) and i made it so all the information it receives from the motor would be translated into simple data strings that the computer could recognize
I mean honestly, for me it could be as simple as just sending one or two integers through the arduino and interpreting them on the PC
I work mostly in C anyway (I still dislike IDE)
you're really making your life harder if you dont just use IDE
many libraries are made for it
yeah but the lower acces to the microprocessor hardware is worth it
depends if you're actually going to use that lower access
for more complicated projects... yes π
well yeah but arduino isnt really for complicated projects 
or as my book tells me "the arduino is great for plugging a few LEDs or a couple of sensors into. But when things get intersting, I end up having to jumper the arduino breadboard with 10 or more wires like a demented spider"
really though, in the end I want to just plug in a microprocessor for a project instead of using an arduino board
cmon not in code talk, this place is sacred

Get back to #foxhole-discussion no one likes code...
Glory for C language
I love to think that he got muted for saying that specifically
python masterrace lmao
Uncompiled languages is not the way to go, thou shall search the holy Program Efficiency
Imagine being unable to beute force thinga
JIT compiling to rule them all
to the people that code, how useful is c++
A lot of qualitiy of life from C
Is a in-between C and Interpretd languages.
The libraries add good data structures
if you learn c++ does learning C or python become easier?
Knowing any programming language makes any other language easier to learn imho
The more you diversify the more you learn the underlying concepts instead of just the syntax/libraries
isn't c++ just c with objects?
the more pluses the better right?
c++ is very different really, polymorphism, templates, casting, the standard libraries, theres a lot of difference
c++ changes regularly and C is pretty static now
alright
all the important libraries and OS code is written in C, its like only games are written in c++ now
machine learning is like almost entirely in python now
i wrote a regular expression to detect spaces, but the whole string can't be a single space, and it looks like this
( .|. )
could also be (. | .)
I feel like there's a better solution for this than regex
i would have agreed before i saw what the regex looked like
...but does it detect mongolian zero-width spaces?? HUH!?
i actually cannot think of a faster way to write that test
for (i in str.length) {
if (str[i] == ' ') {}
}
Not faster to write, but faster to execute
It will use a regex engine
yah, theyre fast
slower than iterating a string once
If I was a betting man I might bet it's language dependant
any good regex library should be better
Do you have any data handy so I dont have to google myself?
no
Google it is
i just ... know how regex engines work
Apprently .NET regex engine is trash then
its pretty good, i dont think it's utilizing the new span features tho
its definitely got a lot of features and power
its going to take more time to parse an expression and turn that into a scanner, but if youre doing a lot of string reads the regex is going to be better
youre not sharing enough in the delight of accidentally writing a (. | .) regex
Plenty of delight in writing a short perf test for it tho :>
Newer regex implementation -> more better
Clearly, loop is the superior choice here though
Bruh
Its 69
The funny number
Its 2 am im not going to do the science
Pretty much same speed though yeah
oh jeez youre right i didnt even see that
No matter how long a string I choose regex on newer net version is usually couple millis faster
the regex will be faster when more types of white space are added
How would it run the regex without doing at least the same number of comparison operations though? you seem well-versed in regex
it builds a lookup table - when it sees this character, jump to this new table
no if statements needed, just memory accessing
That cannot be faster than machine code though, can it?
uhh generally on a CPU memory access is faster than a branch statement
branches can really screw up pipelining
assuming the lookup tables get cached in memory they'll be extremely fast
it uses more memory and takes parsing/compiling time, but the execution time should be faster than some custom string scanner
Well depends on how fast your memory is I guess
Maybe Im using a cpu from 1894??? huh???
i think on a GPU a memory access that's a cache miss is like 200 ns
modern cpus are really really fast at memory in my opinion
Multilevel cache is your friend
i would also point out the for loop needs to also check the entire string to make sure its not " "
which is another iteration of the whole string (although faster)
Dotnetperls says loop with switch for all the chars is faster than regex... too lazy to test it out rn though
can just test length and the first character, but thats more conditional statements
about 70x
Again might be old regex engine version tho
c# has the new span arrays that are hella fast for character arrays
so that might get you a boost over a regex
Which lang ver did those get introduced?
maybe 6.0?
so old
Might have something to do with it
well the c# regex dates back to like ... 1.0
Yeah it got updated a bunch for .net core though
they rewrote some of the core components to use spans and got much better performance out of stuff
the real way to code is to input your source code in a serial data stream manually, like this https://imgur.com/a/5ggtDaH of course it was a great contraption, basically a research project I did to demonstrate the use of a shift register
it isn't arduino it's a shift register from long before arduino existed
10000100010100010010111000001111110000111000100001101001000011111010001000000
Ogonek-1, I Ogonek-2.
@fickle aurora this is the solder police you are being arrested for lack of common decency
is that a fucking paper capacitor
@barren quarry @pure sierra new map tiles
@long raft thanks but I already updated the tiles
oh ok, so fast
Sat tiles too
not so redundant after all
π
poor oarbreaker

wait wtf adobe flash is going to be removed from browsers
yep
welp goodbye flash games
rip newgrounds
actually apparently they're developing a flash specifically for newgrounds
Rip
An entire generation went through school on flash
Playing on the school computer when teach wasn't looking
nice
i found this cool thing if you want to easily throw together a mobile app, its very solid, fun and versatile https://appinventor.mit.edu/
yeah
RIP
he guys is a god
Terry Davis (author of TempleOS) demos his SimStructure physics simulator.
Here he makes a PID controller (https://en.wikipedia.org/wiki/PID_controller) based on math from the book "Numerical Recipes In C".
PID controllers are found everywhere today. They control rockets...
he was at least very prolific.
When will foxhole be ported to TempleOS?
no network, bruh
finally an excuse for single player foxhole
A remix of the Hymn you hear on most TempleOS videos
Download
In the spirit of TempleOS and to honor Terry Davis, this song is released into the public domain - you may use it however you wish.
Download: https://music.daveeddy.com/tracks/templeos-hymn-risen-remix/
Ban...

tfw the error points to line 253 in a file you've never even heard of
That moment it errors and it only gives a reference to a code line in the package you using and you go there and it is just a 1000+ character action
yerp
123
seg fault
Hey guys. Is there any open api for foxhole?
Only found this project > https://github.com/clapfoot/warapi
I keep hearing people talking about game jams and how great they are
But I can't do that in a weekend
I need a week just to understand how unity works, and another week at least before I even have something of a 2d platformer
ah hell, now I'm thinking about how I might use that API
But I'm pretty sure Kastow might already be doing that
aagh, I can't get the idea out of my head now
A game jam is not for learning how to use a program
You use the 48 hours to apply whwt you learnt
@mint cosmos Yes that's the dev's API we are allowed to use
A game jam is not for learning how to use a program
I assumed as much, which is why I'll never be able to participate in one
even if I wanted to
Β―_(γ)_/Β―
Well, you can always make tic tac toe or a cheesy foxhole inspired card game to get the basics
I suppose I'm more of the 'think big and take it slow'
It's usually how I do art when I do do art
nah, the biggest mistake you can make is take on a project out of scope for a lone programmer. you will just get frustrated or dwarved by the amount of work and just shelve it for later
Maybe. But so long as I make small progress I like working at it.
The tank rush and snowy pieces I did were not things I had planned out
I knew what I wanted the end result to be, but from there I just iterated one step at a time
how do you make a clan?
yes
You Create a Discord Channel π
clan ()
{
create();
}
$clan = new clan();
Ew
Import discord.py as dis
Clan = []
for n:100
Clan(1,n) = dis.create("attempt" + str(n))
if n<100
Clan(2,n) = "fail"
else
Clan(2,n) = "particial succes"
end
end
print(Clan)

Wot? I didnβt type shit here...
@zealous sonnet @humble spear it seems there might be error with the war time endpoint not reporting correctly, have not investigated but my website war time is not correct
map just reset, so seems same error as last time
resistance mode time is now reporting correct,
also you have set required victory towns in api to 20, yet not that many available, unless this is intentional
also in game day count is wrong, just like last time.
why are samwise frodo and i not in the top 250 for our fellowship of the component
we spent like an hour to get to mount doom
@pure sierra what are you saying is wrong in game, βwar 59β? It is war 59, or was now that itβs over
so it seems everything on my site is ok after all, just displayed correctly the incorrect data during map reset.




a proper 4 bit adder https://imgur.com/gallery/Sw0ulUj
it is designed to be analog output actually but of course making it digital just means providing a flat line voltage to the input and common in
@fickle aurora whats the thing at the top of the board ?
at the top it is called a network resistor, so basically instead of making 8 separate current limiting resistors, you can use this device... it has 1 common pin connected to 8 resistors (or more if you get network resistors with more pins) so 9 pins total in this case, then I connect the common to ground and use it on the ground side pin of each LED
in this case of course this one was 470 ohms on each pin, though you can get them with different resistances
the chip in the middle is the CD4051BE, nothing really fancy but I used a USB micro B connector to provide 5 volts conveniently with just a USB cable
input syntax to avoid floating condition
so floating would be if you didn't pull the input pin of your IC to ground, but in this case if you follow that syntax, your input pins should always either be grounded for low or connected to positive for high (also assuming your IC follows this standard)
if the input pins are left floating, what happens is your output will look wonky, like nothing will work properly, some of the LEDs will flash or look dim when they should be off
the back certainly doesn't look pretty but it works, and of course the USB connector doesnt have to be perfectly mounted, I usually just use the wide flat part and solder that directly to some large copper traces to hold it there and then break off the 3 center pins to avoid zapping the USB port, all you need are the 2 outside pins for power
the wires make me sick
75 years later and computers are still big rooms full of wires and tubes
oeh nice
still waiting for my gps reciever and lcd screen from ali
they're 2 weeks late
π
a lot of those pictures are not necessarily data centers, often they are industrial automation controllers, and often the same RJ-45 connector is used for RS485 which is not compatible at all with ethernet but uses the same wires for purely convenience
the triconex PLC system is a great example, you will see what looks like hundreds of ethernet connections on the back but it turns out what looks like a bunch of network connections are control wires used to transmit analog data signals from field/plant equipment to a centralized control system, the internal workings are often microcontrollers/microprocessors that of course end up switching relays or outputting analog control signals
I can imagine programming is quite boring compared to EE, like if a program doesn't work, you just get an error message; when you accidentally put full line voltage through a tiny microprocessor, the error message is more spectacular involving popping sounds and smoke
@coral sundial china mail very slow currently due to limited flights etc
cheapest I can source 328p in DIP package is like 1.55CAD each from ali, probably not genuine but the last batch I got worked fine .. it is cheaper to use these than to make projects with multiple discrete ICs
there are also the pro mini clones selling for about that price also, I have tons of those but they are not good for motor control projects because they die really fast with a sudden voltage/current fluctuation or whatever
I usually go from the pins out to ULN2003 or to a BC547 and then from there to relay then to motor, of course 4 relays per motor to make forward/reverse function
328p (nano) is my classic too, and can do 4mhz 1.8v. 32u4 (promicro) is nice too due to native usb but only goes down to 8mhz ~2.8v due to usb
I made a real newbie mistake with the breadboarded 328p, so I used internal 8mhz clock and couldn't figure out why the thing had such a problem with 5 volt supply, but thankfully no damage
328 can handle 5v fine at any speed
the thing with voltage and speed is just that at lower voltage u need lower speed for stability
@fickle aurora
this is the chart for the 328p DIP
you're right I think the problem was ripple from power supply
generally they recommend a coulpe of caps on the vcc if not battery powered
also a tip, if you are running serial at 4mhz better with 3.6864mhz crystal
is there any benefit to power it 5.5v rather than 4.5v?
no
I just have all 20mhz crystals, the 16mhz ones are overpriced due to popularity and the others are somewhat redundant I find
there are some chinese branded microcontrollers well over 100Mhz but their prices are still too high for me, if it's more than a couple dollars it's not worth using imo, unless it is specialized like for USB implementation or something
one thing I have not yet tried is using pins from a 40pin parallel port to control something, though, I do have a parallel/serial port PCIe card with working windows 10 drivers so I will eventually get started on some of those projects
101010101101010?
oof
dont develop on production
dont develop on production
dont develop on production
I though it was a bug from map, but nah. π«
π
added indication of who made noot area
@pure sierra Cool feature, nice job
@long raft did you finish that project ?! well done !! https://www.logiwaze.com
@pure sierra i like the new features, much more informative.
@ocean cobalt thanks, still working out some bugs, but i like i too
Ah thank you
I feel like it needs a lot more work to be useful but it's hard to stay motivated
you should put somewhere on it who made it ! its very cool, you did a good job
the youtube selector doesn work very well in ff for me though
also did think it seemed a bit strange that it was only 7.6km from almost north to south in your default example, but that just likely the devs wierd scale
hmm i dont not feel confident about the driving time estimates, but i feel pretty solid on the distances being accurate
i must admit ive never tested this in firefox once
i recently redrew every road and marked them according to their road tier
also what hapenned to the really nice sat view you guys made, the current one, (same on the other sites) its pretty crap now compared
and then when i did my drive speed tests i couldnt calculate any difference between their speeds - matt says the top speed should be different, but i feel like i wasted a bunch of time
elevation makes a bigger impact on road speed and i dont have that data, and damnit i want that elevation data
so they took free cam away basically, and kastow and mulon had a really hard time getting the devs to accomodate them and let them take satellite pictures in devbranch before anything was built
but the alternative, someone, maybe skaj, or maybe kas/mulon found the unprocessed map textures in the assets used to create the drawn map
but it lacks rocks and trees and stuff, but its the closest thing we have, and its at least pixel-accurate
so that's the foxholeglobal map
not worth too much time
also, the devbranch version of the unprocessed maps had road tiers colored, but then the next dev branch colored them all orange, so for a split second we had a picture of the road tiers
yes, topo maps we need bad
and i copied all of those...
i never thought about how we did nt have that data yet it makes a big difference, especially now with the new driving physics
im not sure it does
make a big difference ?
yah, i cant determine a speed difference
i wanted to weigh the route calculation by road tier but it doesnt seem to make a big difference and matt wont tell me what the hard numbers are
i find myself wondering if the devs have a tool similar to this, because warden routes are longer, and i wonder if they just eyeball it
i wouldnt have though there would be much difference in road tier
and colonial routes to important places have more tier 3 roads the entire way
i didnt realise there was a difference in road tiers
i thought all roads where same speed pretty much, unless track of coarse
oh is that where it affects? maybe i should have tested with something besides a regular truck
i want that heightmap data so bad tho
i know
everybody wants it, its huge for roads because you go faster downhill by a lot
partly i think they would think it took away some of the mystery of exploring
its super important for arti calculation
its important for planning where to build bases...
we need a campaign to get that data
the other part is they just dont want any extra work
i cant imagine its a ton of work to export the height map
doesn't have to be done all that often
you should put your name credit and contact on the website and get the devs to add it too their homepage.
even get @barren quarry to add it in his links section
hes alive
Mulon tried to get me to do some maintenance once
I did and now the fucking stats tab doesnt work
I'm afraid to the pile of shit that is foxhole global
were u working on live ?? ;p
1st , can you add link to derp website ? 2nd why impossible to test ? do you have revision history ?
Maybe I will add it when I have the time
did u konw about derps site ? its pretty cool, he kept working on it
i like the name too derp
thanks
i wanted to buy the domain mrsunchips.tv and link it to logiwaze but that domain is like $30/year
i dont think the joke is funny enough to justify that
i dont know it
oh ... youve been out of #foxhole-discussion too long
long
mr sunchips buys domains and links them to his twitch
i must admit, i feel guilty about logiwaze because it has no server
the api queries are done in javascript so ... im afraid if it were big and popular it might lean a little too hard on the api server
but i figured the project would die if i linked it to a single server that required maintenance
so where is the client side code hosted ?
just local javascript
but where is that
but i think a responsible programmer would make an API caching service in between the two
uhh just in the browser, ya know?
where is logiwaze.com
can just make AJAX calls to get all the API data
oh i host it on github
but it could be downloaded locally and would still work
ok, yeah, there may be api caching services i can use
its pretty cool u made it all client side
i mean, theres still an API server, its just not mine
the devs would likely host it for you if u needed, or maybe they could make a caching server if needed, do u use the etags ?
i'm really digging how amazing javascript can be all client side, lately. been using tiddlywiki a lot lately. its such an amazing wiki/blog software/resume/code documentation platform
nah i dont use the etags, although i would if the API automatically refreshed itself
but still, it would mean every person on the webpage would be querying the API server, i dunno how capable it is
but isnt every person on the webpage querying ther api server the way it is ?
yes, but they have to manually refresh, which wipes the data, so i can't possibly remember the etags
i guess i could try to make a persistent sqlite database to store them
well, i would generally agree, unless something changes hands in the middle of a long trip
and actually likely ends up with less requests to apii overall rather than have a api cache requesting every minute
but it makes the music player problematic to refresh the page
i think ideally id look up some caching service, because i dont want to design a custom piece of software that needs maintenance
split the player and map into 2 iframes
hmm
maybe to get really crazy u could make a client request for api data push that back to github on recieval, and then future clients check there first if not too old use it otherwise repeat. but really i wouldnt worry about it until the devs are like leaning on u to stop ddos their api server
heck could even use pastebin as cache...
but would that require a 3rd computer, or can it be scheduled by github
no its fine
A while back I couldn't stop wondering if it were possible to do more with it than a website
like a game show?
such as ?



