Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

948 Good

About M2tM

  • Rank
  1. That problem won't really go away if you switch to pure C, though, except that you obviously won't be writing any classes. Instead you'll write a set of functions operating on a certain type of data and then change your mind the next day and rewrite them all. There are probably various third-party libraries available that provide somewhat generic data structures such as lists and so on. It's just that in C, "generic" usually means mucking around with void-Pointers and constantly casting to the type of data you're using the structure with. [/quote] Really thanks for your replies. Actually I am doing exact things you descripted: writing function to operate some data, as a class in C++, but with functions. From some books I read that abstraction is important because it decreases the complexity. But I always feel it's hard to do it. Sometimes I think programming without abstraction, just use plain data, may be more efficient, as I can waste less time designing interfaces and abandon thems, and may feel less frustrated. Maybe I read wrong book. Books I read always tell the concepts, list a lot of its advantages but doesn't teach how to really do it. Even SICP, I read the two chapers and half the third chapter and did the most exercises in these chapters, doesn't help a lot. I feel the programs in these books are always too ideal or just toy programs. But practical programs are more dirty. Do you have some recommended books? Or should I read some sources code of open source projects? And actually my point is not whether there are some third-party library for C. I'm asking whether professional C programmers write some general data structure once and use them frequently after (or just use some third-party libraries), or just combine these data structures into the applications' algorithm? [/quote] Library development is common in programming. It is the process of building on abstractions. It sounds like you're asking if C programmers use libraries to which the answer is simply "yes". Now, I'm more confused about why you want to use C instead of C++. You have already said you're using a C++ compiler and IDE. It sounds to me like you are running against issues with learning the language because you perceive it to be harder than to continue on with what you know. It doesn't sound like you're making this choice for any actual technical reason. I can assure you that while in the short term it may be easier to hack out a few hundred lines of code (rather than learn the standard library) it won't pay off long term. Implementing your own container classes might feel more comfortable, but it is also much more likely that you're introducing memory leaks and probably lacks the efficiency of the STL (it's hard to beat a couple decades of testing and design even for specific applications of problems by seasoned programmers, and impossible to when you're first learning the language). It sounds like you're in need of a good book, or a complete change in language (maybe try python or something else). There is very little reason to restrict yourself to C in this day and age, maybe only for some specific embedded systems does it make sense. The power of templates and the benefit of classes and the standard library is huge (not to mention boost and other C++ libraries). Finally, and probably most fundamentally, C is not a great language for container classes primarily because of the lack of template support. You can simulate object oriented programming in C by passing around structs to functions which modify state, but it's harder to simulate std::vector or std::list type functionality primarily because the underlying methods do not exist in the language. That is, in fact, the primary reason C++ exists. It offers a lot of extra stuff that C simply does not, much of that is directly a result of why you are asking this question now and are unsure about library development. There are quite a few high quality C libraries for specific purposes, but it is a lot harder to write good generic code for C. Generic C code often involves a lot of void* casting or macros. So now that I've given you the advice you actually need, I'll tackle the advice you asked for. Here's a decent rundown of a few options for C libraries: http://programmers.s...t-library-for-c And more specifically here is a generic macro based container library: http://sglib.sourceforge.net/ Ultimately the question you've got to ask yourself is: if I download a non-standard library and invest time in reading and understanding how to use it then what am I REALLY gaining over simply biting the bullet and learning a little more about the C++ standard library?
  2. Some universities have a co-op work placement program which allows companies to hire on students for partial government funding (at least up here in Canada) as an incentive to hire interns. If you can enroll in such a program I highly recommend it. Then the next step is to actually make the internship with a game company happen, typically this is best done when you live in the same area as a few studios (as these universities are more likely to have some kind of understanding with local studios.) I went this route, and was very lucky to get a recommendation from a former alumni of my university who worked at EA and wanted to do a talk at our school (which I set up for him.) This basically helped get that vital first bit of work experience and I'm currently working in the industry.
  3. M2tM

    Guild Wars 2

    Quote:Original post by Antheus Quote:Original post by jpetrie I work on it. It's fun. Here's a hint: - Titles that require weeks/months/years of active playtime are not fun. Nor are titles that require 10,000 mouse clicks. C'mon... When that was added I went to WoW for hard-core raiding. It was seriously more casual compared to that. Guild Wars PvP allowed you to spawn an instantly top-level character. PvE is for people who like wasting time, and there is a demographic there which is targeted. Some people like clicking 10,000 times to get a title on a game. It isn't "for" me, I don't understand it, but there are people who enjoy that. I never got too deep into Guild Wars PvP, so maybe there were some buffs/bonuses that could only be gathered by PvE, but it didn't seem to be the case with my limited experience with it.
  4. M2tM

    Guild Wars 2

    Quote:Original post by jpetrie I work on it. It's fun. Neat. I'm actually looking forward to giving it a shot. I played and enjoyed Fury quite a while back despite its flaws (until it died), and I enjoyed Guild Wars, but it felt a little too slow paced (with only 8 abilities at a time I felt a little too constrained, I could do with 10 and feel better) and I couldn't get into it. Recently been playing Aion which has faster paced PvP, but also lacks any form of arena based combat. World PvP kind of sucks (never fair, always either catching someone offguard or outnumbering them). Also, lots of PvE mindless grinding, not that fun. So I've been looking forward to giving Guild Wars 2 a try.
  5. Quote:Original post by Prinz Eugn I just think there are times when things should be kept secret. The wikileaks assumption that having all information available to everybody is a good thing hasn't really been evaluated, has it? They strike me as idealists who are too caught up in themselves and release these things with the assumption that everything will be just fine via the magic of Openness! It's like the idea that making everything open-source will somehow erase all the problems with software... When your government decides what to tell the public and what to keep a secret it really opens up the door for corruption. The truth will set you free and all that.
  6. Quote:Original post by Anon Mike I switched to C++0x for my MSVC projects and never looked back. Lambdas and auto both rock. I've also been suprised at how useful decltype has been to me. I appreciate the potential for rvalue references but have yet to actually use them in a significant way. And yet, you probably have. :) That's the beauty of them.
  7. M2tM

    Is posting your full name online a bad idea?

    I'm not really worried if people know my name is Michael Hamilton and I live in Edmonton. As far as I'm concerned separating myself from myself simply because I'm posting online is a pretty schizophrenic thing to do. If I were to meet you at a club, or at work, or out on the street, or anywhere I wouldn't think twice about telling someone my name, why should it matter online? With that said, having a spam account as an e-mail buffer is a good idea for situations where you simply don't want to be pestered by some company's bulk e-mail list... But for conversation on forums or with other people I don't see the big deal. I have two e-mail accounts, mike@m2tm.net and maxmike@gmail.com. Both forward to the gmail account (which actually has a superb e-mail filter benryves, probably better than any other because of it's huge database of users contributing to it. I wouldn't be worried if someone professionally knew my personal e-mail was maxmike@gmail.com, it's a bit goofy but it isn't offensive, but of course I prefer to use mike@m2tm.net on business cards etc. Basically I try not to portray myself like a complete ass-wad in any environment so it doesn't matter to me if people can link my person to my persona. I figure if someone honestly cares to dig around and find posts by me online they are welcome to whatever they find, and if they are put off by any of it then I figure they probably aren't worth talking to anyway. People take themselves too seriously, I think.
  8. M2tM

    How much do you trust Wikipedia?

    Quote:Original post by Talroth Quote:Original post by Sirisian Quote:Original post by Talroth What I would really love to see is an academic version of Wikipedia to be developed. You want to be an editor? Well then you go to your local university or other institution that is part of the project, provide proof that you are actually qualified to comment on the subject material, and then you are given access to edit parts relating to your field of training or research. I really don't see how that would help. All the technical articles that pertain to actual fields of study tend to be correct. Your archery problem seems to be just a disagreement. The nice thing about Wikipedia is that the Talk page can clarify those things or discuss why something isn't included. Also it sounds like from the article that problem was solved. Wikipedia works. You would not imagine how long it took for the "MMO" sections on Wikipedia to get fixed. There was a time when every ignorant kid would list games like Counter Strike as an MMO or something. It got pretty ridiculous. Wikipedia 'works', like the Model T worked at the time. Sure it got the job done, but I don't think I would want to take one across Canada during the winter. We've moved on and developed better and more useful cars. Holy inappropriately mixed metaphors, Batman! Quote:Original post by LessBread Quote:Original post by zyrolasting How can I research a question that explicitly asks for subjective data? Have you never read a history book? What I wanted to know was whether you investigated how wikipedia works, if you took the time to read any of their guidelines or reviewed their response to the issues you raised or if were you simply shooting from the hip based on scuttlebutt exchanged between you and your buddies. Heheehehe... Butt... Buddies. I'm super mature. [Edited by - M2tM on November 23, 2010 8:38:43 PM]
  9. M2tM

    How much do you trust Wikipedia?

    I'd trust Wikipedia on certain topics (basically whatever article it says more citation is needed, or that the article may contain original research) as much as I'd trust an unverified student essay. Many Wikipedia articles are very good, but for some things it just is not something you can point at and say "this is the truth". Quite a few things have opinion. MANY articles are excellent, but there are also MANY articles which just aren't worth citing on a research paper.
  10. A) No. B) No. C) NO! Even relatively "harmless" viruses that spread widely can end up costing a lot of money (distributed over many people in terms of time and effort removing it and regaining control of their system, bringing it in to tech shops for repair etc.) Beyond potential legal ramifications this is in NO way a good use of your time and is not going to earn you any friends.
  11. M2tM

    Is it just me?

    Quote:Original post by necreia Quote:Original post by M2tM As Vin Diesel once said, "Genius is one percent inspiration, ninety-nine percent perspiration". That would be Thomas Edison. "Frankly my dear, I don't give a damn." -Vin Diesel ;)
  12. Quote:Original post by Fl4sh Quote:Original post by M2tM As Vin Diesel once said, "design patterns are all well and good, but there are many ways to deal with object interaction. There are no right answers, but there certainly are wrong answers." what the hell? Vin Diesel is a game programmer? Vin Diesel is many things it is not our place to question HIM.
  13. As Vin Diesel once said, "design patterns are all well and good, but there are many ways to deal with object interaction. There are no right answers, but there certainly are wrong answers."
  14. M2tM

    Xbox 360 vs PS3..

    Even setting up a PS3 dev kit correctly vs a 360 is quite a bit more involved. Basically a simple installer for the Xbox, several disperate steps for the PS3, and then my HDMI cable wasn't even working when I first plugged it in! We're talking half a day vs half an hour.
  15. Quote:Original post by Ftn Your code example is missing destructor which is crucial part to make this work. It's fine if you use a shared_ptr or possibly a unique_ptr. With that said, yes, the memory will leak as the example stands.
  • 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!