Results 1 to 5 of 5

Thread: I move !!

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2002
    Location
    KL.......
    Posts
    13

    I move !!

    creating movements in VB is somehow simple...
    Though the question is how to make them move in a networking environment. So far I have not receive any satisfactory feedback.

    I used

    Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
    If KeyCode = vbKeyDown Then
    Shape1.Top = Shape1.Top + 100
    Call mdlPackets.SendChat(KeyCode)
    End If
    End Sub

    but how do I send it????
    Hate not me. Hate your weaknesses

  2. #2
    Member
    Join Date
    Oct 2001
    Posts
    51

    Um

    Well I am not sure that I understand your question. But here goes...

    I don't understand this line
    Call mdlPackets.SendChat(KeyCode)

    But if you want to do networking you should probably use the winsock control. You can use it to send/recieve data using the udp or tcp/ip protocols.

    MSDN contains a good example for using udp, and it would be a simple task to apply that logic to your situation I think.

    Here is the link:
    http://msdn.microsoft.com/library/de...ockcontrol.asp


    Good luck

  3. #3

    Thread Starter
    New Member
    Join Date
    May 2002
    Location
    KL.......
    Posts
    13

    wooppsss

    Sorry for the extra line of coding.... but somhow winsock will lag my program unless there is some way to kill the lagging time.

    How abt directx?
    Hate not me. Hate your weaknesses

  4. #4
    Member
    Join Date
    Oct 2001
    Posts
    51
    OK, I don't know much about DirectX. My impression was that udp was a pretty lightweight messaging system.

    I don't know any easier way to incorprate networking into VB unless you use a 3rd party OCX, which will probably be heavier than Winsock.

    Good luck. You should probably try one of the other forums on this site for info. on DirectX and gaming.

  5. #5
    Banned Michael_Kamen's Avatar
    Join Date
    May 2001
    Location
    The Netherlands
    Posts
    1,180
    You want to use DX for sending over data?
    I once made a DirectX game, but used Winsock for sending over the movements. In my opinion DX just s*cked for that.
    Winsock is very lightweighted and easy to use.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width