Old 05-09-2008, 09:28 PM   #1 (permalink)
Zuner
 
Join Date: May 2008
Posts: 64
amoo3 is on a distinguished road
Default [BETA] ZunePong [Multiplayer]

Another version of Pong. Its not 100% complete yet, but Im working on it. You can look at the documentation to see what I want to have done.

Also, this uses the touch pad instead of the buttons to control your paddle.


Quote:
I’ve done it! I’ve made multi-player Pong

EDIT: Onscreen instructions work now


Known Bugs / fixes
-No way to go back to main menu
-Client Score has issues FIXED
-Host begins play before Client FIXED
Quote:
I've updated the graphics and the layout of the screen.
Download:
http://amir.shah.org/index.php/zune-pong/

Last edited by amoo3; 05-15-2008 at 07:56 PM. Reason: updated linkage




amoo3 is offline   Reply With Quote

Advertisement [Remove Advertisement]
Old 05-09-2008, 09:47 PM   #2 (permalink)
Support Team
Expert Zuner
 
Soccerfreak24's Avatar
 
Join Date: Nov 2007
Posts: 3,029
Soccerfreak24 is just really niceSoccerfreak24 is just really niceSoccerfreak24 is just really nice
Default

Cool, althoguh I have already downloaded two other pong games from this site. >.< If you can try getting wifi working, It'd be a big hit.
__________________





Soccerfreak24 is offline   Reply With Quote
Old 05-09-2008, 10:08 PM   #3 (permalink)
Zune Guardian
 
charmed61's Avatar
 
Join Date: Mar 2008
Location: The Gold Rush State!
Posts: 678
charmed61 is on a distinguished road
Default

i really love it, but it'd be better if it look more pretty and less buggy. i mean the touch is fine it's not buggy it's just the programming/drawing... sometimes the ball would get stuck to my bounce thing and i have to move it around to get the ball to bounce back up xD
__________________




charmed61 is offline   Reply With Quote
Old 05-10-2008, 01:02 PM   #4 (permalink)
Zuner
 
Join Date: May 2008
Posts: 64
amoo3 is on a distinguished road
Default Version 1 bugs fixed

I’ve fixed up my pong game from last night. New updates:
Better graphics
Better collision detection
“Dumber” AI
Scores (game still lasts forever)
Menu (Note: 2p has no function yet)

Im working on 2p now. Pray for the best!

Download




amoo3 is offline   Reply With Quote
Old 05-10-2008, 01:14 PM   #5 (permalink)
Senior Zuner
 
saline's Avatar
 
Join Date: Dec 2007
Location: 15 miles south of Nowhere, USA
Posts: 1,260
saline has a spectacular aura aboutsaline has a spectacular aura about
Default

You should replace the pong ball with a beer bottle and call it "Beer Pong". Just throwing that idea out there.




saline is offline   Reply With Quote
Old 05-10-2008, 01:34 PM   #6 (permalink)
Zuner
 
Join Date: May 2008
Posts: 64
amoo3 is on a distinguished road
Default

Quote:
Originally Posted by Saline View Post
You should replace the pong ball with a beer bottle and call it "Beer Pong". Just throwing that idea out there.
lol. An interesting proposal. Maybe after i get the wireless working. Too bad I dont have 2 Zunes

Its all going to have to be guessing until I get a friend's




amoo3 is offline   Reply With Quote
Old 05-10-2008, 04:09 PM   #7 (permalink)
Experienced Zuner
 
rpgoof's Avatar
 
Join Date: Apr 2008
Posts: 138
rpgoof is on a distinguished road
Default

I can't wait until you get the 2 player thing up! I'd love to play pong with my friends in the middle of class




rpgoof is offline   Reply With Quote
Old 05-10-2008, 04:37 PM   #8 (permalink)
Super Zuner
 
Chri(Z)tian's Avatar
 
Join Date: Feb 2008
Location: Florida
Posts: 1,701
Chri(Z)tian has a spectacular aura aboutChri(Z)tian has a spectacular aura about
Default

downloading the game right now looking forward to play it. For some odd reason I'm able to spend countless hours of my life playing pong with out getting bored...=P.
__________________

Thanks for the sig stkr!
Quote:
Originally Posted by stkr View Post
MS will have to be smarter and think farter ahead.
Lol farter...




Chri(Z)tian is offline   Reply With Quote
Old 05-10-2008, 05:15 PM   #9 (permalink)
Zuner
 
egamerhdk's Avatar
 
Join Date: May 2008
Posts: 73
egamerhdk is on a distinguished road
Send a message via AIM to egamerhdk
Default

Good game. I'm glad people keep on trying to make more and more games.




egamerhdk is offline   Reply With Quote
Old 05-10-2008, 11:20 PM   #10 (permalink)
Support Team
zB Programmer
Zune Guardian
 
Lucifer's Avatar
 
Join Date: Feb 2008
Posts: 724
Lucifer is a splendid one to beholdLucifer is a splendid one to beholdLucifer is a splendid one to beholdLucifer is a splendid one to beholdLucifer is a splendid one to beholdLucifer is a splendid one to behold
Default

this pong game sounds wonderful, but not everyone has a zune with a squircle, try making an "or" statement to support the 1st gen zunes as well... if you don't mind, if you do that, I'll give you a +Rep




Lucifer is offline   Reply With Quote
Old 05-11-2008, 09:20 AM   #11 (permalink)
Zuner
 
Join Date: May 2008
Posts: 64
amoo3 is on a distinguished road
Default

Quote:
Originally Posted by umisguy View Post
this pong game sounds wonderful, but not everyone has a zune with a squircle, try making an "or" statement to support the 1st gen zunes as well... if you don't mind, if you do that, I'll give you a +Rep
Will do. I'll try to have the next version up by Monday, but no promises. I've got exams this week.




amoo3 is offline   Reply With Quote
Old 05-11-2008, 09:39 AM   #12 (permalink)
Jr. Member
 
Join Date: Mar 2008
Posts: 448
Techy Dude is on a distinguished road
Default

yay i love pong











Techy Dude is offline   Reply With Quote
Old 05-11-2008, 12:33 PM   #13 (permalink)
Zuner
 
Join Date: May 2008
Posts: 64
amoo3 is on a distinguished road
Default

Ok, I added support for the Zune 30s. It should work, but I have no way of testing it (it seems that the game turns on touch even if its off in the settings). Someone let me know how it is. Download link is the same

Download

Also, careful with pressing the play button on the title menu. It may or may not crash your Zune. Still working on that.




amoo3 is offline   Reply With Quote
Old 05-11-2008, 12:47 PM   #14 (permalink)
Experienced Zuner
 
rpgoof's Avatar
 
Join Date: Apr 2008
Posts: 138
rpgoof is on a distinguished road
Default

Broken link?




rpgoof is offline   Reply With Quote
Old 05-11-2008, 01:03 PM   #15 (permalink)
Zuner
 
Join Date: May 2008
Posts: 64
amoo3 is on a distinguished road
Default

Fixed




amoo3 is offline   Reply With Quote
Old 05-11-2008, 04:30 PM   #16 (permalink)
Squirt
 
Join Date: May 2008
Location: Crazytown
Posts: 10
disca is on a distinguished road
Default Error

I keep getting the same two errors:

Error 1 'Microsoft.Xna.Framework.Input.GamePadCapabilities ' does not contain a definition for 'hasLeftXThumbStick' and no extension method 'hasLeftXThumbStick' accepting a first argument of type 'Microsoft.Xna.Framework.Input.GamePadCapabilities ' could be found (are you missing a using directive or an assembly reference?) C:\Documents and Settings\Owner\My Documents\My Videos\ZunePong\ZunePong\Game1.cs 249 58 ZunePong

and

Warning 2 The variable 'MinX' is assigned but its value is never used C:\Documents and Settings\Owner\My Documents\My Videos\ZunePong\ZunePong\Game1.cs 319 17 ZunePong




disca is offline   Reply With Quote
Old 05-11-2008, 04:48 PM   #17 (permalink)
Zuner
 
Join Date: May 2008
Posts: 64
amoo3 is on a distinguished road
Default

Oops. I changed that on my computer. Guess I forgot to upload it. On the line where it says ......hasLeftXThumbStick
Change it to ..... HasLeftXThumbStick

Second error is just a warning. It will work fine with that

Alternatively, I have fixed the code. You can download it again if you like.

Last edited by amoo3; 05-11-2008 at 04:55 PM.




amoo3 is offline   Reply With Quote
Old 05-11-2008, 05:04 PM   #18 (permalink)
Squirt
 
Join Date: May 2008
Location: Crazytown
Posts: 10
disca is on a distinguished road
Default

Thanks




disca is offline   Reply With Quote
Old 05-11-2008, 06:07 PM   #19 (permalink)
Squirt
 
Join Date: Nov 2007
Posts: 25
Rob848 is on a distinguished road
Default

Just tested it on my Zune 30, and the up/down controls seem to be inversed. When I right on the dpad (which is up when the zune is sideways) the paddle moves down and vice versa.



Rob848 is offline   Reply With Quote
Old 05-12-2008, 01:46 PM   #20 (permalink)
Zuner
 
Join Date: Mar 2007
Posts: 55
trs21219 is on a distinguished road
Default

Not to step on your toes Amir but i fixed the up / down inverse that was happening on the zune 30. here is the code.

Find this in the Game1.cs File in the ZunePong Project:
Code:
protected void movePaddle(GameTime gameTime)
        {
            int MaxX = graphics.GraphicsDevice.Viewport.Width - (int)(ball.Width * scale);
            int MinX = 0;
            int MaxY = graphics.GraphicsDevice.Viewport.Height - (int)(ball.Height* scale);
            int MinY = 0;

            //paddle2Pos.X = ballPos.X + paddle.Width/2; <--- Too "Smart"
            if(ballPos.X > paddle2Pos.X - paddle2.Height*scale*2){
                paddle2Pos.X += 2f; 
            }
            else if (ballPos.X < paddle2Pos.X - paddle2.Height * scale * 2)
            {
                paddle2Pos.X -= 2f;
            }
            if (GamePad.GetCapabilities(PlayerIndex.One).HasLeftXThumbStick)
            {
                if (paddlePos.X < MaxX && paddlePos.X - paddle.Height * scale * 3 > MinX)
                    paddlePos.X += GamePad.GetState(PlayerIndex.One).ThumbSticks.Left.X * 10f;
                else if (paddlePos.X >= MaxX && GamePad.GetState(PlayerIndex.One).ThumbSticks.Left.X * 8f < 0f)
                    paddlePos.X += GamePad.GetState(PlayerIndex.One).ThumbSticks.Left.X * 10f;
                else if (paddlePos.X <= MaxX && GamePad.GetState(PlayerIndex.One).ThumbSticks.Left.X * 8f > 0f)
                    paddlePos.X += GamePad.GetState(PlayerIndex.One).ThumbSticks.Left.X * 8f;
            }
            else
            {

                if ((paddlePos.X < MaxX && paddlePos.X - paddle.Height * scale * 3 > MinX) && GamePad.GetState(PlayerIndex.One).DPad.Left == ButtonState.Pressed)
                    paddlePos.X += 5f;
                if ((paddlePos.X < MaxX && paddlePos.X - paddle.Height * scale * 3 > MinX) && GamePad.GetState(PlayerIndex.One).DPad.Right == ButtonState.Pressed)
                    paddlePos.X -= 5f;
                else if (paddlePos.X >= MaxX && GamePad.GetState(PlayerIndex.One).DPad.Left == ButtonState.Pressed)
                    paddlePos.X -= 5f;
                else if (paddlePos.X <= MaxX && GamePad.GetState(PlayerIndex.One).DPad.Right == ButtonState.Pressed)
                    paddlePos.X += 5f;
            }
        }
And replace it with this:

Code:

protected void movePaddle(GameTime gameTime)
        {
            int MaxX = graphics.GraphicsDevice.Viewport.Width - (int)(ball.Width * scale);
            int MinX = 0;
            int MaxY = graphics.GraphicsDevice.Viewport.Height - (int)(ball.Height* scale);
            int MinY = 0;

            //paddle2Pos.X = ballPos.X + paddle.Width/2; <--- Too "Smart"
            if(ballPos.X > paddle2Pos.X - paddle2.Height*scale*2){
                paddle2Pos.X += 2f; 
            }
            else if (ballPos.X < paddle2Pos.X - paddle2.Height * scale * 2)
            {
                paddle2Pos.X -= 2f;
            }
            if (GamePad.GetCapabilities(PlayerIndex.One).HasLeftXThumbStick)
            {
                if (paddlePos.X < MaxX && paddlePos.X - paddle.Height * scale * 3 > MinX)
                    paddlePos.X += GamePad.GetState(PlayerIndex.One).ThumbSticks.Left.X * 10f;
                else if (paddlePos.X >= MaxX && GamePad.GetState(PlayerIndex.One).ThumbSticks.Left.X * 8f < 0f)
                    paddlePos.X += GamePad.GetState(PlayerIndex.One).ThumbSticks.Left.X * 10f;
                else if (paddlePos.X <= MaxX && GamePad.GetState(PlayerIndex.One).ThumbSticks.Left.X * 8f > 0f)
                    paddlePos.X += GamePad.GetState(PlayerIndex.One).ThumbSticks.Left.X * 8f;
            }
            else
            {

                if ((paddlePos.X < MaxX && paddlePos.X - paddle.Height * scale * 3 > MinX) && GamePad.GetState(PlayerIndex.One).DPad.Right == ButtonState.Pressed)
                    paddlePos.X += 5f;
                if ((paddlePos.X < MaxX && paddlePos.X - paddle.Height * scale * 3 > MinX) && GamePad.GetState(PlayerIndex.One).DPad.Left == ButtonState.Pressed)
                    paddlePos.X -= 5f;
                else if (paddlePos.X >= MaxX && GamePad.GetState(PlayerIndex.One).DPad.Right == ButtonState.Pressed)
                    paddlePos.X -= 5f;
                else if (paddlePos.X <= MaxX && GamePad.GetState(PlayerIndex.One).DPad.Left == ButtonState.Pressed)
                    paddlePos.X += 5f;
            }
        }
__________________



trs21219 is offline   Reply With Quote
Reply

Bookmarks

Thread Tools