Quick query of Windows Phone 7 xna4 Game Development

Source: Internet
Author: User
Tags dotnet

 

Update 2010-11-24 (* U2 *)

Update 2010-11-23 (* u *)

Resolution of xna4 on WP7

In most cases, automatic configuration can satisfy you.

The full screen on WP7 is the full screen, and the non-full screen is the one on which the power is displayed to the cloud. The default mode is non-full screen.

The maximum resolution on WP7 is 800*480 or 480*800. If the resolution is smaller than the maximum resolution, the resolution is automatically scaled up at the same time. The resolution is black filled in areas that are not satisfied.

If you set the aspect ratio to large, the default screen is a vertical screen. Set the aspect ratio to small. The default value is a horizontal screen, which automatically switches between the left and right sides of the mobile phone. Equal width and height are regarded as vertical screens.

You can also change this behavior by setting the allowed rotation direction. In most cases, it is meaningless.

Unless you set a resolution of 480*480, you can make the portrait screen adaptive from left to right.

If the portrait screen and left and right support are enabled for non-square resolution, the screen is forced to be portrait. A resolution bug occurs when the left and right sides are rotated.

If you need a screen that is rotated at will, calling the gyroscope and controlling the drawing direction by yourself may be the only way.

 

Xna4 is divided into two standard configurations: REACH and high

High can be used for PCs and Xbox,

WP7 does not allow customshader Based on REACH Configuration

The Development Environment on WP7 is DOTNET Framework 3.5 compact pure C #

Don't be surprised. There are a lot of things that don't have, no full reflection, no binary serialization, and no data structures such as sortedlist

WP7 debugging without PC-side convenience

WP7 is not edited and continues. It cannot be appended to a process. Therefore, you should create a synchronized PC project.

As long as the compilation can be passed on two platforms, it is very easy to switch from a PC project to WP7 for debugging. This is enough to save you a lot of time.

Available storage on WP7

Titlecontainer

AccessProgramResources released together: We are usually called bin \

Isolatedstorage

Access to the temporary storage area allocated to the application. The temporary storage area is too uncertain, and the lifetime and capacity are not guaranteed.

The official recommendation is to use a temporary storage area to save the local archive. In fact, I don't think he can even save the archive.

This is basically equivalent to an Internet Explorer Temporary File. For a temporary storage area of Silverlight on a PC, an application has a 1 MB quota by default, and WP7 is not tested.

(* U *)In the simulator test, the quota interface returns an exception. The temporary storage zone can be two GB and can only be used in one application. Still need real machine testing

User storage Zone

There is no way to store arbitrary files in the user's storage zone. This is because WP7 has abandoned the design of the resource manager. Of course, the cracking is omnipotent.

The game that wants to collect money cannot be cracked. What replaces the user's storage zone is

Medialibrary

Allows you to store images and read thumbnail albums of images and music.

If you want to save an archive, You can encode the information and save it in the image. Other types of data are also supported. This function cannot be tested on PC and WP7 simulators.

After obtaining the real machine, I will perform a more detailed test on this function.

This will be the only way to exchange data locally across applications. in-depth research into medialibrary is often necessary. To avoid all possible blockages, it is the most reliable way to encode the information directly to the image.

As long as we switch our thinking, the limitations of WP7 are not that strong

(* U *)Invalid.

Duplicate files are allowed, and existing files cannot be deleted or modified.

The file stream must be in JPG format; otherwise, an error occurs.

Data can be appended to a JPG file and can be read normally.

The real machine test is still required to have duplicate names. Although cross-application communication can be performed, the append operation is not allowed to be modified, which still produces large application restrictions.

Input on WP7

Text input

You can call guide. beginshowkeyboardinput to call the Standard Input Panel.

We recommend that you use this tool. Now you can enter six languages. Although Chinese is not included, we all know that it is only a matter of time.

Touch

Support for touch point status detection and gestures

Forget the gesture, it won't bring a better experience

Most operations are completed by one hand. Click, drag, and hold.

I have already made two free operations, such as a free camera control solution, and the results are quite good.

The characteristics of input are to be concise, more imaginative, and not to be restrained by gestures.

Button

WP7 only supports one button back, while others are for Xbox. This back is the rollback in the lower left corner of the WP7 standard button.

Microsoft has made a detailed requirement on the event responding to this button. In the subinterface, you must be able to return to the previous layer. you can insert a dialog box to confirm the event. When the dialog box is displayed, press the rollback button to agree to the rollback.

In the main menu, roll back and exit the application.

WP7 program exit and recovery

The WP7 program exits and recovers. Although the official website has requirements, it does not do anything.

You have no chance to press the START key or search key.

The onexiting event is executed, and the interface has exited. You cannot intercept it or give the user any prompt. You

You can only save the state of your program to the temporary storage area slowly in onexiting, or do not save, then your program will no longer be able to return to this state.

There is no notification of program recovery, and it is no different from the new program.

So you should check whether you have saved the status before. If yes, restore it.

(* U *)Observing the behaviors of embedded office programs can clearly differentiate recovery and operation. After checking that Silverlight events can be restored and run separately

(* U2 *)Phoneapplicationservice. Current can also be used in xNa. The default game event is useless and some events can be directly involved here. The state here can be used to store the objects to be restored.

Note that the State cannot be stored in the onexiting event. This object is useless. You cannot recover data in the game constructor,

What can WP7 learn from?

Dotnet cf is a senior developer of embedded development.

Unique WP7 Recognition

The bound liveid cannot be obtained currently.

The Xbox Live series interface can only be debugged on a real machine

The WP7 PUSH Service can generate a unique identification. It does not know whether it is related to hardware or bound ID. This requires more than two real machines to be determined.

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.