Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!

1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Member Since 13 Jun 2001
Offline Last Active Yesterday, 06:23 PM

#5204317 Checking the equality of objects in C#

Posted by Madhed on 14 January 2015 - 04:01 PM

Your code is very verbose.


Any reason why you are not using properties? http://msdn.microsoft.com/en-us/library/x9fsa0sw.aspx

You can also override Equals() or the == operator to make testing for equality much simpler http://msdn.microsoft.com/en-us/library/ms173147(v=vs.80).aspx


As for your problem: Are you sure the order of the arguments on this line is correct?

Person pSearch = new Person(firstName, lastName, State, ZipCode, PhoneNumber, Address, Age);


more stuff to read:


#5203587 Estimating effort Hours

Posted by Madhed on 11 January 2015 - 06:56 PM

You can give time estimates for the tasks. These will probably be wrong however.

After finishing some amount (say one week) you should go back to the original estimates and find out what took longer and what actually was done quicker than planned.

You should involve your team in this process and absolutely make clear to them that it isn't a personal fault if they needed more time than expected.

#5200685 Is Unity good for learning?

Posted by Madhed on 29 December 2014 - 06:07 PM

Visual Studio Express is a little bit weird. It's separated into a few different versions. I personally use their professional version, but I believe that the version you'd need is called "Visual Studio Express 2013 for Windows Desktop." Express should provide all the features you could ever need


Actually Microsoft just released the community edition of visual studio for free, which has all the pro features such as plugin support.



#5195332 Decoupling physics

Posted by Madhed on 29 November 2014 - 08:28 AM

Why are you doubting that this is the correct approach?

The physics systems acts as a service in this case and the other systems are consumers.


Events or not, your picking system is dependent on the physics system either way, as without it your code would not work.

#5195273 Particle Systems & Handling Transparency

Posted by Madhed on 28 November 2014 - 05:52 PM

Tween vertex color to RGBA(0,0,0,0) this gets rid of both terms

#5195254 Particle Systems & Handling Transparency

Posted by Madhed on 28 November 2014 - 03:58 PM


(it is possible to draw additive and alpha blended particles in a single draw call).


How do you do that? (I'm an OpenGL beginner)



I suppose with the blend function: Dest * (1 - SrcAlpha) + Src


Aka premultiplied-alpha.


If SrcAlpha is 0, it simply reduces to additive blending.

If SrcAlpha is between 0 and 1 you can achieve alpha blending but you have to premultiply your textures by the alpha value first.


This also allows you to seamlessly blend from explosion to smoke and other cool effects.

#5193245 The left-hand side of an assignment must be a variable

Posted by Madhed on 17 November 2014 - 07:48 AM


How does this even let you do this?

class Foo
   Foo yolo;


It's Java. yolo is a reference. You are probably thinking in c++ terms... tongue.png

#5192939 Proper C++ header file?

Posted by Madhed on 14 November 2014 - 08:32 PM


Where is the compiler output?


Hmm...? I'm compiling with g++ from the terminal command line. The only thing being output to the terminal that isn't posted here is the command I used to compile.


g++ -c TileMap.cpp



Ah, now it's there. It wasn't when I posted.

#5192550 Live filesystem changes

Posted by Madhed on 12 November 2014 - 06:36 PM

Really, go for a version control system.

I you want to go open source you can use github.

Alternatively check out Assembla. https://www.assembla.com/home

1 Project with up to 1GB of storage is free there.

#5188647 O(pow(N,12))

Posted by Madhed on 22 October 2014 - 06:43 PM

This somehow reminds me of the lugaru source code that was posted here a while ago.

#5188643 O(pow(N,12))

Posted by Madhed on 22 October 2014 - 06:23 PM


#5188641 Is optimization for performance bad or is optimizating too early bad?

Posted by Madhed on 22 October 2014 - 06:21 PM

Optimizing is bad if your "sub optimal" code is actually running perfectly fine on the target system and you have more important things to do.

Optimizing code that you haven't tested is bad because you are most probably fishing in the dark.

#5188640 C++ header inclusion question

Posted by Madhed on 22 October 2014 - 06:16 PM

I think #2 should actually read: "Only include headers in headers if you can't get away with forward declarations"

#5187648 How to remove GET variables from URL in php

Posted by Madhed on 17 October 2014 - 08:50 AM

That's the whole point of GET. The parameters are added to the url.

Either I didn't understand the problem correctly or what you are trying to do is impossible.

#5187214 What's best (Custructor Arguments)

Posted by Madhed on 15 October 2014 - 01:28 PM

If your constructor takes too many arguments, well... make it two classes or more. biggrin.png

Could be a sign that your class tries to do too much.