|
  
|
|
|
#21 (permalink) |
|
Experienced Zuner
Join Date: May 2008
Posts: 126
Reputation: 10
Donate |
Awesome, the re-release is WAYYY better. No offense.
|
|
|
|
| Remove Advertisements Sponsored Links | |
Advertisement |
|
|
|
#22 (permalink) |
|
zB Programmer
Experienced Zuner Join Date: Nov 2007
Posts: 112
Reputation: 38
Donate |
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.
|
|
|
|
|
|
#24 (permalink) |
|
Zuner
|
That's exactly what I wanted to hear!
__________________
"Everyone loves Hannah Montana... some people just think they're too cool to admit they like her. You can't tell me you havn't heard her new song and wanted to turn it up and rock out to it?" -Some Random Interweb Guy (He speaks the truth) ![]() |
|
|
|
|
|
#25 (permalink) |
|
Zewbie
Join Date: Oct 2007
Posts: 2
Reputation: 10
Donate |
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
|
|
|
|
|
|
#26 (permalink) |
|
Experienced Zuner
$zB: 97
Donate |
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.
__________________
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts. Noob Patrol : Locked and Loaded To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts. To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts. To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts. Last edited by collver : 05-09-2008 at 02:13 PM. ![]() |
|
|
|
|
|
#27 (permalink) |
|
zB Programmer
Experienced Zuner Join Date: Nov 2007
Posts: 112
Reputation: 38
Donate |
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)
|
|
|
|
|
|
#28 (permalink) |
|
zB Programmer
Experienced Zuner Join Date: Nov 2007
Posts: 112
Reputation: 38
Donate |
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.
|
|
|
|
|
|
#29 (permalink) | ||
|
Super Zunerē
Join Date: Jan 2008
Location: a small town in california....
Posts: 4,301
Reputation: 176
Donate |
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.. >.<
__________________
![]() |
||
|
|
|
|
|
#30 (permalink) |
|
Experienced Zuner
$zB: 97
Donate |
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
__________________
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts. Noob Patrol : Locked and Loaded To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts. To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts. To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts. Last edited by collver : 05-09-2008 at 02:39 PM. ![]() |
|
|
|
|
|
#31 (permalink) | |
|
Member
Join Date: Mar 2008
Location: The Gold Rush State!
Posts: 641
Reputation: 4
Donate |
Quote:
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 =)
__________________
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts. ![]() |
|
|
|
|
|
|
#32 (permalink) |
|
Experienced Zuner
Join Date: Sep 2007
Location: Vermont
Posts: 151
Reputation: 14
Donate |
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!
__________________
When the battle of the zunes/ipods began, Apple said Give them what they want; smaller players 4 more money" Microsoft bravely stepped in and said "Give them what they Really Want; a better player with updates for free" ![]() |
|
|
|
|
|
#35 (permalink) |
|
Stronger than sand
Administrator
Ultimate Zuner Join Date: Jan 2007
Location: NYS
Posts: 6,326
Reputation: 330
Donate |
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);
}
}
}
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
__________________
Note: The viewpoint posted above does not necessarily reflect the opinion of Zuneboards, Crowdgather, Nurta, Cyber Connect Corporation, Nurta.net, fairpolls.org, or any affiliate thereof. Also, this posting is provided "as-is" with no warranties, and confers no rights. In fact, this posting has no guarantee whatsoever and may be true, false, or both. This posting may be hurtful, helpful, or both. If you feel this posting was too hurtful, please contact me so I can set aside some pity time for you, which is offered "as-is" with no warranties, confers no rights, and may or may not occur, at my discretion. If you respond to this posting in any form, including but not limited to: a laugh, chortle, grimace, or sigh, you agree to these terms and agree to drive heavy machinery while taking child's cold medicine. This disclaimer is provided "as-is" with no warranties, and confers no rights. To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts. ![]() ![]() |
|
|
|
|
|
#36 (permalink) |
|
zB Programmer
Experienced Zuner Join Date: Nov 2007
Posts: 112
Reputation: 38
Donate |
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.
|
|
|
|
|
|
#37 (permalink) |
|
zB Programmer
Experienced Zuner Join Date: Nov 2007
Posts: 112
Reputation: 38
Donate |
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.
|
|
|
|
|
|
#38 (permalink) | |
|
n00blet chef
Jr. Staff
Expert Zuner |
please don't double post, and could you share the fixed files please
__________________
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts. To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts. To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts. Quote:
![]() |
|
|
|
|