C# Game using Forms

This is a discussion on C# Game using Forms within the C# Programming forums, part of the General Programming Boards category; Hello, I am trying to write a sports management game in C#, played mainly by clicking buttons to move between ...

  1. #1
    Registered User
    Join Date
    Aug 2006
    Posts
    36

    C# Game using Forms

    Hello,

    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,

    Ed.

  2. #2
    Registered User
    Join Date
    Mar 2005
    Location
    Mountaintop, Pa
    Posts
    1,059
    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-07-2010, 11:08 PM
  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, 02: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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21