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.

Topics - Trinity

Pages: [1]
SFML projects / Sprite Animation Editor based on Thor
« on: September 30, 2018, 11:15:59 am »
Hey there,

I decided it was time to make another editor, this one for sprite animations. It is built directly upon the animation module from the Thor library extension and has features as:
  • Sprite sheet selection
  • Grid generation for sprite sheets based on tile size
  • Export animation data directly to animation files
The editor is very simple and thus easy to use, you can literally make an animation in a matter of seconds. Here are a few screenshots from the editor:

Integration steps can be found on the front and wiki page of the Github repository:

Github: https://github.com/Jakobzzz/SpriteAnimator

*** Notes ***

I ran into some limitations when using the Thor animation module as there were no support for:
  • Remove animations
  • Change the duration of an existing animation
  • Query the size of the animation map
Those were all trivial things to implement and were added to AnimationMap.hpp and AnimationMap.inl in the animation module for Thor.

SFML projects / Particle Editor based on the Thor library extension
« on: September 04, 2018, 07:51:53 pm »

I recently created a particle editor based on the Thor library extension to speed up the development of my own projects with SFML and Thor. The editor covers most of the features from the Thor particle module and has additional support for:
  • Save particle data to a json file
  • Open an exisiting json file with particle data
  • Change particle texture with file browsing
The editor can be seen in the following screenshot:

Integrating the saved particle data into a project is very easy and example code can be found at the github repository.

Github: https://github.com/Jakobzzz/ParticleEditor

Graphics / Scrolling view causes tiles to blur/flicker [SOLVED]
« on: August 27, 2017, 06:46:23 pm »

I'm currently loading tilemaps from Tiled using https://github.com/fallahn/sfml-tmxloader and it works as expected. However when the view moves with the player the tiles in the loaded tilemap appears to blur/flicker which from my understanding is caused by rounding issues related to the view and the nearest tiles?

The issue can be seen in the following video: https://www.youtube.com/watch?v=PQ4SpWTb_xQ&feature=youtu.be

I read that there is an implementation fix for this with SelbaWard, but I just don't want to just change my system just yet if there might be a solution for the current setup. Has anyone encountered this problem and know of any possible solutions?  :)

Graphics / Animate sprite back to idle state
« on: August 19, 2017, 06:59:58 pm »

I have recently picked up SFML and decided to try out the extension, "Thor", which comes with some handy
functionality. Although I'm experiencing some problems when I'm trying to animate my sprite i.e return it to idle state when I have released the key which should trigger the movement. The code up to this point looks like this:

void Player::UpdateInput(sf::Time dt)
        float velocity = m_movementSpeed * dt.asSeconds();

        if (Input::GetActionMap().isActive("walkRight"))
                if (!m_animator.isPlayingAnimation())

                if (m_animator.getPlayingAnimation() != "walkLeft")
                        m_playerSprite.move(velocity, 0.0f);

        if (Input::GetActionMap().isActive("walkLeft"))
                if (!m_animator.isPlayingAnimation())

                if (m_animator.getPlayingAnimation() != "walkRight")
                        m_playerSprite.move(-velocity, 0.0f);

Now the behaviour is perfectly fine except from that the sprite doesn't stop animating directly when I release the chosen movement key, something which could be solved by setting up a release event like this:

if (Input::GetActionMap().isActive("stopRight"))
        if (m_animator.isPlayingAnimation() && m_animator.getPlayingAnimation() == "walkRight")

What will happen now is that when I move right for example, the sprite will stop animating and then return to idle. However the movement of the sprite will not be in sync with the animation since the idleRight animation is still set to one second. Reducing it to around 0.1 seconds solves the problems but allows the player to simply glide along when you tap the movement key  :'(. I have a feeling there is a more elegant solution to this, perhaps I should look into blend trees for animating?

Pages: [1]