Asset Needs?

I see many things on the Asset Store and once they’re on they never get a second glance. I was wondering if there are any assets that the community would like it see on the store you don’t already see?

Yep, maybe an odd one, but… I’d like to see an RTS selection system implementation that takes a unit’s bounding box from 3d world space (or some shape like a circle or square box around it) and converts it into 2d screen space that can then be tested for intersection with a gui selection box. It must convert somewhat accurately and work with a perspective camera that has an angle (which 45 degrees angle is around average for a typical rts camera).

I.e. Unit selection by area, and not just by one point. If there was a system that was accurate, worked correctly, and had reasonable performance, I’d pay up to $100 for said asset. :smile:

I know that’s super specific though lol.

Preferably it would be decent on performance.

Anything after that? Seems decent enough.

Yeah that seems a trivial script and the asset store might even say its too simple to add it. All you need is the centre point radius and then do a physics sphere overlap check

This doesn’t sound too hard. If you’re serious, PM me. If login4donald can write this script for you, he gets “dibs,” but if not, I’ll take a crack at it.

Hmm…not that I can think of right now, but I come up with about 5 a week it seems like lol. :slight_smile:

Lets brainstorm some ideas.

Well maybe a rts kit as I don’t think there is one yet.

Oh tb is always going on about the options menu so maybe you could make a good one that uses NGUI, maybe you could even get him to endorse it every PC unity would pick it up

Okay another one is essentially a level editor so users can edit maps and or a place they can upload/rate it - think of super meat boy, or trials. So say a dev wants to add that to there game and who wouldn’t well now they can just pick up the system

It’s all good, free for grabs, I’m just trying to get new ideas, challenges and some progress.
By the way, halley, love your work.

Brainstorming ideas, I like.

Well, as far as I know, it’s not “easy” to do accurately. Sure you can WorldToScreenPoint() or WorldToVeiwportPoint(), but with an angled perspective camera it doesn’t account for the camera angle. You might have to modify the projection matrix in order for a point to accurately track across the screen. Especially as the unit gets closer to the edges of the screen, the more the point conversion drifts from where the unit actually is on screen.

I don’t think it’s quite as simple as you guys think it is. But, if it is, great! lol. And yes I am serious, if it does what I need it to do.

Both angle and rotation need to be taken into account. And actually, depending on angle, distance and rotation you can have multiple permutations. The first step is to calculate the points of intersection between the view frustrum and the ground plane at whatever your projected average is (zero is nice and easy). Depending on the rotation of the camera, your far clipping plan could be entirely below the terrain, entirely above the terrain, or intersecting the terrain. This means that the shape created by the points of intersection could be anywhere from 3 to 6 points.

Once you know the shape and the coordinates of the points and you’ve projected it down the Y axis to the common height (zero in our example), you can start using the separating axis theorem to figure out if there is any intersection between bounding rectangles, or any convex shape and the convex shape created by projecting your view frustrum.

I actually took one crack at it in XNA and got it working fairly well… but I only took one pass and the code is a bit messy. :slight_smile: It’s a veritable hell of nested if / else / if / else in one method because it takes the corner coordinates of the far clipping plane, determines the rotation and which point(s) are above the ground plane and builds out the clip shape. Even with all of the crazy code though, it performed much faster than doing intersect tests with bounding volumes (previously it had been using a bounding box and a bounding frustum and this example created a bounding shape and tested against a bounding rectangle both projected to Y = 0).

If you’re interested in looking at the code here is the link. There are a couple of XNA specific bits but the majority of it are just structs and regular old C# so it could be modified and adapted (and hopefully cleaned up and simplified!).

http://www.dustinhorne.com/post/2011/10/18/XNA-Terrain-with-LOD-Part-7-Better-Culling-With-2D-Shapes

Yes, I think this is the type of work it takes to achieve what I’m looking for. I didn’t know rotation had to be accounted for as well :frowning: Man, my brain hurts now lol.

So, as this is currently beyond my level of programming expertise, I might end up having to hire someone to do this. I’ll take another stab at it though. I can work on things for quite awhile, but some stuff I just have to admit defeat and ask for help.

Well it depends on the application. By rotation, I really mean “yaw” or twist… so imagine the far clipping plan is a rectangle. But if you twist the camera to the right 45 degrees, suddenly it’s closer to being a diamond but would only truly be a diamond if it were square.

In your case though where it’s for an RTS… the camera will be rotated but never twisted so you don’t have to worry about that. The camera is at 45 degrees. I’m going to assume that your entire clipping plan is below Y = 0. All you need are the four corners of the far clipping plane. Then imagine a line going from the camera’s vector3 position to each of the four corners of the camera. All you need to do is find the point on each line where Y = 0. Those will be the four corners of your clipping shape. :slight_smile:

You really should browse through the code in the link I shared… if you ignore all of the bits about the frustrum positioning and twist it really wouldn’t be that difficult to do. I’m not sure if Unity gives you access to the corners of the near and far clipping planes, but if not you could calculate them.

I was just going to say that my camera will never be at any rotation other than 45 degrees essentially (it won’t be twisting as you said). Although zooming in and zooming out will change my camera height currently (unless I change to FOV zoom). And yes, the entire far clipping plane is always below Y=0. So, just wanted to acknowledge that you’re correct about all that.

When I get enough motivation and time, I’ll study the code you linked more in-depth – I simply can’t right now, I’ve been staring at the computer for too long for today and my eyes are telling me to stop lol. Thank you for posting it! I can’t wait to take a shot at it when I’m able to. :slight_smile:

looking for multiplayer networking tutorial+script asset it will be awesome

I would love to see some particle AI systems. I am working on one now and if it is good enough, I will put that up.

Particle AI? Like enemies in the particle form…Interesting…