I am currently doing a 2D side-scrolling game with SDL. I got some problems with animation: i want to to animate from frame 1 to 4 but it stopped at frame 2.
I'm not familiar with SDL but from looking at your playAnimation function it seems a little strange that you set currentFrame to startFrame each time you call that function, is that correct or should that only be done once?
The problem solved, but more problems occurred. Man I feel like I'm doing a 2D engine not a game! Does Irrlicht fits my needs to make a 2D game? But there are so little guides about making 2D games with Irrlicht here.
Btw SDL kinda slow even though it is rendering 2D images. When rendered for like 10 seconds it started to get laggy.
No, I mean, probably will switch the whole thing to Irrlicht.
SDL alone is pretty slow. The only advice people would give me is combining SDL with openGL. But hey I want to make a game and finish it fast, not constructing a rendering engine!
JP wrote:I'm not familiar with SDL but from looking at your playAnimation function it seems a little strange that you set currentFrame to startFrame each time you call that function, is that correct or should that only be done once?
as far as I know only once... basing that on a simple demo I saw once.
@V - I find it rather comical that you're asking about SDL on irrlicht but never the less I'll do my best to help.
SDL.. is basic.. Irrlicht does what it does for the most part and more.
I wouldn't recommend SDL for 99.9% of projects based on my very limited knowledge of SDL.
as for 2d and side scrolling type games... maybe you can find more info on the wiki on 2d animation in irrlicht and also I recommend you take a glance at the magic 2d library.
searching irrlicht forums for "2d" would probably produce some very interesting results as it's not really talked about all that often.
also I highly recommend you try my search engine it can be extreamly useful taking priority of some 18 or more well known game development sites.