#code-talk
2 messages · Page 7 of 1
looks clean
like cabinets?
nice
do be aware that some of these are supposed to be like
drawers
others are actual cabinets with swinging doors
i imagined the wide ones
and some are just shelved spaces
the problem is that I don't know how to integrate it into the game yet lmao
how this thing in particular works is that
carpenter simulator 2019?
i mean
it's supposed to be a thief game
with REALLY DEEP simulation of stuff inside of stuff
and also very procedural
but yeah, here's the thing
it makes a partitions
then it generates a True or False for
"is this partition going to be cut up vertically"
please do
I may reject it, but I'd rather "this doesn't really work for me" than "I never knew of this"
but anyway, yeah
once it has a partition to cut up
it cuts it up with a random number of cuts
but the problem is
it stores those shelves as 4 numbers
upper left x, upper left y, lower right x, lower right y
and it stores them as a percentage of the total "furniture" area
An update on Yahtzee's second game. Subscribe to Escapist Magazine! ►► http://bit.ly/Sub2Escapist Want to see the next episode a week early? Check out http:/...
start watching from this timestamp
lol focus on the primary game loop! lol someone should tell devs
I have done things that are absolutely irrelevant to the game
I mean, they're technically interesting and cool
but, you know
you can't play a building generator
...uhh
you kind of can, but you could generate buildings yourself by hand as place holders
the worst part
I actually had that idea at the very start
but somehow that fucked off and got completely forgotten about
but it sounds like you were interested in making the building generator... not as much on the game
I should talk to my co-developer about this
because
"wow that game sounds great"
"I'm gonna setup a github, here's a branch for building gen, start working"
man, it's so easy to blame him when he's not here
people treat coding like its building a house. start with the foundation and plumbing, etc etc finish with a welcome mat and fresh baked cookies
but coding does not limit you to building in the waterfall fashion
now, the thing is
place holders give you incredible flexibility
what do I do with current code
it's not functional yet
but I shouldn't have a significant issue picking it up later
punchlists... so important
yeah, I was thinking of
you wont remember where you left off or what you wanted to do
probably writing a readme and canning it
for the time being
now, another thing is
interacting with the game
though, probably honestly
it's still going to be just
calling functions based on player decision
so I can get away with very minimal work on that end
but for now
I'm going to take a break
and eat good food
and watch entertaining things
because no matter how many cool things I make
if I die miserable
nothing has been worth it
i guess at some point i just committed to it
"tv shows" is just a small example of hedonistics things
but yeah
programming is
portrayed very
very
incorrectly
best thing for programming is taking a walk
oh shit, right
and of course sleep...
I should go outside sometime
walking will solve all your technical problems
what do people even do outside
like specifically walking.
I should see if there are any places that are neat to be in
i hear swimming laps has the same effect too
but don't take public transport hell to get to them
basically anywhere you can be trapped with about 60% of your attention
yea if i could walk around a dimly lit airplane hangar that would be ideal
does it matter if it's crowded, not crowded, or doesn't matter
nature-y, or concrete-y
because there are different parks too
you just want to occupy part of your attention on something, not all of it
I see
honestly after this chat
going outside feels
VERY seductive
dang
I'm probably gonna do something like that soon-ish
what about things like
oooh if i had space at the office id consider a sensory deprivation tank
museums
there are places where you can go and they're full of thought-provoking things
i dont think that works tho, not as good as a walk
probably
I still want to see if there are galleries available nearby
I've literally never been to a gallery in my life
im just talking in terms of solving coding problems or design questions, a walk around the block usually does it
a lot of the time it just seems like
solutions to complex problems are so
sudden
oh, oh
regarding punchlists
paper or digital
the walking gives just enough distraction to be open to new ideas
oh your call, im not sure it matters. but paper can get lost easily
or notetaking in general
that's true
I'm considering having some sort of a notetaking apparatus
phone could work
but a paper notepad feels a bit
very dreamy and appropriate
i use visio
maybe I'm just very emotional right now for whatever reason
tiny bit manic lol
google keep aint bad
but some program that offers a canvas for scribbles, flowcharts and text would be gerat
i had 20 pages for the website project lmao
does google keep offer all of these
I think Google Keep will be fine for me
V1 is january 4 - february 12
V2 is march 24 - june 21
V2.1 is july 10 - ...
still doing it but there are some complications
it seems like enormous project
there is still room for improvement
there always is, isn't there
i dont think any sane person would spend as much time as i did doing this
lol
i put an unreasonable amount of time into https://www.foxholedraft.com/ which is probably defunct now
but i learned a ton, learned how to make a site entirely without javascript.
did you know you could sort things with CSS? ... i didnt
how
what was your website supposed to do?
it was just the draft profiles of the players in the foxhole draft
yea so you can presort it on the server side, assign classes to the objects, and then you can use some css tricks to activate those classes and sort with them when a checkbox is selected
it took me like 10 hours lol
probably 1
the wonders of learning
javascript is definitely the easier way to sort.
but my page loads in 250ms
easy
i learned a lot about css responsive design, too...
kastow seems to work way faster than me tho, lol, maybe he just works harder and more
or maybe electron really is great for development
mulon seems to work fast too
i had like up to 80 people on my website at the same time
i have a discord bot outputting this stuff
im pretty close to finishing the routing engine...
i am sure wondering if anyone is going to use it
nowadays it only crosses 20 on weekends when deekays are planning another steamroll
but im 90% done so i might as well finish
i basically have it all working except for additional waypoints and some of the paths dont connect, it needs a revision
and damn it's slick!
i did not learn anything on this project tho - it just reinforced how much i hate javascript
hey guys, are you ready for
the most annoying part
where I have an idea that I ask you to do
I was thinking that it could be interesting to make a Voronoi map of the foxhole map
hayden already has that
neat
well actually another guy did it and then hayden implemented it into his website
i made a krigged map, but its slow to generate
there are also some super old videos of mine where i made a time lapse in c# using the old event log that used to be in fod
Soundtrack: League of Legends Team Builder
i wrote all polygon coordinates in json by hand and almost gouged my eyes out doing that because it was so nerve racking
kastow you have such ambitious projects!
am very narcissistic and have a constant desire for glorification so i do massive projects in secret and then show them to other people and demand glory
and foxhole devs give me enough glory
eeeevery time
most people talk about the project, demand glory, then never finish
statistics show that people are less likely to finish projects they talk about
yea...
Real quick, are you planning on putting etas for the routing maps or no?
thats an interesting idea
we would have to somehow get the average truck speed and also the path length
and then do some test runs to see how the two relate
reminder: truck encumbrance is a thing
was also thinking that.
just pick an average, or truck at 100% and get the speed of that
Can’t you take the speed at like loaded(white backpack) unloaded and full(red)
A lot of testing though
yea. that would be nice too
im nearly finished with the demo, just need to edit the readme and git rebase
@barren quarry do you use github pages? I can't get an index.html to show up - keep getting a 404 and was hoping someone had experience with this
i think you got to put it in a bit hub pages branch
they say master branch works
ive also seen maybe gh-pages, but I set it to master in the setting specifically, so it should be ...good
also tried commiting and pushing again in case it was a hook that runs only on push
Oh I see an error...
The variable {{a} on line 50 in Demo/node_modules/balanced-match/README.md was not properly closed with }}
wtf. never asked for that to be compiled.
just open my stupid index.html file github you suck
Had to make a branch with no other files, ok here's the demo:
very cool @long raft
yea i'm surprised how well it works when the paths are actually connected (see tempest island
)
anyway the example code should stack on top of any existing code anyone is already using (as long as they included leaflet)
but we need to clean up the paths next
sure
thats why i was hesitant to commit your converted and combined shape files as i know they would have to be reworked
whoever fixes the paths shoudl work with the unified.json file
i actually dont think we need the individual map json files anymore
maye not, but multi line will come back
thats ok, I can reprocess it no prob
although i suspect if you use the unified json itll be loaded as polyline not multi
i found aproblem here to investigte
yep, theres those problems all over
it would be good if we could find them automatically some how
im pretty sure its just the noobs i got to do the maps not fololwing a common practise
yea i should have overlaid the border shape file, so we could see if they mostly happen on borders
?
show names on your maps
hmm ...
never occurred to me. it's in the router control
i did the geocode lookups, reverse lookup, and auto suggest
@long raft do you want feedback on non properly connected roads?
Uhh ... hmmm I'm not the one who did the roads, so I don't think I'll be the one fixing them either
before you start collecting the bad nodes, it might be worth it if I add the region border layer (to determine if the borders are where they all are), and I don't know if I'll also be the one who tries to use code to find potential bad connectors
there are also just ... missing roads.
I really have no idea how to do this, firehole!
i know 80% of it can be done with automation (on the coder's back), but it might be best to do the corrections by hand, its not just severed nodes, its also the missing roads/bridges/shallows/etc
ill try to make a pull request or something in the next 24h
its going to be an ongoing process
i think the most important next feature is integrating it with the safe zones and offering alternative routes
devbanch:
" Resource and Shipping Containers can now be directly used by vehicle drivers" ??
that is a different type of code talk 😉 @pure sierra
ooooh can pull into the container directly omg
hayden doesnt talk in the regular channel anymore, so he says it here now
ahahahahaha, big mood
this is my sanctuary from fod madness
but what i dont understand is do you have to be in driver seat ? to be driver
i might have to get devbranch to look
that is what it means
I dont think you are in the driver seat if you are a co-driver
so when at town hall ?
like normal truck?
can operate inventory ?
or anywhere ?
(im going in )
ok its not what i thought
it means as a vehicle driver, you can interact with a container unpacked on the ground
*not on a flatbed
for anyone further interested in sound design in battleflield (brought up in devstream) check out this presentation by my brother: https://www.gdcvault.com/play/1022251/Smart-Sound-Design-Using-Modularity
As the quantity of content required by AAA games continues to grow, new approaches to structuring this content must be considered in order to quickly build your game without compromising on quality due to memory and performance restraints. This...
oh cool, yes interested
can you unpackage from the truck?
no
@pure sierra ok I made a pull request
oh
all that hard work, all that research and debugging and shooting colonials, all summed up into a 5,662 line diff file 
it felt like more work than that...
oh no! i have a typo!
waaaaaait ill re-request it
ok there fixed.
@zealous sonnet Need mortar house API coordinates
Low-key this channel is so underwhelming aint much code talk
bruh what have you contributed
Nothing really inspiring about foxhole just a couple of guys talking about their maps
feel free to go elsewhere
Lol
what do you want? lmao
Look at #art-discussion for example it's actually serving its purpose compare that with this channel this just devolves into nonsense
It's just my observation
@silk trout you talking here is also nonsense
Constructive
Well, thing is that Foxhole has a very large art community compared to its player base, so it obvious that #art-discussion is more active
we dont have a lot of coders here and our projects take weeks, sometimes months
On top of that, some people use that channel to discuss tanks
Also what @barren quarry says
the things we do here dozens of people use every day
@silk trout This channel is actually quite usefull, just not in the past few weeks. Just take a look at channels like #486379601468194846
that shit is,.... shit
Lol yea fair enough
Don't mean to come across as an ass just wasn't really what I was expecting
what did you expect? us tearing apart the game code for hacks and special lore?
there actually is a person that tears foxhole apart and he's very useful
ive been in a lot of code channels, this is what theyre all like
well usually more talk about 3d printing and drones, and less video games, but yea.
Code talk is an essential channel
@chilly burrow oh, they are not in the api ?
please double check if i am wrong @pure sierra
i thnk kastow already did
ok
whats the github address??
ok
@zealous sonnet
what do you mean by comment ? why not just add it as all existing items
i mean, what else could they really tell about mortar houses beside coord, status of the building and Upgrade parts might be too much intel
if they make mortar houses part the the automatic AI defenses then they would start having more use i think
yeah i get you
i wonder if they are noot, ie nyone can get in one and start using it ?
so maybe no side can be reported
or if it has to be destroyed and rebuilt to use
and therefore sided
You guys ever suffer from analysis paralysis?
"There are so many ways to achieve X, so many choices to the point that I'm overwhelmed and can't do anything at all"
This is applicable to coding, but other places too
In this context I'd like to talk about coding
Or maybe just whine a bit, get a "it's okay man we've all been there", a pat on the back
you got dice?
Dice?
Oh
You mean "choose randomly"
If it was such an easy decision that can be left to chance, it wouldn't be an issue in the first place
When I get a split road, I just go! Like, if there are several way to achieve a thing, I just pick the one that has the least cost to achieve. In coding, that is the way were it can be typed the clearest and uses the least number of extra libraries; if required, I will choose the way that would require the least RAM, depending on the project
but analysis paralysis in coding for me is nonexistant
That makes me envious
Even if I start doing something one way, I end up going "oh but what if there's a better way"
I remember doing coding puzzles
And there were those
"oh, but this problem can be done in O(n)"
it's always crushing
It always feels like a cheap "gotcha"
Like a trick
Well, I have an easy moto: "why doing it the easy way, if you learn more from the hard way"
i wrote my website in debruary in pure javascript and then someone told me "why dont you use react" so i threw out the original front end and rewrote it from scratch on react
regardless of the way you do it you will have in your mind the basic algorithm of how it works
I had a bot that used a .txt file to storage the data it used (it would only need these data once a week or so, so it wasnt important at all to have it in active memory). When I showed it to my brother, he said "why not use this and this library and then import .json files?" And I am like, "this works, so why care?"
If its stupid and it works, it ain't stupid; the way of an engineer
That being said, I later had to rewrite it to a different format for loading in the tables differently, but y'know, for the time being it worked well
@harsh summit just don't think too much about it. Learn what you learn, do what you do. If you design it right, you can always rebuild parts.
Dont fear
I literally can't know that I don't know something
Well, if you design it wrong, you just gotta wiggle more
Everything is rebuildable, and otherwise you can always just restart and copy over some parts
If you write, do you write in lowercase or capital letters?
it doesnt matter, as both get the message across
huh
do you guys ever force yourself to code
because you "haven't coded in X days"
Nope, only if I have a deadline coming up
Well, I generally work in sprints. I will code for a day or two, then take a break for sometimes a week. Keeps things fresh and if you use enough comments, you still know what is going on
I don't really know, man
I think it's different for different people
Is misery a part of it?
Is it growing pains?
yes yes and yes
A lot of the times discipline for me comes to "I could work on this, but my next few days will be full of pain and self-loathing"
That is what it is like being an adult in my view
Such an uncomfortable view
find a partner
I did
He's not very productive
I've heard of an opinion that "making peace with how things are is an important part of being mature"
that took me a lot of time to type
I stupidly used too many -'s
my fault not taking Dyno in mind
Anyhow, when I program, I use a strict format: I define all the constants at the start together in one block, then I define the global variables together (sometimes with or without values assigned, just reserving them). Then I make codeblocks, which start with a commend line full with dashes and then a name for the block (sometimes I use a finished block print cmd to know when it breaks). Looks something like this:
#---- TEST BLOCK ----# (use way more -'s)
#Block with all the test commands
command 1...
command 2...
Print( "Finished TEST BLOCK")
This is language-specific, though
and it doesn't apply to what I'm using, unfortunately
Python
Oh yeah, nevermind, I'm silly
I thought you said "define all variables"
Which is something you need in a strongly-typed language
well, x=1 is defining to a sense
Defining constants in Python is a thing that's touched on in style guide
All caps, underscores, at the top of file
what lol
I just do
Global X
X=3
then anywhere where I type X, it is 3
I am certainly not a master in prgramming, but it works
and that is all that matters
Can't argue with that
If I dont know yet that X=3, then I just use "Global X" and have it reserved for later
Scopes
But my issues aren't with the code itself
They're with everything that's around coding and on top of coding
You know
Systems
Ideas
Planning
nah, but you were nitpicking me
the core of my message is still clear? @harsh summit
Just work organised and be able to take a blow to the jaw, then go ham
It is
I'll see if I get anything done after this chat
When I asked for advice earlier, I actually got started on making the game I'm making be a game
Programming just requires some autism to kick in to work in systems
Instead of cool, but otherwise useless content generators
I once made checkers with python combined with discord.py
it worked shite, but I learned a lot from it
To make it work, I gotta redo it certainly, but who cares?
I had fun, I learned something, and I can reuse parts of it for other projects (I had a method of drawing the board which was quite sophisticated in my opinion)
exactly
And it is actually how you do big projects
a friend of mine made checkers in Matlab
a friend of mine made checkers in Matlab
he just made the board and rendering in a few days
then he made every piece on its own
thats one big 2 day thing and then 6 bite size thingies
It worked well with his sceme, as he had to travel 2~3 hours a day with the train, sufficient to get most work done after sitting a day for the base
I saw a quote recently
"A good plan violently executed now is better than a perfect plan executed in a week"
If only smart words were easy to apply
But that's my whining at this point
Just smash your keyboard and by chance you will type a Shakespeare play by random chance
Not within a lifetime
You get the point
Just go
make your code
sitting around doesnt solve a thing
i swear i would have never done shit if mulon didnt make me
all he knows is a bit of css but he's vital to the project because he tells me what to do and actually makes me do it
🔫
Do you think it'll work if I make my project partner do things?
I never worked with someone else in programming projects
so no clue
although I did some matlab together, but that is just something else
@pure sierra pull request 💢
@long raft can you tell me in short how to install this routing thing?
https://github.com/NoUDerp/foxhole-router is more documented until Hayden pulls the branch
merged @long raft
let it be known, the project is not roll out ready, there are many 'hidden' route bugs/breaks in the map that need finding and fixing
maybe could write a script that drawsa line between all points, and then see where it is missing ?
There is a path to most places excluding Iris but it may not be the shortest
i got an infection
what are those
Meanwhile in the Foxhole Interactive Map
what function?
unfortunately it does not exist in my code .. yet
https://www.reddit.com/r/ProgrammerHumor/comments/92uhu7/whats_the_best_thing_youve_found_in_code/
@pure sierra have you guys tried adding a in game clock to your foxholestats website?
I see days are tracked but not time of day,
@quick shoal what time is it in game right now
Have no idea at work
basically the way we count days is just subtract the conquest start time from current time and divide by hours
Following the even chart on the website the day switch from 24 to 25 between 11:37 and 11:43 it’s a 1hr for each day right so it should be day 26 already
If that’s the case what time does conquest start in game like 00:00 or 6:00?
good question, idk
we dont even know whether it consistently starts at the same time
Darn
Also if that’s the way you guys do the days I think the samething can also give us hours if the wars do start at 00:00
I mean In game time
im guessing the wars start during day time ? but who knows...
Yeah wish there was a way
Why?
What's everyone's opinion on "model based design" or "model driven design"?
I've been doing that a lot at work lately and I'm honestly just confused by it and hate it. That's shit they don't teach in school.
shit like IBM Rhapsody
oh ... hmm sure seems like a lot of drawing and not so much coding
what is code talk for?
programming talk
@green jacinth , try #386353469776330762 maybe?
woops, late to the party.
Nevermind, looks like you did already.
possibly #technical-chat
AAAAAAAAAAHHHHHh
help
help help ehelp
it won't go away
it just sits there
taking up space
i can;t deltet it
it now gone yay
@long raft I agree, it does look a lot like drawing and not actual coding. It's for Euro/US military helicopter stuff
@pure sierra to answer you in game clock question, I would want it just so I can see what time it is in game to see if I wan an log in and do combat for 30mins while it’s day time or go do logy when it’s night time, having it would also help keep track of when to attack instead of looking at the map 24/7, I know it’s not like necessary for anything but I still think it would be cool.
to tell you the truth, i'm using deadlands as my point of reference for day. the game stores the "day" value in the static data of each region map, so i just take deadlands and directly put it into the war map
???
How do I see the day value sethfire?
See this is why they're called split ac. Not because of the indoor and outdoor units.
😂
fyi disabled maps for wc are now removed from : https://war-service-live.foxholeservices.com/api/worldconquest/maps/
coming in next update: https://github.com/clapfoot/warapi/issues/69
@pure sierra Hey, not to be some goober, but won't this just make witchhunts like the deal with WNS all the more easy?*
no, its just warden or collie team, not clan
wut?
it hurts
Sup Robots! Art tard here. Is there any way to acces 3D models from Foxhole? Thanks in advance!
Unless you reverse engineer the game?
Or are you talking about the SketchFab models that were taken down? @brazen helm
Unfortunately, and this comes from KFC, SketchFab wanted Clapfoot to pay to host their models and they did not want to pay
Already know this. Asked KFC if he has acces to models. Looks like no. Is is it possible to acces them from files?
Or am I missing some basic info that makes me look like a dumbass?
@summer bobcat
Game assets are packed away into a .pak file so unless you know how to "unpack" it there is no way
If you did figure out how to access them... what would you do with them?
I need to get models of vehicles to scale my drawings. Pictures on net are not in isometry or in any other position I need to re draw parts from them.
Found this.
I suppose those are files I need? @summer bobcat
I cannot help you any further than this
@brazen helm they used to have them on sketchfab but then they removed them because reasons
I know. Is there anyone capable of opening PAK files?
Nevermind.
Server Side Rendering or Client Side Rendering for web development?
Unpack those PAK files.
that's... unethical imo
Already tried. Not that it worked. Next time devs post something of value I will just screencap everything.
Locales will just be language stuff
I have unpacked the main pak, not sure it all came out, I think blade was able to do it too
so im developing an update for my website...
and of course it has console logs for debugging
and there is quite a lot of info in those logs
so when i leave the website running in background for 15 min, it fucking nom noms all of my memory and asks for more

it eats about 5 gb of ram and clogs all of my hdd bandwidth
@zealous sonnet a question regarding the api
so imagine there is one colonial town that is in process of being upgraded to level2, so the api says it belongs to colonials, the icontype is 6 and has the build site flag 0x04
and imagine another level 2 colonial town that has been taken out by the enemy and is now in the process of being rebuilt
so if we shoot the first blueprint, it reverts to level 1 colonial town hall, and if we shoot the second blueprint, it reverts to a destroyed level 2 town hall despite two towns having absolutely the same data in the api
the question is, how do we differentiate the two?
if you are currently busy working on the new update and don't have time to respond, i will respect that
to clarify, you're asking how you distinguish between static base build sites?
the build sites themselves should have the appropriate icon ID, so a StaticBase1 (aka tier 1) should be 5, StaticBase2 should be 6, etc
im asking how do i distinguish upgrading buildings from capturing them
by capturing you mean you've destroyed a colonial town hall, brought a warden CV, reset the static base to t1 if it's not t1, triggered the build site, and completed the build site?
by capturing i mean wardens destroyed the level 2 town hall from distance, then colonials brought in a cv and rebuilt it
so there is no resetting to level 1
in that case the state flow would be as follows:
Build Site - Map Icon: 6, Team ID: Colonials
Built - Map Icon: 6, Team ID: Colonials```
you've re-captured before the enemy takes it if it gets built and its team ID is never set to the opposing faction
is that what you're getting at?
you should be able to do the exact same thing with a t1 static base as well
oh i get it
i should save 2 previous dynamic states
thank you for your response, it helped me get on the right way
its just... another problem that ive had is when i tried to recreate the structure count history across the war i had about a dozen events that go like this:
structure is built -> structure is a build site -> structure is destroyed
this happened because my request rate is 10 seconds so there could be situations where within those 10 seconds someone would start rebuilding it
so sometimes these destruction events went under the radar
yeah, there can be a lot of edge cases for stuff like this
Is there any source on the id no's of items
what would you need those for?
@hybrid mason github readme ?
I'm toying with a factory helper.
Where depending on what you pull into your inventory it will tell you what you can make
At the moment it's just the experimental phase, it involves reading memory addresses so I'm probably going to put it in some sort of wrapper to avoid abuse.
through in-game data? isn't that hacking in a way?
hacking usually implies breaking through some sort of protection scheme, reading from memory is a programming thing thats been around forever
504 timeout errors on dynamic api
Ffs guys can we get the new icon ids published b4 putting them in the api...
@zealous sonnet would be quite neat if all the items costs and refinement time would be API bound. So whenever something new is added, or modified, is then handled by the api. Neat thing to have if it doesnt require much work from you devs.
@chilly burrow that's probably a decent amount of work but if you think it'd be a worthwhile addition, definitely make a github suggestion so it doesnt get buried in a discord channel
Mobile app tiles must be manually enabled/disabled as still olds layout
So varanoi like region calculation now to add, mentioned in Dev blog
@long raft so it's officially Voronoi now, you "called it"
yea ive heard several names, but i think thats the most common
oh wait - maybe i misunderstood what you mean
what did i call?
oh im reading the devblog, i see. so thats good - it means the routing tool is already accurate to their region definitions - since it uses nearest point
The android mobile app map problem is fixed by latest update
do you make that app, hayden?
No
Lagrange's polynoms
n-n-n-no
code boys
I have a funky issue in C'
for everything thats no a decimal number (aka a normal word) my code goes into an infinite loop and I dont understand why
float score = 0;
printf("Welkom bij zevenhalve\n");
printf("voer uw kaart in\n");
scanf("%d", &kaart);
while (kaart > 0)
{
switch(kaart)
{
case (1):
score = score + 1;
break;
case (2):
score = score + 2;
break;
case (3):
score = score + 3;
break;
case (4):
score = score + 4;
break;
case (5):
case (6):
score = score - 1;
break;
case (7):
case (8):
case (9):
case (10):
score = score + 0.5;
break;
default:
printf("ongeldige kaart");
break;
}
printf("uw score is %.2f \n", score);
printf("geef nog een kaart op\n");
scanf ("%d", &kaart);
}
return 0;
I understand that if I put in a normal word for a decimal, it converts it to its equal number in ACII if I am correct. but I dont understand why it doesnt default. and especially not why it goes into an infinite loop if its still waiting for input
put your scanf into the while loop
its only asking for input once, but if you give the wrong number it just loops forever and never asks again
also, it may help to initialize your value of kaart to -1 so that it enters the while loop for the first time
break; is exiting the switch statement, not the while loop.
ive always hated that languages dont include how many levels you want to break out of, like break 2;
getting closer (stonecradle)
werent they gonna make the api for that?
they did @chilly burrow , afaik they did all they are going to , to support it by adding the major/minor indicator in the text endpoint
done
good job
reminds me of those puzzler games
eventually devs should make that boundaries follow terrain features, mainly rivers.
*or at least not be limited by the map borders
some areas are really beefy
like the red route is just 1 fort while blue is 4
and the distance you'd have to travel considering roads shouldn't be too different
@chilly burrow would make it very difficult to put that in a api (river data) to calc boundaries
their method is not ideal, i liked mine better, but im happy to go with theirs for conformity with game, plus in game it does have a bit of effect to reduce the percieved significance of the hard game map borders
what would be interesting would be if there was some kind of bonus or boost or ability that is unlocked for use within the area that is controlled this way by your team, giving further significance to the new boundaries, and who controls which of them
yeah like CoH
i think the game should start distancing itself from trying to represent too much reality, and instead adding some gamey fun mechanic, just to spice it up a bit.
what does it do in that game ?
each controlled point gives +3 of fuel and ammo for example
not saying that's what foxhole should do, but to give an idea
COH 2 - Tactical Map 8x - 4 vs 4 - German Victory - Lienne Forest
this one is better
from 00:30 secs
🙂
done
(im not showing town or region borders, as just gets too cluttered for reading each map stat)
this site is now finally automated, so i dont have to do anything between wars, meaning i dont have to check it every day....
looks good
@chilly burrow so i was watching latest devstream/s and it turns out there is a point to the region thing, must be held to build 'outpost' base in neighbouring map border
yes i know, they also say they have deeper plans for these smaller regions.
yes , i caught that bit
Could it please be a feature to attempt connection to regions without spawns?
I've lost count of the times I'm deep in enemy territory, DC and lose everything
I mean you can already do it when there are no shirts
I was driving an AC and disconnected along with gunner, collies wrenched it and now have it
meanwhile on my way I found a guy who DCd with a flatbed full of supplies and probably couldn't join back
best to ask the devs about this or another channel, i know other games that do it will like pubg and wot, @plucky niche
which one?
like, anything else
as said in the description and pinned, this is about code, not the game itself
@plucky niche #game-feedback-archive or and @native kernel or reddit
spent 3 hours trying to fix a bug
almost went insane because its only a couple of lines
turned out it happened in another function
does anyone here know how to read a button on an arduino using bits?
int main(void)
{
DDRC |= (1<<PC0); //zet display 1 als output
DDRB |= ~(1<<PB2); //zet pin3 als input? =1111011
PORTB |= 0b0000100; //zet S3 high =0000100
DDRB |= (1<<PB0); //a DDRB = 0000111
DDRD |= (1<<PD7); //b DDRD = 1111100
DDRD |= (1<<PD6); //c
DDRD |= (1<<PD2); //d
DDRD |= (1<<PD4); //e
DDRD |= (1<<PD3); //f
DDRD |= (1<<PD5); //g
DDRB |= (1<<PB1); //dp
PORTC |= (1<<PC0); //zet display 1 output naar hoog.
PORTB ^= (1<<PB1); //zet dp laag.
PORTD ^= (1<<PD5); //zet g laag.
while(1)
if(PINB & (1<<PB2)); // 1111111 & 0000100 = 0000100
{
PORTD |= (1<<PD5); //g aan.
PORTD ^= (1<<PD7); //b uit.
PORTD ^= (1<<PD6); //c uit.
}
return 0;
}```
I need to configure PB2 as input and then read it in a if statement to see if its on
but I dont know how to configure PB2 as input
the letters correspond to parts of a 7 display
i know arduino
@coral sundial
why the f not just use the ide though ?
@barren quarry nice sat photos
@pure sierra Thats an entirely Mulons project
ah cool, i remember being mentioned it a bit back, would make a great in game map
We spent a lot of time refining the stats tab, hence the file requests, but had to comment it out because of complications
Its fucking massive
@pure sierra ide?
arduino ide (editor)
oh
(the standard language)
because we're learning C
so what did you want to know about that func above ?
and I dont feel like learning ide because I have it busy enough
I got it to work
but Idk how lol
hold on posting code
literally could do all that in about 1 or 2 lines with ide
{
int a = 1;
DDRC |= (1<<PC0); //zet display 1 als output
DDRB &= ~(1<<PB2); //zet pin3 als input 0000010 1111101
DDRB |= (1<<PB0); //a DDRB = 0000011
DDRD |= (1<<PD7); //b DDRD = 1111100
DDRD |= (1<<PD6); //c
DDRD |= (1<<PD2); //d
DDRD |= (1<<PD4); //e
DDRD |= (1<<PD3); //f
DDRD |= (1<<PD5); //g
DDRB |= (1<<PB1); //dp
PORTC |= (1<<PC0); //zet display 1 output naar hoog.
PORTB ^= (1<<PB1); //zet dp laag.
//PORTD ^= (1<<PD5); //zet g laag. //ddrd = 1101100
while(1)
if(~PINB & (1<<PB2))
{
_delay_ms(200);
//PORTD |= (1<<PD5); //g aan.
PORTD ^= (1<<PD4); //b uit.
PORTD ^= (1<<PD3); //c uit.
}
return 0;
}```
I dont understand why the button works
that is
DDRB &= ~(1<<PB2);
if(~PINB & (1<<PB2))```
Open-source electronic prototyping platform enabling users to create interactive electronic objects.
nuuuh I need to code in c
just read it
it tells you what the words mean
<< is a bit shift
The Arduino programming language Reference, organized into Functions, Variable and Constant, and Structure keywords.
Oh I know the code, I just dont understand why it works this way. why does the IF statement work. I am cooked medium rare with knowledge.
I just litterally fumbled around and added a not before PINB and it worked lol
PORTD |= (1<<PD5); //g on.
also this part is on comments because if it wasnt. it wasnt toggling G
youre working with half info. I am working on a arduino uno with a display shield
eh
ive got display 1 hooked up and button s3
so im not sure why you need pinb (read pin8) in there, maybe its doing nothing
where does it read pin 8 in the code?
uuum as I understand it. its listening for a pin to turn on. then it compares it to (1<<PB2) and if true goes into the if
but thats also the part I dont understand, what is PINB lol
actually i think PINB is 8 to 13
DDRB &= ~(1<<PB2) like over here. I am looking for not 0000100. that is
1111011
then i am listening for NOT PINB is the same as 0000100
and for some reason NOT PINB is the same as that
when I press S3
if I remove the NOT the statement it will always be true (it goes into the IF as soon as I upload the program)
the IF is the test if the button is pressed right
yes
so i think (1<<PB2) is the mask for pin 10
that is applise as a 'fliter' to PINB (which contains input state ofr pins 8-13)
what? the display shield schematic has no pins 8-13?
8-13 in the arduino
uno is arduino
as in, I am working from the display shield schematic. I am not using an arduino pinout
but all connections on shield are just linked to the uno pins
pb2 is pin 10 that much you are correct in. but I read it from the display schematic and not from a pinout. I have very little to do with the fact that its pin 10 on the arduino
your buttons are using pull-up resistors, so when in open not-connected state, they will read 5v high, at connected input pin, when pressed/closed they pull input pin to gnd - low. thats why you need the NOT ~ coz you are testing if not high for button pressed state
you mean the light or whatever comes on and never goes off ?
yes
you'd say it only turns on for as long as I press the button. but it remains on even if I dont press it
i think it is not that the IF is always true after first press, but that you have no else to turn the light off if not true
The Arduino programming language Reference, organized into Functions, Variable and Constant, and Structure keywords.
^= is acting as toggle i believe
correct
then I hacked my exercise hard. since it describes it needs to remain true even if I dont press the button
so come on once, and never go off ?
untill I toggle it again
so it does what you want/need ?
so the entire display is on. but I only toggle 2 parts of it everytime I press the button
so all good ?
trial and error works sometimes 🙂
its so stupid xD
so @barren quarry / @young pilot any plans to do the leaflet coding for the region boundaries ?
When they put it into the api, sure
We've had the technology for drawing polygons on top of maps for many months
Just need to know the borders
@pure sierra really? whats the endpoint?
cant you draw the borders yourself given the points?
It's in the static endpoint
Map marker type
You use the major points and voronoi to make the boundaries, it's in the dev blog back a couple
oh i see
well unless someone gives me a done script for getting the polygon coords im not doing that
Here is the exported major locations (for use in Voronoi calculations). I suppose somebody (or maybe eventually I) can easily create Voronoi shapes (QGIS has a tool for this), and then bound them with a rectangle, and export them to any vector format. The scripts to export these are located in the demo folder of my clone, https://github.com/NoUDerp/foxhole-router/. There is a JSON and CSV export format. The locations X/Y have already been properly offset for a global map.
https://raw.githubusercontent.com/NoUDerp/foxhole-router/master/Demo/major_locations.csv
Oof I am realizing they probably bounded each voronoi set by region with a hex shape. 
Yea they did, I'll need to export a version with the region name so they can be grouped into layers. But it's going to be more manual work, ouch.
wanted to fiddle in electron
downloaded a simple react electron boilerplate and hit npm install
took 20 mins and installed 46k files worth of modules taking 640 mb
holy crap
Ooh, Kastow's trying electron. That ingame overlay is getting closer and closer. 🤞
@long raft we dont really want 'exports' what i did is just calculate the borders dynamically from the api, and this way they just update as per dev changes
Yeah but it'll be difficult to find a scriptable voronoi calculator
And it also needs a polygon intersection
the frog has jumped
wrong kind of code talk bruh
id be suprised if there wasnt libs for that sort of thing in js
Not that it couldn't be calculated in something like node or python by the server every update and dist from there
ie server side not client side
test
looking at the timestamps, more like ping: 1 minute
Hello everyone! can someone help me with a super short code understanding why i get only 4 inputs from loop and not 5?
im half a day on it already lol
c#
@Alleycat#5592 Sure, post your code here
@warped pulsar
lmao he left the server?
maybe he already got an answer somewhere else
{
int s3pressed = 0;
int s3pressedmemory = 0;
int s2pressed = 0;
int s2pressedmemory = 0;
DDRB |= (1<<PB4);
DDRB &= ~(1<<PB2);
DDRB &= ~(1<<PB3);
PORTB |= (1<<PB4);
while(1)
if(~PINB & (1<<PB2))
{
_delay_ms(200);
s3pressed = 1;
}
else
{
if(s3pressed)
{
s3pressed = 0;
s3pressedmemory++;
}
if(s3pressedmemory==5)
{
s3pressedmemory =0;
PORTB ^= (1<<PB4);
}
}
if(~PINB & (1<<PB3))
{
_delay_ms(200);
s2pressed = 1;
}
else
{
if(s2pressed)
{
s2pressed = 0;
s2pressedmemory++;
}
if(s2pressedmemory==3)
{
s2pressedmemory = 0;
PORTB ^= (1<<PB4);
}
}```
question time
why is S2 not working, even though the code is identical to that of s3 (wich is working)
both are buttons
changing the order around works
am I doing the if else wrong?
what language is this
@coral sundial
From the top of my head and not knowing what language is this, my guess would be that without curly braces the while only executes the first command below it and only one
did you mean to use xor operator?
That's C? well shit I have a whole lot more to look forward to
C is really easy, its such a basic language, but most people arent familiar with the bitwise operators
theres a lot of left shift, xor, and, not in that code
i had pascal and c++ in the first years of uni and i never really understood bitwise operators and pointers
@coral sundial you work it out ? (this is arduino code)
Yes
I lost the brackets for the while loop somewhere
@pure sierra
@long raft yes I meant to use the xor operator. It.toggles that specific bit
?
Yeah I'm just surprised, would have expected an or operator to toggle 1 bit, as xor can also turn a bit off
reminds me of the x86 days, xor ax, ax zeros the bits of ax faster than mov ax, 0 did
boomer programmer wackiness
youd see assembly written and wonder why they're XORing so much shit
Encountered typescript recently
Its like coding with clamps on your balls
But I understand why it could be useful
static typing is more like a protective cup
the biggest retardation i encountered so far is when typescript refused to compile a perfectly fine component
so i googled the error and it turned out typescript doesnt like when components' names start with a lower case letter
and when it doesnt, it hides that in some fucking obscure error
case sensitive languages are pure insanity
so somehow i missed that the api was updated 10 days ago for dead harvest ?!
ok got this done:
no idea how you iterate so fast
@barren quarry Does Typescript fail a compile if a linter has an error? As far as I know Typescript was just JS with some template
@neat fossil well at least in vscode it does
yah the point is to catch the errors at compile time and not at runtime
Fair enough, I've never used Typescript
Im more of an old school C++ dev with some JS-ES6 on the side
how can i know who controls a region using the war api? already tried to check the flags for each building listed on the endpoint /worldconquest/maps/:mapName/dynamic/public, looking for the building that has the flag 1. Still, some regions don't have any building with the flag 1
Just to be clear: i need to know who controls the victory town of the region. Just like in the foxholestats map
isnt there a teamId variable set to COLONIALS or WARDENS?
yes, but this variable does not exist in the /worldconquest/maps endpoint. It only exists in the /worldconquest/maps/;mapName/dynamic/public endpoint
basically, i need to access the region endpoint and then every object in mapItems have this variable
also, sorry for my bad english :/
yea you have to query each map
It's because the state of the victory town is not per say who controls the region, I just show it at the top of each region grid as it's the most significant item for that map.
@mortal iris
So yes, you have go through all the items list to find the details on the one you want
Ok then, ty for the help guys 🙂
just wanted to let you know the api /maps endpoint is reporting all maps, but there are some offline
Loch Mór literally just means Loch Big
Anyone here familiar with the Godot game engine?
no
Is it obligatory to learn GDScript to start prototypes or can I use C++ no problem?
I have no idea how Native works
then again, I have no idea where/if any official documentation exists for Native
c# probably more ideal
c# or c++, i wouldnt waste your time learning a language specific to 1 engine
unless its 1998 and youre referring to flash script
@cunning forge if you know python GDscript shouldn't be too hard
I can say with 90% certainty that you can basicly just copy-paste python into godot and it will work
ok so i want to create a simple bot would it be good to use node.js
@jovial lake yes
thanks
maybe tech tree progress can be added to API? if both sides are always on the same tech, why not
Sounds good
What if a soldier could take an object or vehicle examined by the enemy to base, accelerating his examination on his team
This would be an interesting idea on any other day in the past 3.5 years
But now both factions progress automatically with the same speed
if they'd make it api, it would be next year iv been told
Aw, that means the tech tree automation is probably a temp. thing if API goes to next year
possibly. but i really don't mind the automation cus both teams get tech at the same time BUT it would be nice if we could (as in, both factions) speed up the tech rather than the constant 2/min
At the end they want to get rid of tech tree entirely, and the sooner the better. This auto system can only stay afloat for so long
@zealous sonnet Hey, one quick question. We're making discord bot post automated tech updates and i wanted to ask if there were any changes in the tech costs or are the numbers from the previous update correct
I'm not sure
I'd advise against hard coding anything that isn't exposed via the WarAPI but that's up to you
ok my bot is finished
i went against your advice and hardcoded everything
except war start time
this is the end of the tree and im off by just 5 minutes
im not insisting but it would be really nice if tech tree were available via api
but considering that you want to kill it i don't have high hopes
kill api? what? the tree itself?
think he means that the current plans about removing the tech tree altogether would make opening api requests for tech tree state kind of wasteful
being deleted?
say bye
Quick Q re: red river, was that an inhouse dev project?
Yes
Who did the work on it?
I know foxhole is a small dev team, so it's maybe easier to get trust for experimental projects. Some insight to how it was developed(Resourced by what % of time by how long) is kind what i'm getting at
nooba did
I think Casey worked on it? Dunno
they said on the devstream it was nooba's project, he introduced it, but i would guess the art may have been someone else?
Oh yeh then maybe it was Nooba
Oh! I did not know about this channel! Here can i talk about our lord and supreme lider #!/bin/bash?
#!/usr/local/bin/bash you linux shill

How do you pass an array into a function
And then fill in the array in a faction
Function
In c
pass a pointer to the first element in it
int * array_pointer;
array_pointer = &existing_int_array[0];
if you allocate an array on the heap, not the stack, then youll already have a pointer to it. just pass the pointer to the function
void foo(char * array_pointer, int length) { int i; for(i=0;i<length;i++) array_pointer[i] = 0; }
I haven't learned pointers yet
I have to initialize an array in my main. Pass it to a function with 5 numbers and the fill it in in the function
Derps solution is pretty much what you are asking. If you want to change an array that you initialized in main, you’ll need to use a pointer to change it inside a function
Well I wasn't entirely correct. you don't have to use a pointer
void foo(int array[], int length) {
int i;
for(i = 0 ; i < length ; i++) {
array[i] = i;
}
}
int main()
{
int array[5];
foo(array, 5);
int i;
for(i = 0; i < 5; i++) {
printf("%d", array[i]);
}
} ```
if you pass an array to a function without a pointer, it will copy the array. and when you change the data, it will not change the original array, only the copy
and you would normally have to specify the size, wouldnt you?
...
jeez maybe my C rusty
i thought the same but when I tested it worked. I guess it passes the address which is why it works
What do you mean?
Imma try again

"Tech Parts and Research Parts have been removed from the game"