Staredit Network

Staredit Network -> UMS Assistance -> wall-bouncing
Report, edit, etc...Posted by Zeratul_101 on 2006-05-15 at 23:02:22
i'm sure its possible to make a objects(in this case, a grenade) 'bounce' off walls realistically but just how would you go about doing that?
Report, edit, etc...Posted by HolySin on 2006-05-15 at 23:51:30
Use a grid system or use the observer system.
Report, edit, etc...Posted by Red2Blue on 2006-05-16 at 01:08:25
I just wanted to point out that SC isn't realistic... period.

However, there are many ways to do it, the easiest way would involve being the least realistic... which is to just duplicate the basketball game genre and have a unit such as a scourge patrolling on the far side and centering a location on it and just having the "grenade" move to the location wherever it is when it makes contact with a "wall." Just duplicate the scourge on every wall possible. Remember, it flies to the opposite side.

The other ways are a bit more complicated... so I wouldn't tread that path...
Report, edit, etc...Posted by Zeratul_101 on 2006-05-16 at 01:27:47
QUOTE(HolySin @ May 15 2006, 09:51 PM)
Use a grid system or use the observer system.
[right][snapback]487293[/snapback][/right]


i know that much, but in order for it to keep moving in a line, i'd have to order it to move, remake the grid, then set the location and keep on doing that until it hits another wall or a target. that just plain isn't very efficient and wanted to know about another method.

QUOTE(Red2Blue @ May 15 2006, 11:08 PM)
I just wanted to point out that SC isn't realistic... period.

However, there are many ways to do it, the easiest way would involve being the least realistic... which is to just duplicate the basketball game genre and have a unit such as a scourge patrolling on the far side and centering a location on it and just having the "grenade" move to the location wherever it is when it makes contact with a "wall." Just duplicate the scourge on every wall possible. Remember, it flies to the opposite side.

The other ways are a bit more complicated... so I wouldn't tread that path...
[right][snapback]487328[/snapback][/right]


that wouldn't work out too great. a 256x256 with turns every 10-20 tiles is alot of walls.

thanks for the help anyways though.
Report, edit, etc...Posted by (U)Bolt_Head on 2006-05-16 at 02:29:27
What I would do is have a wall on one end and a line of units on the other end with the wall being shorter than the line of units. This is just a breif overveiw of one idea of how to do it.

CODE
*
*
*
*           |
*           |
*           |
*           |
*           |
*           |
*           |
*           |
*
*
*


Whenever you hit the ball with your unit depending on timing or whatever you would basicly decide and angle to throw the ball. You would have a counter or something with differant values representing differant angles.

When the ball hits the wall you would center a long horizontal location on it. Then center another on the unit wall on the other side to use simple gridding to select a unit that is a specific angle to your spot on the wall.

As far as making the unit go towards the wall at preset angles you could do the same thing. If there is alot of space behind the wall then you can basicly put a set of units behind the wall. You can space them out more and put them alot futher so the angle doesn't vary when your dude hits the ball from differant distances from the wall.

An example of this unit wall would be like this (zoomed out more than the previous)
CODE

                                                              *



                                                              *

*
*
*                                                             *
*   |
*   |
*   |
*                                                             *
*
*

                                                              *



                                                              *


If you wanted to do it with no space behind the wall then you could have units on the wall itself to use for your grid. But then you would have to adjust the angle according to how far your unit was from that wall.

For example if you wanted to hit the ball at a 45 degree angle NE
If you were right next to the wall then you would select a grid unit on the wall alot closer to your horizontal parallel than if you were standing further away from it.



PS. If you have lots of wall and want to make it real real high teck then you could mimic my corrdinates map and make a path that bounces with custom walls. It would be like basicly having the entire playing zone mathmatically mapped out on a corrdinate plane where locations could move to. But walls could be anywhere, even placed during the game itself. That would take alot of work and would be one hell of a show off map even without a game attached.
Next Page (1)