#code-talk

2 messages · Page 26 of 1

fickle aurora
#

the reason why buffer overflow is a problem is because the CPU has to look in subsequent memory locations until it reads null

devout ivy
#

Almost as if null terminated strings are a problem

#

And as if intel provide instructions for prefixed strings for a valid reason

fickle aurora
#

yes it is a problem only if you don't know what you are doing

long raft
#

same problem even with length prefix, but maybe less likely

#

yea allan this is ridiculous, youre basically giving a skill issue git gud argument to programming

devout ivy
#

Typically can test beforehand with a prefixed string

fickle aurora
#

derp is talking about one single value, which isn't a problem because it will only access the maximum number of memory locations for whatever data type it is

long raft
#

why have safety features on a car if you can just drive better

devout ivy
#

You've completely missed derps point

#

In a rather hilariously inept manner

long raft
#

you were suggesting one single value could overwrite your bootloader. im suggesting a single mathematical operation thats done incorrectly is a big deal

fickle aurora
#

I never missed the point, adding 1 to 255 in a single byte won't cause an issue

devout ivy
#

Are you sure? It's not a memory violation sure

long raft
#

is the difference of looping 256 times and 0

devout ivy
#

But it could still be a nasty bug to your programs logic

fickle aurora
#

it's not a memory violation because a byte declaration will limit the CPU to only read one byte of memory

long raft
#

yea this isnt mangling a string, this is causing logic errors

devout ivy
#

I said it wasn't a memory violation

long raft
#

and buffer overrun testing is comparable to integer overflows was my point

devout ivy
#

You don't need to explain why it wasn't a memory violation

fickle aurora
#

logic errors aren't even an issue because it will just set some flags in the flags register, and most people never even check eflags

devout ivy
#

You've just been fired

long raft
#

..

devout ivy
#

Logic errors can and have been life or death

long raft
#

i do not believe allan is trolling

fickle aurora
#

you are confusing a data type with an array of data types

devout ivy
#

No

#

I'm not

#

So if I am writing safety critical code

#

And a 255 incorrectly becomes a 0

long raft
#

arithmetic errors are very grievous

devout ivy
#

And results in some other safety critical code not running as the condition is now wrong

#

That's not a problem?

long raft
#

they are easier to debug than a buffer overrun tho, oof

#

just step through a scenario that fails

fickle aurora
#

how is buffer overflow not easy to debug?

long raft
#

if there was some easy way to say why, then it would be easy

devout ivy
#

I'm guessing you don't believe in unit testing either

long raft
#

i would say the biggest reason is because you cant easily visualize the data youre reading, its not like a string. you can hex edit it, but encoded things are difficult to analyze

#

oh shit test driven development is 21st century, just git gud

#

we didnt need tests in the 20th century

#

there was literally never a problem until it rolled over into the 21st century, very first day even

#

err first day of 21st century is 2001 huh

fickle aurora
#

I'm pretty sure people were better at debugging in the 90s than now

long raft
#

hah.

fickle aurora
#

I can use star citizen as an example of a project where code is pumped out with not even one glance at bugs

devout ivy
#

That doesn't answer the question

long raft
#

its probably 5 orders of magnitude more complex

#

you already know your answer six

#

he doesnt approve of buffer overrun testing

#

you think he wants unit tests?

fickle aurora
#

in the 90's, if your program was bugged out, people didn't buy it because you couldn't just automatically patch it by connecting to the internet

long raft
#

unit tests would just be admitting youre fallible

devout ivy
#

Clearly has no experience in embedded design then

long raft
#

oh well i dont either

devout ivy
#

Or even touched basics of safety critical programming

fickle aurora
#

well for one, no one uses C# in embedded

long raft
#

...

devout ivy
#

Because that cavalier attitude has literally resulted in deaths in medical and industrial sectors

long raft
#

no one?

devout ivy
#

Did I say they did

#

And actually, they do

long raft
#

is it rare?

devout ivy
#

Extraordinarily rare yes

#

But not non existent

fickle aurora
#

it is non existent if you are referring to microcontrollers

devout ivy
#

So you're saying I don't have an esp32 this minute running c#

fickle aurora
#

esp32 is a microprocessor, not a microcontroller

devout ivy
#

It is categorised by it's own vendor as a microcontroller

devout ivy
#

I also have stm32's running it

#

Which you yourself already referred to as a microcontroller

fickle aurora
#

yes they like to say it's that, but it's Tensilica Xtensa LX6 microprocessor @ 160 or 240 MHz

devout ivy
#

It has no mmu

long raft
#

i feel like if i came in here as an alt talking about how great C is allan would find a reason C sucks

fickle aurora
#

microcontrollers don't run at high clock speeds like that either

long raft
#

especially if i had a blue name...

devout ivy
#

You've clearly not touched any microcontroller in the last decade then

#

We even have 1ghz microcontrollers today

long raft
#

i guess every programmer needs a creed, i dunno i guess allans is that things peaked in 1970

devout ivy
#

Mmu-less as that seems to result in the common modern distinction

#

Even atmel avr32's are clocked that fast (hundreds of megs not gig)

long raft
#

imagine doing async in C

fickle aurora
#

it's hardly believable that anyone has used C# for a microcontroller

devout ivy
#

C# can run on an arm cortex m0 mcu

#

There's been several ways to do so over the years

#

Starting with the .net compact framework

#

.net microframework

#

Nanoframework

long raft
#

i wonder what advantage there could be to doing that even

devout ivy
#

And also meadow

fickle aurora
#

arm is a microprocessor.. again, not a microcontroller

devout ivy
#

Cortex M ksnt

long raft
#

all i can think of is like ... if you need a fast web server? i dunno

devout ivy
#

Not cortex A, cortex M

long raft
#

if you just really only know 1 language i guess

devout ivy
#

Cortex M is the microcontroller variant

#

To compete with avr and pic offerings

#

They lack MMUs, microprocessors have MMUs

long raft
#

uwu?

devout ivy
#

Or is the humble stm32 not a microcontroller now

fickle aurora
#

yes I am sure someone managed to fit the .net framework into it, but it's not mainstream and it's not the intended method of programming a microcontroller

devout ivy
#

Change in tune from earlier where you claimed it couldn't happen

fickle aurora
devout ivy
#

What question or suggestion

#

I made no question or suggestion

#

I just made the objective statement that c# can run on several mcus

fickle aurora
#

well, the answer is there is a project called netduino for getting .net into microcontrollers

devout ivy
#

I didn't say it ran on all of them

#

Netduino died years ago

long raft
#

oh netduino is old - even ive heard of that

devout ivy
#

Replaced with nanoframework and meadow

long raft
#

i didnt know an arduino counted as a microwhatever

devout ivy
#

Still never answered my actual question

fickle aurora
#

well you guys keep trolling with obvious stuff, like with buffer overflows going on about storing value 256 in a one byte memory location, which wouldn't do anything of course because you can only fit 8 bits in one address, and of course the real issue with buffer overrun is quite clearly a problem with pointers to arrays

devout ivy
#

No, that was you missing the point

fickle aurora
#

at first I couldn't tell if you really didn't understand but I kind of figured it out by now

devout ivy
#

Nor was it trolling

#

If anyone doesn't understand, it's you. You don't understand that storing 256 in a 1 byte address is a logical error

#

Which may set a flag. If you bother to read that flag

#

What if you dont

#

What if that logical error results in other safety critical code failing

fickle aurora
#

it isn't even an error, it may be a design problem but it isn't a security violation

devout ivy
#

Didn't say it was

fickle aurora
#

pointers to arrays are an actual issue

devout ivy
#

So a logical error in a safety critical system like I don't know, a pacemaker, that isn't a problem

#

A bug in an insulin pump firmware from someone not checking integer overflow, not unheard of

long raft
#

what is the difference of a buffer overrun and a [bad] pointer? its the same thing in reverse. its a buffer underrun or a combination of both

devout ivy
#

And your attitude seems to be that it's not important. And seemingly that unit tests to verify this kind of thing are also not important

#

And that tools that exist today for reducing errors as simple as integer under/overflow or out of bounds memory issues are also pointless?

long raft
#

AllanOS would release 1.0 on schedule, and never need another update again

fickle aurora
#

it's a design problem, you can sort it out by reading the eflags register, it's not a problem that could cause havoc on a computer system

long raft
#

just git good lol

#

just point your pointers to the right place, whats the problem

devout ivy
#

And that attitude just got you fired again from a place I previously worked

#

It might not cause havoc as far as the computer itself cares. But if that bug results in your ABS system not responding correctly?

#

You still seem allergic to even mentioning the words unit test

long raft
#

hasnt got to that chapter in the old book on C

#

its probably ... past the index

#

maybe an addendum...

devout ivy
#

Eh, it's a principle that existed as far back as the 80s

long raft
#

yes i think in the modern day, we dont expect programmers to be perfect, we know things are complicated, so we pay some CPU time to double check their work, and its worth it because we have CPU time in spades

devout ivy
#

And tooling did exist back that far

long raft
#

it existed in manufacturing, not in computers software

#

cmon, 700 line programs dont need unit testing. they are the unit test

devout ivy
#

Nah, it just wasn't dubbed unit testing til the late 90s

#

But testing code via execution in smaller chunks was performed even in early 80s

long raft
#

yea, and the code bases were small

devout ivy
#

Even 8bit avr code can be unit tested. Assembly is harder to unit test, it's one of the major reasons you see less of it around

#

But it can be done, and it is actively done

long raft
#

eh its easy you just step through it, and then never ever ever change it again

#

you cant refactor assembly. all you can do is rewrite it, if its been more than like 2 days

fickle aurora
#

since when was assembly harder to test?

#

can't refactor? since when?

#

so you're saying once I write a program in assembly, it's not possible to modify the program?

devout ivy
#

unit test. And note I said it can and is done

long raft
#

assembly is largely unreadable

#

its hard to rewrite stuff better

fickle aurora
#

jeez I must be doing things the wrong way, because I have no problem changing or updating assembly

long raft
#

i mean you cant make it more readable because its ...inherently unreadable

devout ivy
#

Eh, I've seen some clean ASM, I've seen obscure ASM, I've seen dirty ASM

#

It can be read

fickle aurora
#

it's not unreadable if you learn it

long raft
#

3 comments for each line?

devout ivy
#

Don't need that usually

#

But typically assembly isn't as broken down into smaller discrete units

#

Can't unit test something that isn't a unit

long raft
#

patterns are harder to recognize

devout ivy
#

But it can 100% be done

fickle aurora
#

you absolutely can break it down into smaller sections

devout ivy
#

Where did I say it couldn't be

long raft
#

yea i guess my point was its easier to rewrite it all than refactor it

fickle aurora
#

you can include other files, libraries, execute functions written in other languages

devout ivy
#

There will be obscurities in any language. Comment lines exist for that

long raft
#

what is there to learn? its mostly referencing

#

its not like theres tricks to assembly

devout ivy
#

There are, some are simple and some are almost galaxy brain

long raft
#

really?

#

galaxy brain assembly tricks?

devout ivy
#

Everyone knows about the subtle shift by 1 space instead of mul/div by 2

long raft
#

errr i ... know of that myth yes

devout ivy
#

Or testing for odds/evens by testing the LSB

fickle aurora
#

you only need to learn the 20 most commonly used instructions for x64 to make basic functions

#

and the calling conventions are important

long raft
#

the conventions are very simple compared to any other language

fickle aurora
#

GCC ignores some of the calling conventions though

devout ivy
#

It's not a myth but it isn't as big as impact today as it used to be as modern mul/div is significantly faster than it was and most compilers are smart enough to make the same optimisation

fickle aurora
#

GCC won't add 32 bytes of reserved stack space for each function call as directed by Microsoft, but it's not critical

long raft
#

yes these days its not faster for left shift, and right shift means you wont also have a remainder to use

devout ivy
#

Muls in particular are very fast on modern CPUs yes

long raft
#

yea those ... microoptimizations, like xor to zero a register, i never considered those galaxy brain, those are just architecture quirks, reference things

devout ivy
#

I think single cycle now in some arm core designs

fickle aurora
#

the biggest advantage is being able to write a program in as few instructions as possible

long raft
#

why is that an advantage?

#

what if theyre slower instructions

fickle aurora
#

even just a hello world program you can cut the bloatware by at least 50% by writing the assembly yourself instead of using GCC

devout ivy
#

Div is still slower. And on mcu's you're less likely to find cutting edge stuff like a single cycle mul instruction

long raft
#

i have a big hard drive and lots of ram, why do i care about that

devout ivy
fickle aurora
#

if you ran concurrent servers with millions of connections you might care about it

long raft
#

its not an issue

devout ivy
#

Humble Arduino Uno uses an atmega 328p

#

8bit avr chipset at 16mhz

#

Like 2kb of ram iirc

long raft
#

hmm not an issue for me

devout ivy
#

There's the sort of place it might legitimately make a difference

long raft
#

also i still think a C/c++ compiler would do a better job optimizing size than i could do, or anyone else i know

devout ivy
#

Wouldn't want to go and write an entire computer game on a modern pc in it, and most game engines today don't have any assembly at all anymore

#

Not even 1 little sub routine called from c

fickle aurora
#

Factorio was written in C on allegro originally

#

not a very old game

devout ivy
#

Yes, C

#

Not assembly

#

I didn't say nothing was written in C

#

Albeit checked, it was C++

#

And still uses a lot of lua

fickle aurora
#

derp, a 1 hour MIT free open courseware (University of Massachusetts) will teach you how to make assembly more optimized than a C/C++ compiler

#

all the courses are available if you want to learn

#

of course, if you don't want to become better, that is also an option

long raft
#

i uhh ... i reject the notion that its possible

#

its sheer arrogance to think youre better than a compiler

#

its like a fundamental basis for my whole way of thinking. also there is no such thing as a free lunch

devout ivy
#

It's actually been regularly proven wrong too that the compiler is slower than a human. You absolutely can cherry pick examples like hello world

#

But real code isn't always hello world

long raft
#

i also cannot beat a computer at chess

devout ivy
#

Human written assembly is usually terrible for cache alignment, compilers generate for cache alignment, can be hugely important on hot paths

long raft
#

yea cache ... ffs... cache.

#

been doing a lot of GPU programming lately, omg nothing from the CPU world works

#

all that stuff you thought you learned was fast its not

devout ivy
#

Does it mean there are humans that can't write good code with excellent caching performance, no, of course some can

long raft
#

with tons and tons of testing

#

and deep understanding of the particular hardware architecture

#

which will be useless in 3 years

devout ivy
#

Fewer instructions doesn't always mean faster either as not all instructions are single cycle. Particularly in x86

#

Many arent

#

Throw in a bit of branch prediction and out of order execution to keep you on your toes - and compiler on its toes tbf

long raft
#

you have to think more stochastically at these complexity levels now

devout ivy
#

Arm typically has much lower cycle counts

long raft
#

how is RISC pushing so hard now? like 15 years ago they were totally hobbled by heat

devout ivy
#

They were never hobbled

#

The money just wasn't there

long raft
#

they werent seeing the performance gains of cisc

devout ivy
#

The only interest was more in how can we make tiny chip power tiny device rather than pushing the envelope of what 100W can do

long raft
#

apple abandoned the architecture at least in part because of heat issues for higher speeds and mobile devices was a no go

#

intel was even killing it on the low power stuff

#

now arm processors are so stupidly good, and m1

#

i think only one of them will survive into the future, i guess risc?

devout ivy
#

PowerPC was pretty fast. But it was partly business decisions, apple small customer and IBM not catering their lines to apple

#

Less a fundamental issue

long raft
#

really?

#

that seems like a petty reason to change your architecture every decade

#

its quite disruptive

devout ivy
#

They sold more 360's than apple sold PowerPC macs in total

#

360, GameCube, Wii, Wii u and PS3 all featured powerpc

long raft
#

oh man that 360 was a monster

#

so cheap for that kind of power. but it also melted

devout ivy
#

Yep and it's a risc design

long raft
#

rrodisc

devout ivy
#

Yeah but remember the first revision units, the coolers aren't torqued to the right spec

long raft
#

that console lasted like 5 years and was still relevant ... damn that was good hardware

devout ivy
#

So were usually making poor die contact

long raft
#

yea mine melted

devout ivy
#

Mine came to life in an oven

long raft
#

i had mine serviced, they extended the warranty an extra year and mine melted in that window

#

i still have it lol

devout ivy
#

But yeah basically, IBM weren't releasing new chips suitable as upgrades to what apple were selling

long raft
#

so i dunno yes the power was there, but also the heat was. because yes even when they replaced the cooling unit i could use that thing as a house heater

devout ivy
#

Like sure, they had a Mac on sale, but next gen has to be faster right? Part didn't exist in the catalogue

fickle aurora
#

https://www.youtube.com/watch?v=wt7a5BOztuM at 2:40 you can see where one of the examples of why you would want to learn assembly is due to compiler inefficiencies and problems

MIT 6.172 Performance Engineering of Software Systems, Fall 2018
Instructor: Tao B. Schardl
View the complete course: https://ocw.mit.edu/6-172F18
YouTube Playlist: https://www.youtube.com/playlist?list=PLUl4u3cNGP63VIBQVWguXxZZi0566y7Wf

This lecture focuses on how C code is implemented in x86-64 assembly. Dr. Schardl reasons through the mappin...

▶ Play video
long raft
#

with apple? nah it doesnt have to be faster

devout ivy
#

Apple were less dickish back then

long raft
#

the only people that course should be relevant to are compiler designers

devout ivy
#

People were legitimately using macs for good editing performance back then

fickle aurora
#

no, it's for general programmers

long raft
#

i remember macs were stable for video editing, never performance, but you could not get stability for video in a windows program

#

video is ... so intense. good god is it intense.

devout ivy
#

When the first PowerPC macs came out. You were literally looking at gains over competition that make the M1 today look like a slouch versus it's rivals

#

And the crazy thing with PowerPC macs. Idle power draw. Full load they pulled many watts sure.

long raft
#

oh they can clock them way down for idle huh

devout ivy
#

But they had CPUs in 2000 with 1W idle powers

long raft
#

definitely not my xbox 360 lol

devout ivy
#

My complete Mac MDD with dual powerpc's idles at 20W from wall. Less than my lattepanda delta pulls at idle

#

And that's a modern atom (branded as celeron)

long raft
#

atoms were disappointingly weak IMO

devout ivy
#

Modern atom isn't as bad tbf

long raft
#

its like the price you pay for x86

devout ivy
#

But the lattepanda is bad

#

It's just taken a long time for companies to pour the money into another personal computer take on risc unfortunately

#

And even that I think is just side effect of the rampant consumerism in modern flagship smartphones having to be more powerful than units a year prior

#

And finally just realising we can take that one extra step. And apples closed wall ecosystem giving them the weight to take that risk

#

Now I'm hoping the windows 10/Qualcomm exclusivity deal ends (meant to this coming spring) and that M1 lights a fire under competitors butts

long raft
#

wait what about windows 10 and qualcomm?

#

was there a windows 10 for ...snapdragons or something?

devout ivy
#

Windows 10 for arm

#

Only contains Snapdragon drivers

#

And the only windows 10 arm devices released are all Snapdragon

long raft
#

I had no idea they were exclusive

devout ivy
#

Even the surface pro X and it's "SQ1"/SQ2

#

Those are Qualcomm Snapdragon 8cx's with a neutral net co processor and a slight overclock

#

And the 8cx is just an 855 from phones with more cache, an overclock and some extra I/O

#

And then the original windows 10 arm devices are literally Snapdragon 835. Then some used the 845

#

Have a surface pro X at work, it's interesting

#

Nowhere near same performance League as m1

fickle aurora
chilly burrow
#
  "warId" : "4d5467c6-3ac9-433e-ba0c-c95fd73916e9",
  "warNumber" : 86,
  "winner" : "NONE",
  "conquestStartTime" : 1639507210409,
  "conquestEndTime" : null,
  "resistanceStartTime" : null,
  "requiredVictoryTowns" : 32
}```
When a faction wins/loses the war, does the "warNumber" changes, or it stays the same until next war starts?
devout ivy
#

Believe same until next war

hollow gyro
#

I reckon so too, but I'm only recently started this kind of coding.
I reckon it stays that way until Resistance Phase ends.

pure sierra
fickle aurora
long raft
#

what advantage is there to reinventing the OSs memory management?

#

its just another layer

#

if you want to avoid alloc calls then you would typically just use a memory pool, much easier to allocate smaller pieces than a big block

fickle aurora
#

I'm offering examples for those who like to learn more about it

#

and it seems you don't know what you are talking about, like yesterday when you mentioned doing Byte 255;, in C, there is no Byte, but you can use char.. except you can't store 255 in a char as the max is 127, now unsigned char can store up to 255 .. and the reason for this is that the most significant bit is reserved for the sign flag

long raft
#

who said that was C code?

#

it was just an illustration

#

typedef unsigned char byte;
now its C compatible

coral sundial
#

Why do you need to typedef defined types?

long raft
#

its a C tradition to make your code as unreadable as possible

long raft
#

has anyone stitched the newest map?

pure sierra
#

what maps

long raft
#

i know there are some road changes but im not seeing any updates...

pure sierra
#

i think i forgot

long raft
#

i forgor too

pure sierra
#

thanks for reminding me

long raft
#

but i see nothing has updated in the warapi so i dunno if anyone has stitched it from the assets yet

#

storm cannons should be coming online soon so thatll be in the warapi to finally test

#

id like a new map tho and i havent kept my code up to date for stitching it, and i dont have the assets from the game directly

pure sierra
#

the maps did update for last update in warapi

long raft
#

28 days ago?

pure sierra
#

well that had the update for the sc

long raft
#

Hmm OK I'll use that one

coral sundial
#

@long raft you and my c teacher would go along wel

barren quarry
#

I think

#

I updated the tiles

pure sierra
#

storm cannons are alive

long raft
barren quarry
#

they are fucked

long raft
#

😦

#

damn they look good tho

#

damn i thought it was gonna be amazing for finding missed roads

pure sierra
long raft
barren quarry
#

what i mean by fucked

lunar cobalt
#

holy shit

long raft
#

uhh

#

what about the regions where the map changed?

barren quarry
long raft
#

is it possible only those regions are ok and the old ones can be used for the rest?

barren quarry
#

hmm i think you could be right

barren quarry
#

@pure sierra you need to specify which number belongs to which faction

pure sierra
#

if you hover it tells you, how else would you indicate without taking up extra width ?

frosty sierra
#

"C" or "W" infront of the number

#

Still takes space but not much

pure sierra
#

thats extra width i dont have

pure sierra
#

unless i make it a really small font

barren quarry
#

nop

#

okay

#

yea

pure sierra
#

i changed it

#

reload ?

barren quarry
#

yes reload worked

lunar cobalt
#

Color it to the factions

vague otter
#

Why have total cadualties that prominent anyhow? It's not that critical

#

You could have them as a hover over hourly cssualty rates for ecample

mossy pelican
#

i was about to say change the color of the font to be the color of the faction but icanari already said it

pure sierra
#

tried that but green text against green bg not great, you can get the team by hover

#

@vague otter ive been seriously considering this too

#

Iive moved the rocket back up for now

vague otter
pure sierra
#

Just to show it?

pure sierra
long raft
#

@barren quarry do you have a zip of the new unprocessed map images and/or the old ones?

barren quarry
#

New ones yes

#

But I'm not at my pc right now

long raft
#

ok np

lunar cobalt
#

I think I have the old ones

#

zipping them currently

lunar cobalt
long raft
#

om nom nom ty

lunar cobalt
#

I think these are U46 or U46 devbranch

#

Not sure which

#

Probably U46 think360

long raft
#

reaching trail is just a black image in that

lunar cobalt
#

correct

long raft
#

hmm

#

good god this file is so big i cant even open it. the webp is 47mb

#

where do i download more ram?

pure sierra
#

where ?

coral sundial
dark kayak
#

Go to that one really sketchy site and click on every link then bam! You get like 75 viruses and maybe one of them will give you more ram

mossy pelican
#

If a virus infects your OS to the point that it no longer works then it technically gives you more RAM by freeing up the RAM your system is using

coral sundial
#

Dont the virussus(virussi) use ram

mossy pelican
#

depends on the virus

#

some might use disk speed

#

or be cpu intensive

languid harness
#

just delete system32

long raft
#

wow deleting system32 gave me a 10x speedup

lunar cobalt
#

nice

tribal orchid
#

Is there a way to find out the number of resources in a building?

#

I looked a bit but couldn't find it

languid harness
#

You mean via API?

tribal orchid
languid harness
#

I know there is an api

#

What I asked if your question relates to the api or in game

#

And no, there is no end point in the api because its faction specific data

tribal orchid
#

sadge

languid harness
#

And the api contains no data that only one faction can see

pure sierra
#

well the number of ranges is getting a bit out of hand

frozen oriole
languid harness
vague otter
#

display range on hover only, and optional toggle to display all ranges

long raft
#

i didnt realize the intel stations were part of the api too... not sure how to make use of those derpthink

neat fossil
#

so we talk in code here?

devout ivy
#

azetc bqeqf wqgpw qdolz qczis mgeow xrgup snujq ffnob ezzbp sekbh ivfr

coral sundial
#

Beezlebup

hollow gyro
#

Bah weep granah weep nini bong

devout ivy
#

Well, if it makes it any easier, I didn't use a plugboard

languid harness
#

Programming code

pure sierra
#

discount codes 🙂

long raft
#

ISBNs and only ISBNs

plush dew
#

Apha Mike foxtrot

past crag
#

Is there a comprehensive list of all the API calls that one can make documented anywhere?

long raft
#

on the github warapi

past crag
#

Is there any additional api queries that can be made such as unique spawns in a region etc?

long raft
#

yes, enlistments

#

its a value in one of the queries somewhere, you can find unique enlistments in a region since the war started (home regions are exceptional)

hollow gyro
pure sierra
#

@past crag just in case its not clear, it is only unique per region not across maps

past crag
#

thanks!

pure sierra
#

well that escalated quickly

long raft
#

seems like a lot of bad sectors.

#

e.g. bad cable instead

oblique crag
#

12 days left 😮

long raft
#

is it SSD?

pure sierra
#

no

oblique crag
#

RAID 10 ?

devout ivy
#

19120 hours on spinning disk

long raft
#

how does SMART think it knows a magnetic drive has ... time left

#

magnetic drives are binary, they go from working to not working

devout ivy
#

prediction. Its taken 19120 hours for x sectors out of y to go bad, and minimum operating number of sectors is z, assume linear progression and z achieved in 12 days

#

Accuracy? minimal. But there'll be method in the madness

long raft
#

i know but why would you assume linear progression with a spinning disk

oblique crag
#

maybe too much shadowplay recording on that drive

devout ivy
#

Eh, they may try curve fitting or something

long raft
#

you know whats nuts about a drive? after they reach like 5 years their likelihood of death in a given year begins to drop

#

then again those are ~2010-2013 drives

devout ivy
#

tbf with consumer drives too. Even the orientation its mounted in makes a massive different to MTBF

long raft
#

ive never lost a single one of those 4T HGST drives before and ive had like ... 30-40 of them

devout ivy
#

flat as in a typical drive cage in a desktop tends to be fine

pure sierra
#

the seagates of this error seem to die quick

long raft
#

seagates of that era were awful

devout ivy
#

on side as in some SFF PC's and caddies, tends to murder consumer hard disks quickly

#

I'm yet to own a hitachi drive for more than 6 months at a time, stopped buying them entirely

mossy pelican
#

at least its not 420 bad sectors

long raft
#

hitachi is mediocre

devout ivy
#

and also stopped warranty claiming on the machine I had that came with one from factory after the 3rd drive

#

purchased a WD drive for that machine instead

long raft
#

seagate once again seems like the best drives now for the large 12T+ stuff

pure sierra
#

yes i have 2 seagotes of same era and age in similar condition now, my mate stopped buying them after than era

devout ivy
#

ordinarily not knowing the level of activity on the drive, I wouldnt really expect a failure at that age. But its definitely possible

long raft
#

8 years?

#

thats a good life

devout ivy
#

thats a lot less than 8 years 😛

long raft
#

hmm

devout ivy
#

2 and a bit

long raft
#

for a 2TB drive?

oblique crag
#

maybe 2nd hand drive

devout ivy
#

those times are taken from the drives controller

long raft
#

so run time, but not age

devout ivy
#

so would count the time in previous owners possession

pure sierra
#

not sure about that

devout ivy
#

Thats also fair, dunno if it counts up when head is parked

pure sierra
#

this is my other one

long raft
#

8 bad sectors o_O

#

i consider a drive failed if it has 1 bad sector

devout ivy
#

Likewise

pure sierra
#

oh so thats bad

long raft
#

i dunno. maybe my tolerance is low

devout ivy
#

Generally drives tend to be 0 failed sectors, then death

pure sierra
#

well that other one had 320 !

devout ivy
#

yeah, likely all in a short time frame

pure sierra
#

its in a windows raid

long raft
#

i dunno if thats data stored on the disk or the OS reporting bad sectors

#

because a bad sata cable will give you tons of bad sector reads

devout ivy
#

If its from SMART, it'll be controller side

pure sierra
#

havent touched that box for a number of days

long raft
#

if its SMART then id replace ... probably both drives

pure sierra
#

i wont trust them for anything but temp disposable storage

devout ivy
#

so long as you have backups of anything important

long raft
#

this reminds me to check my zpools lol

oblique crag
#

dont backup , live dangerously

pure sierra
#

i was running as raid for this reason.

devout ivy
#

raid isnt a backup

pure sierra
#

kinda of

#

better than nothing

long raft
#

i raid, i snapshot, and i have offsite backup

#

and im still worried

devout ivy
#

Barely. Raid gives you a chance of keeping the working copy only. But should never be trusted as a backup strategy

long raft
#

i used to have this NAS with an annoying red hard drive light and i electrical taped over it to sleep, and one day i realized both disks have failed and i lost everything for years

devout ivy
#

I do intend on building a NAS soon

#

my current backup strategy is frankly disorganised and poor XD

pure sierra
#

oof, yeah, that caught me too , windows raid does not give you any notifications if the raid is not working,

#

so what i did is put computer management in the startup, so each boot i check it manually

long raft
#

better than hardware raid

devout ivy
#

best part with hardware raid is what happened at work recently - thankfully in a scenario that had full backup&recovery plans so was mitigated quickly

#

Losing the raid controller itself

long raft
#

thats the #1 reason it sucks

pure sierra
#

yes that what scares me of hardware raid, not being able to buy another card

devout ivy
#

Spare cards were kept on hand for that very reason

long raft
#

there are other annoying parts of hardware raid. batteries.

#

it offers little performance benefit if any at all

#

all so you can have some outdated disk mirroring scheme

devout ivy
#

Many modern machines indeed hit disk bottleneck before CPU bottleneck if running as a dedicated storage server

#

even on quite puny CPUs

long raft
#

decryption, decompression, and reading the disk basically never saturate the cpu

#

you are very likely to be throttled by your 1gbps network if anything

devout ivy
#

start trying to push 10gb/s+ through tiered storage solutions with full encryption then you can start to make it sweat, but you arent gonna bust its balls

long raft
#

nah i cant.

devout ivy
#

and by it, I mean an intel atom XD

long raft
#

my server has an i3 i cant choke it with cpu stuff

devout ivy
#

But more seriously. Even the raspberry pi 4 chokes on I/O way before CPU

#

And realistically, that'll probably always be the case

long raft
#

my write speed is 400MB/s because the drives cant go faster, thats with encryption and compression

#

i promise the chokepoint will be the network if youre able to use ssd/nvme

devout ivy
#

Which I'd put under I/O

#

My own home network is only running on 1 gigabit switches

long raft
#

the PCI bus basically. yea i guess thats I/O

#

10gb is finally affordable, and also becoming necessary

devout ivy
#

And my desktop, thats on wifi at the moment

long raft
#

my wifi is > 1gbps, my internet provider will sell me 2gbps if i want, so ... itd all be wasted on a 1gb network

devout ivy
#

I have benched it at over 700mb/s throughput with my old card+access point setup

long raft
#

yea thats network throttle

#

well i dunno thats also similar to the speed of a magnetic disk, so...

devout ivy
#

That was just iperf testing

#

so true artificial load

long raft
#

100MB/s is like where i think of a 7200rpm drive on a 1gb network

devout ivy
#

Have since switched from ISP provided modem/router/AP combo to standalone modem+switch+router+access point

#

Access point is now wifi 6 2x2. But desktop is still on wifi 5 2x2

#

While I could swap its card out, I'd sooner just drill a hole in the ceiling and get it on ethernet

long raft
#

hm... how far is your run?

#

i thought 10gb was all about rj45, but ... no

devout ivy
#

10gb on RJ45 is possible with short runs

long raft
#

totally, 30m, but it gets hot

devout ivy
#

and tbf, I am talking almost literally just straight down through the floor

long raft
#

its hotter than my video card

#

nobody told me about the heat

devout ivy
#

so, about 1 storey's height worth of cable and maybe an extra meter at either end

long raft
#

the fiber cables are cool tho, and much cheaper if you go SFP+ ports

devout ivy
#

a 10gb run would be possible, but I don't currently have 10gb equipment

long raft
#

mikrotik sells a 4 port 10gb router/switch for like $110 but you have to buy the ports (or direct cable) additionally

devout ivy
#

and its unmanaged I think

long raft
#

nah its managed i thought

#

theyre pretty good

#

but again, hot

#

if i were wiring my place fresh, i would be thinking about twinax cable

devout ivy
#

Rental here

long raft
#

hmm

devout ivy
#

and not one I want to stay in for much longer

long raft
#

like if i was just drilling a hole and doing 1 cable, id be thinking twinax instead of cat7

devout ivy
#

Thing is in terms of drilling a hole and doing 1 cable. I already own a second managed switch

long raft
#

i just assumed 10gb was centered around cat7 and rj45 but found that wasnt as good, and was more expensive

#

oh

devout ivy
#

All my current gear is gigabit

#

and all of it is RJ45 only

long raft
#

also the network adapters for rj45 are kind of expensive

devout ivy
#

So right now we're talking sub 10m of RJ45 in a gigabit network on RJ45 equipment, its pretty plug and play

long raft
#

i just found sfp+ more versatile, i reused my existing cat5e in the walls with a rj45 port, but if i had like a 15 foot run id prefer to use twinax

#

and i just use twinax to the router because its next to the server, saved $100 and a lot of heat

devout ivy
#

Adding a proper NAS is when I'll want to go multigigabit, and I may just have to pull tricks off like giving the NAS 2 interfaces, 1 gigabit onto the switch and the other a 10gb static IP'ed point to point run

#

and then save obtaining a proper 10gb switch and doing proper runs for when I have my own place

long raft
#

well i dig that mikrotik router, very versatile, you can make it 1000gbps with $20 ports

devout ivy
#

interesting that it has dual redundant power input

long raft
#

i found network cards (that dont work on windows) for SFP+ i put on my linux server that were $25 for 4 of them

#

twinax cable is like 10-15 dollars

devout ivy
#

SFP cabling I'll probably just use the tooling at work

long raft
#

for 35 bucks i got my server connected to the router for 10gbps

devout ivy
#

so long as we don't take the piss, that generally flies

#

Currently got an ubiquiti edge router running OpenWRT, that again is fixed with just gigabit interfaces

#

though tbf, to get 10gb through to the NAS, not like my router needs to be gigabit

long raft
#

Oof i have one of those routers i hate it

#

Never knew there was an openwrt for it

devout ivy
#

All the ubiquiti gear tends to get openwrt rapidly

long raft
#

i hate that router

devout ivy
#

and tbf, theyve been "kind enough" to not pull a cisco and done nothing to block it

#

Albeit my modem is cisco

#

but I am on vdsl, so, not like I need gigabit throughput from the router

long raft
#

totally, just about NAS, and if its just multimedia 1gb is more than enough

#

my desktop doesnt have local storage

devout ivy
#

tbf if I roll my own NAS on linux, depending on the hardware in use and whether I put it upstairs or downstairs

#

I may even just use USB

#

RNDIS atop the gadget stack

#

Or, I've already had some experience with setting up mtp over USB on linux but mtp tends to be slow and the daemon for linux has quite a few bugs

long raft
#

why will the hardware matter

#

what os would you use otherwise?

devout ivy
#

USB device mode isnt typically available on your average intel box 😉

#

even many machines with a USB C port routed to the native type C interface of some newer intel chipsets tend to have BIOSes locking that interface into host only

#

though some machines have patches to switch it to device and/or DRP

#

On a pi compute module the usb interface can do device mode and therefore I could have the Nas direct usb plugged to my main machine for local access but that usb interface is only usb 2, so it would be pointless to do so

#

Realistically I'm probably best off just sticking a multi gigabit nic inboth desktop and Nas, just run a point to point link between Nas and desktop and the gigabit runs to the switch

long raft
#

or just go wireless

pure sierra
#

hdd update, i removed it from the mirror and put a blank partition on it and ran scandisk on it looking for bad sectors and now the health is 100% again. seems to have been a glitch

long raft
#

maybe bad controller or cable then

pure sierra
#

could have been a sleep/restore glitch

long raft
#

can it be resilvered?

pure sierra
#

?

long raft
#

re mirrored

pure sierra
#

dont see why not, but not sure if i want to bothher

barren quarry
#

@zealous sonnet the assets google drive has been made private apparently

#

(it says "no access")

#

pretty much the only thing i was looking for there was the color palette file

long raft
#

are you just looking for collie/warden colors?

barren quarry
#

yeah i guess

#

well i have some approximate values

pure sierra
#

its in the api readme but i believe its wrong

barren quarry
#

but i wasnt sure if theyre correct

long raft
#

its not wrong in the API, theyre just ... adjusted

#

srgb colorspace or something

barren quarry
#

oh indeed

#

they're in the api readme

long raft
#

or they claim to be but backwards

#

i have them as '#516C4B' and '#235683'

lunar cobalt
#

They're also in a pinned message in this channel

hollow gyro
#

The WorldExtent values, are they per hex, or the whole map?
I want to say the former, as I don't think these values changed when the 14 new hexes were added...?

WorldExtent.Minimum = (-109199.999997, -94499.99999580906968410989) WorldExtent.Maximum = (109199.999997, 94499.99999580906968410989)
#

Also I find the flags section utterly confusing, e.g. for MorCrossing all bases are 8 but the VP is 41 but this doesn't seem to match their README at all:

#

I know the numbers in the README are hex (1, 2, 4, 16, 32) but don't understand how they map to 8 and 41.

pure sierra
#

@hollow gyro, you need to learn bit masking and shifting, google it

#

you take the hex value for the flag given in the readme and use it as mask on the api flag value to get the result

#

basically the api flag value is actually bits, which each bit assigned to different flags, not decimal as you would see it normally

hollow gyro
#

So the value from the API is hexidicimal? (So 65 in dec)

pure sierra
#

if its 65 in dec, in binary its 0b1000001

#

each 1 or 0 relates to a flag

#

yes or no

#

the map flags section of the readme tells you whhat position relates to what

hollow gyro
#

I have a degree in ComSci but never did masking, but I know about the different base numbers.

#

If I wanted I can count to 31 on 1 hand 🙃

pure sierra
#

so 0x01 (isvictory) means the very far right digit

#

you can use masking to get that value computationally

hollow gyro
#

I see you've explained this before 🤦

pure sierra
#

so 0x01 & (and) 65 (0b1000001) = 1

#

so in this case is victory is true

#

if it was 0b1000000 is would be false

hollow gyro
#

So...basically turn the hex to decinal, that identifies which bit in the binary of the hex from the API means that it is that value.

#

So it's a cheeky way of returning multiple true/false values, but as a single hex number.

pure sierra
#

yes it called bit packing, and is a way to save data

hollow gyro
#

Alrighty I ubderstand that now, thanks fkr the explanation 👍

hollow gyro
#

They refer to a Hex, or the whole World Conquest Map?

pure sierra
#

im not really up on that, you dont really need it, i dont use it, but someone else can explain it

#

its for the whole world though i believe

#

im going to bed, bye

hollow gyro
#

Humm...109,000 yea seems world'ly

#

Thanks again 👍👍

#

Rest well

hollow gyro
hollow gyro
#

New question, is there a space for detailing these kinds of dicussions, e.g. a wiki that already exists?
I suspect not as it'd probably have been pinned.

olive hamlet
#

Is there any restrictions on what mods are allowed? I'm thinking of a mod that will make a 3rd party API call. It won't have an impact on gameplay, only visuals.

languid harness
#

Why you making an api call if its only visuals?

hollow gyro
pure sierra
#

Its not a big demand topic and theres not a lot to it

pure sierra
olive hamlet
languid harness
#

You cannot pull IDs from the client afaik

#

Anything that isnt known by both factions via in game channels is not available in API

#

You'd have to use some sort of scraping system, which is illegal

olive hamlet
olive hamlet
coral sundial
#

Wat in tarnation

#

these arent even the same dang colors as they where in RGB

lunar cobalt
pure sierra
#

boogaloo

hollow gyro
# coral sundial

What kind of coder takes a photo of their screen, instead of a screenshot?
There a security reason? 😀

hollow gyro
coral sundial
#

@hollow gyro being lazy

#

Also i found the problem out

#

Its displaying hsv values as rgb

#

Which is interesting because you can clearly see the luminance mapped in green channel

#

Or saturation rather

hollow gyro
fiery maple
#

butt we but q be can u cc but box d cc ct xxx wvtctx cc cc,, AA as well wearing how BB cc h

long raft
#

what a day to be a college student. you can just ... download your textbooks from iran. could have got through school for half the price...

lunar cobalt
#

Nah they're still full price because all the homework is online locked behind single use keys or time based subscriptions @long raft

long raft
#

hah figures theyd find a way

#

so many perverse incentives behind text books

#

thats amazing, there was nothing like that when i was studying

lunar cobalt
#

just for this quarter I spent.. ~150 on online access codes

#

Just for homework

#

That's not even including the online textbooks, which are another like 90 or so

long raft
#

thats ... not too bad

#

i used to spend 300-400 per semester on books

#

with inflation is sounds like your costs are going down for textbooks

#

even without inflation, youre talking like $1000 a year for books, i spent at least 50% more than that, and they were used

#

and it was 1864 so a dollar was worth more

lunar cobalt
#

Spent 300 last quarter, but some of the books can be used across multiple classes which brought my price down this quarter

oblique bane
#

Well, I will say this. Eversus would be easy to take. There is one person building.

pure sierra
#

@oblique bane wrong channel ?

oblique bane
#

is it?

#

its a code.

pure sierra
#

how ?

oblique bane
#

I dont understand the code channel.

pure sierra
#

🙂

oblique bane
#

I thought we were supposed to talk about plans here. ._.

#

like radio codes and discussions. My apologies.

pure sierra
#

no, sorry, this is about programming and computer code

#

and anything tech

oblique bane
#

oh, then my apologies.

pure sierra
#

not sure if there is faction/team specific channels here ?

lunar cobalt
#

There are not.

oblique bane
#

was I lied to?

#

someone said this was all Warden.

pure sierra
lunar cobalt
oblique bane
#

Thank you ❤️

pure sierra
#

id never thought about it, but why dont that have faction chat here ?

#

i guess not secure

lunar cobalt
#

Because we have no way of guaranteeing that someone in one of those channels is supposed to be in that channel

oblique bane
#

True, like how I was lied to. Someone told me this was all Warden so I'm over here spilling the beans.

pure sierra
#

they might be implying mostly wardens in here, but its not the case

oblique bane
#

sorry again, you guys have a good night.

cerulean urchin
#

If we had faction channels here, it would be like the old days of global cross-faction chat lol

pure sierra
#

mud slinging

chilly burrow
hollow gyro
#

So you need only request it twice-ish

spark surge
#

Hi guys, I'm a geologist and I'm interested in making a pseudo-geological map of the Foxhole game map. I'd like to get hold of height data to create a DEM (Digital Elevation Model). I want to get this data into some GIS software then populate the map with beaches, outcrops etc. that are in game. Does anyone know if it would be possible to extract height data from the WAR API? I'm not a coder so wouldn't know how to go about this. Also - I'd like to get hold of the game hex maps to import into GIS software as a basemap image. Any help or advice would be greatly appreciate. Feel free to DM me. Cheers!

chilly burrow
hollow gyro
lunar cobalt
pure sierra
long raft
#

i would have done the work to unify the height maps probably, but we are missing the 4 islands i think, so its not worth attempting

#

rust posted them, i havent seen them post the rest

pure sierra
#

we need this automated

#

it was so cool

long raft
#

i think we need the procedure to do it from rust, rather than the maps themselves

#

otherwise we'll never get updates

pure sierra
#

correct

#

needs to be scripted

long raft
#

manual is probably ok, i imagine it requires using unreal

#

i just dont want to try to find the mathematical solution for a one time thing, its gonna be a lot of work

pure sierra
#

no, there is standalone app for unpacking the pak file

long raft
#

i know but it wasnt just a simple asset stored inside

pure sierra
#

then just a matter of tilng them

long raft
#

he used UEviewer

#

said the island maps are not included because of a bug with ueviewer

pure sierra
#

let me try something else

long raft
#

"Extracted 'raw' tiles with vector info from game's files using UEViewer and then wrote a lil python script to 'stitch' them together..."

pure sierra
#

that python script would be handy

long raft
#

i bet its easy to rewrite

#

more concerned about the bug that prevents the islands from exporting

pure sierra
#

we pretty much do it already for warapi

#

i dont think that was the problem

long raft
pure sierra
#

ok

pure sierra
#

would /is FH UE4 ?

long raft
#

yes

pure sierra
#

im unpacking now

#

ok, so unpacking is one thing, but looks like still need ue asset viewer

long raft
#

yes

pure sierra
lunar cobalt
#

UModel exports those images FYI

pure sierra
#

thats what im using

lunar cobalt
#

ah cool

pure sierra
#

@long raft

long raft
#

he said raw files

pure sierra
#

that would be them no ?

long raft
#

nah, literal raw files

pure sierra
#

there are no raw files

long raft
#

these are TGA... theyre just textures

pure sierra
#

but they have the data

long raft
#

for sure? tga is easy to deal with

#

how do they tile together tho

pure sierra
#

let me convert them to jpg

long raft
#

i doubt you want to flatten the alpha out of them

pure sierra
#

ok png

long raft
#

i think they are a combination of light normals or bump maps and also height values

#

like maybe the alpha channel is the height

pure sierra
#

converting now, will take about 3 mins

#

only 1000 tga

long raft
pure sierra
#

gimp

long raft
#

it cant open tga?

pure sierra
#

yes, but easier to flick through in windows i thought

long raft
#

hmm

pure sierra
#

and get thumbnails

long raft
#

yea i dunno how they tile together

#

im afraid its something that isnt simple

lunar cobalt
#

UModel can also export as .png

pure sierra
#

oh neat

long raft
#

hopefully its just in column major order or something

pure sierra
#

how ? what is command

long raft
#

can tga hold a higher bit depth than 8?

#

nope.

#

itd be interesting if height turned out to be 2 of the components instead of 1, for more depth

pure sierra
#

likely its a standard ue thing you could google

long raft
#

but rust said he extracted raw files, and there is of course actual raw format that is often used for height maps and images

#

ive seen all these files before, i dont know how they tile together

#

youll find they arent even all the same size

pure sierra
#

so far all 64x64

long raft
#

theyre sort of clearly different data tho

#

hey rust can you enlighten us on this?

pure sierra
long raft
#

so you see anything that lines up in that?

#

oh i see 2 that line up

pure sierra
#

yep

long raft
#

which ones do you think have the height data

#

this appears to be lighting to me

#

here is the alpha channel

pure sierra
#

from that same bit above ?

long raft
#

yes

#

still kind of looks like lighting to me...

#

wut.

#

wow it hates blue

#

it wont let me post it. also blue looks like height lol

#

i cant tell tho

#

clyde thinks the blue channel is explicit content

#

yea i think we have the ... right ones i dont know which channel is the height tho

#

i think its the B or A

#

A makes the most sense but when i see it visually im not convinced

pure sierra
#

im still looking through fils

#

i found these files

long raft
#

might be best to start with deadlands

pure sierra
long raft
#

yea unprocessed

pure sierra
#

in a folder called textures/ui/hexmaps

long raft
#

yea

#

those are what im using for logiwaze now

#

i think some are ... outdated. i need to update fisherman's row

pure sierra
#

i think the file naming and output is generated by umodel/ueviewer, this is the output of list rather than just export

long raft
#

meaning?

pure sierra
#

maybe theres more data in the umap file than just tgas,

long raft
#

rust said he used those images, the purple hue ones

pure sierra
long raft
pure sierra
#

looks the same

long raft
#

is it 2 of the components that are height? maybe alpha and blue combined?

#

or likely just alpha

#

so my thinking is visually select all the maps like that, figure out how they line up, stich them, then extract the proper channel or channels for height

spark surge
#

@long raft , @lunar cobalt, @pure sierra - thanks for the responses guys. Looks like a complex problem. I know a few professional GIS guys that may have solutions to this, though I'm not 100% sure. I've read through from the older post by Rust and gathered that the maps are at different heights and scales for each hex, so stitching them together is an issue. I can throw out a message to the GIS guys for some help if you think it would be worth it?

long raft
#

sure. seems like a linear algebra problem to me

#

sample a pixel at each border, then solve the coefficients so they line up

#

i dont ... know if GIS guys would be able to help unless theyre good at math

#

step 1 is gonna be stitching the map, hayden. then it should be easy to extract the height from the combined version, and im pretty sure its in there if rust said it was

#

itd be funny if he was just using a normal vector component for height and didnt know better

lunar cobalt
#

I think he converted the normals into height maps somehow

long raft
#

from the light angle?

lunar cobalt
#

dunno

long raft
#

well there wouldnt be 4 channels in use in that image

lunar cobalt
#

I tried running one of the heightmaps to create a 3d model in blender and blender was very unhappy with me

long raft
#

they only need 3 for the normal, 2 in reality

#

did you extract a channel?

#

oh you used an actual provided height map

lunar cobalt
#

No

#

I used the image rust provided

long raft
#

they sure looked like height maps to me

lunar cobalt
#

Tried it on each channel separately, none gave me something that looked right

#

Then grabbed a grayscale to heightmap conversion plugin and it just got mad

long raft
#

no i think the heights are also scaled non linearly

lunar cobalt
#

Yeah agreed

long raft
#

that would sure make the math hard ... oof

#

i hope theyre all scaled the same way at least

lunar cobalt
#

My assumption is that this task is going to be as painful as possible, so they're probably not scaled the same

long raft
#

we will need surveyors julianlol

pure sierra
#

still got a problem with stuck G threads in apache

#

even after adding timeout to backend

#

whats strange is the pid listed dont seem to exist in linux

#

its as if apache thinks its finishing but in fact it already has

spark surge
#

What we need is an in game "survey" kit, to give height values - the only reason I'm asking in here (and I'm super happy I did because it's promising if you can extract height maps) is because of a silly idea to RP as military scientists/geologists analysing beaches and rock outcrops xD

long raft
#

we all have different reasons for wanting height map data. artillery. roads. bunker construction

pure sierra
glad whale
#

So, each tile has 4 channels

#

Alpha and blue channels contain normal data. Red and green is height data

#

To get normal is easy. You just grab those 2 vectors and fill blue channel with value of 1 (since blue channel in normal maps doesn't really matter)

#

But to get the height was a more pickle thing to do. Since I couldn't figure out what to do with the green channel

#

And I used the formula from there for the height calculating

#

Now the stitching process. Which is the main headache.

#

Last time I forgot to mention that I used Fmodel to get data for stitching (Since UEViewer can't do it)

#

So, using Fmodel I extracted data from .umap file as a .json file

#

And from that .json file I used the coordinates for each 64x64 tile

#

And by stitching them you get this

#

But then there's tiles that arent 64x64 scale for which you should make an exception and process them a bit differently

#

And then you will get this

#

But then there's another issue with the ocean area

#

Basically all those tiles are a baked texture of a landscape mesh. And in some regions the landscape mesh doesn't extend to the ocean areas

#

Thus some regions don't have tiles for the ocean area (In my script I filled such areas with the tiles of a value that I sampled from nearby tiles)

#

And as a result I finally got this

#

And speaking of the landscape meshes it's time for the problem with the island regions.

#

Basically most foxhole regions consist of just one landscape mesh and UEViewer exports them correctly

#

But there's a couple regions that consist of 2 landscape meshes: Westgate (1st Landscape Mesh is the Sanctuary area and 2nd Landscape Mesh is the rest of the region) and Shackled chasm (1st LM is the Simo's Run area and 2nd LM is everything else)

#

And if .umap file contains of more than one Landscape Mesh UEViewer exports tiles incorrectly

#

Basically some tiles of the LMs can have same name and when UEViewer exports them, they get overwritten

#

There's a simple way to get around this stupid bug but it works only in the case when there's only 2 LMs

#

And the reason I couldn't get the height maps for the island regions because they have way more than just 2 LMs. Fisherman's for example consists of 10 LMs. And Oarbreaker (if I remember correctly) consists of 16 (lol) LMs

#

Heres Fishermans LMs

mossy pelican
#

Any idea why they did that?

glad whale
#

It's easier to edit them I guess. Or maybe Matt is just a lazy person to make everything into one LM

#

But actually there's a dumb solution for this dumb problem I found (I can describe it later). It requires some manual labor but it's possible to get islands height maps (I did for fisherman's and it somewhat worked). The only downside is the water area (which doesn't really matter), gets a little scuffed in some places because of the same normalization problem

#

Here's the fisherman's region heightmap. I tried to "smooth" problematic areas in Photoshop but you still can see the obvious issue it has between the intersections of the LMs

#

I didn't do the other 3 island regions cause I don't have much enthusiasm left for it 😔

long raft
neat fossil
long raft
#

oh shit the devs read here

glad whale
zinc osprey
#

Dont think Matt got offended, its just every dev sees this "lazy devs" from people who know nothing of how complex everything is, and it eventually gets annoying. Tho i stopped caring.

hollow gyro
#

What people fail to see is a difference in knowledge.
Developers tend to know more than us, and the development process; what might seem lazy is actually genius because of something you just don't know.

The same observation could be made as a question and could have gotten an insightful answer.

deft quartz
#

There are many areas when it comes to Game Development. At the end of the day, its the players and the subjective interpretation of what is considered fun is what drives success/failures in a game. There's alot of topic on Game Design that can be interesting to see.

hollow prawn
#

Thank you!

pure sierra
#

this topic is dense

neat fossil
quick acorn
#

01000110 01010101 01000011 01001011 01011001 01001111 01010101 00100001

long raft
#

@lunar cobalt do you happen to have the last known good version of the reaching trail unprocessed map?

#

likely from september

lunar cobalt
#

Uhm I’ll get back to you in the morning

long raft
#

ok

sinful steppe
mossy pelican
#

Thanks, i cant unsee it now

lunar cobalt
pure sierra
#

hosting holding strong against new war ddos

long raft
#

nice

pure sierra
#

oh it would have gotten so salty

long raft
#

evidently looking sad is their only outlet

hollow gyro
#

⬆️
Maybe someone could pin this?
I'll remove the embed soon

#

I assume <@&213133977681264640> can pin things; feel free to copy the content and then pin if preferred.

pure sierra
#

@hollow gyrothanks, ill see if i can add anything

hollow gyro
pure sierra
#

link my git issue in "Map War Report" section about day of war

hollow gyro
#

I didn't overly see it as a major problem myself, that's why I didn't include that one.

pure sierra
#

I have been getting a lot of complaints about it while i was using it, i recently switched to not use it, calculating it a different way.

#

maybe put it in the known issue bit at bottom than, as you have

hollow gyro
#

If anywhere that'd be the best place.
I just didn't see the need for knowing in-game days; it's an artificial construct that's not normally of a care to people; I'd assume.

pure sierra
#

as there are "improvement issues" and then theres the ones where the data is just wrong

hollow gyro
#

Bingo

pure sierra
#

I know, I actually just tried not showing it at all, as easier, but some users wanted it back so i hhad to correct it

#

I would also mention enlistments is only unique per region, we get plenty of confusion about that here

hollow gyro
#

Ah true

pure sierra
#

"Combining this with World Extents will allow you to position structures onto a visual hex of a region if desired."

#

World extents is not used/needed at all for item placement

hollow gyro
#

Well no, but it helps with accurracy

#

Would it not?

pure sierra
#

how ?

#

i dont believe it has any relevance unless you want to represent a mapped distance in real world measuremnt ?

#

Another big issue people get stuck on you missed is the correlation between dynamic items and static labels, that you must find the closest one to know which belongs to which

#

' princpiples '

hollow gyro
hollow gyro
pure sierra
hollow gyro
#

I'll update the section to state it can help with accuracy and distances, but is not a blocker.

#

@pure sierra I haven't checked, do the static and dynamic instances of the same thing share the same x/y or are they slightly different?

pure sierra
#

they are different (i think)

hollow gyro
#

Cool 👍