We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexDiscussionExhibition › Penti - A 3D Multitouch Puzzle Game
Page Index Toggle Pages: 1
Penti - A 3D Multitouch Puzzle Game (Read 2046 times)
Penti - A 3D Multitouch Puzzle Game
Apr 30th, 2008, 10:20pm
 
Hey Guys.

Last semester I developed a multitouch-game for an university project using a multitouch table built by the Fraunhofer institute. And I figured I could share it with you guys since I put a lot of effort into it and there arent that many multitouch applications out there yet.
It is a geometric puzzle game resembling the game of Pentomino. The goal is to fill a given shape with the available geometric blocks.
It was built in Processing using the OpenGL renderer. It supports multitouch table input via the TUIO protocol but it can also be played with just a mouse on a pc.

Its Features are:
- 15 different levels with different backgrounds, and blocks,
- 3 2-Player levels (2 players play at the same time - who first finishes the puzzle wins),
- 3D OpenGL graphics
- Levels are in xml format -> you can easily create your own levels with custom shapes, blocks and textures
 (they are added automatically to the menu with a thumbnail preview)
- Blocks snap to the gamefield
- Game detects if puzzle is solved
- Camera: Zooming, Panning, free look

Following multitouch gestures are supported:
- Dragging Blocks  -> Put 1 finger down on a block and move your finger (only use one finger!)
- Rotating Blocks  -> Put 2 fingers down on a block and move them clock- or counterclockwise
- Panning (Camera) -> Put 1 finger on the level background and move it around (Note: only 1 panning action is allowed at a time)
- Zooming (Camera) -> Put 2 Fingers down on the background and move them together or away from each other to zoom in or out

Here are a few screenshots:
...
...
...

Im offering two versions:
- a setup.exe file for convenient installing on windows machines
Link: http://nuispace.com/misc/penti_09_setup.exe

- a ZIP file which contains the game as a executable Java ".jar" file
Link: http://nuispace.com/misc/penti_09_archive.zip

Oh, and you can define the resolution or fullscreen mode by chaning the settings in the "Settings.txt" file in the base directory.
Just try it out and tell me what about what you think or any bugs you find. Im looking forward to get some feedback Smiley

Enjoy!
Re: Penti - A 3D Multitouch Puzzle Game
Reply #1 - Jan 11th, 2010, 9:11am
 
I have a square and wanted him
move with a finger
rotate with two fingers
And zoom with 4 fingers
Someone could make me an example of these!?


my email : pedro_gomes6987@hotmail.com

TUIO_Processing

urgent
Re: Penti - A 3D Multitouch Puzzle Game
Reply #2 - Jan 11th, 2010, 9:29am
 
thats not the way it works..
Re: Penti - A 3D Multitouch Puzzle Game
Reply #3 - Jan 12th, 2010, 11:16pm
 
I hate to hijack this thread, but psg's request (albeit somewhat off topic) was just too good to pass up.

Quote:
/// "Tuio" by TfGuy44 (TfGuy44@gmail.com)
/// Created for psg (pedro_gomes6987@hotmail.com) 
/// Please feel free to distribute or repost
/// so long as this comment block remains intact.

/// Please also feel free to contact me with 
/// comments, compliments, or job offers.


int fingers = 0;
int sx = 150, sy = 150;
float sr = 0.0;
float ss = 3.0;
int sb = 200;
boolean goup = true;
color sc = color(200);

void setup(){
  size(300,300);
}

void draw(){
  background(0);
  if( fingers == 1 ){
    sx = sx + mouseX - pmouseX;
    sy = sy + mouseY - pmouseY;
  }   
  if( fingers == 2 ){
    sr = sr + ( 0.01 * ( abs( mouseX - pmouseX)  + abs ( mouseY - pmouseY) ) );
  }
  if( fingers == 3 ){
    if( (mouseX != pmouseX) || (mouseY != pmouseY)){
      if( goup ){
        sb++;
        if(sb >= 255 ){
          goup = false;
        }
      } else {
      sb--;
        if(sb <= 0 ){
          goup = true;
        }  
      }
      sc = color( 255* mouseX / width, 255* mouseY / height, sb);
    }
  }
  if( fingers == 4 ){
    ss = ss + ( 0.01 * ( abs( mouseX - pmouseX)  - abs ( mouseY - pmouseY) ) );
  }
  sx = constrain(sx, 0, width);
  sy = constrain(sy, 0, height);
  drawSquare();
  drawhand();
}

void drawSquare(){
  pushMatrix();
  translate(sx, sy);
  scale(ss);
  rotate(sr);
  fill(sc);
  noStroke();
  rect(-20,-20,40,40);
  fill(255);
  stroke(0);
  ellipse( -10, -10, 10, 10);
  ellipse( 10, -10, 10, 10);
  fill(0);
  ellipse( -10, -10, 5, 5);
  ellipse( 10, -10, 5, 5);
  line(0,-6,-3,0);
  line(-3,0,3,0);
  ellipse( 0, 10, 30, 5);
  noStroke();
  popMatrix();
}

void drawhand(){
  fill(color(200,200,100));
  rect(mouseX-5,mouseY-5, 11,14);
  rect(mouseX-8, mouseY-5, 2, 14);
  rect(mouseX-8, mouseY+3, 5, 6);
  if( fingers > 0){
    rect(mouseX-5, mouseY-15, 2, 10);
  }
  if( fingers > 1){
    rect(mouseX-2, mouseY-17, 2, 12);
  }
  if( fingers > 2){
    rect(mouseX+1, mouseY-15, 2, 10);
  }
  if( fingers > 3){
    rect(mouseX+4, mouseY-13, 2, 8);
  }

}

void mouseClicked(){
  fingers++;
  if( fingers == 5 ){
    fingers = 0; 
  } 
}




We now return to your regularly scheduled thread.  Smiley
Page Index Toggle Pages: 1