lesson 20 problem
lesson 20 problem
everything working perfect but in this function i get error
void Game::UpdateAnimation(AnimatedSpriteInstance* instance )
{
instance->currentFrame++;
if( instance->currentFrameExposure >= instance->templat->frameDuration)
{
instance->currentFrame++;
instance->currentFrame %= instance->templat->nFrames;
instance->currentFrameExposure = 0;
}
}
instance->currentFrame++; before if sentense if i comment it is working if not
err assertion failed expresion x<800
void Game::UpdateAnimation(AnimatedSpriteInstance* instance )
{
instance->currentFrame++;
if( instance->currentFrameExposure >= instance->templat->frameDuration)
{
instance->currentFrame++;
instance->currentFrame %= instance->templat->nFrames;
instance->currentFrameExposure = 0;
}
}
instance->currentFrame++; before if sentense if i comment it is working if not
err assertion failed expresion x<800
Re: lesson 20 problem
Shouldn't your first instance->currentFrame be instance->currentFrameExposure?
Chili
Re: lesson 20 problem
Hi,
I loved lession 20. Chilli made loading a bmp so simple while watching the video, but once the video is stopped could I do it on my own, no way man LOL.
I will be re-watching this. Would love to work out how to load pngs just for the transparency later.
Asimov
I loved lession 20. Chilli made loading a bmp so simple while watching the video, but once the video is stopped could I do it on my own, no way man LOL.
I will be re-watching this. Would love to work out how to load pngs just for the transparency later.
Asimov
----> Asimov
"You know no matter how much I think I have learnt. I always end up hitting brick walls"
http://www.asimoventerprises.co.uk
"You know no matter how much I think I have learnt. I always end up hitting brick walls"
http://www.asimoventerprises.co.uk
Re: lesson 20 problem
PNGs include compression that would make them a LOT more difficult to load than a raw bitmap. I recommend using library functions for stuff like this. The only reason we coded it from scratch was for the practice in file access (which we just learned in the previous lesson).
Chili
Re: lesson 20 problem
check out my topic here for loading png files you can also use .tga , .dds, .bmp, .jpg and some more...Asimov wrote:Hi,
I loved lession 20. Chilli made loading a bmp so simple while watching the video, but once the video is stopped could I do it on my own, no way man LOL.
I will be re-watching this. Would love to work out how to load pngs just for the transparency later.
Asimov
However I somehow fuck up the file and put it to .iwd file extension you can just change the .iwd to .rar or use "open with" winrar to extract the file... I will be changing the download link to .rar when I'm home since the shitty internet connection of mine here in the office can not handle downloading files into mediafire...
Chili++ for President
Re: lesson 20 problem
Hi ghillie,
I did download your file, and quickly deleted it when I saw iwd LOL. Thought it was some Mac format or something.
Will have a look it later.
I think I will leave pngs until I understand the basics, and then come back to them later to make my program pretty.
Asimov
I did download your file, and quickly deleted it when I saw iwd LOL. Thought it was some Mac format or something.
Will have a look it later.
I think I will leave pngs until I understand the basics, and then come back to them later to make my program pretty.
Asimov
----> Asimov
"You know no matter how much I think I have learnt. I always end up hitting brick walls"
http://www.asimoventerprises.co.uk
"You know no matter how much I think I have learnt. I always end up hitting brick walls"
http://www.asimoventerprises.co.uk
Re: lesson 20 problem
yup it's iwd but that's because i am a modder of modern warfare 2 and i always think that i am modifying a game file and compressing using .iwd but that's actually compressed by winrar - so things are just the same except the file extension.
You are right that the basic building block of knowing programming is to understand or even master the basics first before going to complicated ones. But in some ways it's also helpful to become ahead a little bit some times...
You are right that the basic building block of knowing programming is to understand or even master the basics first before going to complicated ones. But in some ways it's also helpful to become ahead a little bit some times...
Chili++ for President
Re: lesson 20 problem
Hi ghillie,
My brother plays Modern Warfare three also. You will like my handgrenade in my Avatar then LOL, which I built in 3ds Max and only 700 polys.
I tend to build even my 2D graphics in 3ds max because I am better at 3D than I am at 2D. I made a 2D game called Thomthello and all the pieces were built in max. I made that with Codeblock, mingw compiler, C++ and the SDL framework though.
Asimov
My brother plays Modern Warfare three also. You will like my handgrenade in my Avatar then LOL, which I built in 3ds Max and only 700 polys.
I tend to build even my 2D graphics in 3ds max because I am better at 3D than I am at 2D. I made a 2D game called Thomthello and all the pieces were built in max. I made that with Codeblock, mingw compiler, C++ and the SDL framework though.
Asimov
----> Asimov
"You know no matter how much I think I have learnt. I always end up hitting brick walls"
http://www.asimoventerprises.co.uk
"You know no matter how much I think I have learnt. I always end up hitting brick walls"
http://www.asimoventerprises.co.uk
Re: lesson 20 problem
Good for you Asimov I myself can make 3d's using 3d's Max like organic modelling... it's a good tool when you are interested in games if you know modelling this is a Plus.
by the way I hate modern warfare 3, There's a bunch of cheaters around there. I love to play mw2 from 4D1 formerly alterIW since they enhanced the game and prevent cheaters...
by the way I hate modern warfare 3, There's a bunch of cheaters around there. I love to play mw2 from 4D1 formerly alterIW since they enhanced the game and prevent cheaters...
Chili++ for President