Anyone Know C#?
Moderator: Community Team
Forum rules
Please read the Community Guidelines before posting.
Please read the Community Guidelines before posting.
Anyone Know C#?
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?
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#?
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.
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#?
It's enharmonic with D flat... try fifth position, or 2nd key fingering.
natty_dread wrote:Do ponies have sex?
(proud member of the Occasionally Wrongly Banned)Army of GOD wrote:the term heterosexual is offensive. I prefer to be called "normal"
Re: Anyone Know C#?
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.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?
...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.
- GENERAL STONEHAM
- Posts: 648
- Joined: Thu Nov 29, 2007 4:05 pm
- Location: EXILED, BANNED and INCARCERATED!
Re: Anyone Know C#?
Definetely use your middle finger, with a flutter of up and down motions befitting a butterfly.
The loyal drone of C.C.
GS
The loyal drone of C.C.
GS
Re: Anyone Know C#?
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.
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?
(proud member of the Occasionally Wrongly Banned)Army of GOD wrote:the term heterosexual is offensive. I prefer to be called "normal"
-
tzor
- Posts: 4051
- Joined: Thu Feb 22, 2007 9:43 pm
- Gender: Male
- Location: Long Island, NY, USA
- Contact:
Re: Anyone Know C#?
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.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.
(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#?
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.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.
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.
Re: Anyone Know C#?
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#?
Oh geez, I didn't even realize... sorry man, we totally destroyed your topic.
natty_dread wrote:Do ponies have sex?
(proud member of the Occasionally Wrongly Banned)Army of GOD wrote:the term heterosexual is offensive. I prefer to be called "normal"
-
tzor
- Posts: 4051
- Joined: Thu Feb 22, 2007 9:43 pm
- Gender: Male
- Location: Long Island, NY, USA
- Contact:
Re: Anyone Know C#?
Yes, I think the music jokes fell flat.
Wish I could help you but I'm not familiar with the routines.
Wish I could help you but I'm not familiar with the routines.

-
Army of GOD
- Posts: 7178
- Joined: Tue Feb 24, 2009 4:30 pm
- Gender: Male
Re: Anyone Know C#?
tzor wrote:Yes, I think the music jokes fell flat.

Sir, so did yours? Sir.
mrswdk is a ho
-
Army of GOD
- Posts: 7178
- Joined: Tue Feb 24, 2009 4:30 pm
- Gender: Male
Re: Anyone Know C#?
Sir, I'm merely a n00b at coding, but did you end your parentheses here? Sir.Jace-N wrote: spriteBatch.DrawString(courierNew, "MARBLE CHASE \n Click Enter To Play!", new
mrswdk is a ho
Re: Anyone Know C#?
Army of GOD wrote:Sir, I'm merely a n00b at coding, but did you end your parentheses here? Sir.Jace-N wrote: spriteBatch.DrawString(courierNew, "MARBLE CHASE \n Click Enter To Play!", new
(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.
-
Army of GOD
- Posts: 7178
- Joined: Tue Feb 24, 2009 4:30 pm
- Gender: Male
Re: Anyone Know C#?
Whoops, sorry. Didn't see that last one.Jace-N wrote:Army of GOD wrote:Sir, I'm merely a n00b at coding, but did you end your parentheses here? Sir.Jace-N wrote: spriteBatch.DrawString(courierNew, "MARBLE CHASE \n Click Enter To Play!", new
(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.
mrswdk is a ho
Re: Anyone Know C#?
And you apparently don't have a sense of humour.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
Interestingly, at first I though you were simply misspelling C++.
Re: Anyone Know C#?
You're right...I definitely thought that Assembly was a reference to writing music. Thanks for clearing that up.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
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.