Thread: C# Game using Forms

  1. #1
    Registered User
    Join Date
    Aug 2006

    C# Game using Forms


    I am trying to write a sports management game in C#, played mainly by clicking buttons to move between difference screens, rather than a video graphics based game. I am wondering what the best way to create this game is? So far, I have chosen each new screen to be represented as a form. For example, clicking the "go to match" button from the "team select screen" form, will open up a new form, "match screen". Is this the best way of doing it?

    When a new form is created, data is passed between the two forms. This way means that I cannot "Close()" any of the forms, but must just "Hide()" them, as it seems that a form must always have its parent form active. How can I have a global class that will store data without having to rely on passing data between forms?

    Thanks for any help you can give me,


  2. #2
    Registered User
    Join Date
    Mar 2005
    Mountaintop, Pa
    I would suggest you use a public static class to hold your variables with get/set accessor properties.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. how do the game engine and the api interact?
    By Shadow12345 in forum Game Programming
    Replies: 9
    Last Post: 12-08-2010, 12:08 AM
  2. Creating a simple Windows game
    By ejohns85 in forum C Programming
    Replies: 1
    Last Post: 05-22-2009, 12:46 PM
  3. Open Source / Semi Open source game idea. Help needed
    By CaptainPatent in forum Projects and Job Recruitment
    Replies: 10
    Last Post: 05-16-2007, 10:44 AM
  4. game engine advice?
    By stien in forum Game Programming
    Replies: 0
    Last Post: 01-23-2007, 03:46 PM
  5. My Maze Game --- A Few Questions
    By TechWins in forum Game Programming
    Replies: 18
    Last Post: 04-24-2002, 11:00 PM