Old 05-09-2008, 12:44 PM   #21 (permalink)
Experienced Zuner
 
Robert13's Avatar
 
Join Date: May 2008
Posts: 126
Robert13 is on a distinguished road
Default

Awesome, the re-release is WAYYY better. No offense.



Robert13 is offline   Reply With Quote

Advertisement [Remove Advertisement]
Old 05-09-2008, 01:28 PM   #22 (permalink)
Experienced Zuner
 
Join Date: Nov 2007
Posts: 131
MarcusMaximus is on a distinguished road
Default

ya, I think I'll work on a menu eventually(Probably going to put a delay in the beginning with a countdown or something to let you get ready before the game starts next release), just trying to get the actual gameplay down first. As for why some people's music isn't playing I have no idea... Make sure you have the volume up when you start the game cause XNA seems to use that as the max volume, also try pressing up, that'll increase the volume in the game(although only to the volume it was when it started, I think that might be a bug in XNA but idk). Aside from that I hope you guys are enjoying it so far.



MarcusMaximus is offline   Reply With Quote
Old 05-09-2008, 01:39 PM   #23 (permalink)
Jr. Member
 
Join Date: Mar 2008
Posts: 427
Techy Dude is on a distinguished road
Default

hey i have to hold back + down to restart my zune can u have it so when u hit back it restarts











Techy Dude is offline   Reply With Quote
Old 05-09-2008, 01:42 PM   #24 (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

Quote:
Originally Posted by MarcusMaximus View Post
Probably going to put a delay in the beginning with a countdown or something to let you get ready before the game starts next release.
That's exactly what I wanted to hear!




egamerhdk is offline   Reply With Quote
Old 05-09-2008, 01:46 PM   #25 (permalink)
Zewbie
 
Join Date: Oct 2007
Posts: 2
darthcircuit is on a distinguished road
Default

would it be possible to add some comments to your code? i can figure out most of it, but i dont want to spend the time if i dont have to. I Want to change a few things to make it more likeable to me (IE: Add support for the zune pad, Keep the paddle from constantly moving, ect...) Great work so far though!!!! its pretty fun



darthcircuit is offline   Reply With Quote
Old 05-09-2008, 02:51 PM   #26 (permalink)
Experienced Zuner
 
collver's Avatar
 
Join Date: Sep 2007
Location: some where left of the right
Posts: 121
collver is on a distinguished road
Send a message via MSN to collver
Default

have to give this guy a playtest, i'm surprised we already have so many games to play.


edit: after playing the game a lil I want to say kudos, it is pretty fun, that damn computer is next to impossible to score against, and I like the random song play.

How ever the freezing problem is still there. curious thing I noticed, when it's frozen if you hit the play/pause button it still switches songs lol.
__________________
Noob Patrol : Locked and Loaded

Last edited by collver; 05-09-2008 at 03:13 PM.




collver is offline   Reply With Quote
Old 05-09-2008, 03:24 PM   #27 (permalink)
Experienced Zuner
 
Join Date: Nov 2007
Posts: 131
MarcusMaximus is on a distinguished road
Default

hmm strange that the freezing is still there for so many of you... Is everyone getting it(i.e. if anyone isn't please say so)? Either way I'll try redeploying to my zune and seeing if that brings it back and if not, try to make sure the version I have up is current. (By the way if you get good enough you beat the computer every time cause he can't keep up at high speeds, I might try to change that to make him more challenging at higher speeds)



MarcusMaximus is offline   Reply With Quote
Old 05-09-2008, 03:27 PM   #28 (permalink)
Experienced Zuner
 
Join Date: Nov 2007
Posts: 131
MarcusMaximus is on a distinguished road
Default

ok so for whatever reason it looks like when I tried to put up the new version this morning I must have put up the old version again. Hopefully that fixes everyone's issues.



MarcusMaximus is offline   Reply With Quote
Old 05-09-2008, 03:33 PM   #29 (permalink)
zB Deal Finder
Support Team
zB Writer
Ultimate Zuner
 
runtohell121's Avatar
 
Join Date: Jan 2008
Location: a small town in california....
Posts: 6,598
runtohell121 has much to be proud ofruntohell121 has much to be proud ofruntohell121 has much to be proud ofruntohell121 has much to be proud ofruntohell121 has much to be proud ofruntohell121 has much to be proud ofruntohell121 has much to be proud of
Send a message via AIM to runtohell121
Default

meh.. i do agree that this game freezes a lot.. whenever you push the back button your zune will freeze.. and you have to hold down the back button to let it actually exit on my zune.. >.<
__________________
1.Window > Linux > Mac
2. Sony Ericsson > Nokia > Samsung
3.
4. don't forget to rep me




runtohell121 is offline   Reply With Quote
Old 05-09-2008, 03:33 PM   #30 (permalink)
Experienced Zuner
 
collver's Avatar
 
Join Date: Sep 2007
Location: some where left of the right
Posts: 121
collver is on a distinguished road
Send a message via MSN to collver
Default

kudos on the redesign bro. For fun and extra challenge how about a bonus round where you must keep up with 2+ balls at the same time? And perhaps a music visualizer in the background, and as the temp of the music increases the speed of the balls increases as well. Dunno if it would work or not, just thought that music integration with the gameplay would be a nice touch
__________________
Noob Patrol : Locked and Loaded

Last edited by collver; 05-09-2008 at 03:39 PM.




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

Quote:
Originally Posted by Techy Dude View Post
hey i have to hold back + down to restart my zune can u have it so when u hit back it restarts
that's odd, for me all i have to do is hit "back" and it restarts...

and i have no idea what you guys are talking about :/ the game didnt freeze on me... altho i did only played for 20 seconds...

great game! my fav part is that it snuffles your songs instead game sound =)
__________________




charmed61 is offline   Reply With Quote
Old 05-09-2008, 07:55 PM   #32 (permalink)
Experienced Zuner
 
Epoc's Avatar
 
Join Date: Sep 2007
Location: Vermont
Posts: 242
Epoc is on a distinguished road
Default

I think I solved the "Freezing" problem, where the music still plays: seeing how it happens with the zune 80 (which I have) and not the zune 30. I am sorry to say, you have pressed the center button and put the game on pause. yes, I said it, paused.
So with that outta the way, good game marcus!
__________________
\nn/===IRON MAIDEN RULES===\nn/

Xbox live/Zune= Epocilyps. Invites are fine. need people with zunes on my friends list.





Epoc is offline   Reply With Quote
Old 05-09-2008, 07:58 PM   #33 (permalink)
Jr. Member
 
Join Date: Mar 2008
Posts: 427
Techy Dude is on a distinguished road
Default

yeah i hd the freezin prob with my 30 then realized it was pause











Techy Dude is offline   Reply With Quote
Old 05-10-2008, 11:20 AM   #34 (permalink)
Squirt
 
Join Date: Nov 2007
Posts: 23
Krisverde is on a distinguished road
Default

I've got it on my 30gb zune, but when I load it up it just restarts the zune. Anyone else have this problem?



Krisverde is offline   Reply With Quote
Old 05-10-2008, 12:24 PM   #35 (permalink)
God
α+ω
Retired Staff
Professional Spammer
 
Join Date: Jan 2007
Location: Look up
Posts: 7,779
God has much to be proud ofGod has much to be proud ofGod has much to be proud ofGod has much to be proud ofGod has much to be proud ofGod has much to be proud ofGod has much to be proud of
Send a message via AIM to God Send a message via MSN to God Send a message via Yahoo to God Send a message via Skype™ to God
Awards Showcase
Biggest Abuser of Noobs Trogdor's Peasant Favorite zB Extremity 
Total Awards: 3
Default

I changed it to get rid of the acceleration based control, now left moves it left and right moves it right. To apply the change replace game.cs with:
Code:
using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Storage;
using Microsoft.Xna.Framework.GamerServices;
using XnaTetris.Graphics;
using System.Threading;

namespace Pong
{
    /// <summary>
    /// This is the main type for your game
    /// </summary>
    public class Game1 : Microsoft.Xna.Framework.Game
    {
        GraphicsDeviceManager graphics;
        SpriteBatch spriteBatch;
        Texture2D ball;
        Texture2D paddle;
        Texture2D albumart;
        Texture2D talbumart;
        float p1x = 105;
        int p1y = 0;
        int score = 0;
        float p1s = 0;

        string error;

        float p2x = 105;
        int p2y = 275;
        float p2s = 0;

        float ballx = 120;
        float bally = 160;
        float ballsx = 1.0f;
        float ballsy = 1.0f;
        long numframes = 0;
        string info;
        bool changesong;

        Thread albuminfoloader;

        bool paused, pchange=false, volume=false;

        public Game1()
        {
            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";
            MediaPlayer.IsShuffled = true;
            MediaLibrary ml = new MediaLibrary();
            SongCollection s = ml.Songs;
            MediaPlayer.Play(s);
            MediaPlayer.Queue.MoveNext();
            albuminfoloader = new Thread(new ThreadStart(LoadAlbumInfo));
            albuminfoloader.Priority = ThreadPriority.Lowest;
            albuminfoloader.Start();
        }

        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            // TODO: Add your initialization logic here

            base.Initialize();

            p1x = 105;
            p1y = 0;
            p1s = 0;

            p2x = 105;
            p2y = 275;
            p2s = 0;

            ballx = 120;
            bally = 160;
            ballsx = 1.0f;
            ballsy = 1.0f;
            paused = false;
            numframes = 0;
            changesong = false;

            error = "";
        }

        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);
            
            ball = Content.Load<Texture2D>("ball");
            paddle = Content.Load<Texture2D>("paddle");
            albumart = MediaPlayer.Queue.ActiveSong.Album.GetThumbnail(Content.ServiceProvider);
            // TODO: use this.Content to load your game content here
        }

        /// <summary>
        /// UnloadContent will be called once per game and is the place to unload
        /// all content.
        /// </summary>
        protected override void UnloadContent()
        {
            // TODO: Unload any non ContentManager content here
        }

        /// <summary>
        /// Allows the game to run logic such as updating the world,
        /// checking for collisions, gathering input, and playing audio.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        protected override void Update(GameTime gameTime)
        {
            // Allows the game to exit
            if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed)
            {
                MediaPlayer.Stop();
                albuminfoloader.Abort();
                this.Exit();
            }
            GamePadState gps = GamePad.GetState(PlayerIndex.One);
            // TODO: Add your update logic here

            
            if (!paused)
            {
                if (numframes > 100)
                {
                    ballsy *= 1.0005f;
                    ballsx *= 1.0005f;
                    if (ballx + 10 > p1x && ballx < p1x + 30 && bally + ballsy < p1y + 5 && ballsy < 0)
                    {
                        ballsy = -ballsy;
                        ballsx -= .2f * p1s;
                    }

                    if (ballx + 10 > p2x && ballx < p2x + 30 && bally + ballsy + 10 > p2y && ballsy > 0)
                    {
                        ballsy = -ballsy;
                        ballsx -= .2f * p2s;
                    }

                    ballx += ballsx;
                    bally += ballsy;
                }
                p1x += p1s;
                p2x += p2s;

                if (bally < 0)
                {
                    score++;
                    Initialize();
                }
                else if (bally > 270)
                {
                    score--;
                    Initialize();
                }

                if (ballx < 0)
                {
                    ballsx = -ballsx;
                    ballx = -ballx;
                }
                else if (ballx > 230)
                {
                    ballx = 460 - ballx;
                    ballsx = -ballsx;
                }

                if (p1x < 0)
                {
                    p1s = -p1s;
                    p1x = -p1x;
                }
                else if (p1x > 230)
                {
                    p1x = 460 - p1x;
                    p1s = -p1s;
                }

                if (p2x < 0)
                {
                    p2s = -p2s;
                    p2x = -p2x;
                }
                else if (p2x > 230)
                {
                    p2x = 460 - p2x;
                    p2s = -p2s;
                }
                
                if (gps.DPad.Left == ButtonState.Pressed && p2s > -2-(.0005*numframes))
                {
                    p2x -= 2.5f;
                }
                else if (gps.DPad.Right == ButtonState.Pressed && p2s < 2 + (.0005 * numframes))
                {
                    p2x += 2.5f;
                }
                if (ballx < p1x)
                {
                    p1x -= 2 + (.0005f * numframes);
                }
                else if (ballx > p1x + 30)
                {
                    p1x += 2 + (.0005f * numframes);
                }
                numframes++;
            }
            if (gps.Buttons.A == ButtonState.Pressed && !pchange)
            {
                paused = !paused;
                pchange = true;
            }
            if (gps.Buttons.A == ButtonState.Released)
            {
                pchange = false;
            }
            if (gps.DPad.Up == ButtonState.Pressed && !volume)
            {
                MediaPlayer.Volume+=.05f;
                volume = true;
            }
            if (gps.DPad.Down == ButtonState.Pressed && !volume)
            {
                MediaPlayer.Volume -= .05f;
                volume = true;
            }
            if (gps.DPad.Down == ButtonState.Released && gps.DPad.Up == ButtonState.Released)
            {
                volume = false;
            }

            base.Update(gameTime);
        }

        void LoadAlbumInfo()
        {
           
            bool album = false;
            while (true)
            {
                GamePadState gps = GamePad.GetState(PlayerIndex.One);
                info = (MediaPlayer.Queue.ActiveSong.Artist.ToString()) + ": " + MediaPlayer.Queue.ActiveSong.ToString();
                
                
                
                if (gps.Buttons.B == ButtonState.Pressed && !album)
                {
                    MediaPlayer.Queue.MoveNext();
                    changesong = true;
                    
                    album = true;
                }
                else if (gps.Buttons.B == ButtonState.Released)
                {
                    album = false;
                }
                if (gps.Buttons.Back == ButtonState.Pressed)
                {
                    return;
                }
            }
        }

        /// <summary>
        /// This is called when the game should draw itself.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        protected override void Draw(GameTime gameTime)
        {
            graphics.GraphicsDevice.Clear(Color.Black);

            // TODO: Add your drawing code here

            spriteBatch.Begin(SpriteBlendMode.AlphaBlend);

            Rectangle r = new Rectangle((int)ballx, (int)bally, 10, 10);
            spriteBatch.Draw(ball, r, Color.White);

            r = new Rectangle((int)p1x, (int)p1y, 30, 5);
            spriteBatch.Draw(paddle, r, Color.White);

            r = new Rectangle((int)p2x, (int)p2y, 30, 5);
            spriteBatch.Draw(paddle, r, Color.White);

            if (changesong)
            {
                do
                {
                    albumart = MediaPlayer.Queue.ActiveSong.Album.GetThumbnail(Content.ServiceProvider);
                } while (albumart == null);
                changesong = false;
            }

            r = new Rectangle(200, 280, 40, 40);
            spriteBatch.Draw(albumart, r, Color.White);
            
            spriteBatch.End();
            
            TextureFont t =new TextureFont(GraphicsDevice, Content);
            TextureFont.WriteText(30, 450, info);
            t.WriteAll();

            TextureFont.WriteText(30, 400, error);
            t.WriteAll();

            TextureFont.WriteText(30, 480, "Score: " + score);
            t.WriteAll();
            base.Draw(gameTime);
        }
    }
}
That's the only thing I changed around.

Besides that I'm having the freezing when changing songs thing it is a very cool little pong game. Add in a menu, ability to choose which songs you play (playlist or something) and a difficulty control and it would be epic.

Best game released so far

edit: yeah, the center thing was what I was doing. Why is everyone using the center button as pause? I keep hitting it by accident

Maybe add something that says PAUSED when paused and make the music pause when paused.

And instead of a pause before starting, maybe wait till you push a button

Zunepad support would be cool too
__________________
Quote:
Originally Posted by sb
10:15 PM <Marshillboy> I almost never eat out

Nurta.net cures 29 known diseases



God is offline   Reply With Quote
Old 05-10-2008, 04:19 PM   #36 (permalink)
Experienced Zuner
 
Join Date: Nov 2007
Posts: 131
MarcusMaximus is on a distinguished road
Default

I know what's causing the freezing for a little when loading a new song, I'll get on working on that(I'm at the girlfriend's house so have to install visual studio et all here first). Also, I'm gonna get started on 2 player and a menu. Probably going to have different modes where the ball gets faster at varying degrees.



MarcusMaximus is offline   Reply With Quote
Old 05-10-2008, 06:49 PM   #37 (permalink)
Experienced Zuner
 
Join Date: Nov 2007
Posts: 131
MarcusMaximus is on a distinguished road
Default

Hey all, so I fixed it so there is no freezing when changing song or at the beginning of the round, though it takes a second or two to load the album art now(but at least you can keep playing while it does!) Next up: Main menu and hopefully multiplayer.



MarcusMaximus is offline   Reply With Quote
Old 05-10-2008, 06:53 PM   #38 (permalink)
Super Zuner²
 
ChurchedAtheist's Avatar
 
Join Date: Nov 2006
Posts: 3,569
ChurchedAtheist is a name known to allChurchedAtheist is a name known to allChurchedAtheist is a name known to allChurchedAtheist is a name known to allChurchedAtheist is a name known to all
Default

please don't double post, and could you share the fixed files please
__________________

Quote:
Originally Posted by Marcus Aurelius
Live a good life. If there are gods and they are just, then they will not care how devout you have been, but will welcome you based on the virtues you have lived by. If there are gods, but unjust, then you should not want to worship them. If there are no gods, then you will be gone, but will have lived a noble life that will live on in the memories of your loved ones.




ChurchedAtheist is offline   Reply With Quote
Old 05-11-2008, 12:54 PM   #39 (permalink)
Experienced Zuner
 
miceylulu's Avatar
 
Join Date: May 2008
Posts: 182
miceylulu is on a distinguished road
Default

Yeah, I like it better without the accelaration. Thanks for that! But does anyone know how to make it so that the computer isn't quite so hard? It's like impossible to beat them.




miceylulu is offline   Reply With Quote
Old 05-11-2008, 03:43 PM   #40 (permalink)
Experienced Zuner
 
sonicgeek's Avatar
 
Join Date: Dec 2006
Location: If there's a bright center to the universe, you're on the planet that's farthest from. -Wisconsin
Posts: 215
sonicgeek has disabled reputation
Default

It's cool, acceleration is fun, but the ball does move too slowly, so I haven't even scored once yet, a ball freezing period would be nice, and it freezes when i adjust the volume. But like I said before, it's cool.
__________________

Props to stkr for the sweet sig!




sonicgeek is offline   Reply With Quote
Reply

Bookmarks

Thread Tools