Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Gihzah

Member Since 25 Jan 2006
Offline Last Active Jun 24 2012 06:49 PM

Posts I've Made

In Topic: Texture2D question

18 June 2012 - 07:45 PM

//AddBackground method in ScrollingBackground
public void AddBackground(Texture2D texture)
{
scrollingTextures.Add(texture);
}[/source]


This was what I was looking for, didn't think it would be so simple. Thanks for the help!

In Topic: Collision detection in C# via colored pixels?

11 June 2012 - 04:54 PM

That approach can blow up in your face if you're not careful Posted Image You'll want to use the pixel vs. pixel comparison in a "granular" collision detection routine since its expensive and use a coarser method for general collision detection (narrow phase collision detection & broad phase collision detection). It makes no sense to do pixel vs. pixel collision detection against an object on the other side of the map Posted Image

I just use bounding boxes or bounding spheres for my broad phase collision detection and the narrow phase uses a slightly more expensive "polygon" collision detection method (the graphic is enclosed within a polygon). I chose the polygon because its easy to rotate and transform.

Alternatively, you could use a quad tree for your broadphase collisions Posted Image


Thanks! This approach makes much more since. I've never worked on anything like this before so I'll have to do some messing around with it. Would you happen to know how I would go about using pixel vs pixel comparison in c#? And would I have to use bitmap images?

edit
What if I used the Region class and the GetBounds method?

In Topic: Problem loading sounds (OpenAL & c#)

06 June 2012 - 11:09 AM

Looks like the data variable doesn't contain any information because alutLoadMemoryFromFile is failing. I tried some other file types but still no luck.

In Topic: Problem loading sounds (OpenAL & c#)

05 June 2012 - 07:11 PM

Hey, thanks for the reply. I have minimal programming experience so I get lost in the woods pretty often... After a quick google search to see what Breakpoints do, I added one in at the top of the LoadSound method and everything seems to be working fine until it hits the 3rd assertion. Also, the path variables contain the right sound file name. I'm just not sure where to go from here, but I'll keep tinkering with it tonight.

edit
Actually, I take that back. The assertion failed error pops up on the line after the 3rd assertion.
Al.alBufferData(buffer, format, data, size, (int)frequency);

edit
Well, now I'm not entirely sure... It doesn't crap out while the 3rd assertion is highlighted, it's when I pass the breakpoint beyond that line. So does that mean the problem is in the next line or the line you're moving the breakpoint from?

In Topic: Songs written by pro. musicians

11 October 2007 - 10:07 AM

Yeah, actualy I've decided to just write something myself.

PARTNERS