Use openxlive to develop Windows Phone 7 social games

Source: Internet
Author: User

Openxlive is a social promotion tool on the WP7 platform. I want to make some interesting content for players.

Openxlive can provide a great boost and support Sina Weibo binding in the future.

 

Because now there is a sl & xNa hybrid framework, there is a way to display native text. To display beautiful uncertain text, no texture is playing.

You won't be able to use textures for friends. I used to have a TTF resolution scheme, but a TTF font is large, so I chose the SL & xNa hybrid framework.

In this framework, only the SL control of openxlive can be used. Here is a small comment. The Sl control of openxlive is a portrait screen, and the xNa version is a landscape screen. If you can switch between the landscape and landscape, it will be fine.

After using the openxlive control, you can have a basic interface. After reading the interface, it seems that you can also create these interfaces by yourself. However, since openxlive already provides these features commonly used in games, why do I need to draw a snake.

This is 1.0. After these interfaces are updated, the openxlive SDK will become better.

The first is the main interface, and the background image can be changed. WhatCodeYou don't need to write it. New Game and continue both correspond to events, and you just need to add your own code. The customization is better here. A game with an archive can have a continue demand.

In a continue game, the new game should not be conspicuous except when it enters the game for the first time.

 

Well, let's take a look at the social networking features, rankings, and achievements provided by openxlive. These functions can be configured on the openxlive website, which is very convenient and very useful.

Online players do not have a single player, because we are a test game. The online users are myself. The announcement board, such as the game server, can be used to maintain the magic horse.

My center and friends are useless.

The interesting thing is that after I add a few friends, openxlive gives the interface so that you can get the information of these friends, so I got these player portraits and names in the xNa view.

I'm going to get an interesting image. paste the avatar of my friends and beat them.

 

 

Let's talk about the text display. Get a uielementrender object, and copy the uielement to the texture object. we can imagine that writeablebitmap can also be used to create the uielement.

It should be the same thing. The underlying Encapsulation has a better copy performance. Even better, it is also a pixel operation, so it is not suitable to keep running. So I saw a friend demonstrate how to directly create a 800*480 uielementrender, which is not suitable for this thing.

This is almost the case if you want to build more projects and draw them all the time. In this example, I don't feel the problem that uielementrender causes the number of frames to drop.

I encapsulate uielementrender as static and dynamic labels. The name of a person must be static and updated only once. The top line is dynamic.

In practical use, there must be more than labels. You can use the XAML parser to convert a vector image into a bitmap, which can reduce the storage capacity of some simple images.

 

Please be careful when there is another situation. The hybrid framework does not lock frames. I just got FPS for good debugging. But this directly means that the battery pressure is very high.

The wrong thing is that gametimer update does not lock frames, but the render limit is 60. Actually, Samsung i917 gets 30 in a slightly complicated scenario.

The simulator indicates that Hao has no pressure. The following is a test of billboard.

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.