Help to create dotted lines

Help to create dotted lines
0.0 0


I wanted to show path in my game using dotted lines and upon googling CCRibbon seems to be my best bet.
But it seems like i couldnt find anything by name CCRibbon.
I tried doing cocos2d::CCRibbon, but didnt workds.
In this form ( the guy explained that by including manually he is able to use it.
so i tried searching for “CCRibbon” file in cocos2d-x folder but all i can find is CCRibbon.pkg at location (D:2d-2.0-rc2-x-2.0.1\tools\tolua++)
but no .ccp of .h files.

After more googling i came to know about CCMotionStreak.

I tried using CCMotionStreak but

  1. CCMotionStreak has fading effect which i dont want
  2. its not creating dotted lines.



You may try to use custom GL shaders to draw line with any dotting style you like.


Thanks for reply. Atleast I have something to research on.
But i know very basic GL stuff. I learned only till drawing vertices. :frowning:
Still learning …. (learning curve is very slow :frowning: )
Can you direct me to any good tutorial or articles explaining about shaders.
Thanks I’ll keep googling about clues you gave :slight_smile: