microsoft visual basic game programming with directx phần 4

Các tác giả của văn bản này cho thấy cách dễ dàng, nó có thể được sản xuất trò chơi thú vị đa phương tiện sử dụng quản lý DirectX và lập trình với NET trực quan. Basic Everett, phiên bản mới nhất của Visual Studio của lục. NET Lập trình game với DirectX Giới thiệu Lời nói đầu Lời nói đầu Chương 1 | Exit Sub Load the textures and create the cube to show them Elself Not Then Could not initialize geometry. Exit Sub End I f Start with a simple rotation to position the cube more nicely and with no scale 100 of the original size With WinMatrixControl . 45 . 45 . 45 . 100 . 100 . 100 End With Ends the test if ESC is pressed in any of the 2 windows Do While Not And Not TFrameTrateT calculation Matrix Test. Frame Rate Tnnn Loop Call the finalization routines and close the windows Now we can finally run the test. Modifying the values of numeric up-down controls in the control window will let us see the transformation occurring dynamically choosing the Auto Move check box will make the cube perform some nice moves automatically on screen. Figure 3-29 shows an example result of this last test. Figure 3-29 A moving cube with a walking man in each face Adding the Final Touches Since this chapter features no games there s no such thing as polishing the application. But there s at least one thing we can improve in our samples that will surely be useful in the next chapters finding a way to create smooth animations. Although it is very interesting seeing our walking man running at a 400 steps per second in a real game this kind of behavior will be at a minimum strange. So we d better define a specific frame rate to improve our graphics animation. Including an if command in the loop that calls the Render procedure to check the processor clock and just render a new scene at previously defined intervals will suffice to give the desired effect in our test and maybe even in .

Không thể tạo bản xem trước, hãy bấm tải xuống
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
Đã 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.