Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Elentor
Dec 14, 2004

by Jeffrey of YOSPOS

Shalinor posted:

What you're doing is like trying to learn English by reading the dictionary.

This is how I started. :smith:

Adbot
ADBOT LOVES YOU

KillHour
Oct 28, 2007


I can help a little bit with the polynomials. A polynomial (literally multiple numbers) is most commonly used to define a special type of curve on a graph. The simplest kind is a binomial: y = 2x+c where X and Y are coordinates and c is some constant (literally, you can just make one up. Like 65 or -5.3 or pi or the square root of 2). Throw it in Wolfram Alpha to give it a try.

All polynomials follow a standard format, which is:

y = c1*xn+c2*xn-1+...+cm*x1+cm+1*x0

Let's break that down. Basically, you have a bunch of x raised to some power and multiplied by some constant and you add all those together. For example:

4x3+7.3x2-2x+5

Then you just plug your x coordinate in and that gives you the y coordinate for that point on the curve.

Higher order polynomials means you just have more groups of this (ie X is raised to a higher power in the first group).

Splines are just multiple polynomial curves attached to each other at the ends so play around with polynomials a lot before trying to grasp them and it will help.

KillHour fucked around with this message at 16:02 on Jun 16, 2017

Tiler Kiwi
Feb 26, 2011
To be fair, being recited a dictionary does essentially describe the quality of my primary school math education. :v:

I'm taking a step back and finding better instructions on the subject matter, though. I get stubbornly fixated when I get frustrated, which is sometimes helpful, very often not.

I know what derivatives are, now, at least! Kind of important thing to know, when it comes to describing change at a point.


Thank you. It helps clear up a fundamental misunderstanding I was having over what a MathNet spline is; I kept wanting it to be a thing I could just feed some points and get back a thing I could get a bunch of points out of, but I suppose I'll need to implement some of that myself.

taqueso
Mar 8, 2004


:911:
:wookie: :thermidor: :wookie:
:dehumanize:

:pirate::hf::tinfoil:

I think you are looking for 'spline interpolation' as the thing that you give points and it gives you back a spline approximating your points.

Tiler Kiwi
Feb 26, 2011

taqueso posted:

I think you are looking for 'spline interpolation' as the thing that you give points and it gives you back a spline approximating your points.

Yeah, the issue with the interpolate method I was having was that I didn't really get that you had to do some transformations and/or breakdown a thing over multiple splines? or something like that, to map out the curvy line and derive a series of appropriate points to draw. Since the issue came up where, for instance, I had it wanted the river to pass through points at, say, (20 0), then go to (30 20), but go "back" to (19, 40) or something, which didn't really work out trying to interpolate with the MathNet methods, since you could only give it an X value and it assumed that all the points you gave it were ordered in a particular fashion that would make sense on a line graph, so I was giving it data that it was just turning into absolute garbage and/or something very different from what I expected. So that confused me and made me think I was looking for something else.

I did other things wrong, too, mind you. I kind of hit a point where I was just doing random poo poo and seeing if any patterns started to emerge. (nope)

Polio Vax Scene
Apr 5, 2009



You should look into Hermite splines.

KillHour
Oct 28, 2007


Tiler Kiwi posted:

To be fair, being recited a dictionary does essentially describe the quality of my primary school math education. :v:

I'm taking a step back and finding better instructions on the subject matter, though. I get stubbornly fixated when I get frustrated, which is sometimes helpful, very often not.

I know what derivatives are, now, at least! Kind of important thing to know, when it comes to describing change at a point.


Thank you. It helps clear up a fundamental misunderstanding I was having over what a MathNet spline is; I kept wanting it to be a thing I could just feed some points and get back a thing I could get a bunch of points out of, but I suppose I'll need to implement some of that myself.

Anything calculus (i.e. derivitives) is going to use polynomials as its basis, and therefore pretty much all of physics will as well. So I really suggest learning polynomials and factoring and algebra like the back of your hand. It will help you with everything.

KillHour
Oct 28, 2007


Tiler Kiwi posted:

I kept wanting it to be a thing I could just feed some points and get back a thing I could get a bunch of points out of, but I suppose I'll need to implement some of that myself.

I did this for a tower defense game I made where I wanted the units to smoothly follow a bunch of waypoints. Instead of trying to find a mathematical curve that best fit the points through some kind of regression, I just gave each waypoint a position and marched from one to the next using this:

code:
moveDirection = (currentWaypoint.transform.position - transform.position);
lookDirection = Quaternion.LookRotation (moveDirection, Vector3.up);
transform.rotation = Quaternion.Lerp (transform.rotation, lookDirection, (2 / moveDirection.magnitude) * speed * Time.fixedDeltaTime);
transform.position += transform.rotation * Vector3.forward * speed * Time.fixedDeltaTime;
You're not using Unity, so I'l break it down a little bit. Each "step" the unit takes, I have them rotate a little bit towards the next waypoint and then take a step forward. This is accomplished with the Quaternion.Lerp function, which returns an interpolation between the two rotations.

https://docs.unity3d.com/ScriptReference/Quaternion.Lerp.html

Stepping through this gives a very "river-like" path where the units will always pass exactly through each waypoint without making any abrupt turns.



The green circles are waypoints and the red line is the path units take following them.

Edit: I removed all but 5 waypoints and moved them around to show you don't need a ton of points to get something smooth and river-like.

KillHour fucked around with this message at 18:53 on Jun 16, 2017

KillHour
Oct 28, 2007


Well, I can strike "sensors and the ability to detect nearby objects" off my list.

https://www.youtube.com/watch?v=Yxua-wFnOZA

Next up is probably some sort of resource collection. Most likely starting with figuring out how I'm going to handle inventory and moving objects around.

Edit: And a bonus one of several flying in formation.

https://www.youtube.com/watch?v=EMLAUdO3Ix4

KillHour fucked around with this message at 05:02 on Jun 17, 2017

Spatial
Nov 15, 2007

I spend a lot of time tweaking parameters. Is there any hardware out there for doing that? Like just a bunch of knobs and sliders which connect over USB that I can read like a game controller?

I know there are musical instruments that can work like this, but I don't know how to interface with them.

Tann
Apr 1, 2009

I made a click/drag slider thing for music/sfx volume and I use temporary sliders for tweaking values!

Corla Plankun
May 8, 2007

improve the lives of everyone
I use antimicro to convert my game controller to keyboard/mouse signals. I'd be pretty surprised if a modern controller didn't have enough nobs to suit parameter tweaking. If it isn't enough, you could also just make a couple buttons context-switches that point the inputs at different parameters.

There's also a whole bunch of machine learning algorithms that can pick the best parameters if you're capable of mathematically defining what you want the output to be like!

Chainclaw
Feb 14, 2009

Spatial posted:

I spend a lot of time tweaking parameters. Is there any hardware out there for doing that? Like just a bunch of knobs and sliders which connect over USB that I can read like a game controller?

I know there are musical instruments that can work like this, but I don't know how to interface with them.

I saw this post and it got me pretty excited, developing games and playing with music hardware are two of my big passions, and I spend a lot of time thinking about mixing and matching, and sometimes actually doing so.

There are all sorts of cool USB devices you could use to accomplish this. I don't know what your price range is, but some competent devices start at $60 and go up from there. See Nano Kontrol Studio, Akai's pad controllers, Behringer's BCR2000, Novation's controllers, and many more.

The downside to most of these is they aren't motorized or they don't have a good memory system, so you can't initialize the knob positions based on game data. The one that I am pretty sure supports that is the Behringer line, the rotaries handle it with the LEDs around the knobs, so you can initialize it with game data when you connect. There are also some other Behringer devices with motorized faders, so you can initialize those correctly, too.

When it comes to implementing the interface into your technology to talk to them, some of the controller manufactures make specific libraries to simplify interaction. Sometimes you'll find user made APIs. In most cases, a USB MIDI device shows up to Windows as a standard MIDI device, so you can grab nearly any MIDI API and wire things up for your controller.

If you want to hand build something yourself, you can start with one or more Arduino or Rasberry Pi devices. On Windows, you can communicate over the COM ports to talk to these devices. A few months ago I wanted to control a game with my modular synthesizer, so I built this rats nest of a device to use Arduinos to communicate over USB with my PC, and then I could control the game with my modular synthesizer.

Chainclaw fucked around with this message at 19:23 on Jun 18, 2017

Spatial
Nov 15, 2007

The problem with game controllers is they only have relative analogue inputs. I want to connect a knob/slider to some floating point value and see what happens when I twiddle it. It's no good if it moves back when I let go of the control, and relative input is too imprecise and fiddly. Ideally I want absolute scale and value input.

Thanks for the great post Chainclaw. Glad to meet another game/music tinkerer! :) I was actually just looking at the NanoKontrol 2, my local music store stocks it. Seems that someone already went and did the needful with a C++ library for it which is awesome, so I might go with that. Only downside is the lack of a free-rotating encoder wheel like the Studio version has.

Budget is maybe $120. If I start forming a collection like I see in your pictures my girlfriend will stuff me down the drain pipe. :v:

Mr Shiny Pants
Nov 12, 2012

Spatial posted:

The problem with game controllers is they only have relative analogue inputs. I want to connect a knob/slider to some floating point value and see what happens when I twiddle it. It's no good if it moves back when I let go of the control, and relative input is too imprecise and fiddly. Ideally I want absolute scale and value input.

Thanks for the great post Chainclaw. Glad to meet another game/music tinkerer! :) I was actually just looking at the NanoKontrol 2, my local music store stocks it. Seems that someone already went and did the needful with a C++ library for it which is awesome, so I might go with that. Only downside is the lack of a free-rotating encoder wheel like the Studio version has.

Budget is maybe $120. If I start forming a collection like I see in your pictures my girlfriend will stuff me down the drain pipe. :v:

You know, this is a pretty good idea. I think you want a mixing console, with sliders and the like.

Ranzear
Jul 25, 2013

Tiler Kiwi posted:

I did other things wrong, too, mind you. I kind of hit a point where I was just doing random poo poo and seeing if any patterns started to emerge. (nope)

Five minute idea because i hate math: Generate several (5+) valid straight line rivers, find the intersection points of all lines and turn them into a bunch of segments between each intersection, sorted/bucketed by their endpoints. Reserve two segments that are far apart and reach the edge of the map or other endpoints you desire. Delete any segments that have only one endpoint shared with another segment (except the reserved), delete any segments where both endpoints are shared with more than one other segment, then delete any segments where either point has more than one other segment. Should now have a chain of segments from one edge of the map to the other. Should be really chaotic with a lot of starting lines, but as long as all of the starting lines are valid, the segments will be too. Generate your river tiles based on manhattan distance from any segment?

Edit: Realized you may have to randomize the order of deletions, but another option is to check for the largest (sum of?) angles.

Ranzear fucked around with this message at 06:57 on Jun 19, 2017

Tiler Kiwi
Feb 26, 2011

Ranzear posted:

Five minute idea because i hate math: Generate several (5+) valid straight line rivers, find the intersection points of all lines and turn them into a bunch of segments between each intersection, sorted/bucketed by their endpoints. Reserve two segments that are far apart and reach the edge of the map or other endpoints you desire. Delete any segments that have only one endpoint shared with another segment (except the reserved), delete any segments where both endpoints are shared with more than one other segment, then delete any segments where either point has more than one other segment. Should now have a chain of segments from one edge of the map to the other. Should be really chaotic with a lot of starting lines, but as long as all of the starting lines are valid, the segments will be too.

I got the river drawn in a "good enough" state right now: Draw a line between two points. If that fails, find a point both points can draw a line to, then tentatively draw a line, then get two new points by doing a t=.75 lerp on those lines, then draw a line from start to lerpa, lerpa to lerpb (doing some recursion if the lerp points don't connect), then lerpb to end, and as a final failsafe if poo poo doesn't work, just do pathfinding. Makes the rivers smooth enough, but the true Evil Problem turned out to be coming up with procedurally generated points to draw between. The "intersections between straight lines" concept you mentioned, to get a set of points to draw between would actually, maybe, probably work out alright for doing that! I'll give that a shot later.

Ranzear
Jul 25, 2013

It was originally a pathfinding idea: Draw random lines, cut or pre-segment any that cross impassible space, chain segments between here and the destination, and plug the (nearest few) intersections into something like Caliber's vector shenanigans. I think it'd be fast enough for the simple on-the-fly indirect navigation I need. Quick and dirty immediate direction decision instead of deep pathfinding.

Ranzear fucked around with this message at 07:57 on Jun 19, 2017

Xerophyte
Mar 17, 2008

This space intentionally left blank
There's a lot of ways of interpolating things in 2D, since you've found one that's good enough for what you're doing I guess this is more a future reading thing. If you just have a set of points and want a smooth curve that goes through all of them, no tweakable control points outside of the shape itself or any of that, then maybe Catmull-Rom splines are for you. They work like this and look like this.

The four control points you feed (p1, p2, p3 and p4 on that page) are a sequence of points on your river, and the resulting function p(x) is a smooth cubic curve that interpolates between points p2 and p3. Repeat for all segments, shifting your control points every time. It's probably the simplest cubic spline to work with.

E: Also, Ed Catmull is a cool guy who made what's possibly the first 3D CG animation (of his own hand) and (much) later ended up president of Pixar & Disney Animation. Clearly this means his splines (and also his subdivision surfaces) must be extra good.

Xerophyte fucked around with this message at 08:07 on Jun 19, 2017

Tiler Kiwi
Feb 26, 2011
Thanks for that information. I may give that intersection point generation + Catmull-Rom splines a shot... later. Right now my prototype procedural generation code is some horrible 1200 line string-of-consciousness class I've been thrashing together with zero real planning, and I've gotten a bit sick of playing around with it. Not to say writing it isn't fun, its just, I'm just sort of in awe how badly I underestimated the difficulty involved in drawing a friggin curve: I spoke with a relative who does programming and mentioned "oh yeah im trying to procedurally generate a curve" and he gave me sort of a :catstare: look and expressed sympathy, so I guess this is a bit of a rite of passage. Its all making a lot more sense than when I started with it, though, thanks in part to everyone in here being super helpful.


coming together a bit. need to write the logic for placing the actors, selecting them, issuing a command, getting valid movement spaces, selecting a space, moving the actor, and tracking overall turn state and win condition. and some actual UI, maybe. easy-peasy, i'm sure.

e: vvv Thank you!

Tiler Kiwi fucked around with this message at 12:15 on Jun 19, 2017

Mata
Dec 23, 2003

Tiler Kiwi posted:

Thanks for that information. I may give that intersection point generation + Catmull-Rom splines a shot... later. Right now my prototype procedural generation code is some horrible 1200 line string-of-consciousness class I've been thrashing together with zero real planning, and I've gotten a bit sick of playing around with it. Not to say writing it isn't fun, its just, I'm just sort of in awe how badly I underestimated the difficulty involved in drawing a friggin curve: I spoke with a relative who does programming and mentioned "oh yeah im trying to procedurally generate a curve" and he gave me sort of a :catstare: look and expressed sympathy, so I guess this is a bit of a rite of passage. Its all making a lot more sense than when I started with it, though, thanks in part to everyone in here being super helpful.


coming together a bit. need to write the logic for placing the actors, selecting them, issuing a command, getting valid movement spaces, selecting a space, moving the actor, and tracking overall turn state and win condition. and some actual UI, maybe. easy-peasy, i'm sure.

If you decide to revisit the spline approach and use C#, this library is pretty straightforward imho (and can be used in commercial applications). Check out the "input constraints and parametric fitting" header - you don't want to be limited to only valid functions of y = f(x) :)

See the CubicSpline.FitGeometric static method below, which fills xOut and yOut with 100 floats each. m_nodes is where my input control points are.
code:
float[] controlPointsX = new float[m_nodes.Count];
float[] controlPointsY = new float[m_nodes.Count];

for (int i = 0; i < m_nodes.Count; i++) {
    controlPointsX[i] = m_nodes[i].AbsolutePosition.X;
    controlPointsY[i] = m_nodes[i].AbsolutePosition.Y;
}

float[] xOut;
float[] yOut;

int pointCount = 100;

CubicSpline.FitGeometric(controlPointsX, controlPointsY, pointCount, out xOut, out yOut);

for (int i = 0; i < points; i++) {
	// do something with xOut[i] and yOut[i]
}

Spatial
Nov 15, 2007

Mr Shiny Pants posted:

You know, this is a pretty good idea. I think you want a mixing console, with sliders and the like.
Yup. And now I have one! :v: I bought the Korg NanoKontrol 2 earlier:



I'll be twiddling away soon, I can see the input values live in the console already. Just need to fix up the library to be 64-bit safe and I'm good to go.

Spatial
Nov 15, 2007

I've gotta say, this works awesomely and I wish I did it years ago. At the moment I'm doing a liquid surface simulation and now I can control all the parameters with knobs and faders. I'm going to get a hell of a lot of use out of this baby.

For anyone who goes down the same path: the Korg supplied driver doesn't work in 64-bit mode. How embarrassing. But the default Windows driver works fine.

Chainclaw
Feb 14, 2009

Spatial posted:

I've gotta say, this works awesomely and I wish I did it years ago. At the moment I'm doing a liquid surface simulation and now I can control all the parameters with knobs and faders. I'm going to get a hell of a lot of use out of this baby.

For anyone who goes down the same path: the Korg supplied driver doesn't work in 64-bit mode. How embarrassing. But the default Windows driver works fine.

A lot of music stuff is still in 32 bit land. I don't know if it's a compatibility thing where no one wants to be one of few 64 bit outliers, or if it's performance focused and they don't want to deal with the performance trade-offs of moving to 64 bit from 32 bit. Besides the obvious access to more memory, there's a lot of conflicting info out there about faster CPU performance versus memory bandwidth and consumption concerns due to larger pointer sizes.

RobotsLoveSpectres
Dec 29, 2008
So I've just been messing around in Unity using C# with a match-3 style game. I can move tiles around similar to how puzzles and dragons does it and even make matches but I'm curious if anyone has an idea how to elegantly handle the type of match in this http://imgur.com/a/vt8DP image? I would like all the yellow tiles to count as one match.

crab avatar
Mar 15, 2006

iŧ Kë3Ł, cħ gøÐ i- <Ecl8

RobotsLoveSpectres posted:

So I've just been messing around in Unity using C# with a match-3 style game. I can move tiles around similar to how puzzles and dragons does it and even make matches but I'm curious if anyone has an idea how to elegantly handle the type of match in this http://imgur.com/a/vt8DP image? I would like all the yellow tiles to count as one match.

Sounds like a job for flood filling?

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

crab avatar posted:

Sounds like a job for flood filling?

Pretty much this.

roomforthetuna
Mar 22, 2005

I don't need to know anything about virii! My CUSTOM PROGRAM keeps me protected! It's not like they'll try to come in through the Internet or something!

crab avatar posted:

Sounds like a job for flood filling?
No, he doesn't want all connected tiles, he wants the "five and three" lines to match. (ie. if there was another square connected off the side of the top one, that one would not match, which is different from flood fill.)

The simple way is to just do whatever you're already doing to find existing matches, but don't remove anything until you've found *all* matches, then disappear them all in one instant.

Edit: if part of the goal is to know how big the disappeared connected set of single color is then flood-fill is still relevant for that though, you could flood fill the intersections of disappearing tiles and same-colored tiles.

Jewel
May 2, 2009

Find all individual matches on the board (longest priority, ie if it's 6 long it's one six-match and not two 3-matches) and keep those around in an array of matches. Then find all the matches that share any cells with eachother and keep those around in some array of shared matches (each element being a list of matches that are "one match", all connected). You should end up with what you want. No flood fill is needed since they'll always share one cell.

e: Unless

XXX
XXX

or

__XXX
XXX__

Counts as one match (instead of two 3-matches) in which case check if any other tile from a match is of the same color and adjacent rather than looking for shared cells. Both of these methods only ever check other matches and not the global board so there shouldn't be any accidental spillages into non-matches.

Jewel fucked around with this message at 14:56 on Jun 20, 2017

Dr. Stab
Sep 12, 2010
👨🏻‍⚕️🩺🔪🙀😱🙀
I guess you'd just iterate over the field twice, once vertically and once horizontally. If you find a long enough line, create a matching and mark the tiles as being in that matching. If you mark the same tile twice, merge the two matchings.

Spatial
Nov 15, 2007

Chainclaw posted:

A lot of music stuff is still in 32 bit land. I don't know if it's a compatibility thing where no one wants to be one of few 64 bit outliers, or if it's performance focused and they don't want to deal with the performance trade-offs of moving to 64 bit from 32 bit. Besides the obvious access to more memory, there's a lot of conflicting info out there about faster CPU performance versus memory bandwidth and consumption concerns due to larger pointer sizes.
Compatibility is probably it. Performance is usually the same or better on 64-bit and for float DSP stuff I wouldn't expect any difference. Pointers may be twice as big, but so are the registers and there are twice as many of them.

Back to the original subject, is there a way to read the state of a MIDI device without physically moving the controls? I'd like to sync the initial values with my game on startup. Also it seems like you can control the LEDs somehow which is quite cool... Any idea how that works?

For the fader/knob memory problem you mentioned earlier, I used the same solution as used on the MicroKorg, which is to ignore control input until it matches the current value. That way there are no sudden jumps.

Spatial
Nov 15, 2007

Different topic. Has anyone here got an Xbone controller? Does it work the same as the 360 and show up as an Xinput device?

Also lol Sony why have you named your controller "Wireless Controller". At least put PS4 in the drat name.

The Fool
Oct 16, 2003


Spatial posted:

Different topic. Has anyone here got an Xbone controller? Does it work the same as the 360 and show up as an Xinput device?

Yes.

Spatial
Nov 15, 2007

Cool, thanks.

Shalinor
Jun 10, 2002

Can I buy you a rootbeer?
... with the exception, IIRC, that XBone vs 360 controllers as XInput devices have a different button mapping. That is, I want to say the face buttons don't map to the same XInput buttons / that you'll have to have a different default binding for each. Or something with the stick VS trigger axis, maybe? I recall there being some unexpected difference.

Zaphod42
Sep 13, 2012

If there's anything more important than my ego around, I want it caught and shot now.

Spatial posted:

Also lol Sony why have you named your controller "Wireless Controller". At least put PS4 in the drat name.

I'm not sure they did? Its not that simple as plug in device, device tells windows what it is. Windows is probably using a generic game controller driver, hence the generic name "Wireless Controller" :doh:

Which is also why PS4 controllers don't work with most games by default. If you run DS4Windows it makes the PS4 appear as an Xbox 360 controller to all games, so it has perfect compatibility. Its a driver thing, not a hardware thing. As for why there aren't better first party drivers for PC for PS4 controllers... Microsoft is Sony's competition. They'd rather you just play on PS4.

The Fool
Oct 16, 2003


Shalinor posted:

... with the exception, IIRC, that XBone vs 360 controllers as XInput devices have a different button mapping. That is, I want to say the face buttons don't map to the same XInput buttons / that you'll have to have a different default binding for each. Or something with the stick VS trigger axis, maybe? I recall there being some unexpected difference.

My only experience is with a b-hell shooter toy that I made, and my 360 and xbone controllers worked interchangeably.

That being said, I only used the face buttons and d-pad.

fe: after a quick google, https://github.com/glfw/glfw/issues/700 implies that there was/is an issue with r-stick and the triggers having the axis swapped.

Spatial
Nov 15, 2007

Shalinor posted:

... with the exception, IIRC, that XBone vs 360 controllers as XInput devices have a different button mapping. That is, I want to say the face buttons don't map to the same XInput buttons / that you'll have to have a different default binding for each. Or something with the stick VS trigger axis, maybe? I recall there being some unexpected difference.
Argh. I'll have to find out what the deal is there. Why the hell would they do that? Then again, this is the same company that decided to assign the 360 triggers to a single DirectInput axis despite the API supporting 16+, so how surprised can I really be.

Zaphod42 posted:

I'm not sure they did? Its not that simple as plug in device, device tells windows what it is. Windows is probably using a generic game controller driver, hence the generic name "Wireless Controller" :doh:

Which is also why PS4 controllers don't work with most games by default. If you run DS4Windows it makes the PS4 appear as an Xbox 360 controller to all games, so it has perfect compatibility. Its a driver thing, not a hardware thing. As for why there aren't better first party drivers for PC for PS4 controllers... Microsoft is Sony's competition. They'd rather you just play on PS4.
It really is that simple, that's how USB devices work. If you make your own USB device you can put GIANT BUTT in the description field and Windows will faithfully inform you there is a GIANT BUTT connected to your USB port :v:

The PS4 pad not working with most modern games you can chalk up to developer apathy. The 360 controller supports Xinput which is baby simple to use and a lot of people own them so it's an obvious first step. All controllers support DirectInput, but it's a huge pain in the rear end to use without a library. Speaking from experience though, there are good libraries out there and if you plan from the beginning to support any controller it's only a couple of extra days work to support the PS4 pad with onscreen prompts and everything.

Also, while I'm complaining about controllers: while the PS4 controller doesn't have the 360's design flaw of one axis for both triggers, it does have the minor flaw of having both buttons AND axes for the triggers. So any typical binding detection system is going to see the button press first and take away the analogue functionality. Some motherfuckers are always trying to iceskate uphill

awesomeolion
Nov 5, 2007

"Hi, I'm awesomeolion."

Does anyone know how you'd approach doing the effect where there's a handful of particles or objects spawned and then after a beat they all sort of gather up and arc over to a destination in a satisfying way? I guess I'm thinking like some games where you collect things they have those money animations as they zoom to your inventory or count of total stars or w/e. I'm thinking there maybe is a name for this? Or a common way to do it? I can spawn a bunch of stuff and lerp it over to a destination but that's going to look poo poo I feel like.

Adbot
ADBOT LOVES YOU

ShredsYouSay
Sep 22, 2011

How's his widow holding up?
Lerp it over a spline. Or if you just mean an actual arc, maybe just have its origin at the centre of the circle of the arc and slerp it?

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply