Jump to content
  • Advertisement

timmay314

Member
  • Content Count

    159
  • Joined

  • Last visited

Community Reputation

138 Neutral

About timmay314

  • Rank
    Member
  1. timmay314

    Cap a Velocity

    pseudocode: if(|v| > maxvel) v *= maxvel / |v| Of course you shouldn't take the square root until it is necessary to do so, so have the |v| and maxvel squared in the if statement, then take the square root if it's true.
  2. timmay314

    Python: for loops

    for i in range(len(data)): data = 3 Edit: Do what GnuVince said
  3. timmay314

    really good game engines???

    I heard there's an engine called "Source" that works pretty well.
  4. timmay314

    college

    I go to CMU and the atmosphere is great here for game programming. Lots of us do it in our free time, there's an art major across the hall in my dorm that makes meshes in Maya for us, we have a class dedicated to it (haven't taken it yet but I hope to), and you won't have any trouble getting a job once you graduate. All the big companies recruit heavily here, so you'll have great employment options if you decide to go into something other than game programming, and good internship opportunities either way. To name a few companies you might have heard of that have recruited here so far this year, there's Google, Microsoft, AMD, and EA...I am very happy with my decision to attend CMU.
  5. timmay314

    Question about vectors

    Quote:Original post by MetalRob It's much quicker and more semantically correct in C/C++ to write it as ++i More semantically correct? Are you implying that there will be some ambiguity in what i++ does as opposed to ++i, or that it contradicts standard usage in a significant way? Much quicker? First of all, if i++ is in any way a bottleneck, I'd say your code is probably pretty dang optimized. Second, any decent compiler would optimize i++ and ++i to be the same speed if used in this context. It doesn't really matter if he uses i++ or ++i, don't nitpick. Edit: typo
  6. timmay314

    Getting started with Linux...

    I have decided that I should learn to use Linux proficiently for employment reasons. I have Windows XP and my hard drive is formatted with a single partition. I want to have both XP and Linux on this machine. Can I do this without reformatting and losing everything I currently have? If not I can just buy another hard drive I suppose. Also, what version of Linux is recommended for relative beginners? I'm told there are many different versions. I have a small amount of Solarus and Unix experience but not much.
  7. timmay314

    Rendermonkey

    Got it, trying it out, it does seem a bit better. Now, what book would you people recommend that I get for learning HLSL? I can do the basics but I'd like a book that walks me through most of the specifics and gives some good examples for how to do common effects.
  8. timmay314

    Rendermonkey

    I started learning how to do shaders a year or two ago in HLSL. I ended up doing other things for various reasons, but I remember being disgusted with RenderMonkey because of a number of things, the main one being that the near and far clipping planes were so close that you could never see an entire mesh at once so you couldn't get a good feel for how the shader was acting on it. Now I'm interested in working on shaders again, does anyone know if RenderMonkey has gotten any better or if there's something else I should use? Also, should I use HLSL over Cg?
  9. timmay314

    Singletons

    I was wondering, is there any reason singletons are used like this: public class Singleton { private Singleton () {} private static Singleton _inst = null; public Singleton Instance() { if (_inst == null) _inst = new Singleton(); return _inst; } // Methods and such public void DoSomething(); public int DoSomethingElse(int a); } Rather than a class with all static methods and member variables like this: public class Singleton { private Singleton () {} // Methods and such public static void DoSomething(); public static int DoSomethingElse(int a); } As far as I can tell, they'd accomplish the same thing unless you need to do something nontrivial like loading resources from files when you get the instance for the first time. Otherwise it seems like the second one would be (somewhat trivially) easier to deal with because you don't have to call Singleton.Instance() to get the instance to use.
  10. timmay314

    Win32 vs. Visual Basic?

    A few things... 1) You can't claim to know anything about how Windows works if all you know is VB. People that do know Win32 will doubt your competence as a programmer as well, rightly or not. 2) Win32 is far more powerful than VB, unless you mean VB.NET...you didn't really specify. 3) Performance. Win32 code in C++ is faster than VB, though VB.NET is close in performance. 4) C# is a much less noobish language than VB. Professional games are not written in VB (there may be a few exceptions that I'm not aware of, please enlighten me if so). This isn't a flame, it's a fact. It's pretty much a change of syntax that will give you more respect and probably better paying jobs. C# also lets you do some "unsafe" things that VB doesn't allow.
  11. timmay314

    Anyone know any books for DirectX for C#

    Really I don't think there's any need to spend the money on a book. drunkenhyena has good free C# D3D tutorials and hopefully you could pick up anything else you need from other pages (like MSDN).
  12. timmay314

    What C++ IDE to use?

    Microsoft Visual Studio .NET if you can get it, no question. Nothing else comes close.
  13. timmay314

    Another "odd" error.

    Quote:Original post by xor DECLARE_MESSAGE_MAP(); I haven't used MFC for quite a while, but if I remember correctly the DECLARE_MESSAGE_MAP() macro isn't supposed to have a semicolon after it. I could be wrong though, and I don't have access to a compiler at the moment.
  14. timmay314

    Another "odd" error.

    It sounds like it can't find your class declaration. I have this problem sometimes when you have lots of things #including each other and they are compiled in a bad order. For example, suppose class A needs class B, and class B needs classes A and C. If A is included first, it goes to include B, which then includes A and C, but it finds the "pragma once" and ignores A.h thinking class A has already been declared when it actually has not, so you get an error because it doesn't recognize class A. Your case may be much more complicated (like A needs B needs C needs D needs E needs A), but when this problem has arisen for me I've had very similar errors. I can generally fix this by not having any unnecessary #includes in header files (it's okay in cpps), and this means not #including A.h inside B.h when you only have a pointer to an A object in class B, just add "class A;" before the declaration. Hope this helps.
  15. timmay314

    managed vs unmanaged c++

    Quote:Original post by intrest86 Right, the current incarnation of Managed C++ is an ugly beast, and really should only be used if you have to use it. If you want to do .Net, use another language like C# Agreed. Managed C++ should not even exist IMO. I've heard that benchmarks show managed C++ is slower than managed C#, and the biggest reason to use C++ over C# anyway is speed. C# is far easier to code and very easy to learn - I learned the entire language in literally a day. I don't know why Microsoft thought managed C++ would be a good thing, I see it as an oxymoron because it destroys the main purpose of using C++.
  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!