Game Development Tutorial

Everything a total beginner needs for game programing!

12. NOOOOO! Game Over!?

This chapter will be a short one. When the game detects that conditions for GameOver are met, we basicaly have to stop the game play, and let the user know it's over. This would be a good time to process the score, and see if the player made it to the hall of fame… I know, I know… We don't have a High Score list. Not yet! We'll come to it somewere near the end of this tutorial. So, I'll just put the code for the GameOver() method here, so we could move on to another fun part of the tutorial – Chasing the mouse over the field.

// First, we stop the game play
// by stopping the Game timer.

Game.Enabled = false;

// Then we display the Game Over
// message.

lblDisplay.Visible = true;


I hope you didn't try to run your program yet. I forgot to tell you: You need another label on your form. So, back to the design view, add a label, and adjust it to meet these specifications:

Label

  • (name): lblDisplay
  • Autosize: False
  • BackColor: Web > Transparent
  • Font: Arial Black; 27,75pt; style=Bold
  • Forecolor: Web > Red
  • Location: 12; 388
  • Size: 600; 52
  • Text: GAME OVER!
  • TextAlign: TopCenter
  • Visible: False

Right. Now we're ready to test our game. It should show the 'Game Over' message when the game field fills with columns. Here's a screenshot of how the game should look at this stage: (Huh, notice that I forgot to select the 'Show Grid' check box)

Next:
Heeeeereeee mousey! Heeere mousey… I'll catch you this time… Just wait and see… ;o) 

0 comments:

Post a Comment

Downloads

Downloads
Finished Bubble Splash Game

Followers

Translate

Blog Directories

Programming Blogs - BlogCatalog Blog Directory
blog directory
Software Computers Business Directory - BTS Local
Top Blogs GoLedy.com
TopOfBlogs DigNow.net
Blog Directory blog search directory
Top Computers blogs Add to Technorati Favorites
Computers Blogs Blog Directory
blogsbycategory.com Blog Directory & Search engine
Blog Flux Directory Programming Blog Directory
Join My Community at MyBloglog! BlogRankers.com
Technology Blogs - Blog Rankings Blog Directory
C# Game programming tutorial Blogs lists and reviews
Bloglisting.net - The internets fastest growing blog directory Blog Directory - photarium
blogarama - the blog directory Blog Toplist
Blog directory Computers (Linux) - TOP.ORG
Blog Ratings si.blogs
Blogz game, development, programming, c#, visual studio, tutorial, source code
On our way to 1,000,000 rss feeds - millionrss.com
RSSMountain
TopBlogLists.com - Blog Search