The OFFICIAL programming thread
-
@hog said in The OFFICIAL programming thread:
I feel like I’m asking for help with my homework here but, anyway, if anyone wants to venture an opinion it will be welcome:
I’ve got this code snippet in glsl that takes a vector of two values (e.g. an x and y coordinate pair) and returns a pseudo random number between 0.0 and 1.0.
float rand(vec2 co){ return fract(sin(dot(co, vec2(12.9898, 78.233))) * 43758.5453); }The problem is that I need to pull 4 random values for the same x, y coordinate. I was going to make the second and subsequent call pass back the previous result as both the x,y and values but then any x,y pair that shares the same first result will also have the same subsequent values. I’d like more randomness or differentiation.
Edit: actually having written it out, I’ve got an idea. For each additional value I need, I’ll multiply the original vector by the previous random value that’s produced and call it with that.
That’s a function built into UWP world generation in Traveller.
Roll world size 2d6-2.
Roll atmosphere 2d6-7+size.
Roll hydrographics 2d6-7+size- if size=0 then hydro=0, if atmo 01,1 or A+ then -4.Roll population 2d6-2.
Roll government 2d6-7+pop
Roll law level 2d6-7+govSo the bigger the world the thicker the atmosphere and the more water it can retain (gravity).
The more pop the more the simpler government structures won’t do, and the more restrictive governments cause higher law levels- more things are regulated/illegal, more police hassle, more bribery/corruption.
-
I couldn’t get a simple sword slash animation looking even passable so I got my wife to film me wielding a broom and then slowed it down and freeze framed it to see where the arms and legs should be.
-
Neat
-
You need a Reddit channel or something.
-
@tigger I don’t know if I’m right person for that kind of thing. Id have to start grooming my eyebrows regularly for one thing.
-
That video really speaks to me.
-
Maybe we need a game dev thread. Anyway, I’m pleased the below was relatively easy to do.
The character and sword are on separate spritesheets so I can swap out the sword for different weapons. But you can see that the sword doesn’t render where the character would obscure it. In Blender you can use a “holdout” setting on a collection to get that effect easily.
Edit: actually that video does a crap job of highlighting what I mean. In the below spritesheet you can see that in one frame (maybe when the character is facing north and is resting) the only thing you can see of the sword is just the highlighted part because the character’s body obscures the rest:

-
-
@gators1 That’s impressive. It’s just amazing what Software Engineers are doing these days.
-
For the mother fucking loss:
Work added my personal Github account to their private org and Github subscribed me to every bloody repo they have.
You automatically watched these repositories because you’ve been given access to them
I’ve got to click 69 individual links and manually unsubscribe from each one.

-
69 huh? Giggity!
-
@hog said in The OFFICIAL programming thread:
For the mother fucking loss:
Work added my personal Github account to their private org and Github subscribed me to every bloody repo they have.
You automatically watched these repositories because you’ve been given access to them
I’ve got to click 69 individual links and manually unsubscribe from each one.

Maybe use wget, some bash scripting and curl to do the job?
-
@rote7 said in The OFFICIAL programming thread:
Maybe use wget, some bash scripting and curl to do the job?
I think there’s an API where you can probably do it even easier. It’s probably a toss up on which is quicker to do - manual or via code - if you factor in having to learn how to call and use the API.
In any case, it’s an asinine action on Github’s part. It would much be less of a nuisance if they just sold my email address to viagra spammers since Gmail would at least remove them automatically from my inbox.
-
You have erectile dysfunction? Damn that sucks.
-

Given his user name, I really want to reply:
Now listen cunt, I don’t know how you think you can see my screen but it definitely isn’t visible.
-
-
@hog said in The OFFICIAL programming thread:

Given his user name, I really want to reply:
Now listen cunt, I don’t know how you think you can see my screen but it definitely isn’t visible.
Well that was a weird turn around.
I was frustrated with the low value response (“hur, I don’t even use your operating system but I can see the caret on my screen so you must be able to, dur”. And I didn’t have much hope of the issue being seen by anyone who knew anything since there are 5K open issues on their github. I’ve got a day job now and I have enough frustration there so I wrote a polite, if slightly pissy reply, and closed the issue. About an hour later the original author of Godot reopened my issue himself, diagnosed the problem and suggested some things to try which confirmed the cause and gave me a workaround.
It’s the alpha release of their new 4.0 version and I don’t have to use it but it’s gratifying that they responded.
-

Javascript is 26 years old now. It has long stopped being the new kid on the block and it never bore even the slightest resemblance to Java. Can they stop fucking doing this please?
-
@hog said in The OFFICIAL programming thread:

Javascript is 26 years old now. It has long stopped being the new kid on the block and it never bore even the slightest resemblance to Java. Can they stop fucking doing this please?
This is what you get when you use Bing.
-
@kilemall said in The OFFICIAL programming thread:
@hog said in The OFFICIAL programming thread:

Javascript is 26 years old now. It has long stopped being the new kid on the block and it never bore even the slightest resemblance to Java. Can they stop fucking doing this please?
This is what you get when you use Bing.
My vaccine scar hurt when I read this post.


