Jump to content

  • Log In with Google      Sign In   
  • Create Account


Endemoniada

Member Since 01 Jul 2003
Offline Last Active Today, 11:51 AM

#5068776 Camera Panning ?

Posted by Endemoniada on 10 June 2013 - 04:33 PM

Change the position with your current up and right vector, like so (pseudo code).

 

 

   // dx, dy are your current mouse move deltas
   camera.position += dx * camera.right + dy * camera.up;

Probably need to play with the signs (-dy * up, if your mouse y increases when moving down) and scale according to current frame delta time and some empirical value until it feels right.

 

It works like a charm now, thank you.




#5062670 How would you concatenate an array of strings together?

Posted by Endemoniada on 17 May 2013 - 03:53 PM

 

char buffer[4096]; // adjust
buffer[0]='\0';
 
for(int i=0;i<array_size;i++){
strcat(buffer,string_array[i]);
}

 

You can implement a two pass system as well, the first pass can determine how big the buffer must be.

I want to provide constructive criticism to say why you are getting downvotes, because it is frustrating to receive a negative reputation with out explanation.

That is the wrong language; there is no strcat() that I'm aware of in C#, and character arrays are not what is being used. That's also one of the least efficient ways to concatenate a collection of strings, due to having to count the length of the buffer each time you concatenate the string, which takes longer and longer.

 

Thank you. I didn't see the C# icon until just now.




#5061190 How would you concatenate an array of strings together?

Posted by Endemoniada on 11 May 2013 - 07:04 PM

char buffer[4096]; // adjust
buffer[0]='\0';
 
for(int i=0;i<array_size;i++){
strcat(buffer,string_array[i]);
}

 

You can implement a two pass system as well, the first pass can determine how big the buffer must be.




#4956183 Catalog of Particle Effects ?

Posted by Endemoniada on 05 July 2012 - 08:20 PM

Hi guys,

Do you know of any catalogs of different types of particle effects so I can learn how they are made ? I made a little engine and editor and the stuff I'm coming up with doesn't look very professional. I know it's a complex subject but I'm just trying to make cool looking stuff for an essentially 2D game, I'm not necessarily looking for realism either.

One thing I'm running into is the effects I make look decent on one colored background (like gold) but not another (like blue). The different levels in my game will have different colored backgrounds so this is disheartening.

Any help would be appreciated. Thanks.


PARTNERS