Jump to content

  • Log In with Google      Sign In   
  • Create Account


renman29

Member Since 19 Jul 2006
Offline Last Active Yesterday, 07:41 PM
-----

Posts I've Made

In Topic: Spritebatch Draw Initial delay for some textures

07 May 2014 - 04:42 PM

Ah excellent ideas smile.png

The texture seems ok so stressing out the gpu seems to be  the case. Card has 1 Gig (although I'm also loading a lot of other fairly large textures so I'm probably getting close to the 500Mb mark).

Tried switching to DXT for the huge textures (or any large textures for backgrounds which I thought should be a bit lossy anyway) -- IT WORKED!

Quality is still very good! smile.png

If I could hug you right now I would. biggrin.png


In Topic: Spritebatch Draw Initial delay for some textures

07 May 2014 - 01:36 AM

Ok well I kind of found a disturbing and inappropriate temporary workaround for the problem using a private do_once Boolean like so:

 

if (do_once == false) { spriteBatch.Draw(tex, Vector2.Zero, new Rectangle(0, 0, 1, 1), Color.White, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f); do_once = true; }

 

//LOL. I really hope there's a better solution...


In Topic: 2d collisions

04 November 2012 - 03:21 PM

Not sure which types of collision detection would be most useful to you. If you're doing 2d tile platformer these might help:
Types of tile based collision methods:
http://higherorderfun.com/blog/2012/05/20/the-guide-to-implementing-2d-platformers/
Pixel perfect collision detection:
http://gamedev.stackexchange.com/questions/15191/is-there-a-good-way-to-get-pixel-perfect-collision-detection-in-xna
Here you can find rectangle-based collision detection source code - also links to pixel-collision and others:
http://xbox.create.msdn.com/en-US/education/catalog/tutorial/collision_2d_rectangle

I'm thinking rectangle-rectangle collision detection works for most things (but may want to try bounding-circle [radius-overlap] for some things)

In Topic: No Light in my scene

18 December 2010 - 08:19 PM

Is everything black? If so I'm not sure.
Maybe use a lower ambient value too - like r=0.3f,b=0.3f,g=0.3f
You might also want to try using a spotlight for a light coming from the camera. I'm thinking if the light is parallel directional and pointing along the sight of the camera - everything will look equally lit the same.

In Topic: Disable Screensaver not working

20 September 2010 - 11:21 AM

Aha! So this should do the trick:

switch (wparam & 0xFFF0) {
case SC_SCREENSAVE: return 0;//prevent it from happening
case SC_MONITORPOWER: return 0;//prevent it from happening
}

Thankyou! :)

PARTNERS