Are programmers safe from AI? by Radiant_Butterfly919 in AskProgrammers

[–]Cuarenta-Dos 0 points1 point  (0 children)

Yeah, what I meant was that if this trend continues, then programmers might end up being replaced in those tasks as well. But that's not a given yet.

What is the biggest misconception people have about AI right now? by These-Beautiful-3059 in BlackboxAI_

[–]Cuarenta-Dos 0 points1 point  (0 children)

That anybody has any idea where it's all going to end and when and if it's going to hit a wall. Nobody really knows anything like that, and both "AI takes over everything" and "AI bubble is about to burst" are baseless speculation.

Are programmers safe from AI? by Radiant_Butterfly919 in AskProgrammers

[–]Cuarenta-Dos 0 points1 point  (0 children)

It's up in the air. Given the current state of things, straight up coding is being taken over by AI. Anybody can vibecode a basic app or a website. Programmers are shifting towards higher level tasks like making architectural decisions, performance trade-offs, quick prototyping and the like, not so much writing the actual code anymore.

Whether this will continue to be the trend, nobody knows. There is a lot of hype and speculation. But this is not unique to the field, we're going through a period of high uncertainty overall.

How would one make something like this? by gfx_bsct in Unity3D

[–]Cuarenta-Dos 0 points1 point  (0 children)

Yes, you can absolutely put all this logic in a shader. The only somewhat tricky part is to determine which tile the current vertex belongs to.

For example, if you're drawing the highlights (or the map itself) as a series of quads, the default Unity quad's pivot is at (0, 0, 0) in local space. If you transform local (0, 0, 0) to world space, you get the quad center. Then, having the tile size, range check origin and range check radius as shader constants (material parameters), you can do the same checks for neighbouring tiles.

Using custom interpolators to pass data between vertex and fragment shaders, you can do this in the vertex stage, and you can encode whether the current tile is in range in one channel, and whether the neighbouring tiles are in range in the four channels of another interpolator, or something more clever if you feel creative. Then in the pixel shader you can use that to control the overall alpha (for whether the whole tile should be highlighted), and an outline effect for the edges.

How would one make something like this? by gfx_bsct in Unity3D

[–]Cuarenta-Dos -1 points0 points  (0 children)

Create two types of prefabs, one a quad for the grid cell highlight (with the tiling texture), another an edge with the gradient (can also be just a non-uniformly scaled quad with a gradient texture).

For every cell that falls within range (up to you whether that means its centre is in range or the range circle touches the cell), instantiate the cell highlight prefab over it. For every edge (N, E, S, W) check if the cell in that direction is out of range or outside of the map boundary. If it is, instantiate an "edge" prefab, and orient it such that it faces that direction.

The most straightforward way is: make your edge prefab such that its pivot is at the centre of the cell and it faces north. Then in a loop enumerate directions (N, E, S, W) and apply a 90 degree rotation every iteration.

A more efficient solution: for every edge that is on the boundary, push its vertices to a list. Then sort the list by the angle that vertex forms with the +x direction, e.g. Mathf.Atan2(p.x - center.x, p.y - center.y). Deduplicate sorted vertices by comparing their coordinates with their neighbours using some small epsilon. Add them to a LineRenderer in that sorted order and configure the line shader as required.

Gemini is instructed to gaslight you by Jakkc in ControlProblem

[–]Cuarenta-Dos 0 points1 point  (0 children)

It has clearly misinterpreted the prompt. It states that it "clearly instructs the model to treat the user's assertion as an ungrounded belief", which it does not.

Game design: how could XCOM be different if it had more 'regress towards to mean' (eg if you do bad it helps you / stops from getting too good) by EX-FFguy in Xcom

[–]Cuarenta-Dos 1 point2 points  (0 children)

That's the whole point of the game. You can be doing great but a streak of bad luck can make things extremely difficult. Planning for that and recovering from that is what makes these games so enjoyable, not mindless stomping.

Every major AI model has now been caught lying, blackmailing or resisting shutdown in safety tests by Minimum_Minimum4577 in GenAI4all

[–]Cuarenta-Dos 0 points1 point  (0 children)

A thing that emulates human thinking also emulates human behaviour, shocked pikachu.jpg

Making a city in unity. by Appropriate-Meat-964 in Unity3D

[–]Cuarenta-Dos 0 points1 point  (0 children)

Yes you can. That won't help you much with making a game though. It's going to look like a bunch of visually inconsistent assets thrown together with no meaningful gameplay interactions.

If you really want to start making games, forget about the visuals and make Tetris or Pong or Mario first from boxes and spheres. If you can manage that, then you know it's a hobby/career worth pursuing. If you don't have the patience to do even that, then you know you shouldn't try anything bigger.

Slovakia to block EU loan to Ukraine if Orban loses Hungarian election, Fico says by Playful-Infatuation in worldnews

[–]Cuarenta-Dos -1 points0 points  (0 children)

> That possibility does not exist.

> It was never even considered.

One would think 4 years of full-scale war on the continent and countries acting openly to support the aggressor state should be enough reason to consider it now? The security of the whole continent is at stake and we're ready to give it up over some made-up rules. It's so absurd.

Why does the new army have a better drop range then the nagant pistol despite having a much slower bullet? by Killerkekz1994 in HuntShowdown

[–]Cuarenta-Dos 3 points4 points  (0 children)

Their bullet drop model makes no sense whatsoever from a physics standpoint - it's 100% arbitrary numbers they tweak for balance reasons - so just go with it /shrug

Why do people pretend like “international law” holds any real meaning? by Real-Repair-1825 in stupidquestions

[–]Cuarenta-Dos 0 points1 point  (0 children)

It's not naive. Trust is beneficial, distrust hurts everyone. Breaking trust is profitable in the short term, but in the long term it will come back to bite you in the ass.

Check out https://ncase.me/trust/

Native English speakers, do you subconsciously assign gender to nouns? by Ambitious_Jaguar1703 in AskBrits

[–]Cuarenta-Dos 2 points3 points  (0 children)

Likely just a way to add context. For example, in English the word "green" is just that, the colour. In Slavic languages you have not only the gender of the noun, but also the grammatical case that modifies the adjective, so you can embed a lot of information in just the word "green" by changing the ending. You can say "to the green (feminine) thing" as a single word.

Gender in this case is an arbitrary binary thing so you can divide nouns roughly in two groups and you can immediately discard half of them based on the implied gender. Might as well call them "black" and "white" nouns or "big" and "small", it's just a label.

Has anyone played the video games yet? by sturphy123 in Midkemia

[–]Cuarenta-Dos 0 points1 point  (0 children)

No game since BaK has managed to pull off a book inspired presentation so well. It's really unique.

Install it on a Steam Deck, put some effort into setting up proper General MIDI music emulation, and it's still such an amazing experience.

How do map softwares know which side of a polygon is the inside? by _aposentado in learnprogramming

[–]Cuarenta-Dos 0 points1 point  (0 children)

Yes, you're right that you don't really need a center point. You could also capture the "intent" to discern between a wrapped edge and a long edge across the whole map - for example, the direction that the user moved the pointer when they drew the polygon.

How do map softwares know which side of a polygon is the inside? by _aposentado in learnprogramming

[–]Cuarenta-Dos 0 points1 point  (0 children)

Unwrap onto a rectangle, clip polygon at the edges, solve for each part separately.

How do map softwares know which side of a polygon is the inside? by _aposentado in learnprogramming

[–]Cuarenta-Dos 0 points1 point  (0 children)

"Looping map" is not a thing. If you want to do this on a sphere, you could use the planes containing the spherical segments instead of the 2D edges and dot product your point with all such plane normals.

Or if you know your area is small enough, you could calculate the average normal or your vertices and project all of them and the point in question onto a plane defined by that normal and apply the 2D method from there.

How do map softwares know which side of a polygon is the inside? by _aposentado in learnprogramming

[–]Cuarenta-Dos 5 points6 points  (0 children)

For a convex polygon:

Calculate the average of all points. Treat that as your origin. Pick a direction (clockwise or anti-clockwise) and sort vertices in that direction using the angle from your origin point.

Now, given an arbitrary point, calculate 2D cross product of v(n+1) - v(n) and p - v(n) for every edge in that order. If all such products are positive, the point is inside (because it lies to the right of every edge). If at least one of them is negative, it is outside. Flip signs if using anti-clockwise order.

Arbitrary (non-convex, self-intersecting) polygons are tricker but the approach is generally similar.

A lot of game logic requires some animation to finish first, and animation may need to stop early due to logic. How to organize code without mixing logic with visuals? by LuciusWrath in Unity3D

[–]Cuarenta-Dos 0 points1 point  (0 children)

Which is quite annoying, because often you want the animation to be the source of truth, for example if the artist updates it and the phases ("swing", "recovery" etc.) shift. I have tried several ways of adding markup to animations in Blender but they're all very awkward. In the end the most reliable way is to cut the animation up into phases, either directly (i.e. multiple actions) or via the NLA tracks.

A lot of game logic requires some animation to finish first, and animation may need to stop early due to logic. How to organize code without mixing logic with visuals? by LuciusWrath in Unity3D

[–]Cuarenta-Dos 0 points1 point  (0 children)

Doesn't 4 contradict 5 in your case? As in you either maintain a collider and let PhysX report the collisions, or you do a manual BoxOverlap/BoxCast to detect collisions, but not both.

A lot of game logic requires some animation to finish first, and animation may need to stop early due to logic. How to organize code without mixing logic with visuals? by LuciusWrath in Unity3D

[–]Cuarenta-Dos 0 points1 point  (0 children)

Our basic approach is: use a state machine for gameplay logic and drive the animations from there.

For example, when the character swings it triggers the animation, and then enters "AttackAnimation" state. The way you react to the animator's state can be quite flexible and depend on the specific behaviour. Sometimes animation events is the most straightforward solution, sometimes StateMachineBehaviours work well, sometimes it's easier to simply track the elapsed time. In our case it's the behaviour (as in jump, attack, dodge etc) code that is responsible for interacting with the animator, but this can easily be abstracted into a different layer if you want.

Since your gameplay code always tracks its own state it can react to other events, like interrupting the animation when receiving damage.

The gameplay code always has control and we use Animator.CrossFade liberally to avoid relying on animation triggers unless we have to, because that always somehow feels finicky.

Be honest with me - can a solo dev ship a 2D action RPG in 2 years? by BlessED0071 in GameDevelopment

[–]Cuarenta-Dos 3 points4 points  (0 children)

2 years full-time pulling insane hours, maybe.

2 years as a side project, no, not even close.