mxa92's Profile User Rating: -----

Reputation: 0 Apprentice
Group:
New Members
Active Posts:
11 (0.01 per day)
Joined:
22-November 11
Profile Views:
319
Last Active:
User is offline Oct 24 2012 01:15 PM
Currently:
Offline

Previous Fields

Dream Kudos:
0
Icon   mxa92 has not set their status

Posts I've Made

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

    Posted 10 Oct 2012

    View PostBBeck, on 08 October 2012 - 06:23 AM, said:

    Why are you using ==? Why don't you use =< 10 and >= screenWidth - 42? It sounds like it's not hitting that number perfectly because of the movement rate and the condition is only met when it hits it perfectly.


    I've changed it but the same problem is happening :/



    View PostShadowsEdge19, on 09 October 2012 - 02:34 PM, said:

    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.

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

    ^


    Hmmm... all rows definitely move in the same direction in Space Invaders :/
  2. In Topic: Problem with collision detection with an Array

    Posted 7 Oct 2012

    EDIT2: I've been adding more enemies in and have found out that when an invader is at the same X-coordinate but a different Y-coordinate they don't collide with the edge of the screen, but if I shoot and destroy the invader below, the invader on top then collides as it should

    :/
  3. In Topic: Problem with collision detection with an Array

    Posted 7 Oct 2012

    EDIT: I'm assuming it's something wrong with this part of the code:

    bool hitLeft = enemies[i].Position.X == 10;
                                bool hitRight = enemies[i].Position.X == screenWidth - 42;
    
    


    as when I change the numbers (ie. change 42 to 35) none of the invaders never collide with the edge and carry on forever :S
  4. In Topic: Getting spaceship to fire (Space Invaders 'clone')

    Posted 6 Oct 2012

    I know it's been a while and nobody has commented back but just incase anyone was looking into this for me - I've managed to finish it myself :)

    Thank you
  5. In Topic: Getting spaceship to fire (Space Invaders 'clone')

    Posted 4 Oct 2012

    Sorry, that was supposed to be commented out as it was from another projectile tutorial I was trying to follow.

    I've changed the Shoot() method so that the bullet should appear at position 100,100 with origin 100,100 but no Sprite is drawn on the screen at all still :S

    shoot.cs
    
    public void Shoot()
            {
                Bullet newBullet = new Bullet(Content.Load<Texture2D>("Textures\\bullet"));
    
                newBullet.origin = new Vector2(100,100);
                newBullet.position = new Vector2(100,100);
                newBullet.isVisible = true;
    
                if (bullets.Count() < 20)
                {
                    bullets.Add(newBullet);
                }
    
                spriteBatch.Begin();
                foreach (Bullet bullet in bullets)
                {
                    bullet.Draw(spriteBatch);
                }
                spriteBatch.End();
    
               
    
            }
    

My Information

Member Title:
New D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:

Contact Information

E-mail:
Private

Friends

mxa92 hasn't added any friends yet.

Comments

mxa92 has no profile comments yet. Why not say hello?