• entries
    743
  • comments
    1924
  • views
    580359

Hmm

Sign in to follow this  

68 views

Got a bugger of a problem with this interpolation lark.

In order to get sprites to render pixel perfect with filtering on, I need to floor() my drawing co-ordinates before I render so that the vertex co-ordinates line up with those theoretical edges of the texture co-ordinates. See Drillian's journal if you don't know what I'm on about.

Trouble is, flooring these co-ordinates is causing some kind of error where the map blocks (which are drawn based on slightly different calculations to the sprites) flick back and forth between one pixel and another, making it look like the sprites are shivering.

If I stop flooring() the vertex co-ords, the problem goes away, but then the graphics go all horrid and I lose my pixel-perfect sprite replication.

I have a vague idea about changing the way I render map blocks that might work out but I need to have a really good look at it.

Fixed physics, variable render with interpolation to smooth out the motion is a complete bastard with a 2D sprite game in Direct3D 9. But I will prevail. Progress on the latest incarnation of Udo is going to slow until I get this sorted out though.

[EDIT] Actually, another advantage of using this fake backbuffer method is that I don't really need to use linear filtering for different resolutions. Now I've turned it off, I can have my vertex co-ords as weird as I want and I still get my pixel perfect sprites.

Still got one more weird shuddering issue when I push up against a wall from the left side, but maybe this is a step in the right direction.

How the hell does everyone else manage to write rock-solid 2D games that run at different framerates on PCs? It's a complete mystery to me.

----------------------------------------------------------------------------

Jujitsu continues to be good fun. Just got back from another two hour session, aching all over. We were doing neck and throat pressure points tonight and I can't decide what is worse - the pain of having them done on you or the guilt of doing them on someone else.

Started learning some pretty cool arm locks and throws that I need to learn to grade for my first belt, although that's a good few months away.
Sign in to follow this  


3 Comments


Recommended Comments

On the topic of the martial arts, it's definitely a fun/intense hobby. I've been going for twelve years - since I was four years old! - and I'm a brown belt in the Shaolin Kempo style. One more belt color to black. :)

Share this comment


Link to comment
Cool to see other people taking martial arts around GameDev!!
As you can tell I'm taking Taekwondo and have been for just over 10 years.
I am a 3rd Degree Black Belt with plenty more to learn which is half the fun of it!

I hope your rankings go well as I know for me testing was a very nerve racking expierence.

Share this comment


Link to comment
Well, I'm only about three weeks into it so early days yet, but certainly good fun. The guy who runs our club started himself when he was about my age (early 30s) and he's managed to get to third dan black belt within about 15 years, so there's hope for me yet [smile].

Certainly is good fun.

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now