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

Portal Pinball

, 18 Aug 2013
Rate this:
Please Sign up or sign in to vote.
Portal Pinball Intel AppUp competition article

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.

Platform & Category

Lenovo Horizon All-in-One - Games.

Summary

An interactive flat tabletop is a natural fit for pinball. What I want to do is use the AIO to expand on what it means to have a pinball game. In particular, I'm going to combine pinball with a couple of borrowed ideas from Portal 2, specifically the idea of portals and the visual effects of the "gels". The 10 touch points on the Lenovo Horizon All In One means we can have multiple players at once, true multi-touch gestures and interactions and a gloriously dynamic environment - all in all, this will be much more than traditional pinball.

Game Features

Here are some ideas I'd like to add to the game. I'll be adding as many of these as is practical within the timescales of the competition.

  • 2, 3 or 4 players simultaneously, with their flippers on the corners of the device, and a twisted form of gravity which pulls towards each player equally (essentially like the centre of the screen is a raised bump)
  • Alternatively, 2 players could control 2 sets of flippers at either end
  • Alternatively, 2 players could control one set of flippers at either edge with a linear bump in the centre
  • When you hit a ball with your flipper it changes to your colour, so any bumper interactions the score goes to the last player that hit it
  • Drawing an O shape in the main game area would create a portal, with its colour dependent on the clockwise/anticlockwise direction of drawing
  • Metaball-based "ball traps" - bubbling clouds comprising smaller balls which interact with a physics-laden spring action to absorb nearby slow moving balls - this would look similar to the liquid effects in Portal 2
  • Drag and tap on-board elements to alter their behaviour, e.g., pull an obstacle into the way of a ball, enable/disable elements, switch element modes, etc.
  • Add a Lenovo Striker to act as a giant bumper
  • Launch a new ball with a "drag back" touch gesture
  • Activate flippers with independent touches

Player Positioning & Gravity

Portals

Metaball Traps

2 metaballs merging. Field strength is calculated as 1/r2 and summed for each ball. A threshold is chosen - this determines the size of the balls - and triangles are generated to fill the shape.

How It Will Be Made

This will be developed in XNA using C#. I might convert it to MonoGame in the future, but for now I'll just concentrate on Windows. I think this will work much better on the large 27" tablet than a standard 10" one. I have a few bits and pieces of library code in XNA which I can use to help speed up development. To simplify development, I'll also keep the models used very simple, and probably just render it in 2D (we'll see how much time is available before committing to 3D!).

The metaball layer(s) will be rendered using custom shaders. I wrote a demo for Windows Phone 7 which featured a big gooey blob you could pull and stretch around, and the effect works really well. I can't wait to unleash it in a game! It's difficult to describe it in words, but it makes for a really good visual and tactile effect.

Metaball Demo

To get an idea of the look / feel of the metaball effect, I've uploaded some source code of the Windows Phone 7 demo. Download and try it out in VS2010. You'll need the WP SDK, as it's a Silverlight / XNA hybrid app. In case you don't have time for that, here's a couple of screenshots:

How Does this Use / Show Off the Device?

I think this would be a good project for the AIO because:

  • Pinball is simply a natural fit for a tabletop - a tabletop tablet is an obvious evolution of traditional pinball machines.
  • The size of the device means you can get 4 people round it - that's not going to be comfortable on a standard 10" tablet.
  • The graphics spec should mean the device can easily cope with the overhead of rendering metaballs, which pushed a phone to the limit.
  • 10 touch points mean 4 players can quite happily play at the same time (could theoretically use 5, but the rectangular shape isn't well suited to 5 equal play positions).
  • One or two Strikers could be placed down to act as a bumper.
  • The built in speakers mean no external speakers need to get in the way of getting four people round the device.

License

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

About the Author

Dave Gannon
Website Administrator Windwave
United Kingdom United Kingdom
Website administrator and programmer of in-house apps for my day job. For fun I write all kinds of graphic effects: real time plasma, roto-zoomers, real-time fractal zoomers, metaballs, a scan-line renderers, particle effects, an interactive WYSYWIG logic circuit simulator and a solid geometry ray-tracer.
 
Aside from that I'm also a massive games and music geek and DJ live on internet radio once a week.

Comments and Discussions

 
QuestionHow's app development going? Will you be submitting on time? PinstaffKevin Priddle24-Oct-13 4:51 
GeneralMy vote of 5 PinprofessionalAdam David Hill19-Aug-13 2:06 
GeneralRe: My vote of 5 PinstaffKevin Priddle21-Aug-13 9:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web02 | 2.8.140721.1 | Last Updated 18 Aug 2013
Article Copyright 2013 by Dave Gannon
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid