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

Author Topic: sf::Drawable and two sprite on one position  (Read 1391 times)

0 Members and 1 Guest are viewing this topic.

GamDev

  • Newbie
  • *
  • Posts: 29
    • View Profile
sf::Drawable and two sprite on one position
« on: June 07, 2018, 05:44:35 pm »
Hello, please tell me what I'm doing wrong
I have an image size of 128x64, that is 2 sprite.
I draw them like this:
(click to show/hide)
on 1 image my tileSet, the second result of the brown I'm trying to reach, and 3 that turns out
Tell me please how can I put sprite on the sprite?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: sf::Drawable and two sprite on one position
« Reply #1 on: June 07, 2018, 06:05:14 pm »
Easiest and most likely best looking solution is to create the tile in an image editor of your choosing.

If you grey part of the image is transparent, you could alpha blend them, but that will leave you with double as strong corner pieces.

Bet shaders can work some magic somehow, but at this point it's just overkill.

Create a tilesheet with all the images and the rotate accordingly when needed.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/