Jump to content
  • Advertisement

yaroslavd

Member
  • Content Count

    563
  • Joined

  • Last visited

Everything posted by yaroslavd

  1. yaroslavd

    NP or P problem?

    It's definitely in P.
  2. Look up space partitioning. That way you'll have to check an object for collisions with other objects in its vicinity rather than all objects.
  3. I just found out you have to pay $99 to not only publish an iphone app but even to test the app on my iphone. Is there a way around that? Is there some sort of free contract to maybe make free apps?
  4. yaroslavd

    Objective-C

    I've been looking at Objective-C and I am failing to understand the fundamental difference between C++ OO and Objective-C/Smalltalk OO. I understand that in Obj-C you pass messages to objects instead of calling methods directly, but what is the difference besides semantics? I know that there is something I'm missing.
  5. yaroslavd

    Objective-C

    I just finished the Wikipedia article for the second time. I am still a bit fuzzy on how polymorphism works in Obj-C. Do superclasses forward messages to subclasses? Other way around? Of course in C++ if you call SuperClass.someMethod() it will delegate appropriately to SubClass.someMethod(). Does the same thing happen in Obj-C?
  6. I am on a Mac OS X (Leopard) machine. I love C# and would like to use it for my next project. I just installed Mono and MonoDevelop. However, even just by opening up the editor I can see it's no Visual Studio. In fact, it looks like a Linux program ported to Mac instead of a native Mac program. So anyways, I was wondering if anyone is developing C# programs on a Mac. If so, what do you use? MonoDevelop or something else? I also have VMWareFusion and VS2008, so I can use that, but I would rather find a native Mac solution so that I don't have to run Windows virtually. Thanks, Yaroslav
  7. yaroslavd

    Objective-C

    Yeah, I read the Wikipedia entry, which is where I read up on the differences. I just couldn't really understand how these differences impact the programmer. Thanks for helping clarify it, though. So would you say that Obj-C OO is similar to parametric polymophism a la SML? Where you can pass in any object at will perform the method as long as the type has that method?
  8. yaroslavd

    [java] Static Initializers

    What happens if you have to initialize static member A before static member B? Or if initialization is more complex than a single line?
  9. yaroslavd

    [.net] OS X and C#

    Interesting. Do either of these allow development for the IPhone?
  10. yaroslavd

    [.net] OS X and C#

    Yeah, I think you are right. I just started up a project in XNA. I thought it'd be cool to make something for the IPhone, but Objective-C looks like a pain in the ass. Unfortunately, I can't run my code via VMWare Fusion since it can't find my graphics card, so it looks like I'll have to reboot in Bootcamp. And I would never thinking of switching out of OS X for anything but game development - it's just so much nicer than Windows.
  11. yaroslavd

    Visual Studio see all vars- how?

    Why would you ever need to do that? I'm assuming you want to avoid name collisions. In that case, this won't be a problem since local variables are out of your scope, as Visual Studio suggests.
  12. yaroslavd

    Float to Negative Float

    No. For one, what if we are negating a negative number?
  13. yaroslavd

    Float to Negative Float

    Actually, in 2's complement negation is more than just negating the sign bit.
  14. Can you be a bit more specific? Your question is a bit ambiguous.
  15. yaroslavd

    Tracing a bullet's path?

    Quote:Original post by Leo28C I don't wanna sound like a complete noob, but isn't there something easier than that? I don't understand most of the symbols and variables and stuff... Right, which is why "the symbols and variables and stuff" are explained in the article. Now if you actually have a specific question about the article and/or implementation, we'd love to help, but unfortunately there is no magic solution.
  16. yaroslavd

    C# function overloading question

    me.SetInventoryItem(4,(new TextItem()).SetName("Sword").SetDamage(3));
  17. Well, if that's what you want, then just discard the Z-value before doing the calculations. Construct two new vectors where you keep the original x and y coordinates, but make the z coordinate 0.
  18. I'm pretty sure you can overload the function to support a ref and a non-ref argument. So like this: public void function(ref int i) { // code } public void function(int i) { // code } public void other_function() { int i = 5; function(ref i); function(i); }
  19. Yes, that is pretty much the point of OO. You can call entity.Update() and not worry what subclass entity actually is - it will call the Update() of the appropriate subclass.
  20. yaroslavd

    Compute Bounding Box for Several mesh

    Just start with the bounding box for one of the objects and keep growing it to encompass the other meshes.
  21. yaroslavd

    Arrays

    It's also a way of referring to a bunch of variables by the same name. For example, let's say that you want to add up all those variables. You'd have to do something like num1+num2+num3+...+num1000. If you use arrays, you can simply loop over the array because all the numbers can be referred to by num.
  22. yaroslavd

    object motion in space when at maximum speed.

    Well, the thrust is a Force, which directly affects acceleration, not velocity. So in open space, assuming no external forces, there is no maximum velocity (except the speed of light). The max thrust of your engine only impacts your ship's maximum acceleration, not maximum velocity. So yes, you can reach whatever speed you'd like.
  23. yaroslavd

    Using radians in a game.

    Try again. 180 degrees = pi radians.
  24. yaroslavd

    Patrols

    How about a spline?
  25. Do you know what the big-O notation actually is?
  • 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!