Click here to Skip to main content
15,895,606 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionERP Software Pin
ShuklaGirish25-Jun-07 18:55
ShuklaGirish25-Jun-07 18:55 
AnswerRe: ERP Software Pin
Xandip25-Jun-07 19:25
Xandip25-Jun-07 19:25 
GeneralRe: ERP Software Pin
ShuklaGirish25-Jun-07 19:34
ShuklaGirish25-Jun-07 19:34 
GeneralRe: ERP Software Pin
Xandip25-Jun-07 20:11
Xandip25-Jun-07 20:11 
AnswerRe: ERP Software Pin
Vasudevan Deepak Kumar25-Jun-07 22:21
Vasudevan Deepak Kumar25-Jun-07 22:21 
GeneralRe: ERP Software Pin
ShuklaGirish26-Jun-07 0:21
ShuklaGirish26-Jun-07 0:21 
QuestionHelp with Geometry Function Pin
frappydan25-Jun-07 18:54
frappydan25-Jun-07 18:54 
AnswerRe: Help with Geometry Function Pin
Johan Hakkesteegt26-Jun-07 23:24
Johan Hakkesteegt26-Jun-07 23:24 
Hi Dan,

Perhaps you should consider forgetting the idea of areas around the game pieces and think more in terms of distances.
In other words, only determine the distances between all pieces, subtract their "personal space" from these distances, and you end up with which is (too) close and which (too) far.
This way you also do not need to store a whole lot of data in memory that you won't ever even use. Instead you only get two values per game piece: position and personal space.
The following function may be of use to you:
<br />
Public Function RoundToSignificance(ByVal number As Integer, ByVal significance As Integer) As Integer<br />
'Round number up or down to the nearest multiple of significance<br />
Dim d As Double<br />
d = number / significance<br />
d = Round(d, 0)<br />
RoundToSignificance = d * significance<br />
End Function


With it you can determine for instance in which direction a game piece should preferably (not) move.

Frappydan wrote:
calculate whether point 2 is inside or outside of the circle

If the idea is to make a game piece react when another game piece comes within its bounds, you simply look at the distances after a piece has moved. This way it is also much easier to take into account special rules areas or obstructions, and such.

Hope this is of help to you,

Johan

My advice is free, and you may get what you paid for.

AnswerRe: Help with Geometry Function Pin
DanB198327-Jun-07 1:30
DanB198327-Jun-07 1:30 
QuestionCenter Form.. Pin
Xandip25-Jun-07 18:48
Xandip25-Jun-07 18:48 
AnswerRe: Center Form.. Pin
Manas Bhardwaj25-Jun-07 20:44
professionalManas Bhardwaj25-Jun-07 20:44 
QuestionHow to Complile *.bas file in VB.NET Pin
Jahnson K25-Jun-07 11:48
Jahnson K25-Jun-07 11:48 
AnswerRe: How to Complile *.bas file in VB.NET Pin
Christian Graus25-Jun-07 11:54
protectorChristian Graus25-Jun-07 11:54 
AnswerRe: How to Complile *.bas file in VB.NET Pin
The Man from U.N.C.L.E.25-Jun-07 11:55
The Man from U.N.C.L.E.25-Jun-07 11:55 
GeneralRe: How to Complile *.bas file in VB.NET Pin
Jahnson K25-Jun-07 12:23
Jahnson K25-Jun-07 12:23 
GeneralRe: How to Complile *.bas file in VB.NET Pin
Dave Kreskowiak25-Jun-07 13:29
mveDave Kreskowiak25-Jun-07 13:29 
GeneralRe: How to Complile *.bas file in VB.NET Pin
Christian Graus25-Jun-07 13:38
protectorChristian Graus25-Jun-07 13:38 
GeneralRe: How to Complile *.bas file in VB.NET Pin
Jahnson K25-Jun-07 17:19
Jahnson K25-Jun-07 17:19 
Questionlog4net examples in VB.NET Pin
Ridge Howison25-Jun-07 11:38
Ridge Howison25-Jun-07 11:38 
AnswerRe: log4net examples in VB.NET Pin
Dave Kreskowiak25-Jun-07 13:30
mveDave Kreskowiak25-Jun-07 13:30 
QuestionRowHeaders in Datagrids Pin
hsprasain25-Jun-07 10:35
hsprasain25-Jun-07 10:35 
AnswerRe: RowHeaders in Datagrids Pin
Dave Kreskowiak25-Jun-07 13:40
mveDave Kreskowiak25-Jun-07 13:40 
AnswerRe: RowHeaders in Datagrids Pin
Rupesh Kumar Swami25-Jun-07 19:02
Rupesh Kumar Swami25-Jun-07 19:02 
Questionbutton to terminate application Pin
GatoFedorento4725-Jun-07 10:35
GatoFedorento4725-Jun-07 10:35 
AnswerRe: button to terminate application Pin
Christian Graus25-Jun-07 10:51
protectorChristian Graus25-Jun-07 10:51 

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.