Windows Phone 7 Development log (question 1, structure)

Source: Internet
Author: User

The evening of the glory and passion of the future has passed.

The Basic Research on xna4 development is completed. It is a pleasure to create a function, perfect it and fill it with something that is just as physical.CodeIt is very boring and painful.

ProgramEmployees are not afraid of suffering. I have been sticking to this front for more than a decade, and I am also a leader in self-abuse.

Let's review the conclusions of the survey.

I. Windows Phone 7 will stick to DOTNET and xNa and say no to third-party native C ++ development. At present, Microsoft's determination is extremely powerful.

It is like Vista, or like Windows 7.

This is not a problem I want to consider. I will do it if I like it. XNa becomes the only choice for developing graphics applications on Windows Phone 7.

Ii. Custom shader (Supported on Windows and not on Windows Phone 7)

If this is really not supported, the location of the Windows Phone 7 game machine will become a joke. The xNa development team only said that this feature will be available, and I believe Microsoft will not keep this joke to the RC version.

Ii. 1 build of custom shader. Runtime build is not supported. You can use improper methods to initialize effect and call the external program build effect to implement the runtime build of shader on the Windows platform. This problem is the best support, and I can pre-build all the shader if it doesn't support me, but it will become not elegant.

Ii. 2 M shader specifications. This is awesome. I have not found the xna4 document. I can only drag it into the content project to build it and try it. An error is reported. However, it is found that it basically complies with the fx_2_0 specification, Shader Model 3.0, only some rendering status settings are not supported.

2. 3 vectex texture. It is very pleased that the Windows platform is operating normally. It is more efficient to draw the terrain using this method.

Iii. Model Loading

Importing files from fbx is good. Everything is available, except animation. The animation and dress-up module needs to be re-developed.

Iv. Text and input methods

The English version of the simulator does not show any signs of input methods. This part requires further development.

V. xNa itself

Well, except for the contect project, this is a subset of DX encapsulated by DOTNET. In other words, there is still a long way to develop games, and xNa is still very low-layer.

6. Good news

The development and debugging of multi-touch is very convenient. There is a Windows 7 multi-touch compatible input device. It is known that there are multi-touch drawing boards, HP and Dell tablet computers that support multi-touch, Taobao also has an infrared two-point touch screen that can be placed in front of the display.

Next, start the formal development, starting with the establishment of the basic code structure.

C # This part of the design is actually very good, just set the class and function, member access level, OK.

However, this method is always confusing with code. After I finally learned the various methods of C #, the design is as follows:

The engine is divided into two parts: interface and implementation. The interface part is pure interface, and the Implementation part is not made public.

First, you can clearly write all interfaces, and use the interface inheritance with no regret.

In the implementation part, only the single inheritance interface is used.

Then clge_system. All interfaces in this set are created.

Then, initialize the graphics engine in part of game. initialize.

Game. Update calls partial update interfaces in the scenario. I split the update into several parts. considering multiple RT plots, not all updates will be performed. First, prepare for the future posteffect and scenario effects.

In game. Draw, add the rendering interface of the above scenario.

After the basic structure is introduced, the next step is to enter a boring code filling stage. The progress may not be visible for some time.

Our goal is a 4096-inch ultra-high terrain. Supports layer-4 texture mixing (the block size ranges from 16*16-128*128. Each layer of textures can include diffuse, highlight filtering, and normalmap. The appropriate shader is automatically generated based on the layer settings of the block for rendering. The terrain rendering adopts the vectex texture mode, and the CPU specifies the level of the slice for each slice. The GPU processes the terrain height transformation and the slice fusion.

In terms of input, to be fully compatible with multi-point touch, I designed to simulate multi-point touch with the keyboard and mouse:

This is an incomplete implementation. It only tests and ensures the uniformity of platform operations.

Right-click and scroll wheel, sorry, here the mouse is just a touch simulator, I will not do any support for them.

My idea about the future game interface is as follows. There is only one button in the lower left corner of the screen. Press and hold the display menu to hide it. You need another finger to operate the menu.

The operation on the PC is to press and hold the Alt key to exit the menu and release it. When there is a menu, use the left mouse button to perform the operation.

Operations that require multi-point operations include scaling and rotation. Translate with one finger. Only one finger is needed for scaling and rotating, and only one finger can be moved.

Zoom and rotate on the PC to press the ctrl key. When the center of the screen is pressed by a finger, a prompt is displayed on the interface. Then, the mouse clicks the mouse and the center of the screen to make multiple touch judgments.

For an excellent multi-touch experience, change your computer. ^_^

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.