Click here to Skip to main content
15,886,963 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Pointer indirection Pin
Richard MacCutchan14-Sep-23 5:43
mveRichard MacCutchan14-Sep-23 5:43 
GeneralRe: Pointer indirection Pin
Calin Negru14-Sep-23 9:10
Calin Negru14-Sep-23 9:10 
GeneralRe: Pointer indirection Pin
Richard MacCutchan14-Sep-23 21:12
mveRichard MacCutchan14-Sep-23 21:12 
Question[edited] collision response in a RTS Pin
Calin Negru28-Aug-23 6:49
Calin Negru28-Aug-23 6:49 
AnswerRe: [edited] collision response in a RTS Pin
Randor 28-Aug-23 8:48
professional Randor 28-Aug-23 8:48 
GeneralRe: [edited] collision response in a RTS Pin
Calin Negru29-Aug-23 0:41
Calin Negru29-Aug-23 0:41 
GeneralRe: [edited] collision response in a RTS Pin
Randor 29-Aug-23 5:24
professional Randor 29-Aug-23 5:24 
AnswerRe: [edited] collision response in a RTS Pin
Gerry Schmitz30-Aug-23 10:52
mveGerry Schmitz30-Aug-23 10:52 
Every move requires distance and direction (target point; angle).

Prior to the actual move, one checks for any units that will be "intersected" by moving to that point. Rectangles have position and size. Rectangles collide when they interest. (Unless rotated, then you need to deal with polygons)

(The actual move is then shortened so you don't "pass through" the target).

The "mover" then is obviously the attacker; the other the defender. If both moving, it was attacking and counter-attaching. The result of a "charge" is a melee or a repulse; followed by a pursuit. There are no "simultaneous" collisions. Any subsquent collisions creates another attacker-defender scenario.

And infantry won't pursue other infantry; they fire them down.

Cavalry will run down (dispersed) infantry.

Cavalry can not be expected to pursue (and catch) other cavalry.

Artillery is unable to "run" without limbering up.


"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I

GeneralRe: [edited] collision response in a RTS Pin
Calin Negru31-Aug-23 6:05
Calin Negru31-Aug-23 6:05 
GeneralRe: [edited] collision response in a RTS Pin
Gerry Schmitz1-Sep-23 6:26
mveGerry Schmitz1-Sep-23 6:26 
GeneralRe: [edited] collision response in a RTS Pin
Calin Negru2-Sep-23 7:35
Calin Negru2-Sep-23 7:35 
GeneralRe: [edited] collision response in a RTS Pin
Gerry Schmitz3-Sep-23 5:30
mveGerry Schmitz3-Sep-23 5:30 
QuestionDSA Pin
ZAID razvi25-Aug-23 0:50
ZAID razvi25-Aug-23 0:50 
AnswerRe: DSA Pin
CPallini25-Aug-23 1:36
mveCPallini25-Aug-23 1:36 
GeneralRe: DSA Pin
ZAID razvi25-Aug-23 1:54
ZAID razvi25-Aug-23 1:54 
GeneralRe: DSA Pin
CPallini25-Aug-23 2:10
mveCPallini25-Aug-23 2:10 
GeneralRe: DSA Pin
ZAID razvi25-Aug-23 4:57
ZAID razvi25-Aug-23 4:57 
GeneralRe: DSA Pin
Richard Deeming28-Aug-23 21:34
mveRichard Deeming28-Aug-23 21:34 
GeneralRe: DSA Pin
ZAID razvi28-Aug-23 21:52
ZAID razvi28-Aug-23 21:52 
GeneralRe: DSA Pin
Andre Oosthuizen29-Aug-23 2:41
mveAndre Oosthuizen29-Aug-23 2:41 
GeneralRe: DSA Pin
Richard Deeming29-Aug-23 3:11
mveRichard Deeming29-Aug-23 3:11 
GeneralRe: DSA Pin
Richard MacCutchan28-Aug-23 21:56
mveRichard MacCutchan28-Aug-23 21:56 
GeneralRe: DSA Pin
Dave Kreskowiak29-Aug-23 2:04
mveDave Kreskowiak29-Aug-23 2:04 
GeneralRe: DSA Pin
Richard Deeming29-Aug-23 3:12
mveRichard Deeming29-Aug-23 3:12 
GeneralRe: DSA Pin
CPallini30-Aug-23 2:57
mveCPallini30-Aug-23 2:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.