ShadowsEdge19's Profile User Rating: *****

Reputation: 142 Stalwart
Group:
Active Members
Active Posts:
665 (0.43 per day)
Joined:
16-January 10
Profile Views:
16,614
Last Active:
User is offline Feb 05 2013 03:44 PM
Currently:
Offline

Previous Fields

Country:
GB
OS Preference:
Windows
Favorite Browser:
Chrome
Favorite Processor:
Intel
Favorite Gaming Platform:
XBox
Your Car:
Honda
Dream Kudos:
0

Latest Visitors

Icon   ShadowsEdge19 Nothing is impossible!

Posts I've Made

  1. In Topic: Problem with collision detection with an Array

    Posted 9 Oct 2012

    I thought with space invaders each row of enemies would be moving in the opposite direction from the row above/below and would keep alternating as they descended, you might need a specific version of isRight in the EnemyData structure so each individual enemy can be coded to move in the same direction as with all the others on the same row.

    > > > > > > > > > >
    < < < < < < < < < <
    > > > > > > > > > >
    < < < < < < < < < <
    > > > > > > > > > >

    ^
  2. In Topic: XNA passing through if else statement, even though meeting if()

    Posted 9 Oct 2012

    Have you tried changing the order for your rectangle intersection logic as it seems to me that you are trying to fit the door into the key instead of the key into the door if you get my analogy.

    Since I can't see anything wrong with the IF/SWITCH logic in your playerturn() function it must be where you call it, and since you've only got it active in collisionDetect() I'd say that is where your problem lies, otherwise the only other place is where that function is called in Update().

    void collisionDetect()
            {
                for (int y = 0; y < 3; y++)
                {
                    for (int x = 0; x < 3; x++)
                    {
                        Rectangle tileRect1 = new Rectangle(x * 200, y * 200, 200, 200);
                        if (mouseRect.Intersects(tileRect1))
                        {
                            Vector2 pos = new Vector2(x * 200, y * 200);
                            playerturn(pos);
    
    
                            y = 3;
                            x = 3;
                            //    turn++; 
    
                        }
                    }
                }
    
            }
    
    


    There is another problem you will definitely encounter within your playerturn() function that I will give you a heads-up about now.
    Where you declare int x = 0; and int y = 0; inside the routine, yet you are trying to increment them inside the routine without either a loop, or you are assuming that these values are meant to be globally available, then as soon as this function is finished those values will be reset, even more so if you redeclare them at the start of the function every single time you call it.

    They will always be 0 when you run through the procedural logic and end at 1.
  3. In Topic: no spritefont icon

    Posted 12 Aug 2012

    What you need to be doing is right-clicking in the Content section of your project solution in the explorer within Visual Studio 2008, if you try to Add a New Item in the main project folder then all you will get are class and game component files. From there you should get the option for XML File, Effect File and Sprite Font file.
  4. In Topic: collision detection trouble in the X axis

    Posted 5 Aug 2012

    Hi, I was just reviewing the code you put and it occurs to me that you're else case doesn't make much sense.

    You have
    Case 1:

    Quote

    if (cellX > 0 && Wrld[cellX - 1, cellY] != null)

    Case 2: Not Case 1

    Quote

    answer = Velocity.X - 1;


    If you assume that cellX will always be > 0 to be a valid current cell for the player in Case 1 then the only reason why you would reach Case 2 is if the cell to the left of the player is outside the scope of the array as in x array index 0, so why would you then update the "answer" variable with a value that means it will allow the player to move further left into an invalid cell?

    Anyway that is my 2 cents for the first post, if you are having further trouble after making adjustments can you please repost your most recent collision code?
  5. In Topic: IsFixedTimeStep = FPS?

    Posted 23 May 2012

    Better than that print out a string unique to each section so "Initialize", "Load Content", "Update", "Draw" would end up like:

    "Initialize"
    "Load Content"
    "Update"
    "Draw"
    "Update"
    "Draw"
    "Update"
    "Draw"
    "Update"
    "Draw"

My Information

Member Title:
D.I.C Addict
Age:
26 years old
Birthday:
June 28, 1987
Gender:
Location:
Witney, England
Interests:
Reading fantasy and adventure novels, watching action tv shows and anime, One Piece manga, video gaming mostly on the xbox 360. I prefer RPGs and dislike sports games.
Full Name:
Adam Compton
Years Programming:
8
Programming Languages:
Have learned: Pascal, VB, C, PHP, some Java, Javascript, Haskell, Prolog and C++.
Current: C# with XNA

Contact Information

E-mail:
Private
MSN:
MSN  goldensunmaster@hotmail.com
Website URL:
Website URL  http://

Comments

Page 1 of 1
  1. Photo

    Kilorn Icon

    30 Sep 2011 - 11:52
    Congratulations on being the first person to claim the new XNA Reputation award. You've been working so hard for the XNA community around here lately, you've earned it!
  2. Photo

    gabehabe Icon

    18 Sep 2011 - 09:35
    "goldensunmaster@hotmail.com"
    That game is AWESOME.
  3. Photo

    prience123 Icon

    21 Jun 2010 - 16:39
    Good idea about progggg
Page 1 of 1