Go Back   Zune Boards > Zune Discussions > Zune Games > Development Discussions > Development Help

Development Help For help from coding to error finding to that one thing you just can't get right

Reply
 
LinkBack Thread Tools
Old 09-16-2009, 05:26 PM   #1 (permalink)
Jr. Member
 
BlackFox's Avatar
 
Join Date: Mar 2009
Posts: 489
BlackFox is on a distinguished road
Default Creator Screen

So I like how DiNo and CyberFang all have their entrance screens, and I'd like on too. I'd like it so the screen is up for a couple seconds then disappear for the menu screen. How do I do this?
__________________




BlackFox is offline   Reply With Quote

Advertisement [Remove Advertisement]
Old 09-16-2009, 06:31 PM   #2 (permalink)
Jr. Member
 
xCyberFang's Avatar
 
Join Date: Apr 2008
Posts: 449
xCyberFang will become famous soon enough
Send a message via AIM to xCyberFang Send a message via MSN to xCyberFang Send a message via Yahoo to xCyberFang
Default

Are you using the GameStateManagement??
__________________






xCyberFang is offline   Reply With Quote
Old 09-16-2009, 06:32 PM   #3 (permalink)
Jr. Member
 
BlackFox's Avatar
 
Join Date: Mar 2009
Posts: 489
BlackFox is on a distinguished road
Default

No, what's that?
__________________




BlackFox is offline   Reply With Quote
Old 09-16-2009, 06:35 PM   #4 (permalink)
Jr. Member
 
xCyberFang's Avatar
 
Join Date: Apr 2008
Posts: 449
xCyberFang will become famous soon enough
Send a message via AIM to xCyberFang Send a message via MSN to xCyberFang Send a message via Yahoo to xCyberFang
Default

Well, the GameStateManagement is just a starter thing that can be used for making menus, adding screens, etc etc.

XNA Creators Club Online - game state management

But, anyways, what you are wanting is called a Splash Screen. Splash screens are the screens that are shown while the game loads in the background.

You can find a tutorial on this on Ziggyware:
XNA Tutorial - Creating a Splash Screen : Virtual Realm
__________________






xCyberFang is offline   Reply With Quote
Old 09-16-2009, 06:38 PM   #5 (permalink)
Jr. Member
 
BlackFox's Avatar
 
Join Date: Mar 2009
Posts: 489
BlackFox is on a distinguished road
Default

Alright thanks. Another n00by question, but how do I get something to move across the screen horizontally? I have it set so that if you press rightshoulder it goes right 3.0f and if you press left shoulder it goes left -3.0f, but right now I'm not sure how to get it to move.
__________________




BlackFox is offline   Reply With Quote
Old 09-16-2009, 06:39 PM   #6 (permalink)
Jr. Member
 
xCyberFang's Avatar
 
Join Date: Apr 2008
Posts: 449
xCyberFang will become famous soon enough
Send a message via AIM to xCyberFang Send a message via MSN to xCyberFang Send a message via Yahoo to xCyberFang
Default

Yeah, it sounds like you might want to check out the GameStateManagement, this would help you out alot.
__________________






xCyberFang is offline   Reply With Quote
Old 09-16-2009, 06:56 PM   #7 (permalink)
Experienced Member
 
Join Date: May 2008
Posts: 860
Berty is on a distinguished road
Default

if u havnt already, check out the XNA 2D Tutorial on the XNA site
__________________
--new--zGuitarTuner2.1--new--
Now Works With All Zune Models!
Quote:
We talked about this. Bypass the word filter again and you'll be infracted.
-Seb






Berty is offline   Reply With Quote
Old 09-17-2009, 02:34 PM   #8 (permalink)
Jr. Member
 
BlackFox's Avatar
 
Join Date: Mar 2009
Posts: 489
BlackFox is on a distinguished road
Default

Yea I've done that. I'm gonna release a modified version of that game, with many updates.
__________________




BlackFox is offline   Reply With Quote
Old 09-17-2009, 06:20 PM   #9 (permalink)
Experienced Member
 
Join Date: May 2008
Posts: 860
Berty is on a distinguished road
Default

very cool, thats wat i did (put my moms face as the enemy ships)
__________________
--new--zGuitarTuner2.1--new--
Now Works With All Zune Models!
Quote:
We talked about this. Bypass the word filter again and you'll be infracted.
-Seb






Berty is offline   Reply With Quote
Old 09-18-2009, 05:21 PM   #10 (permalink)
Jr. Member
 
BlackFox's Avatar
 
Join Date: Mar 2009
Posts: 489
BlackFox is on a distinguished road
Default

How do I watch the videos? Soapbox was taken down August 30th and there are no other links on the site.
__________________




BlackFox is offline   Reply With Quote
Old 09-19-2009, 05:57 PM   #11 (permalink)
Jr. Zuner
 
Join Date: Jun 2009
Posts: 33
Jenison is on a distinguished road
Send a message via AIM to Jenison
Default

Taken straight from Bauble Play. Does exactly what you want. It takes two points, figures out how much velocity something needs to get to that point in said time (milliseconds).

_vel = velocity
_mod = velocity * time elapsed since last update

Number could be renamed to 'CurrentPosition' you then update the Sprite or whatever you need with IncrementNumber.Number


Code:
    public class IncrementNumber : Command
    {
        Vector3 _vel;
        Vector3 _mod;
        public Vector3 Number { get; set; }
        public Vector3 Max { get; set; }
        public Vector3 Min { get; set; }
        public int Life { get; set; }
        
        /// <summary>
        /// Increments a number over a period of time
        /// </summary>
        /// <param name="number">reference to the varable incremented</param>
        /// <param name="max">the maximum value</param>
        /// <param name="life">how long does it take to get to the max in miliseconds</param>
        public IncrementNumber(Vector3 vec, Vector3 max, int life)
        {
            Life = life;
            Max = max;
            Min = vec;
            this.Done = false;
        }

        public IncrementNumber(Vector3 max, int life)
        {
            Life = life;
            Max = max;
            this.Done = false;
        }

        protected override void BeforeFirstRun()
        {
            _vel = (Max - Min) / Life;
            Number = Min;

            if (_vel == Vector3.Zero)
                this.Done = true;
        }

        public override void Reset()
        {
            base.Reset();
            Number = Min;
        }

        public override bool Run(long time_elapsed)
        {

            _mod = (_vel * time_elapsed);
            Number = Number + _mod;

            if ((_vel.X < 0 && Number.X < Max.X) || (_vel.X > 0 && Number.X > Max.X))
            {
                Number = Max;
                Done = true;
                return true;
            }

            if ((_vel.Y < 0 && Number.Y < Max.Y) || (_vel.Y > 0 && Number.Y > Max.Y))
            {
                Number = Max;
                Done = true;
                return true;
            }

            if ((_vel.Z < 0 && Number.Z < Max.Z) || (_vel.Z > 0 && Number.Z > Max.Z))
            {
                Number = Max;
                Done = true;
                return true;
            }

            return true;
        }




Jenison is offline   Reply With Quote
Old 09-19-2009, 06:20 PM   #12 (permalink)
Jr. Member
 
BlackFox's Avatar
 
Join Date: Mar 2009
Posts: 489
BlackFox is on a distinguished road
Default

Woah Okay, I need to break this down so I can understand everything. Is there anything I need to put in my game class, or any other class?

EDIT: I also have two foreach statements where I get this error:
foreach statement cannot operate on variables of type 'Fish_Game.GameObject' because 'Fish_Game.GameObject' does not contain a public definition for 'GetEnumerator'
__________________


Last edited by BlackFox; 09-19-2009 at 07:20 PM.



BlackFox is offline   Reply With Quote
Reply

Bookmarks

Thread Tools