Draw-it: My next very accurate and efficient line drawing function for GameSalad.
ericzingeler
Member Posts: 334
Hi all,
This is my next line draw function for GameSalad. It's much faster, more accurate, and easier to implement than my last.
Please post here for any questions. Thanks!
Draw-it v1.0
This is my next line draw function for GameSalad. It's much faster, more accurate, and easier to implement than my last.
Please post here for any questions. Thanks!
Draw-it v1.0
Comments
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
I originally wanted to point out how when you draw vigorously it's not able to keep up and curves start becoming jagged edges, but I realise this is an arrogant statement considering you were already generous enough to share this code with the whole community. Much kudos to you and thanks again!
Play around with the settings a bit and you can probably squeeze out a little more efficiency.
Thanks for the compliments everyone!
1. Create a new scene attribute (boolean) for the Draw-it scene, set it to false.
2. In the draw function actor, within the Rule marked "draw line" add a third attribute to the conditions where the scene attribute that you created in the first step, is true. This will keep the unwanted line from being drawn, until the scene attribute is changed to true.
3. Add a new actor for the Draw-it scene, make it the size of the screen, create a rule when touch is pressed, change the scene attribute, from step 1, to true. This will trigger the rule in step 2, to allow you to draw.
✮ FREE templates at GSinvention ✮
✮ Available for hire! support@gsinvention.com ✮
Hi @ericzingeler This is great! is it your most up to date version? Just wondering about the "drawing vigorously" issue mentioned by @TheGabfather .
@fmakawa I don't think @ericzingeler is still active on the forums. @Armelline has a drawing template over at GSHelper.com if you want to check that out.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
@fmakawa PM me and I'll send you the drawing element. I still haven't tidied it up to put on the forums but you shouldn't have to spend $20+ to just get the drawing mechanic.
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support