Page 1 of 1
Anyone Know C#?
Posted: Wed Apr 14, 2010 8:41 am
by Jace-N
I am creating a simple game for a school project. When the game is in state.mainmenu, I want text to appear on the screen. The problem is that I can't get it to show up. Here is the code I am using. Can anyone help?
private SpriteFont courierNew;
*the in the draw method I put this.
if (state == GameState.StateMainMenu)
{
spriteBatch.Begin();
spriteBatch.DrawString(courierNew, "MARBLE CHASE \n Click Enter To Play!", new Vector2(graphics.PreferredBackBufferWidth/2, graphics.PreferredBackBufferHeight/2), Color.Crimson);
spriteBatch.End();
}
Does anyone know why this isn't working?
Re: Anyone Know C#?
Posted: Wed Apr 14, 2010 9:26 am
by Timminz
Mute the low E-string, put your pinky finger on the 4th fret of the A-string, ring finger on the 3rd fret of the D-string, middle finger goes on the 2nd fret of the B-string, and use your index finger to bar the first fret of the G, and high E strings.
It's kind of a tricky chord for a beginner, but there's only one way to get better, and that's selling your soul to the devil at the crossroads at midnight of a full moon. Or was it practicing? I can never remember.
Re: Anyone Know C#?
Posted: Wed Apr 14, 2010 10:57 am
by john9blue
It's enharmonic with D flat... try fifth position, or 2nd key fingering.
Re: Anyone Know C#?
Posted: Wed Apr 14, 2010 11:17 am
by Woodruff
Jace-N wrote:I am creating a simple game for a school project. When the game is in state.mainmenu, I want text to appear on the screen. The problem is that I can't get it to show up. Here is the code I am using. Can anyone help?
private SpriteFont courierNew;
*the in the draw method I put this.
if (state == GameState.StateMainMenu)
{
spriteBatch.Begin();
spriteBatch.DrawString(courierNew, "MARBLE CHASE \n Click Enter To Play!", new Vector2(graphics.PreferredBackBufferWidth/2, graphics.PreferredBackBufferHeight/2), Color.Crimson);
spriteBatch.End();
}
Does anyone know why this isn't working?
Yes, you're not writing in Assembly language. I could help you with that, if you'd like, but you'll have to get your hands on a compiler.
Re: Anyone Know C#?
Posted: Wed Apr 14, 2010 11:33 am
by GENERAL STONEHAM
Definetely use your middle finger, with a flutter of up and down motions befitting a butterfly.
The loyal drone of C.C.
GS
Re: Anyone Know C#?
Posted: Wed Apr 14, 2010 11:36 am
by john9blue
Man, screw assembly. I don't understand why people feel the need to teach it when there are all these higher-level languages around. Makes things twice as hard.
I know it helps understand the underlying architecture, but it's not like your average programmer even needs to know that.
Re: Anyone Know C#?
Posted: Wed Apr 14, 2010 11:48 am
by tzor
john9blue wrote:Man, screw assembly. I don't understand why people feel the need to teach it when there are all these higher-level languages around. Makes things twice as hard.
Because it really helps to at least be exposed to the underlying stucture of everything. When your code is slow as a dead dog you will know why.
(If you think that is bad, you should have seen the simple chemistry course I took from the Physics department. Every single chemical reaction covered at the quantum physics atomic level. Even water made my head hurt; organic chemistry would have killed me.)
By the way, why stop at assembly ... take a
micro assembly language course!
(I better not go there ... I'm staring to get fond memories of my graduate years.

)
Re: Anyone Know C#?
Posted: Wed Apr 14, 2010 11:51 am
by Woodruff
john9blue wrote:Man, screw assembly. I don't understand why people feel the need to teach it when there are all these higher-level languages around. Makes things twice as hard.
I know it helps understand the underlying architecture, but it's not like your average programmer even needs to know that.
It doesn't just "help understand the underlying architecture", it brings the underlying architecture into very clear focus. Ever wonder why your code is SO GOD-DAMNED SLOW? You would if you had a strong understanding of assembly.
Besides, what's not great about decoding hexadecimal? It gets all the chicks!
Re: Anyone Know C#?
Posted: Wed Apr 14, 2010 12:09 pm
by Jace-N
Most of you apparently have no idea what I am talking about. I am not talking about c# music. I am talking about c# programming for video game design
Re: Anyone Know C#?
Posted: Wed Apr 14, 2010 12:13 pm
by john9blue
Oh geez, I didn't even realize... sorry man, we totally destroyed your topic.
Re: Anyone Know C#?
Posted: Wed Apr 14, 2010 12:23 pm
by tzor
Yes, I think the music jokes fell flat.
Wish I could help you but I'm not familiar with the routines.
Re: Anyone Know C#?
Posted: Wed Apr 14, 2010 12:25 pm
by Army of GOD
tzor wrote:Yes, I think the music jokes fell flat.
Sir, so did yours? Sir.
Re: Anyone Know C#?
Posted: Wed Apr 14, 2010 12:27 pm
by Army of GOD
Jace-N wrote:
spriteBatch.DrawString(courierNew, "MARBLE CHASE \n Click Enter To Play!", new
Sir, I'm merely a n00b at coding, but did you end your parentheses here? Sir.
Re: Anyone Know C#?
Posted: Wed Apr 14, 2010 12:30 pm
by Jace-N
Army of GOD wrote:Jace-N wrote:
spriteBatch.DrawString(courierNew, "MARBLE CHASE \n Click Enter To Play!", new
Sir, I'm merely a n00b at coding, but did you end your parentheses here? Sir.
(courierNew, "MARBLE CHASE \n Click Enter To Play!", new Vector2
(graphics.PreferredBackBufferWidth/2, graphics.PreferredBackBufferHeight/2
), Color.Crimson
)
Yes, if you would have checked the whole line, you would have noticed that all the parentheses are matched.
Re: Anyone Know C#?
Posted: Wed Apr 14, 2010 12:31 pm
by Army of GOD
Jace-N wrote:Army of GOD wrote:Jace-N wrote:
spriteBatch.DrawString(courierNew, "MARBLE CHASE \n Click Enter To Play!", new
Sir, I'm merely a n00b at coding, but did you end your parentheses here? Sir.
(courierNew, "MARBLE CHASE \n Click Enter To Play!", new Vector2
(graphics.PreferredBackBufferWidth/2, graphics.PreferredBackBufferHeight/2
), Color.Crimson
)
Yes, if you would have checked the whole line, you would have noticed that all the parentheses are matched.
Whoops, sorry. Didn't see that last one.
Re: Anyone Know C#?
Posted: Wed Apr 14, 2010 12:53 pm
by Timminz
Jace-N wrote:Most of you apparently have no idea what I am talking about. I am not talking about c# music. I am talking about c# programming for video game design
And you apparently don't have a sense of humour.
Interestingly, at first I though you were simply misspelling C++.
Re: Anyone Know C#?
Posted: Wed Apr 14, 2010 5:16 pm
by Woodruff
Jace-N wrote:Most of you apparently have no idea what I am talking about. I am not talking about c# music. I am talking about c# programming for video game design
You're right...I definitely thought that Assembly was a reference to writing music. Thanks for clearing that up.
Sorry I can't help you with that programming thing - I don't have any experience with it.