Hi all,
This sounds ridiculous, I know, but my sprite from Intermediate 12 is displaying "dimmer" than it appears in the spritesheet. Have I missed something obvious? The white text is presented nice and bright.
I attach a grab showing the game window and the sprite-sheet for reference..(I set the spritesheet background to black for easier comparison in the screenshot, but it is saved as Magenta still in the file - honest).
Thanks, Geoff
My sprite is drawing "dim"
Re: My sprite is drawing "dim"
Did you clone from the repo or write the code yourself? What does it look like when the sprite walks over the text?
Chili
-
- Posts: 3
- Joined: October 19th, 2017, 9:11 pm
Re: My sprite is drawing "dim"
Hi Chili, Thanks for responding, and well, for everything that led me here so far. I've enjoyed your videos very much, and watch them daily to speed up my commute to work.
Cloned directly from the repo with no change apart from required re-targeting to v141 for my VS2017 setup. I noticed it first of all when I tried my own sprite sheet where I was trying to create "Galaga" using your framework, then went back to just the original link spritesheet. I have re-tried this morning from a fresh clone of the repo, with the same result.
Grab attached showing the text in comparison to the sprite and the original sheet. I think you can still see that the sprite is dimmer in the game window. It's a strange one. Thanks again,
Geoff
Cloned directly from the repo with no change apart from required re-targeting to v141 for my VS2017 setup. I noticed it first of all when I tried my own sprite sheet where I was trying to create "Galaga" using your framework, then went back to just the original link spritesheet. I have re-tried this morning from a fresh clone of the repo, with the same result.
Grab attached showing the text in comparison to the sprite and the original sheet. I think you can still see that the sprite is dimmer in the game window. It's a strange one. Thanks again,
Geoff
Re: My sprite is drawing "dim"
It's not a strange one bro. I suggest you follow the function calls and see what is actually being called, then report back here
Chili
-
- Posts: 3
- Joined: October 19th, 2017, 9:11 pm
Re: My sprite is drawing "dim"
Ah-ha!! Ghost Effect! Phew. I thought I was going to have to plug in a CRT monitor to see if it made a difference for a moment there!
As Chili pointed out, if I had followed through all the function calls I would have seen that in the latest version, the call to Animation::Draw passes on a Ghost SpriteEffect to allow the text to be seen through the sprite...
void Animation::Draw( const Vei2& pos,Graphics& gfx ) const
{
gfx.DrawSprite( pos.x,pos.y,frames[iCurFrame],sprite,SpriteEffect::Ghost{ chroma } );
}
If I change this from Ghost{ chroma } to Chroma{ chroma }, then I get my desired result of a full brightness sprite, but with text that is hidden behind the sprite if they overlap.
I have learned a lesson to make sure that when I clone a repo, I must roll back to the correct place and branch-off from there, to avoid code that is newer than the tutorial I am working from.
Right, I'm off to prepare the next stupid question...
Thanks Chili!
As Chili pointed out, if I had followed through all the function calls I would have seen that in the latest version, the call to Animation::Draw passes on a Ghost SpriteEffect to allow the text to be seen through the sprite...
void Animation::Draw( const Vei2& pos,Graphics& gfx ) const
{
gfx.DrawSprite( pos.x,pos.y,frames[iCurFrame],sprite,SpriteEffect::Ghost{ chroma } );
}
If I change this from Ghost{ chroma } to Chroma{ chroma }, then I get my desired result of a full brightness sprite, but with text that is hidden behind the sprite if they overlap.
I have learned a lesson to make sure that when I clone a repo, I must roll back to the correct place and branch-off from there, to avoid code that is newer than the tutorial I am working from.
Right, I'm off to prepare the next stupid question...
Thanks Chili!
Re: My sprite is drawing "dim"
Well, you beat me to what i was gonna say next.
But yeah, you can use the tags to see where the commits for each tutorial are, and create your branches accordingly
But yeah, you can use the tags to see where the commits for each tutorial are, and create your branches accordingly
Chili