• Content count

  • Joined

  • Last visited

Community Reputation

122 Neutral

About FinalMinuet

  • Rank
  1. C#: Using an ArrayList in a MessageBox

    I'll probably just make a read-only TextBox and a CheckBox at the end that must be active in order for the user to click the OK button and continue, sort of like the EULAs you have to agree to when you install a program. The instructions aren't extremely long, 12 lines right now including blank lines, which is why I was hoping to pull it off in a MessageBox. I've never used StringBuilder before, so I'll have to do a bit of reading first, but that's no big deal. Oh, and just to clear something up: Quote:Original post by kSquared Quote:Original post by kmccusker To access the individual members of an ArrayList, you'll have to index into the ArrayList using the Item property. There is no Item property in C#; that is for languages that do not support indexers... The way I understand this is that there is an Item property in C#, but it isn't accessed by calling myArrayList.Item(index). It's merely just the classic indexer used in C++, myArrayList[index]. However, for universability it is included as Item so it can be compatible with other .NET languages that use Item, like Visual Basic. Correct me if I'm wrong. I'm always looking to clear up confusion. Thanks much for all the advice. It really helps out.
  2. C#: Using an ArrayList in a MessageBox

    Just in case people didn't notice, I edited the post. Ignore the part where I mention the MessageBox beeping twice. It's supposed to and I forgot.
  3. My job at the University of Iowa is to computerize certain psychological experiments that used to be performed by hand. Part of the job is to allow the experimenters to alter the instructions or parameters of the program via text files. Now, I'm writing a method that reads input from a text file line by line and prints it all out to a MessageBox so the user can read it (the user is required to confirm that they understand the instructions, so I thought this would be the ideal way to do this). Since I won't know how many lines the experimenters might change the instructions to, I decided to use an ArrayList. Here's some code: StreamReader input = new StreamReader(@"gain.txt"); string lineIn; ArrayList instructions = new ArrayList(); do { /* Grab the line from the file */ lineIn = input.ReadLine(); /* Save it to the ArrayList */ instructions.Add(lineIn); } while (lineIn != null); /* Display the instructions in the MessageBox */ MessageBox.Show(instructions.ToString(), "Instructions: Please Read Carefully!", MessageBoxButtons.OK, MessageBoxIcon.Information); I proposed to use instructions.ToString() to output the contents, but all that gets output is "System.Collections.ArrayList", and for some reason when I press the OK button, it beeps again and I have to press it a second time. Any help would be greatly appreciated, either in coming up with a better way to use the ArrayList, or a completely new way to display the instructions altogether. Many thanks in advance, and ratings will be given to those kindhearted enough to help. EDIT: Silly me, nevermind the part about calling up the MessageBox twice. I forgot that the program runs in two sections that use the same method. [Edited by - FinalMinuet on April 17, 2006 10:44:46 PM]
  4. Hi im new here...

    From what I understand, Game Design isn't a very popular major among universities. I'm going to the University of Iowa for computer science and plan on using that to get into the industry, but I did take a class in Game Programming through a local college. It was a good experience, and you learn a lot more than from your basic compsci class, but unless the entire class works together on a single project it won't be an accurate learning experience. My two cents.
  5. Nytehauq, how much money are you working with? How big is your team? What kinds of tools and programs are you working with?
  6. Horror Game Modes

    Of course. I was just presenting any options I thought you might be able to use. I'm not offended if you don't use them. That's interesting, though. Multiple endings for multiple modes. I'm assuming that means the harder the game, the better the ending. I could see how that would boost the replayability, but just make sure the endings are different enough to warrant playing the same game again, and the game is short enough to make playing through a second time feasible.
  7. Horror Game Modes

    I'm a big fan of horror games and I am very pleased to know someone is trying to break the mold. On having more difficulty levels, I don't think that more is better. Multiple difficulty levels are just an excuse to get the player to play through more times. If your game has excellent replay value, it might be worth it, but overall you're not going to get that strong of a response from it. Instead, I would suggest 4, maybe even 3. Novice, Normal, Difficult, and Overkill, and you could probably get rid of Novice mode if you wanted to. A well-designed game doesn't need Novice mode, as it would gradually ween even the most novice of players into the game well. Or, you could just have Normal and Overkill. In this situation, you could make many changes to Overkill mode to make it a truly new experience for the player, such as AI changes, new events, maybe even a new level if you had the budget and time. I personally would like to see AI changes, especially for the bosses and some major enemies. Have enemies drop from the ceiling, or jump in from around a corner, or break down a door as you're openning it. Always keep the player on their toes. Of course, this is all from a theoretical standpoint.
  8. How do I practice with C++

    The first game I ever programmed with C++ was a console version of Tic-Tac-Toe. Kazgoroth already mentioned programming simple games, but I'd like to add one more game to the list: Minesweeper. My second game was a console version of Minesweeper, and in programming that game I learned quite a bit about troubleshooting and ingenuity, both of which are probably as important as actually knowing the language. When looking at books, make sure that they have a section at the end of each chapter for practice assignments. Sure, it's a bit like homework, but many times it's the actual use of the language that learn from, not just reading about it. Just keep at it! Don't rush the basics, take your time and make sure you know something before moving on, and above all else, have fun. That's what it's all about. Good luck!
  9. Game Ideas

    Boc_est1986, it is great that you have an idea. That's where it all starts. Unfortunately, a lot of people have ideas, and game companies won't pay people for them. Your best bet would be to make the game yourself. Honestly, it's probably not going to turn out as you're hoping it would, with the latest 3D graphics, professional-quality music, so on and so forth. It never does, especially if it's your first game. However, having one game under your belt will do amazing things to your confidence when it comes to making more games.
  10. Perfect. Many thanks to all of you!
  11. Visual Studio said it didn't have a definition for Int32.TryParse(), and it won't let me use a continue statement in the catch block. Let me try a different approach. The user is given a text box and a Start button. They are told to enter their user number, then click Start. If the number is valid, the rest of the program starts. If it's not a number, I want the program to display the error message (works), clear the text box (works), and exit the function -- private void start_Click(object sender, System.EventArgs e) {}. This will basically start the program over without forcing the user to restart the program manually. Make sense?
  12. Ok, in my program, the user needs to enter their user number before continuing on. If they don't enter a valid integer, the program throws an exception. Instead of continuing on, I want the program to wait for the user to try inputting a valid number, then start the try block over again. Here's the code. int number = 0; try { number = Convert.ToInt32(usernumber.Text); usernumber.Text = ""; } catch { MessageBox.Show("You didn't enter a number. Please double-check your input and try again."); usernumber.Text = ""; } user = new User(number); trial = new Trial(number); InitializeForms(); StartTrials();
  13. Ok, I wanted to see if it was possible to try something. I have a Java .class file. If I want to run that program, I have to open up the command prompt, change the directory to where the program is, and type "java someclass" just to get the program to run. I don't want to go through all that work to do that, especially since it takes a while to get to the directory. My idea was to create a shortcut to the command prompt, then in the properties part of the target line, type in the command prompt lines that would run the program, effectively creating a makeshift .exe file of sorts. Has anyone tried this? Or am I just doing things the hard way? If anyone has an idea how to accomplish this, I would very much appreciate the help.
  14. Data- or Graphic-Based Games?

    Hmm... interesting concept... I wish I had thought of that. Would have made my game a LOT less complicated. Ok, so as long as the different parts of your program are basically independent from each other, with a "master function" that controls everything, you can manipulate either way according to your tastes and the capabilities of the language. Ok, I think I got it.
  15. Data- or Graphic-Based Games?

    So, let's say this... #include "data.dba" #include "graphics.dba" #include "input.dba" First, input is independent of both data and graphics, because all it does is return the values that the main function recognize as different commands and lets the main function call data. Second, graphics is independent of input and dependent on data, because input doesn't modify and of the graphics directly, but it does need to read data in order to place the graphics in the correct way. Third, data is independent of graphics and input, because it just manipulates data based on the functions called from the main function. Is this right? Or am I close?