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();
}
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.
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.
...I prefer a man who will burn the flag and then wrap himself in the Constitution to a man who will burn the Constitution and then wrap himself in the flag.
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.
natty_dread wrote:Do ponies have sex?
Army of GOD wrote:the term heterosexual is offensive. I prefer to be called "normal"
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.)
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!
...I prefer a man who will burn the flag and then wrap himself in the Constitution to a man who will burn the Constitution and then wrap himself in the flag.
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.
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.
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++.
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.
...I prefer a man who will burn the flag and then wrap himself in the Constitution to a man who will burn the Constitution and then wrap himself in the flag.