Click here to Skip to main content
Click here to Skip to main content

Save the Goal

By , 1 Sep 2013
Rate this:
Please Sign up or sign in to vote.

Please note

This article is an entry in our AppInnovation Contest. Articles in this sub-section are not required to be full articles so care should be taken when voting.


Target Platform: All-In-One

Category: Games

Overview: A multi-player game. One player defends the Goal, while other players shoot foot balls and sometimes other junk at the goalie. EDice is used to decide who defends the goal. Goal keeper defends the goal using the Striker accessory.

Description: Please see below.

Approach: See below.

Coding Languages: WPF Application written in C# using .NET Framework 4.5. ASP.NET MVC site used for Click Once Deployment and updates. WEB API endpoint to provide server-side support with exception reporting. 


This is a multi-user game with multiple shooters shooting footballs at a single goal. The aim of the Goal Keeper is to defend all the foot balls while ignoring any other junk thrown at the goal. A multi-user game, where one user is chosen as the goal saver. Rest of the users become shooters and have a supply of Footballs to shoot at the Goal.


Game starts by choosing number of users and entering their names or call signs for scoring.  Each user gets to roll the E-Dice, user with the smallest number becomes the goal saver first. In case of a tie, users in the tie can resolve manually or roll again. 

The user with the least score becomes the Goal Keeper, rest of the users are shooters. Goal keeper uses Striker accessory so defend the Goal from the balls. Shooter uses Flick gesture to kick the ball, once its in motion, the Joystick accessory can be used to change direction of ball midway. Each shooter gets different colored balls to ensure that there is no confusion. Goal keeper gets a point for each saved ball and Shooter gets a point for each Successful Goal.


Initial sketch of the game shows that, an input screen is required up front to take user options and user names, a local database is required to store user info and profiles. MVVM pattern is used through out the application. Data structures are created to collect and store user information and current play information, these are EF entities as we store all data to a SQL Compact database locally. Structures like User, User Profile, GameSession (contains details of the currently played game) etc are created. All this code resides in the Data layer, a C# Class Library Project.

The WPF application contains UI components required for the Game. Football field and Goal are rendered as static, hence an image is used. Players are represented with icons or user profile picture if available. Football is the only animated object in the game. A user control is created in Expression Blend with properties like Spin Rate, Spin Direction, Color etc. as public properties. Instances of this control are placed on a canvas. Once the X and Y coordinates are animated while letting the ball spin, it gives the effect of a moving ball.

Positional input form Striker accessory is used to identify the location of the goal keeper. Game logic to reflect or let balls score goal is based on the ball position and Striker's position.

Joystick direction modifies the X and Y direction of the balls on the fly. Flick gesture is used to represent kicking a ball.

ASP.NET MVC site is used to allow for click once deployment and to send updates to the Game. The WEB API Endpoint is used to collect Exception information and Feedback from users, so that it can be addressed in the next release cycle. 


 Save the goal is a multi-player game suitable for the All-In-One and makes use of Joystick, Striker and E-dice accessories.



This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Nrupal Prattipati
CEO Indeprof Ltd
United Kingdom United Kingdom
I am passionate about software development and can't wait for the time when everything around us exposes an API for us to develop against.
I have been developing software using the .NET Framework since the last 10years. I hold an MSc in Advanced Software Engineering with a University Medal for Outstanding Academic Performance. I also picked up a few MCP and MCTS certs.
I follow Machine Learning and Artificial Intelligence closely and have completed a course online from Stanford University through Coursera by Andrew Ng.
I have developed and deployed a mobile application on iOS. The application is a telecommunications application allowing users to create a recording and send out voice message blasts to tens of thousands of contacts at once.
I play the role of an Architect and Software Developer. I have been delving in ASP.NET, WinForms (not anymore), WPF, Silverlight, ASP.NET MVC, Azure SDK and other .NET technologies around them like SharePoint. SPA with WEB API is currently the technology I am working on.
A Round 1 winner in App Innovation Contest 2012, but couldn't make it to the second round due to the lack of Code Signing Certificates. I will be re-writing parts of the code to convert the old App into a Windows 8 Store App soon.

Comments and Discussions

-- There are no messages in this forum --
| Advertise | Privacy | Mobile
Web01 | 2.8.140415.2 | Last Updated 2 Sep 2013
Article Copyright 2013 by Nrupal Prattipati
Everything else Copyright © CodeProject, 1999-2014
Terms of Use
Layout: fixed | fluid