Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - cal

Pages: [1]
1
Graphics / Re: Failing To Load Font
« on: January 04, 2014, 03:23:14 am »
I agree with AlexAUT. It seems as though, he's set his debug configuration to use the release libs (although it's hard to tell by the screenshot since the text is cutoff).
You've got to change the configuration so that building in debug uses the debug libs like so (notice the -d after the lib name):
http://www.mediafire.com/view/pkyz60ecwdpwf2d
and so that building in release uses the release libs:
http://www.mediafire.com/view/qacelje8ysmwbxq

2
Graphics / Re: AnimatedSprite undefined behavior
« on: January 04, 2014, 03:14:29 am »
First off, I just want to apologize for not replying in a timely manner. I got a new case yesterday and well, I was quite busy.

What happens if you limit the frame rate?

The framerate has no effect on player movement/animation due to it being calculated by speed*elapsed time.

 // code here

  • Learn to use the event loop correctly, at the moment you may not even be handing a real event
  • Why does everyone like to convert a perfectly valid sf::Time to a float? Anyways in this case it shouldn't make a difference, but you should keep it as a sf::Time until you need to convert it to seconds.

Make these changes and let us know what happens.

I've actually changed my code quite a bit and for now it seems I'm using my event loop correctly. I still have much to learn, my code is quite a mess I do apologize. I've managed to get it working:


Although, of course now the problem is syncing the hands/feet to the bobbing head motion. I think I'll take a short term break from this project to get a fresh perspective on where I should go from here with it. Thank you for your suggestion, it is much appreciated :)

3
Graphics / AnimatedSprite undefined behavior
« on: January 02, 2014, 02:05:05 pm »
I've implemented the AnimatedSprite class as suggested on the wiki, however the frames only animate correctly when I add a std::cout statement.

To keep this post relatively short (text-wise) I'll link to the code on github rather than pasting the files here.

main.cpp: https://github.com/natefailsalways/Pixels/blob/master/Pixels/Main.cpp

player.cpp: https://github.com/natefailsalways/Pixels/blob/master/Pixels/Player.cpp

player.h: https://github.com/natefailsalways/Pixels/blob/master/Pixels/Player.h

I just don't understand why the std::cout statement has any effect on the cycling of the sprites in walkingAnimation.

Here is the visual representation of the problem:

Pages: [1]