Jump to content

  • Log In with Google      Sign In   
  • Create Account

xSharp

Member Since 04 Oct 2010
Offline Last Active Jan 13 2013 04:24 PM

Topics I've Started

First Game - Feedback Please!

11 December 2012 - 09:26 PM

Hello everyone!

I have been reading around GameDev a lot lately, and everyone here seems to give good feedback when people post their first project. I am hoping to get some feedback on mine as well. Posted Image


I recently finished this game as a final project for one of my classes at college. I decided to do a battleship clone I call "Naval Commander". I used python 2.7.3 and pygame 1.9.1.

I have finished one other game before while following a tutorial, but since I made this game on my own I really consider it as my first completed game, even though it isn't much. I was running out of time toward the end of the project, so I started rushing a few things and it may not look the best. I also just started using python this semester, so I probably didn't do a lot of stuff the most "pythonic" way either. I tried to comment a lot, so hopefully that helps.

Among other things, I am hoping to get feedback on the design and organization of the code. I questioned myself with a lot of things like which class does what, or if I made too many or too few classes. I would really appreciate someone's view on that.

I Included the source code, but the exe was too big to upload here. If anyone wants the exe, just let me know and I will upload it somewhere else.


Any feedback will be much appreciated. Thank you for reading! Posted Image


p.s.: if you run the game, be warned the sound effects are kind of loud.

c# static vs. non-static

26 March 2011 - 11:39 AM

Hello everyone,

I just started making a breakout clone and am working on collision detection now. The way I have it set up is that I have a ball class and within that class I have a method for collision detection with tiles.

I have a TileEngine class and within that class I have a list of all my tiles. So I pass that list through the update method like so:

    	void UpdateBall(Ball b, GameTime gameTime)
    	{
        	b.CheckPaddleCollisions(paddle.cBox);
        	b.CheckTileCollisions(tileEngine.tiles);
        	b.Update(gameTime);
    	}

Within the "b.CheckTilesCollisions" method I have several other methods that are used and each of them require the use of the tiles list. This is 3 more methods that I pass the tiles list to. The reason I did this is to split up the code so I dont have just one huge method.

So, my question is would it be more effecient to just make my tileEngine variable static and then get the tiles list out that way? Or is it better just to do it this way? Or is there a better way? (Sorry, a lot of questions)

Thank you!

[XNA] text file questions...

01 February 2011 - 06:42 PM

Hey everyone,

I thought I just finished my first game, but I've ran into a problem already!

I am using a text file to hold the high scores for my game. I put the text file in the Content directory in my installer (I did not add it to the project in visual studio). The game installs in C:\Program Files\

When the highscore is updated, the high score file in Program Files isn't updated, but a new file is made and updated instead. This file is located in "C:\Users\[username]\AppData\Local\VirtualStore\Program Files\"

Is there a way to stop this from happening? If not, what is a good alternative to using text files?

P.S. I've tried xml, didn't quite understand it so I went back to text files... maybe I'll just try using xml again =\.

Thank you for reading!

Visual Studio 2008 setup project problems...

06 January 2011 - 09:23 AM

Hi everyone,

I'm currently trying to make a setup project for my XNA game and ran into a problem.

I have the XNA prerequisite selected, but when I try installing it on a computer without XNA it will still install, but won't download/install the prerequisite.

Help will be greatly appreciated, thank you!

[XNA] Keyboard input problem

04 October 2010 - 03:09 PM

Hi everyone,

I am having a problem with the keyboard input from a game I'm working on while following a tutorial.

The problem is when I press a certain combination of keys, they sort of 'lock up' and stop working until one of the keys are released.

Any combination of the up arrow, left arrow, or space bar in any sequence make it lock up.

Anyway, here's the movement code for the game:


void CheckHorizontalMovement(KeyboardState kbs)
{
bool ResetTimer = false;

player.Thrusting = false;
if (kbs.IsKeyDown(Keys.Right) && !kbs.IsKeyDown(Keys.Left))
{
if (player.ScrollRate < MaxHorizontalSpeed)
{
player.ScrollRate += player.AccelerationRate;
if (player.ScrollRate > MaxHorizontalSpeed)
player.ScrollRate = MaxHorizontalSpeed;
ResetTimer = true;
}
player.Thrusting = true;
player.Facing = 0;
}
else if (kbs.IsKeyDown(Keys.Left) && !kbs.IsKeyDown(Keys.Right))
{
if (player.ScrollRate > -MaxHorizontalSpeed)
{
player.ScrollRate -= player.AccelerationRate;
if (player.ScrollRate < -MaxHorizontalSpeed)
player.ScrollRate = -MaxHorizontalSpeed;
ResetTimer = true;
}
player.Thrusting = true;
player.Facing = 1;
}

if (ResetTimer)
player.SpeedChangeCount = 0.0f;
}

void CheckVerticalMovement(KeyboardState kbs)
{
bool ResetTimer = false;

if (kbs.IsKeyDown(Keys.Up))
{
if (player.Y > PlayAreaTop)
{
player.Y -= player.VerticalMoveRate;
ResetTimer = true;
}
}
if (kbs.IsKeyDown(Keys.Down))
{
if (player.Y < PlayAreaBottom)
{
player.Y += player.VerticalMoveRate;
ResetTimer = true;
}
}

if (ResetTimer)
player.VetricalChangeCount = 0f;
}



Any help will be much appreciated, thank you!

PARTNERS