Welcome to MSDN Blogs Sign in | Join | Help

Silverlight Games: Using F#

Wow, I really like the new Expression 3.0 Blend, you can build games using no code!  What a lot of fun.  But what if you want to extend the code, you can easily use VB or C#, or both!  But what if you want to do something more functional, like maybe you need to do a simulation using a parallel processing to do something complicated.  Or something simple, but a billion times.  Then you need to connect your silverlight solution to the parallel processors, how would you do that?  In future entries I will use F#, then if you need to use F# with parallel processing, you can will have some examples.

Posted by SoCal Sam | 0 Comments

Designing Web Based Games: If I taught a class here is the syllabus I would use

Introduction to Web Based Games (working title)

This is an introduction course to web game design, studying the art, technology, and science involved in the creation and development of video games.

The course covers

·         Web game history

·         game design theory

·         design of computer-based games

·         delivery systems

·         development cycle, case studies

·         ethical and social issues

·         emerging technologies and trends

This course emphasizes the understanding and the interdisciplinary nature of web game design.

The initial training component is not Silverlight oriented.

Text: Blogs, online articles as assigned after first class session

Syllabus:

Week 1:

·         Lecture:

o    Web Game History

·         Assignment:

o    Review web based game

Week 2:

·         Lecture:

o    Game Design Theory: Gathering requirements for design

·         Assignment:

o    Create requirements for building a game

Week 3:

·         Lecture:

o    Game Design Theory: Design

·         Assignment:

o    Utilizing the requirements, design your game on paper

Week 4:

·         Lecture:

o    Game Design Theory: Playability

·         Student presentations: Review of web based games

·         Assignment:

o    Generate a playability survey

o    Utilize the survey with statistics

o    Implement a plan to fix issues

Week 5:

·         Lecture:

o    Web based games Infrastructure design (Delivery systems)

·         Student presentations:

o    Requirements for a web based game

·         Assignment:

o    Generate a request for proposal for implementation of an Web Farm Infrastructure for a Game

Week 6:

·         Lecture:

o    Managing Development cycles

·         Student presentations:

o    Playability survey and results of playability

·         Assignment:

o    Paper on management tools

Week 7:

·         Midterm

·         Student presentations:

o    Management tools

Week 8:

·         Lecture:

o    Demonstration of a complete management cycle

·         Assignment:

o    Student teams work on deconstruction of an existing web based game

Week 9:

·         Lecture: Delivery systems

·         Student presentations:

o    Web Based Game deconstruction

·         Assignment:

o     

Week 10:

·         Lecture:

o    Case study of Allegiance (or similar)

·         Student presentations:

o    Deconstructing Web based games

·         Assignment:

o    Continue to deconstruct the existing web based game

Week 11:

·         Lecture:

o    Ethics and social considerations

·         Assignment:

o    Paper on the ethics of game design: Is violence really bad?

Week 12:

·         Lecture:

o    Social Considerations: Visual and aural considerations

·         Student presentation:

o    Ethics

·         Assignment:

o    Paper on how to design to minimize the impact of visual or aural issues

Week 13:

·         Lecture:

o    Emerging Technology and Trends

·         Assignment:

o    Students can choose to build a simple web animation or write a paper on how to do statistical analysis of survey results of playability surveys using ANOVA or Weeble functions

Week 14:

·         Final

·         Turn in final assignments

Silver Putt

 

image

I LOVE Miniature Golf, and Silver Putt uses a basic Miniature Golf for the design, and NAILS IT.  You can create your own miniature golf course, the editor is a little clunky, but not too bad, and I sure as heck couldn’t do better.  I come away from this game with a feeling that I would like to spend more time with it, so it gets points for addiction.  The play is great: IF YOU LIKE MINIATURE GOLF.

One of the great things is that the game allows you to share game designs, which makes the whole thing a social event!

 

With respect to addictive properties, this game is a plus, if you are designing games, I would really make it be like golf.

As to play, well if you aren’t into miniature golf, there could be a negative, if you like miniature golf, then this is the game for you.

Battle Billards

I usually don’t like Pool games on the computer, the cues are weird

image

or the bounces of the balls is wrong.  Not the case with Battle Billards, although the robot competitor is a little to good and that ruins the addiction.  Good music.  I like Wheelz better than Battle Billards but it is a close thing.

 

The variety of games does make it interesting, but my prejudice against pool games make this one less than addicting and the play is pretty basic, after all it is pool.  However, if you like to play pool this game is for you. 

The reflection off of the bumper seems to be about right, if you always play with new bumpers.  It would be interesting to have a way to change the bumper coefficient of restitution (bounce) and maybe show table greens that are worn.  The cue in speed play is difficult to move.

None of these should be seen as a negative though.

Addiction value is high, if you like pool or billards

Play value is very positive, again if you like pool or billards.

Posted by SoCal Sam | 0 Comments

Wheelz

 

image

This is a fun game, similar in the simplest level to linerunner, but not the same game play, along with the simple jazz in the background, this game is like a drug, without the hangover or cost.

If you are going waste your time playing any game, this is the one for you want to feel that dirty little mind tickle from simply throwing your time away.

 

I judge this as an addicting and fun game.  Max stars.

Better than eating poptarts and washing it down with a Pepsi, Coke or Mountain Dew, with a chaser of Starbucks Coffee and a piece of lemon pie.

Play with your Peas

Great concept, I have often thought about how to use the Expression Designer to build a game to play with my Peas.  This is not that game, the sound effects are cool, and the building goes well, but then…

The darn peas are either quite shy or there is a bug in the game that needs to fixed, the peas do not leave the toolbar on the right side, every once in awhile they will appear.  The behavior of the infrequently appearing peas are not much fun.

image

Overall I would rate this game as:
Addicting: * out of *****

Fun: * out of *****

Vector Space Armada: Review

Another Silverlight based game at the excellent site: Mashooo image

Vector Space Armada, sounds good.

The initial feeling was one of the 1980s and playing the vector games in an arcade.  Then my mouse ran away from the screen and the little vector space ship went away from the training track.  This lowered the fun factor.  Something else happened.  Then the faint ship on dark background killed my addiction factor.

With some tweaks like wider lines, keep the mouse cursor on the screen no matter what the end user does are two of the quick fixes that would raise the scores quickly.

Overall I would rate this game as:
Addicting: ** out of *****

Fun: ** out of *****

Review of Terminator

Another silverlight based game at the excellent site: Mashooo

The Terminator game had a good feel to it, and an excellent menu that blocks you from going to levels before you are trained, which is a good thing.  The initial level felt like it could have been a road rally, frogger, etc. which would have been a little basic, but the designer managed to pull it off.image

Why?  The designer and builder(s) stuck with the story of the level, soldier/terminator jumps out of helicopter and falls through the sky.  You vary the speed.  Controls are using the arrow keys, always a plus in my opinion.  The game has a good life and score bar, if a little small, I would add the ability to press the m key for it to enlarge.

I will definitely go back and play this game a few more times.  Although I liked DotKiller better, that is more a personal preference than with the capability of the designers.

Overall I would rate this game as:
Addicting: **** out of *****

Fun: **** out of *****

Have a happy 4th of July! Be Safe! Build a Silverlight application

Building a Silverlight Fireworks program would be just the thing.  I did my usual search for a project that already is build and found a great site that compares Flash and Silverlight, both create a fireworks display!  You get to compare the two side by side, I won’t, because I am focused on Silverlight, but if you aren’t, then take a look at the Flash code and project.

Get this great firework project at: Flash vs. Silverlight Colorful Fireworks, keep in mind that Silverlight 3.0 works outside of the browser and Flash doesn’t.

Problem and Solution

Problem: When loading the silverlight application into my VS 2010 Team System IDE, but it didn’t convert. 

System: VS2010 with Silverlight SDK 3.0

Solution: Install Silverlight SDK 2.0

Once you have installed the Silverlight SDK 2.0, which could be after you installed the Silverlight SDK 3.0 the project will run as expected.

 

An aside on Fireworks:

Fireworks were initially invented by the Chinese, and likely the medical protocol for missing hands from explosions followed shortly.    image

In the United States July the Fourth represents the date of the signing of the Declaration of Independence, although the real date might have been July 2 depending on your legal point of view.  The making of “joyous” noise and so forth slowly became a tradition, with the slow communications and independent nature of the US in the early years slowed the adoption of the fireworks and parades.

If you are going to the beach, make sure that you enter the water in a manner that allows you to check out the new environment, and all waters, except pools, are renewed everyday.  I surf quite often, but I always, and I mean always do a quick wade out to check for sandbars, etc.  Please do the same.

Fireworks are interesting since they are really the basis for our current civilization.  If we didn’t have fireworks, created by the Chinese, then wars would have been forced to be fought with arrows, rocks, and catapults.  The idea of combustion would have delayed and Carnot might not have investigated the concepts of Thermodynamics.  Exploration of the Solar System would not have happened, and now with Voyager and the Pioneer craft would not have passed the edges of the Solar System.

July 4th is an important date in American History: Signing of the Declaration of Independence is completed!

  

Bottom line: Be safe, have fun, celebrate Independence! no matter where you are, write something important.

Creating a Model Project for your game design

With some versions of VS 2010 you are able to create UML projects, if you are a student in a science, technology, engineering or math class you have access to the full version of Visual Studio 2010 Team System through MSDNAA, if you do not have access, it is because of your school administration.  Please comment on this blog and I will get back to you, I think the blog comments have emails.  Well give it a try, make sure to include your school.

The Model Project is a template that you select from File New Project, it then allows you to create standard UML cases.  Over the next few blog posts I will take you through the following UML cases:

image

Please follow my blog post at http://blogs.msdn.com/devschool, I will do a series on using the Modeling projects for designing a game engine.

Farseer: Water Play

Play with water at FarSeer It’s summer, and Farseer Physics guys created a fun tool to play with water, even if you are stuck in the office.  Click on the picture to go to the Farseer site.

 

This is a great example of a physics modeling the real world.  Or is it?  In cyperspace things look like they are modeled correctly, and no negative toward Farseer, it is unlikely that it really matches the real world.

 

In the real world, if a model is created without a way to confirm them using actual environments, then they can’t be trusted outside of the computer.

 

Bottom line: Modeling tools they are real only if you test them in the real world.

Best line: Farseer is awesome!  But always test your models before going into production.

XNA: Using Fonts in XNA 3.1

XNA 3.1

No difference in how to use Fonts in XNA 3.1 over XNA 2.0.  If you already know how to use text in your project, this won’t be a big help to you.  This article was written to try to look a little smarter than my previous blog may have made me look.

Using text in your XNA project

Using the previous Blog approach, was simple, but not elegant. 

It would be better to add text that indicates whether or not SpriteBatch is an abstract class or a base class.

In this case you will need to add an existing content resource to the project.  The image below shows you how to add the spritefont material to the content folder.  There is a link that gets you to a very clear way to implement text in your game project.  Over future blogs we will go over how to add text, scoring and so forth to your game. 

Follow the article on MSDN:

Use the diagram to the right to add the existing content templates, in this case Sprite Font.

image
Ok, now you have added the content resources what do you do?

First you have to construct the objects from the base or abstract classes, the objects need to build the fonts/letters and the location of the fonts/letters

construct/instantiate a SpriteFont object and in this case the object’s name is Font1

You will also need a way to place it on the gameboard. 

The way you put it on the game board is through the construction/instantiation of the class Vector2, and the object that is constructed is named FontPos.

SpriteFont is a sealed class which is a member of the Microsoft.Xna.Framework.Graphics, which is in the file named:
microsoft.xna.framework.dll



public class Game1 : Microsoft.Xna.Framework.Game
   {
       GraphicsDeviceManager graphics;
       SpriteBatch spriteBatch;

       //Add the two lines below


       SpriteFont Font1;
       Vector2 FontPos;

 

       //******************

Your code should look like:

image

Later in the code, the FontPos will be used to determine the HEIGHT and WIDTH of the pixels that make up the text that are being written on the screen

In your test of whether or not spriteBatch is abstract or a base class, this test will function to change the screen red if spriteBatch is a class, and it will stay blue if it isn’t and write the message on the screen.

image

Posted by SoCal Sam | 0 Comments
Filed under: , , ,

My XAML object doesn’t show up in my Code Behind!

Sometimes you add the name of an object, or you have built an object in Expression Blend and named it.  Then when you try to use the object in your code behind, it doesn’t appear!

 image
image
ClickMe doesn’t appear when you try to use the Code Behind!

That’s just frustrating, awful design, URGGHHHH!

Not really, you need to do a save all

 image
image
Simple: Click the Save All button as shown here

 image
image
Then, magically, you get the object name showing up like you thought it would.

Cool, nice, good.

Hope this helped out.

image
image
Posted by SoCal Sam | 0 Comments
Filed under: ,

Silverlight Games: Getting the infrastructure down by blowing it out of the browser

In the XAML AppManifest.XML file there is a bunch of arcane symbols and words.  In the previous blog I detailed the high level of how to detach the Silverlight Application.  This is an important part of the future of Silverlight, works in the browser and works out of the browser.  Build once and really use everywhere and every when.  Uggh, just getting examples for the AssemblyPart that is comprehensive is going to take awhile.  Okey dokey, here are the combined links, as you can tell it is mostly cut and paste from MSDN.  Although I did add a few comments here and there.  Anyway, mark this one for the future discussions.

<Deployment xmlns=http://schemas.microsoft.com/client/2007/deployment >

<Deployment.Parts>

          <AssemblyPart x:Name="xamlName" Source="assembly" />

</Deployment.Parts>

</Deployment>

AssemblyPart Class

An assembly part is an assembly that is to be included in a Silverlight-based application package (.xap).

AssemblyPart Members exposes these members:

AssemblyPart Constructors

    • AssemblyPart, used in managed code, not XAML
AssemblyPart Methods
 
AssemblyPart Properties
  • Dispatcher: Gets the Dispatcher this object is associated with. (Inherited from DependencyObject.) A dispatcher object  provides services for managing the queue of work items for a thread.  Cannot be directly created in an instance of XAML, it is used only in managed code. (Reference)

  • Source: Gets the Uri that identifies an assembly as an assembly part.  The value of the Source property should be the physical name of the assembly, including the .dll file extension. For example, Application.dll.

Silverlight: Blow it out of the browser and links to definitions

Here is the code you need to make Silverlight work out of the  browser.  AppManifest.xml to see the XAML code I am talking about

Delete a comment in the AppManifest.xml.  The picture tells the story.  Once you delete the comments that surround the Deployment.ApplicationIdentity object, you can right click on your application and get that out of browser experience.  No activeX control, no Java Applet, clean and simple.

That’s it.  Really. And there are a gazillion blogs out there that tell you how to do this, along with how to add icons, etc.

Not here, I want to define some of the terms like

Deployment.ApplicationIdentity

Umm, I can’t, it isn’t written up anywhere.  What does it mean, how can you find out?

Confusion.  Pain. 400 Vulcans dead.  Oh wait, back to reality.

First you need to visit http://msdn.microsoft.com, and use the search tool on that page, there is a reason not to use the general search engines like BING.  BING and those other search engines like google, ASK and so forth won’t return the random item you can find by using your eyeballs.  MSDN search (based on BING) is tuned to only look inside of the MSDN and Microsoft.com site.

I was able to locate the article: Deployment properties, here I found a reference to a property, which is different than a method, called Parts, put it together you get 

<Deployment.Parts>

This property is defined as a property that gets an object that contains information about the application that is used for out-of-browser support.

Then I looked around looking for Deployment.Application, I wanted the actual article, not blogs that basically did what I did in the initial part of this blog.  The blogs are all good stuff, but not what I was looking for, I wanted to know exactly what this deployment class is. 

The deployment class is defined as providing an application part and localization information in the application manifest when deploying a Silverlight-based application.

I found the article, and you will need to just click this link:

Deployment.ApplicationIdentity Property, because you won’t find it using ANY of the search engines as of June 9, 2009. 

Moving to the ApplicationIdentity Class, which is defined as a class that represents the information about an application that is configured for out-of-browser support.

Then to see the class members you will need this link: ApplicationIdentity Members.

Now we have the properties that we need to fully utilize the ApplicationIdentity

Name: Description

  • Blurb: Gets a short description of the application.
  • Dispatcher: Gets the Dispatcher this object is associated with. (Inherited from DependencyObject.)
  • Icons: Gets a collection of Icon instances associated with the application.
  • ShortName: Gets the short version of the application title.
  • Title: Gets the full title of the application.

Example of the ApplicationIdentity XAML use:

<ApplicationIdentity  

           ShortName="shortName"   clip_image004

           Title="title">  

<ApplicationIdentity.Blurb>     blurb   </ApplicationIdentity.Blurb>  

<ApplicationIdentity.Icons>    

<Icon Size="iconSize">   iconSource   </Icon>  

</ApplicationIdentity.Icons>

</ApplicationIdentity>

To see the correct formatting, take a look at John Papa’s MSDN article.  Next article I will clean up how to use the Deployment XAML for fun and profit!

Posted by SoCal Sam | 0 Comments
More Posts Next page »
 
Page view tracker