TAILIEUCHUNG - microsoft visual basic game programming with directx phần 8

giải thích bất cứ điều gì khác trong phát hiện va chạm Chương 1 và Nettrix. GDI + trò chơi nếu chúng ta sử dụng thủ thuật này hình ảnh 7-9: Một con thỏ nhảy mà không có dự đoán trò chơi thú vị đa phương tiện bằng cách sử dụng Managed DirectX và Tiếp theo chúng ta sẽ thảo luận về một khái niệm phim hoạt hình | Catch 0 End Try Else 0 End f End Sub In the next section we ll write the code for creating game sessions and joining them. Coding the Session Methods Although we are coding a single class for the sessions there ll be specific methods executed by the host and others used by the client. We ll discuss these methods in separated sections so that we won t confuse the two. Creating and Destroying Sessions To create a session in DirectPlay we simply call the Host method of the Peer object passing the appropriate parameters which enables us to receive connections from other computers. TheHost method will receive two parameters an ApplicationDescription 0 bject which will give the game GUID and the session name and the Addressobject which points to the service provider to be used Public Function CreateSession strSessionName As String As Boolean Try Create the application description object Dim AppDesc As New ApplicationDescription GameGuid strSessionName No special flags 0 Host a game on DPAddress as described by AppDesc AppDesc DPAddress CreateSession True Catch e As DirectPlayException Error when creating a session __ - CreateSession False End Try End Function We must follow here a rule of thumb for any program Close what you opened. So we ll add code for the CloseConnection method which can be called if the program wants to explicitly close the connection to other computers. Public Sub CloseConnection End Sub These two methods will be used only by the Host and they are all we need to create and destroy game sessions. Since many games will need a configuration screen to receive the session name from the player we can add an extra Create-Session method that receives no .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.