Use Popfly GameCreator to easily build a Silverlight game-Part1

Source: Internet
Author: User
Use Popfly GameCreator to easily build a Silverlight game-Part1

Abstract: This article describes how to use Microsoft Popfly Gamecreator to easily build custom silverlight games. This document describes the basic scenarios and gamer scenarios. Have fun!
Keywords
Microsoft Popfly, Silverlight, Game

I registered an account in Popfly last year, but it was too annoying to create mashups (few available elements) and I never paid attention to it. Until last night, a friend recommended me a new function Gamecreator on the Popfly website, which is very attractive to me who love games from an early age. I opened my game at http://www.popfly.com. I roughly flipped through the wizard and it seems quite simple. It is easier than creating those mashups before. I can't wait until I get started.
Since it was the first time I used it, I 'd like to start a Space shooter game just like using the example in the Wizard.
First, click Creat Stuff in the upper left corner and select "Game ",

In the pop-up dialog box, select "... or start from scrach" (we do not directly create an existing template ).

Then we need to add some roles to our game. At this time, the Actor icon in the upper left corner is already selected by default:

Recall that when I was a child, I played the Nintendo card-carrying classic game "beebot ":

I want to create something similar. First, I have to add two roles, one being a player-controlled ship and the other being an enemy ship. We only need to search for the roles we need in the search box. Here we may search for "spaceship" directly ",

Click the ship icon to see the ship added to the game element bar in the upper-right corner.

The next step is to configure the scenario for your game role. Click the "Scenes" icon on the top left and click the role on the far left. The role will be added to the scenario. You can drag it to any position, like beebot, we have a similar scenario:

Next, we will add a Background for the game. Click "Background" on the left, select a Background you like, and click "X" in the dialog box. Here I select a dark background like space. To make the game better, we can also add background Music. Click the Music button on the Left bar, select or search for your favorite background Music in the dialog box, and then click "X. The layout is complete. Click "Save" in the upper right corner to Save the layout.

The next step is to add some control actions to the player's ship.
What we hope is that the player's ship can move left and right and can open fire. First, click "Actors" at the top to return to the role editing bar, select the player's ship, select "Behavior" on the left, and select "Motion" in the pop-up dialog box ", the column we will see is added to the editing area:

Click the Event button of Motion1 and select "Keyboard" in the pop-up dialog box ":

Click the right arrow of the keyboard on the screen. You can understand that you have registered such a control key.
Click "X" to close the dialog box. Click the Motion button of Motion1. In the pop-up dialog box, select the right E (ast) direction and the While processing Event button ,:

Click "X" to close the dialog box. Then you can test it first, click "preview", and then click the game screen (ensure that the screen gets the focus) at the bottom of the notebook ), right-click the keyboard and you can see that the player's ship is indeed shifted to the right. OK. Repeat the preceding steps and add a left shift effect.
Next, we will add a bullet (missile?) to the player's ship ?) Click the shoot button in the Behavior dialog box:

The following column is added to the editing area:

Click the Event to add a keyboard Event, because we want to Press the Space key to launch a bullet. Note that the Press Event is selected at this time:

Because we do not want to always make this event active, but only need to trigger it when pressing the button.
Then, close the dialog box and click "Projectile" in Shoot1. You can select the bullet style, click it, and click "X" to close the dialog box.
At this time, we also need to edit the bullet behavior. We click the shoot1 motion button to add an action relative to the game Scene (Scene) up to N (orth,

In the "X" dialog box, click shoot1 to set a Sound for shooting. Then click Save. OK. The gamer part is almost here. You can Play your project and try again. Remember to save it :-)

Because there are too many images, the settings of the Computer ship (UFO in the figure) will be introduced in the next section.

Enjoy it

Yellow winter

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.