felisandria

Members
  • Content count

    5027
  • Joined

  • Last visited

Community Reputation

739 Good

About felisandria

  • Rank
    Contributor
  1. Syncronized Typed Queues

    Oh, right. That's because things like Synchronized aren't actually implemented in the generic version of Queue. It's been auto-converting the string to a non-generic to use the non-generic's synchronize capability, but it has no idea how to do that for your "message" type. Why not just lock it yourself?
  2. Syncronized Typed Queues

    I don't think System.Collections.Generic.Queue is inherently thread-safe. Is it possible you're getting interference from that? I would imagine that it takes "longer" to process a template than a string, which might explain the discrepancy. ETA: Although I suppose I really should have asked what exactly it's telling you, first. What's the error or behavior?
  3. Solution needed

    From my experience, a lot of them use internally turn-based logic. So, element A would have a turn to move, attack, etc, then element B would have a turn to move, attack, etc. If attacks are not happening when you think they should at that point, or if that's impractical for your setup, generally you extend the attack range.
  4. Solution needed

    Can you change the sequence of attacks and moves in the game, or extend the attack range out to 2 cells if either character in question is also in motion?
  5. um? help? (noob ahead)

    Try hitting the + key a few times.
  6. Hmm. Well, if it were me, I would just grab one of the many lists out there, write a simple parser that grabs the first name, saves it to one file, grabs the last name, saves it to the other file, and be done with it. Mostly because it would take me maybe 5 minutes to write the parser and I could be searching the web for hours for the perfect list. Do you know how to write a parser or do you need help with that?
  7. I'm not really sure what you're asking. If you're just looking for a list of random names, then look up an alumni list or petition list or something. For instance, here's a list of people who signed a petition to stop some sort of boycott. http://stopnujboycott.blogspot.com/2007/04/petition-names.html If you actually want to generate names, then it's going to depend on how fancy you want to get... when I'm generating random names I usually just append numbers to a Mr. Test Tester, Esq. If you don't care if the name makes any sense, just set up the randomizer to generate a consonant then a vowel for an arbitrary name length, first and last. If you want real names, grab a list from common baby names and a list of common last names and use a randomizer to pair them. If you're mostly having format problems, you can sometimes get around that by dropping the info into XCel and having it help you format.
  8. bad at math, am i done for?:(

    Heh, no. You're not done for. I spent a couple of years tutoring kids who were struggling with math (usually algebra/trig/precalc) over my lunch hour, and I found that 90% of the time, if I could figure out where they "missed something" and fixed that hole in their education, they would suddenly be good at math from that point on. I would suggest that you go to your teacher or TA. Be ready to talk about why exactly you think you're struggling, and it's entirely possible they'll be able to straighten you out. You might also see if tutoring is available, even from your fellow students... but make sure you go into it with the attitude that you want to figure out where you're going wrong so you can do it yourself, not with the attitude that you want to copy off them to survive the class. And, as has been mentioned, there are books and online tutorials if you can't find anyone. Just realize that what you're looking at *right now* might not be the problem... you're probably going to need to go back to go forward. In good news, going forward is probably going to be a lot easier if you can figure out where you ran off the rails. The important part is that you deal with this as soon as possible. The sooner you figure out what you missed that's making things so difficult to understand, the less you are going to miss in the future due to that initial lack of understanding.
  9. Help and advice required...!!

    Learning C++ is about the same as learning C anyway (from the standpoint that it uses most of the same syntax and the standpoint that C++ was created as an extension of C with the addition of a lot of stuff to make object oriented programming a lot easier, so they're close enough to not worry about the distinction most of the time). IMHO, there's not really a point to learning C specifically and separately... if you get to the unlikely place where you need to use pure C, it's just a matter of looking up the related rules and then not using the C++ stuff that violates those rules. Regarding languages in general, you don't *have to* learn C++ specifically, all languages are capable of producing games to some extent, but quite a lot of us like C++ due to the fact that it's cross-platform, has a lot of graphics libraries available for it, and is very powerful (but on the flipside it also means you can shoot yourself in the foot a lot easier). I would note that C++ is not really friendly to web games, though, so if your ultimate goal is web games, you should probably go for C# or Java (which also tend to share a lot of the syntax and structure that you use in C++ anyway, so it's pretty easy to move between them, at least from my experience). To put it bluntly, you're not going to master the language without doing anything in it, and as you do stuff in it, you're going to gain mastery of the language. Best case scenario would be to take a class in your chosen language and go from there, as the homework pretty much forces you to work through it. Otherwise, there are tons of tutorials and book suggestions if you go up top and click Resources->For Beginners. Personally I have several massive shelves of programming books and my first instinct when I hit a wall is to pull up Google anyway, so don't think you have to buy a bunch of books first.
  10. Dll with shared mfc used by non mfc app

    Yes, that's setting the manifest dependencies. It affects your manifest file based on what type you're building for and binds your application to a specific CRT version for it to look for in the WinSxS directory rather than searching for a reference DLL that may or may not be what you intended. This is supposed to be more robust than the old method of doing a general reference dll search. In theory, on your personal computer, you should only have the .dll's that correspond to your processor type plus the "standard" one that shows up in your windows\system directory, though you might have multiple versions (mostly from various Windows updates, it keeps the old ones around). If you're curious about how many copies of the .dll you have, you can always go into the C:\Windows directory and do a search. *shrug*
  11. I'm a little confused regarding the number of bits you're trying to use, as you specified 16 char at one point. So I'm just going to list the allowed multiplication and shift functions (afaik, SSE2 doesn't have integer division available, you're going to have to use multiplication with a shift). _mm_mulhi_epi16 (8 signed 16 bit from a * 8 signed 16-bit from b, packs upper 16 bits of 8 signed 32 result) _mm_mulhi_epu16 (same as above, but unsigned) _mm_mullo_epi16 (signed or unsigned, 16 bit int a * 16 bit int b, packs lower 16 of 32 bit result) _mm_mul_su32 (multiplies lower 32 bit int a * lower 32 bit int b, returns 64 bit result) _mm_mul_epu32(same as above, but unsigned) All the shifts are listed here, so I'm not going to type them: http://math.nju.edu.cn/help/mathhpc/doc/intel/cc/mergedProjects/intref_cls/common/intref_sse2_int_shift.htm
  12. sscanf EOF equivalent?

    Ah. Okay. I guess I'm not really sure why you would care. If there's no data, it won't pull that data out in the sscanf. Granted you might have some issues due to the fact that fread doesn't bother clearing the buffer post-EOF, but you can fix that by either using a memset of \0 to the entire buffer prior to doing the fread, or by setting the entire rest of the buffer to \0 if you hit an EOF (really, the former is probably a better idea). If you're worried about significant differences between the size of the buffer you allocated and the actual size read, then you might try using fseek to figure out how big your buffer needs to be, and dynamically allocate it for your fread.
  13. sscanf EOF equivalent?

    Well, fread returns the size of what was read, so if it hit an EOF then the return value is going to be smaller than the buffer you asked it to read (so you will know if the fread return is smaller than size*count, you hit an EOF or an error). You could also use fseek with SEEK_END to determine how big the file is in the first place. It might be easier for you to use fscanf (the file version of sscanf) in the first place, though. Or you might consider using iostream's fstream and use getline to go line by line (assuming you don't mind using STL) if that's of interest.
  14. -fsave-memoized problem

    <.< >.> /flee
  15. You appear to be causing loader lock. This article might help. http://msdn.microsoft.com/en-us/library/ms173266(vs.80).aspx _vcclrit is deprecated because the /clr used to be able to deadlock as well (back in 2003). They've mostly fixed it though, afaik.