Jump to content

  • Log In with Google      Sign In   
  • Create Account

We need your feedback on a survey! Each completed response supports our community and gives you a chance to win a $25 Amazon gift card!


#ActualKaptein

Posted 24 July 2013 - 11:13 AM

the laser sprite is 1060 pixels wide? oh my smile.png

do you draw a line on it? then draw the sprite on the sheet?

 

there are multiple ways to solve this problem, such as just drawing a line from (tankX, tankY) to (objectX, objectY)

the line would be red with some LineWidth = 4.f; or so, if you are using .NET

 

EDIT: oh right, SFML and c++, i have never used SFML before.. so i can't help you there

 

but, can't you just draw a line? from A to B.. tongue.png

 

Depending on how far you want to go, lasers can be complex effects

In the old days, you could combine many small sprites that formed a line, and i'm sure you can do that today too with some alpha+shader magic

 

Not sure what your options are with SFML though.. sorry


#2Kaptein

Posted 24 July 2013 - 11:08 AM

the laser sprite is 1060 pixels wide? oh my smile.png

do you draw a line on it? then draw the sprite on the sheet?

 

there are multiple ways to solve this problem, such as just drawing a line from (tankX, tankY) to (objectX, objectY)

the line would be red with some LineWidth = 4.f; or so, if you are using .NET

 

EDIT: oh right, SFML and c++, i have never used SFML before.. so i can't help you there

 

but, can't you just draw a line? from A to B.. :P


#1Kaptein

Posted 24 July 2013 - 11:07 AM

the laser sprite is 1060 pixels wide? oh my :)

do you draw a line on it? then draw the sprite on the sheet?

 

there are multiple ways to solve this problem, such as just drawing a line from (tankX, tankY) to (objectX, objectY)

the line would be red with some LineWidth = 4.f; or so, if you are using .NET


PARTNERS