#code-talk
2 messages · Page 31 of 1
Just out of curiosity, has there been any foxhole stats kinda solution that was banned or prevented?🤔
Why?
Im completely new to programming but had a cool idea how logistics could be improved. However i have no clue if needed information can be queried from api, and if not what other alternatives are there.
I assume that botting ingame to collect data is haram?😂
there are different imams and scholars on the subject ...
but you wont find more info in the api than you see on foxholestats. in fact, you wont even find all of that info in the api
i feel like theres some data mined things that could work, e.g. weather forecasting, but otherwise its gonna be soft interfaces to data
Interdastink🤔
Lmao imagine watching a forecast of each region of the map, would be cool af
Depends on how much time are you willing to spend
In the interest of helping me find an actual job, I was asked to make a small game that fit their requirements to review my skills
code interviews are getting ridiculous
next job youll have to make their product for them before they hire you
lol not for an actual job, just an assignment I agreed to to help with my non-existent portfolio
Besides, other than the actual level building I've found it to be rather fun
Hearing birds at 5am kind of fun
i can only write code in my closet at home. im a genius but i can only work in that one space. sorry
A closet genius!
had to rebuild a huge python project because one line was off by a space, this language is stuuuupid
infinitely readable, infinitely unwriteable
haha, yeah space vs tab 
i like python cus to write braces i have to stretch out my hand on this pos keyboard
yea but we already figured out how to make an easy to read language without braces. it was called BASIC. it used end if.
tfw I couldn't resist adding an easter egg
you cant jump?
the popup is the easter egg, yeah
the little picture too
I'll be disappointed if no one gets it
i gotta say, you've certainly grabbed my attention with that single screenshot
i keep skipping queues
gaming
i love braces, python feels naked
This sentence is very different out of the context of code
Little web app im working on, forgive the poor css im not a front end dev, idea is to allow players and clans to collectovely track their activity logs, i plan to add more dashboards that will rank players from each clan based on their stats
every time a player updates their activity log their clans total gets updated
is it going to OCR the activity log screen shots?
view-source:https://www.nytz.com/xo-ocr/
a bit broken at moment as crossoutdb.com is down
?
just another game ocr tool
For now its text fields but i do hope to incorporate ocr if possible
was literally all just dont today while i had nothing to do in work so its early days
itd be sweet if there was like ... an encoded form of the stats data that could be easily copied/pasted
would make my life alot easier
you mean for retrieval from the game
the devs arent into personal stats, its largely meant to be an anti griefing tool
seems to me it will be the new basis for rank
yeah its possible they will create some kind of auto generated class system
I don't get it...
Also, how do we get hex tiles, as mine are a little out of date.
depends which hex tiles you want
if the ones on the warapi's github arent what you want ask again
Ain't much I can do about that if you haven't even seen the stanley parable
I have, just didn't know the reference 👍
Yea...ones in the GH are out of date

some people use ueviewer to extract the map files from the game assets
"processed"
they are 4x the resolution of the github ones. not guaranteed to be up to date either tho sometimes
we have been known to wait a long time
e.g. indefinite
god im not looking forward to updating any maps, its become a ton of work now for me
While we wait, we can imagine that the Devs will get around to providing a map related api - functions that actually extract the roads, terrain elevation, terrain type, etc. The dream would be to have each map broken down by sector and have data for death hotspots. If we get that last bit of functionality, it'll unlock proper heatmaps and allow depiction of moving fronts. Maybe in a few years.
My personal dream is Token auth to see the logs of seaports, and reservable stockpiles.
Be able to immediately tell what has been moved, this way we could implement supermarket-like algorithms for automatic logi orders
I don't see that one happening tho
I played some today, dont get much of a chance. the grenade span is worse than ever...
But after thinking about things I had idea to maybe make site like foxhole requests
where people can just suggest ideas/fixes and then they get voted up down like reddit, so you have a leader board of sorts and a way to keep track of gripes etc
Sounds like #game-feedback-archive but with extra steps
Lmao
That's reddit
you're describing reddit
@vague otter@languid harness@barren quarry except with game feedback and reddit whats here today is gone tomorrow so there's no continuity.
So you're talking about a (public) bug or feature tracker? That'd be useful
I don't doubt they have one internally already
yes they have said they do, but i want something public for the community
i think an accountability website or hopes and dreams would just make me depressed
foxholestudies.com is available tho 
pog
Nothing that we've heard, and I'm not hopeful since the update apparently is keeping devs very busy
My guess is it'll come after 1.0, in the time between larger updates
heyo, requesting assistance. I am trying to GET information via the API
https://war-service-live.foxholeservices.com/api/worldconquest/war retrieves me a JSON with a handful of objects. how would I add onto it to receive only eg. warNumber
you dont
you need to parse out the info you want
i dont remember the exact structure, but if you query it as a json, then you would have an object i and you could get the elements like i.warNumber
i use the node library called superagent, heres some code example: https://github.com/NoUDerp/LogiWaze/blob/master/src/API.js
thanks for the help! 💚
do you need to keep it in javascript?
if youre comfortable with command line stuff, theres a utility called jq that can parse JSON stuff
kind of complicated to use tho...
i would imagine you could achieve extracting data by chaining a curl command an jq together
wget -qO - "https://war-service-live.foxholeservices.com/api/worldconquest/maps/" | jq -r '.[]|.'
or if you wanted to extract to warNumber it would look like this:
wget -qO - "https://war-service-live.foxholeservices.com/api/worldconquest/war" | jq -r '.warNumber'
@paper quartz There's a WIKI in the Pins that described all the APIs
That's not completely alien. Thanks for adding more to this, @long raft!
I might give it a try, there's a lot of utility here and I feel like I'm so close to unlocking some of it.
Absolutely, if you're referring to your pin. I've been eyeing both the wiki and the githib repo.
It's just my blunt ignorance on how to actually use APIs that's hindering me. 🤣
I'm trying to do some overlays using the APIs for my obs stream. So I guess I got to get coding. I'd be able to run a Javascript file in the browser source.
Yea, you'll want to look into HTTPS requests and how to write those for alwhatever language you use.
For example I use the API for a Discord bot and that's written in NodeJS
But there are many languages and tools.so start with finding one that can do what you want; in this case render an overlay
Thankfully OBS does most of the overlay business. All I really need to do is GET the API request and then parse the JSON and then present in a pretty way.
Hey, I’m playing using Linux and a monitor. Playing on my laptop is fine but when I play while hooked up to a monitor my laptop randomly shuts off mid game. Doesn’t do this with anything else - haven’t tried another game yet, was wondering if anyone had this issue?
Have you received any heat warnings, or any other notices, when booting the system back up
@analog elbowhow long been doing that, and when does it say that ?
Just today; and it says “Connection lost: please try again…” when clicking deploy to play
@pure sierra
hmm
I changed my lid switch settings for my monitor but I’m still using the same proton version and tried GE and a few others
Updated, verified files, updated drivers
restarted computer and internet ?
Just restarted internet going to try now @pure sierra
Same thing @pure sierra
I think I give up
yeah sometimes i have to wait for a problem to clear, try another day or just later, if not contact supprot
Ended up pestering one of my fullstack developers at work. Hello, how do I call this API? Apparently I was so close.
Ah excellent 👍
@pure sierra fixed it - works on proton 5
Still, my computer turns off… only this game though?
have you checked the game and system logs
running this game in linux is rough
i suppose its a wonder it runs at all
i wonder if anyone runs it with nouveau
I haven’t
Like it works fine without the monitor
Or with my laptop screen
I’m using arch though so it’s pretty involved and mentally tiring… t the game is worth it I’m addicted
amd or nvidia? or intel?
among my tips, and maybe its unrelated to your issue, i use nvidia's drivers, obviously the i386 architecture, steam stuff, dxvk (real important), which i imagine you have already
and then i throw this in when i start steam to clear the c standard libs (which are redownloaded and updated via steam)
find ~/.steam/root/ \( -name “libgcc_s.so*” -o -name "libstdc++.so*" -o -name "libxcb.so*" \) -print -delete
but when you say your computer shuts down? you mean restarts?
if its truly shutting off, then i would think its a power supply issue
video card ramps up, runs out of power, power supply shuts off, computer quits
im running foxhole in a container through proton, its absurd it works at all. but steam remote play kinda sucks, been experimenting with better streaming alternatives
stumbled upon this nvidia protocol they use for the shield to stream games, part of the geforce experience, i think its called nvidia play or whatever
so somebody made a custom client for that protocol. and then someone else made a custom host
moonlight and sunshine
sure hoping its better than remote play.
I’m using nbidia too. Are you saying I should switch to i386 then run steam?
No completely powers off
my bet is on power supply then
insufficient for the heavy draw from the GPU for foxhole
I wonder why? It stays plugged in
its a laptop?
Yes
it should be kernel panicking
but straight to off? i dunno maybe its heat, but power is my first thought
No kernel panic - or maybe that is what’s happening during shut off
how long does the shutoff take?
not a kernel panic then
That’s what I was thinking but idrk what this could be
i wonder if theres like a power mode you could change, i know in windows the first thing i would try would be like power saving mode for the graphics
or the opposite, turning power saving mode off
I did dabble with my UPower settings for the monitor
because some power throttle might behappening
Should I set power to performance mode?
yeah try that
Bet - I’ll update here if it crashes again after a time
If its heat related, thats also plausible because foxhole uses more cpu than most games
But then thats cpu heat, not gpu
And you could watch a thermometer tool like openhardwaremonitor or whatever to debug that
Which is actually fixable with tiny screwdrivers, thermal paste, and ambition
me too
We should geek out sometime
I think the high performance is working
Spoke too soon
I start bpytops and watch the temp
i wonder what the shut off temp is for your CPU
usually they dont shut down the computer tho, they just freeze the CPU, but maybe laptops are different
I feel like my gaming laptop should be able to handle it tho
Like that’s why it’s a gaming laptop, ya dig?
That makes sense - so unfortunate
well you gotta assume new fans and thermal paste would keep it at specs at least
if thats in fact the issue
yeah just throttling
Idk anything about that kind of thing…
I had the same thing happen to me, it’s definitely a heat problem. If you’re not experienced in hardware, or just don’t want to deal with that, I recommend getting a cooling pad for it, and being careful of how hot it gets when you’re playing.
What always helps with cooling for me is having the fans free
I tend to let the rear rest on a couple of coasters
It gives a little space under for airflow
Here are two GET calls for the API that I've written up over the past day that I'm going to be using for my stream overlay. It's just the lot of it bunched up but might help someone in a similar situation looking at the code. 💚
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script>
// WARNUMBER CALL
axios
.get("https://war-service-live.foxholeservices.com/api/worldconquest/war")
.then(response => {
const warNumber = response.data.warNumber;
let foo = document.getElementById('warNumberID');
foo.innerHTML = "WC " + warNumber;
})
.catch(error => console.error(error));
// DAY OF THE WAR CALL
axios
.get("https://war-service-live.foxholeservices.com/api/worldconquest/warReport/CallahansPassageHex")
.then(response => {
const dayOfWar = response.data.dayOfWar;
let bar = document.getElementById('dayOfWarID');
bar.innerHTML = "Day " + dayOfWar;
})
.catch(error => console.error(error));
</script>
nice
Not too shabby 👍
IIRC The Day Number resets if a server reboots, so you can't use that number.
You need to use war start, work out in-game duration, and then divide to the actual in-game duration
@hollow gyro devs said they fixed it last update
I have not checked, as still calculate it the manual way you suggested
ah, facinating
But yea, I'm a fan of math over provided if I can, feels cleaner
stranger this is not foxhole discord ban this is Discord the company suspending your account. I doubt anyone here can do anything.
Are there any data sources with historical snapshots from past wars?
What do you mean by snapshots?
Foxhole stats has like generated videos of the map for every war
Just me or does it feel like there is alot of people hacking?
🤷♂️
I've never seen a single person hacking in foxhole tbh
I've heard like one story
i mean one guy just runs straight up to me and kills me instantly
What gun did they have?
revolver
I mean yeah it can deal 90 damage up close
So could easily down you in one
If you'd been tagged earlier and not realised it espicially
but i just find it extremely wierd how he pops out shoots me and then back into cover in under 2 seconds
probably right
Yea the API is realtime, so you have to have saved the past to know it.
Hence Hayden or Kas
Yep got it from Hayden now, thanks!
@long raft fixed it finally; had to adjust frame rate lower
what was the problem, again? i dont remember. just crashing on linux?
Yeah my whole laptop would instantaneously shut off at random times
From fps...interesting
Anyone do web dev?
I've only ever made static websites with an HTML/React webpage and Flask backend
now I'm trying to learn Django so I can make a website with actual DB, multiple pages, users, etc
I'm wondering if after this it would be worth it to learn Express.js and MongoDB. I have never worked with noSQL and I want to try SPA after learning Django.
Is Express worth it to learn in terms of speed and as a useful skill? I know Node.js is an aging ecosystem right?
absolutely
express is good
i dont know really, but enough for me
i would say the biggest argument for me is to have both front end and back end on the same language with typescript
copy the interfaces and types between each other
dont have to translate from one language to another
that increases the speed of development i think
i often have to deal with translating node to python or python to node, ive gotten used to it but its still a bit of a headache
oh that's smart
As for mongo, its useful if your project is gonna grow
with sql if you create a table with fields you can no longer change the fields
and putting a json string into them is a bit shitty
mongo allows you to search by stuff in the json in that field
or add new fields without dropping the table
sql i would say is better for billions of same objects that arent going to change
?avatar
It would be cool if someone built a job system, using the games api, telling you the base that needs the specific items and you can take the job
Kinda like euro truck
Maybe it’s because I’m a noob but it’s hard for me sometimes to figure out where I’m useful
I think MongoDB would be better for my use case
mongodb is great if you have an object tree data model with no circular relations
since it's a JSON based format
the api is nice and reliable, but its very limited
Both are great options. Django has a lot of batteries included, but node has a huge ecosystem as well. Personally I prefer Python/Django but try&compare both and see what you like most
I’m using Django right now so I can take advantage of the ORM and spin something up quickly
Once I get comfortable though I’d like to try the MERN stack and get a little more hands-on with the Auth and database interactions etc
well you could take advantage of .NET EFC, great ORM
EFC is dotNETs hibernate and its pretty good imo
if your coding in python, you can try FastAPI with AlchemyORM
FastAPI only from name

well, if you are doing the JAM stack, FastAPI does cover the API part and if you are really familiar with the Python syntax and want to just code React as an SPA you can do that. I recommend Next.js for that
ok
yeah I was gonna try a SPA with Next.js next
my intro to web dev was SPA with React and I had no idea what React Router did/was for
but learning Django helped me understand why, how it was to emulate server-side rendering with routes
Also take a look at htmx for a SPA countermovement
the only spa ive ever built was vanilla js
oh i mean i guess ive made a couple, never used a SPA framework for it
with the caveat that my javascript is unreadable
cooooding
Ugh I'm really going to shell out $100 a year for copilot aren't I
how does the camera glitch when dying work? idk if this is the right place
I want to figure out if I can aim it to get nice pictures
the camera just resets to a normal view instead of the top down one briefly
whate exactly is mapMarkerType min-maj?
ES2019 is gonna blow your mind. They people designing the language is on crack. Its totally not the same javascript as in the IE11 days
See the Wiki pinned 🙂
Something has been bugging me for a while
yeeeees
Javascript has been developed for decades now with new features being added
But there's still no shorthand for delay
It's still the fucking await for a setTimeout inside a promise
Do not enough people use delays to make this important?
Python has asyncio.sleep()
never given it much thought but have used delay, cant remember if there is a jquery helper, as i always just use jquery
id like to get out of using javascript entirely, thats the dream
Good lord I haven't used jquery since like mid 2019
You can do front in .net if you want
I mean
Not using typescript with any meaningful sized projects is like hammering your fingers
So by javascript I assumed typescript by default
To me first and foremost typescript is documentation
It's documentation that dislocates your shoulders when you try to violate it
But at the same time, doesn't crash the process
i hate every part of web development
wait theres 1 good part... when you open your site on some exotic computer and it works
but everything else is just the worst experience.
Web development is unimaginably boring to get into
its hard
like everything is just more difficult than in the grounded world
debugging is just ... terrible
What aspects of it are hard?
we dont talk about that around here
There's jest and sinon for testing
All your interactions between the server and the client are in strictly defined payloads
That are in json
yes but look how much more work you have to do to set that up
and at minimum youll work with 1 language but reality is 3 or 4, broad knowledge on front end and back end
3 or 4?
and all the things we try to do are usually throttled somehow by the runtime environment being in a browser, or something
Html, css, js?
yea, and intermediate data formats, e.g. json, yaml, xml
toml 
These days both html and css are inside js
learn rust 
Who even uses yaml and xml?
yaml is great for configs
Ooh right
its absolutely terrible and needs to be executed for anything else
Configs for gitlab n shit
i can write some impossible-to-read yaml
you should see the stream format of it
its like cursed json

The worst experience in my life was having to write a bash script that installs and launches an app with docker, that includes installing docker itself
just make a docker image with everything setup 
hahaha writing bash is like ... it will cost a piece of your soul
Dark days
my friends are like bruh zsh is the way
every shell script sucks
might as well just stick with the most common, csh, and bash
and im from the bsd world where bash is like foreign
Debugging skynet and not running head first into a wall took being unhealthy obsessed too
Don't get me started on discord js
makes me realize why dyno sucks
When you launch the newest version with typescript, there are actually 4+ type errors inside the library
And if by some reason you went afk and forgot to update your bot, it's gonna die every time someone types something in a voice text channel
needs more erlang
To be fair I can call web dev many things, but not necessarily hard
Maybe I just spent too much time practicing instead of, you know, living a life
its the hardest form of development except for perhaps compiler design, in my opinion
[3d] game programming is pretty tough too
not really if you have an engine tho
You have a Mongo with a node with express on the back, and react redux on the front
writing a game engine is hard because maths
compilers are ok
you can write a proper shit compiler as a doofus, it will make code
lol kastow you are ... you would not be considered a conservative developer
Spending an evening just setting up redux can take a while, but it's not hard
mongo, node, react redux, shit that nobody would even imagine when i was in college
yes nothing is really that hard to set up on computers except uhh ... k8
and email. email is also really hard
Hm
The aspects I admit I don't know about in web dev are k8, aws and emails
And maybe stripe
god k8 ... people told me it was hard, and i thought whatever i can handle anything
Although I interacted with k8 and aws a bit
im a docker master, k8 aint shit
holy god k8 is hard and nothing works
i cannot believe its what everyone is using
K8 is the go to for horizontal scaling isn't it?
im afraid im just never going to go back to ko8
yea basically
i hope something better emerges soon
docker is practically dead
How is docker dead?
you hear people say theyve basically made a multi million dollar company for a container format
What are even the alternatives
well docker is a company that has a container software, but their hosting costs for all the images is tremendous
and theyre not really selling much
its based on containerd technology, i think, so the linux kernel's ability to isolate system calls
theres many things built on top of that, podman, lxc, lxd, kubernetes, docker
Doesn't gitlab ci use docker?
but the Dockerfile format can be used by all basically
uhh im not sure about gitlab ci
lxd is pretty nice, instead of a singular container you can operate on entire OS images
Never heard of it
podman is nice in that it can run as an ordinary user, not just as root (like docker)
theres like a docker-swarm version of podman, and of course theres docker-swarm
sorta competitive with k8 but not really
I have been working on k8s and while I am no "good" sysadmin, it feels like at every turn there is an equal amount of work and learning added to the TODO list as has already been done
and god there is a lot of yaml, huh
even worse, almost everything you find is based around the idea that you want to run it on the cloud and you have to find special software or youtube videos and github pages for doing anything selfhosted
every step
yea ... every single step lol
but at least your entire thing is documented in config files haha
I need to try to dip my toes into it but I'm afraid I'm gonna lose my sanity faster than with bash
dont.
the kubernetes website makes it all look fairly easy with nice diagrams and everything. What they leave out is that pretty much everything requires external software
the big thing about k8 they dont tell you is that k8 doesnt care how soon you want something done
itll get to it maybe today, maybe tomorrow.
maybe the bad startup sequence leads to a 4 hour retry timeout
too bad.
You could say that the main issue with everything code is how informative the error messages are
i do a lot of async and multithreading now, and im struggling to use the tooling to debug in those scenarios. i think thats the next big tooling challenge
async is really hard to debug some of the time
youve really got to write stuff right the first time, test the hell out of small pieces
"promises go brr"
Has anyone else worked at a big tech place before?
I’m just fixing tickets and looking at alarms and notifying service owners as a software engineer. I haven’t written code in a month and want to kms lol.
nope. but small companies suck too
not on company time i guess
I worked at an Insurance place, i would say review the code that run the scripts that you support because they typically suck and will break at some point.
I do big query, Sql, Sas and some python if anyone has questions.
big facts ^
Also look at employment that takes on a variety of tasks. it keeps you motivated and busy. less likely to hate it
are you not reading foxhole-discussion? its been the subject for hours
wild takes, some mild, some history, loxen posting cats
that place makes me feel dirty
at least one person said logiwaze is ruining foxhole, so ... ... nice
its nice to be thought of
lol, must be useful
if clout could be exchanged for money...
The more philosophical question is does automation ruin game experience and to what amount will it take out the fun of playing.
were programmers. we dont ask if we should 
Ethical questions are asked elsewhere
somebody says adjust the reported mileage on this voltswagen we say how high
We ask engineering questions
Yikes. Scary
our life is automation
👋 One of a few thousand engineers at my place
Is it boring?
Nope. I love it.
Has different set of challenges to smaller places, less individual responsibility, etc. But more chance to learn from specialists.
We have dedicated network, infra, database, operations, etc teams. If I have questions, I can get them to assist on stuff and learn from some of the best in the field in the country
Tbh, i love cloud ops
But that's more of an SRE than an SWE role
My place doesn't have SRE, we hire SRE and call them SWE 😅
Which is not good
I just spend all my time responding to alarms and reading through logs and metrics and dont actually code
But I think it’s a similar story across FAANG
Tbh, sounds like you need to adjust your alarms
Not really tbh. Some teams yeah, but not the majority
Yeah I think it’s team dependent
But it sounds like the cloud teams are all pretty similar across different big companies
It’s mind-numbingly boring though
I think my best bet is to learn as much as I can about the AWS stack and then take that knowledge to a startup or something ig
is seth's site completely shutdown?
how do I bribe Hayden so he puts all filters in his map?
what like ?
display only, say MPFs, or refineries and scrap nodes...
https://sigilhq.com/stats/ sigil stats has all the filters
Sigil Stats
oh, nice
What would be a good engine/tool to make a turn based tactics rpg game? I'm hoping to do this as a hobby and familiarize myself with using git versioning and any other nifty skills I can in the process. I am not a professional, but have some experience programming.
whats your language(s)?
I've used python in the past, I messed around with the pygame library several years ago. These days, my scripting work is limited to matlab.
hmm i might consider just finding the most popular python based game engine in that case
hmm tough question
I also did a little bit of Javascript when Sethfire and Kastow were first making their first map.
Open to picking up whatever's useful.
javascript ... is an interesting way to go
i mean you can be sure itll run everywhere...
i think if i were taking that approach i would personally use unity, and compile to webgl, but i dont know the javascript domain for gaming
Alright, I'll check out Unity. Thanks Derp.
0
Ayo hold on a second
I'm a game developer. By far my favorite game engine is the Godot game engine
It runs on gscript, which is semantically based on python, and you can import python libs.
Very powerful, extremely fun, and it uses a unique node system which is way more flexible and easy to use than the unity entity-component system
The editor is much smaller, and much much faster than the unity editor
It's also open source
Sounds cool, thanks for the recommendation! I'll have a look. Haven't started up anything yet.
godot is really nice, it's the one I'm using as well!
Godot is much better than unity for 2d games
Unity is only better for 3d stuff that does not need super good graphics
then you use unreal
As someone coming from Unity, is there a "pattern" people use when working with Godot?
for example, Unity is component-based. I can write a script that defines a trait and then attach it to whatever objects I want.
Godot has a tree-like structure which I couldn't really figure out how to architect for. Polymorphism and OOP has always been confusing for me, and my project layout got really messy really quickly
I had multiple celestial bodies which had gravity and were destructible, as well as a player which did not have a gravity field or destruction, and I wanted both the player and the celestial bodies to have a "clickable()" function that would center the camera on them, so I made them extend a base class "clickable"
but then if I wanted the player to share a method with some other thing in my game that isn't clickable, then that other thing in my game would have to extend "clickable" as well, and then override the "onclick()" function to do nothing
Easy solution there is to use signals or tags. Polymorphism is baked into Godot's design, but there usually isn't a need to extend it too much. But also, overridden functions which do nothing are also a part of polymorphism, and many languages include ways to suppress those functions
As far as a "pattern" goes, it's very easy to work with if you plan out your system using flowcharts. The Godot wiki has a guide for doing that very thing.
It just takes a little bit of hitting used to after coming from the entity-component system of unity, because the entities and components become the same thing
unity is sort of locked into old .net and old c# (because of mono), i take it godot is not
not even sure if godot is using .net? or mono? or old .net framework?
I used signals, I just never really liked polymorphism since I learned about it
“Has-a” always felt better to me than “is-a”
I tried using composition by creating a “clickable” or “mass” script and the composing an object of multible “is-a” objects, but I couldn’t get that to work
How tricky would it be to get the foxhole API to pull the captures, casualties, etc value for a given war and time and export it to an excel sheet. Basically, this graph from foxholestats dumped as a table
(i tried looking for this information in the site's inspect, but I could only find the vectors xD)
I’m not sure how Hayden did it but you’d just need a script to run for the entire war and query the API every minute or so
Load that into a dictionary, then convert to a Pandas dataframe and export to CSV
Or you could probably just write your own CSV converter
Ah. so the API doesnt have historical data? and foxholestats has just been collecting this info for the entire time
I dont think so? I’ve never actually used the War API
It appears to only be cumulativep
it doesnt. you can talk to hayden or kastow about historical data
truly the foxhole historians
I understand and your concerns are valid
Imagine thinking foxhole is a game and not a life changing experience which turns you into a mammon rusher irl
It's honestly so funny how that is the dominant early game strategy
Is skipping inheritance in favour of weakly linked composition an option? Im not familiar with godot
But you could inject a component that implements clickable() and give an iclickable interface exposing the injected object's method
That’s kind of what I was asking. I struggle with OOP and so I was wondering if there was a way to make Godot more “unity-like” with components, and I couldn’t figure it out
Does it work, then?
27
Idk lol I’m not sure how I would implement it
Since Godot is turing complete I definitely could, but I don’t know how I’d go about it
the components are the part i like least about unity
I guess somebody familiar with Godot would have to see if it supports dependency inversion
I'd be surprised if it didn't tbh
If it's not 20+ years old
@unreal cloak this may help, found through quick google search
Welcome to the Basic Design Principles Series, in this episode we take a brief and general look into the Dependency Inversion Principle. The Dependency Inversion principle is part of the SOLID programming design pattern. You can use this design pattern to improve your programming no matter which area of programming you go into.
Godot Tutorials...
Oh man I had to learn about Dependency Inversion for work and it made no sense to me
I recommend Uncle Bob's lectures
And books too
Very practical explanations
But basically dependency inversion is what you replace inheritance with if you want your code to stay more separated from each other, so changes can be made in only 1 component
Bad explanation but should lead in the right direction
I also tried implementing components as children like in this thread:
I'm coming to Godot Engine from Unity. In Unity, you use components to build entities (game ... multiple components to one node (game object)?**
But the “.get_parent().get_child()” was tedious
Kinda feels like trying to use Godot like Unity
Which, if that's what you want, just use Unity
I have read and watched stuff by Uncle Bob and the GOF, but I never got it
The only book that made design patterns click for me was “design patterns for game programming” and even then a lot of seemed like a contrived way to make up for the language not being able to defer function calls
But I’m a shitty programmer so that might also be it
The problem all of these concept are trying to solve is maintenance cost once the project grows larger than a few thousand lines
And almost every program worth completing is going to be bigger than that
So it's something you don't really run into unless you work enterprise
I guess I just haven’t ever worked with a codebase that large
I work with some enterprise code now and see a lot of DI and factory builder patterns and stuff, I dont really get it
Mostly for legacy stuff
Prior to that nothing got larger than a few thousand lines since everything is service-based now
Yes, service architecture is in now so people use it for everything, even if it's not required, useful or even if it's actively detrimental
Yeah my experience was that we pre-optimized far too early
Most of what we did could have been a django monolith
YAGNI is my favourite of the principles
One thing dependency inversion helps you with is building scalable programs
But as far as game dev goes, I haven’t really run into a need for patterns yet in Unity outside of singleton
Any item in the dependency tree can be expanded at will without affecting other components
I wonder what clapfoot devs use
I have used Unity
I used visitor and command for an RTS game, but I took a break and when I came back, the cognitive overhead on the code was really high and it was hard to understand my old code
And even for a small project the amount of scripts you have quickly becomes bigger and bigger
I don't know what visitor and command is
Yeah dependency seems really useful for all the Java stuff I do. I dont really get how it works tho
Visitor is basically to make up for not having deferred function calls
Command is also solving the same problem if I remember correctly
Instantiating functions as objects
I did a queue of commands so you could queue up actions for the RTS units and they would execute them in order
And then visitor meant that if you had builders and combat units selected, it would order them to do different things
For the same commands
Sounds complex
But in js or python it’s as simple as just throwing your function signature into a stack and then doing -> () to it
I'm holding back hard rn not to try explaining dependency inversion with Cars
lol you can go ahead
Oof
That also bugged me
In university all the OOP explanations were about cars and fruit and I’ve never actually understood how it works in practice
Let's say you have a method to start the motor for your car, StartMotor()
You also have a method to change the rubber on your tires, ChangeTires()
Now let's say you want to make a tank
A tank also has a motor, but doesn't have tires
But a Tank has a gun
So your tank has StartMotor(), ShootGun(), and your Car has StartMotor() and ChangeTires
Okay, make a super class that has StartMotor(), and inherit tank and car from it
And extend with ChangeTires() and ShootGun respectively
Works great
With me so far?
Yes
Well
Here comes: The Armored car
It has a motor, tires, and a gun
You can't make the super class have all three methods because then the car would have a gun, and the tank tires
But you don't want to duplicate as well
So you have
Superclass with StartMotor()
Then armored vehicle class with ShootGun()
And then again extend that with ChangeTires()
But whoops, how do you fit the car in?
See the issue?
Yes that was always a block for me in OOP
This is where you'd need multiple inheritance, but most OOP languages don't support it
(And still is lol)
(for good reason)
So how does dependency injection help you with this?
Well, one thing you can do with DI is inject behaviour as components
Let's make a Motor class
Let's also make a Gun class
A Tire class
And a Vehicle class
They have the respective methods
So how would you implement your Car?
Well easy, your car has a motor, so when constructing your car you "give" it a motor
new Car(motor)
Same with the tank;
new Tank(motor, gun)
And if you now want the tank to shoot, or to start the motor, you expose those methods, or their components
So you could call new Tank(motor, gun).GetGun().Shoot()
This will allow you to combine these behaviours however you want
That makes sense, but aren’t motor and gun somehow created when Tank() is called?
Because otherwise all tanks will share a gun instance
Yes, this is called the "Dependency Tree"
Somewhere in your code you will have a tree of objects that make up your whole application
(To avoid this, Dependency Containers were invented, but that's a thing for another time)
So what you'd do if you wanted a non-shared gun instance
You could do
var motor1 = new Motor();
var gun1 = new Gun();
var tank1 = new Tank(motor1, gun1);
var motor2 = new Motor();
var gun2 = new Gun();
var tank2 = new Tank(motor2, gun2);
Of course all the helper variables are pretty redundant, you'd just create the objects right in the constructor call
That all makes sense to me
I dont understand why it’s called “inversion of control” though
For an added bonus, you can work with interfaces too, which will let you later replace components without changing everything that uses those components
The "inversion" part is that control is passed "upwards"
From the using class to the used class
and runs inverse to the execution flow
Ok yeah that makes sense now
I guess I had used DI without understanding the formal name of it
Why not use composition for everything then? It always seemed to me like inheritance had very limited use cases
Funny you'd say that
Because that's exactly what so many modern programmers are saying
inheritance is almost always the wrong choice
The car analogy I always heard in school always fell apart as soon as a characteristic of a third type of vehicle was intorduced
But they drilled polymorphism and inheritance so hard
And I say "almost" so that nobody can come later and give an example to prove me wrong :)
Don't know when I last used inheritance
Oof, your course was pretty outdated
Yeah I think the prof just loved Java
I thought I hated CS until I started doing stuff in Unity and learning Python
I see a ton of Spring at my work which I think is IoC
Yes, spring has IoC built in
Though I'm generally not a fan of the syntax
I tend to dislike annotations
I dont know what any of it means, I’m so new to Java and I haven’t really learned it since I’m barelt modifying things
Just learn C# instead lmao
It's microsoft java
Java has so many outdated tutorials it's sometimes hard to learn without somebody who knows the whole history of it
I’ve done C# in Unity but that’s so sandboxed by Unity’s API that it’s not really C#
Like I barely know how delegates work or how to use the package manager since Unity doesn’t support non-approved C# libraries
kinda insulted at the idea of .net being microsoft java
for so many reasons
delegates are just function pointers
with a closure ... hmm
But... its true
j#
wait wtf that's real?
Visual J# (pronounced "jay-sharp") is a discontinued implementation of the J# programming language that was a transitional language for programmers of Java and Visual J++ languages, so they could use their existing knowledge and applications with the .NET Framework. It was introduced in 2002 and discontinued in 2007, with support for the final r...
the point of .NET is that you can create your own abstraction over it
there's a lot of # langs
Could it be that foxhole ingame packets are UDP but the "foxhole war services" (green circle on top of chat) like squad chat and voice are TCP? Had weirdness after a lightningstrike and trying to work out what happened
The vc itself will be UDP, but the manager for squad and local will be tcp I think
the manager?
The thing that figures out where you are for local and which squad you are in
Again, green circle
Oh also I was displayed in the wrong region in regiment which is kinda funny
Sneak 100
I know it is not really code related, but I couldn't get an answer elsewhere: does anyone know if the wind offset of artillery is proportional to time of flight or proportional to range?
thanks. by the look of that it is just range based
in most circumstances range and time in flight will be related, no?
except for major differences in elevation
now that I look closer with more than 20% of my braincells, it appears to be proportional to time of flight and this is an arbitrary solution that happens to be close enough for 120 guns to not matter
for the same gun, yes it is close enough
however, if you wanted to make a general solution, that becomes a whole lot harder if it is proportional to time of flight rather than range
@long raft https://www.reddit.com/r/whenthe/comments/vrrdmg/when_the/?utm_medium=android_app&utm_source=share
luv webp
Looking like this currently
by just hiding the map doesn't mean we can't find you 🤔
I can smell your tankette from miles away, you’re burning diesel, aren’t you?
Absolutely, Who doesn't recognize the uphill slope east of Calamity. ;-). I don't intend on streaming at all so this is merely for recording purposes.
Get of my lawn you piece of metal
you are invading papa bear palace
take your foxhole slander elsewhere, this channel is for code talk. 
Var me1
you can create a different implementation as long as you abide by the interface
Uh,correct?
That was 2 weeks ago xd
Lmao
I did a game jam again this year
idk if I'll do it again, it was pretty exhausting
I liked it
diceboy - rouge ftw
I also really liked the random lines from chess pieces (and pawns) and houses
wow impressive
Yeah the artist I worked with is really talented
the interdimensional reptilian shapeshifting CIA mantids are causing AI mossad deepfake false flags by masonic predictive program hydroxychloroquine weather manipulation Monsanto fluoride trails to distract moloch crisis actors from the fact that fake news aliens are hollow and that the sandy hook landing never happened so (((they))) can continue to use CERN vaccines to harvest gangstalker jesuit adrenochrome from our kali yuga Covid-19 pineal glands for chinese nanochip astral projection remotely through demonic V2K 5G technology from the black cube HAARP hexagon on top of Satan
I do not get how people keep fucking up the use of this channel
@ripe estuary i agree but its a massive overstatement of what the chinese tech conglomerate l. They cannot produce 5G nanochips to monitor your covid 19 levels its simply a by product of the "long covid" hoax the FBI has you believe exists its simply a by product of the deepstate hallucinogen strategy.
you guys can all read music too, right?
The crazy thing is that everyone's uncle unironically believes this
I can, very slowly. I lost the ability to sight-read years ago.
Does anyone know if there's a way to do third-party validation with Discord?
Like could I have a Django app that requires you to be verified on Sigil to use it?
I guess worst-case I could use CV to have players-self validate and it just checks the logo and date time in the F1 screen to verify your account
You'd have to run a bot in sigil i think to make that happen
That provides an api or checks the user roles manually
Frankly it would be great to piggy back on wuh and sigil verification for some apps, but..yea
If you were to ask me to use discord OAuth on a non-discord site that isn't like, Dyno, or some huge bot, it's a major turnoff. Waaay to many scams going around like that recently.
If I cant verify through discord I could just have a CV verification that runs in Lambda
