Jump to content
  • Advertisement

verp

Member
  • Content Count

    7
  • Joined

  • Last visited

Community Reputation

105 Neutral

About verp

  • Rank
    Newbie

Personal Information

  • Interests
    Design
    DevOps
    Programming
  1. verp

    Does anyone *not* hate VS 2012's UI?

    If I missed someone providing this information already I apologize, but you can do a CTRL+SHIFT+F to search the entire solution and it uses the familiar dialog you are looking for. At least, it does for me.
  2. Hello I am also working on a text-based game in C#. I am learning everything as I go, building it all from the ground up. I don't feel like painting by numbers, since I already know this won't make me 5 bucks much less a million I figure I might as well learn some useful things for the time invested. The approach I took to game data files was to use an MDB file (Jet database). I can access it very quickly with C# natively, perform actual SQL select statements against it, open and easily edit it during development using Microsoft Access, and later on down the line if I need at least some type of security (if you want to call it that) I can look into using a newer ACCDB database, also accessible via C#, that supports many more features. But the point is, it's quick to access on the fly, quick to get data out of, quick to get data into, and very accessible, and working with it is well documented. As for the language parser... I haven't started on that yet! I'm working on world navigation and object manipulation right now... Anyhow, food for thought. Have fun with your project! Edit: sorry for the wall of text- the editor doesn't seem to want to save any line feeds for some reason.
  3. Thank you Mike... I think I will just go with a class as you suggest. I appreciate the example you provided also.
  4. I have a List<> collection that contains multiple Structs. Each Struct has a public method such as this: public bool IncrementCount() { if (IsThePlayerAllowedToIncrementThis) { CounterInternalToTheStuct += 1; return true; } else { return false; } } The reason I chose to use Structs is because I was under the impression that it is not a reference type, but a value type and therefore each one was it's own entity (which is what I want). Should I be using a Class instead? So then from some other code I do this (and it IS SUCCESSFUL because I check the return bool): bool Success = MyListName[Index].IncrementCount() But if I then look inside the Struct stored in the List<> I see that the value of CounterInternalToTheStuct has not incremented. Can someone explain why this is the case? When I access the struct from outside of the List<> am I actually creating and accessing a copy of it or something? How can I execute that method and have it affect the contents of the Struct actually stored there? I have read up on Structs and tried to look into this, but despite this I'm still having problems applying what I have read to my problem. Thanks so much in advance for any help I get! I appreciate it!
  5. The way I chose to do something similar at work was to save the queries in a database, with each column corresponding to the contents of the fields on the screen. I saved text field contents as varchar data in some columns, and checkbox checked states as bit data in other columns. I did it that way for several reasons. I could add yet more columns to the database table that stored these queries to save informaiton such as when the query was saved, how many times a query was executed, or to allow one user to access queries saved by another user. Additionally, storing the queries in the database allows the users to use them no matter what computer they are physically accessing. I present the user with a dropdownlist of their saved queries. When they choose one, the individual saved query data is obtained and I set all the forms controls appropriately based on it. This approach probably makes sense also if you are planning on this becoming a web application. With data saved in the database, you will minimize the disruption to the users when you make the Forms to web transition (meaning, they won't lose all the queries they have saved).
  6. I have found in more than one case using .Invoke() over .BeginInvoke() resolves problems where UI elements are not properly updated before a worker thread is complete. In one case I had a progressBar that would not hit 100% even though the integer I was using to keep track of progress the worker thread was performing was without a doubt reaching 100. Using Invoke() and waiting for that one simple callback to the main/UI thread to update the progressBar was enough to keep the worker thread from blazing through all the work and exiting before the UI could do all of it'e updating. Once I made that change, the progressBar would perfectly and accurately reach 100% when all work was complete. The only reason I was using multiple threads was to keep the window responsive while work was being performed- meaning the UI wasn't busy doing other real work. So, there was absolutely no noticable peformance hit by using Invoke(). I know you didn't necessarily ask this, but I thought I would let you know this practical situation and how Invoke() vs. BeginInvoke() applied to it in case it helps you in the future.
  7. Hi I know this is a late reply but I had some trouble getting registered. What you need to do in this case is explicitly cast the object types being held in the Array. This should work for you: ((Dog)dogArray[2]).bark(); I hope this helps!
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!