The O.G. Virtual learning! Buy one, get 2 more Lifetime Memberships! - Click Here!

Coloring page problem

This topic contains 4 replies, has 2 voices, and was last updated by  Angel Arcas 3 years, 6 months ago.

  • February 26, 2018 at 9:28 pm #180681

    Hi Justin,

    I’ve been trying to make the coloring tool work for several days but it’s practically impossible. What I want to say is that the traces are not flowing and leaves many blank spaces and shortly after being drawn the app crashes.

    I have read a post that you advise increase the size of the sprite being drawn and decrease how often it is added to the scene. It does not work either.

    On YouTube, I found a tutorial to make a coloring app. It works very smooth. I downloaded the project but, of course, it is not configured as The Story Tellers Kit 2.

    If I’m not wrong, the code is written in “ViewController.swift” So, is there any way to create a .sks scene and write that code in it? I do not know if I explain myself.

    As usual, I thank you for your help

  • February 27, 2018 at 12:30 pm #180715

    Yeah the speed at which the user’s touch adds those sprites really depends on the speed of the device. Back when I first created that example page it was serviceable, but from the beginning I considered it more of a decorating device. Like a rubber stamper for kids to add decorations to the page.

    So you’d want to modify would be the Page.swift file, or probably the Page_Extension.swift file. It depends on how tightly you want to integrate it with the property list. That Page_Extension.swift can run code triggered from the plist. Or you could just create a new extension of Page altogether.

    To clarify though, the ViewController typically just presents the Sprite Kit scene. So you rarely would put any game related code in the ViewController (there’s some to just handle stopping and starting sound).

    The Sprite Kit template has a GameScene.swift file which is the code for the GameScene.sks file. SKS files are the visual editors, the Swift files handle the code (so you’d never add code to an SKS file).

    In the Story Teller’s Kit, the GameScene.swift was renamed to Page.swift and to organize the code there’s extensions of Page.swift (Page_Timers.swift, Page_Listners.swift, etc) but its all one big file essentially. And the way the kit works is any of those SKS files work with the code in the Page class. Its like any game really, you write code thats going to apply to all levels of a game (as opposed to writing code specific to a particular level).

    So if you’re watching a tutorial on SpriteKit and they are writing code in a GameScene.swift file, that code could be written in the Page.swift file.

    • February 27, 2018 at 3:57 pm #180742

      Thanks for you quick reply.

      I love work with The Story Tellers kit because I can do everything with no code. I practically do not know about programming.

      My app is almost finished. I just have to set up the coloring page so kids can tracing numbers from 0 to 9 and it has to go really smoothly.

      I would ask you if I write code in the Page.swift file, can I work with the plist creating all coloring scenes I need and adding sprites, buttons, setting physics,etc… as with the rest of the scenes that I have in the app?

      Thanks for your help

    • February 27, 2018 at 5:18 pm #180752

      Well I fired up the demo and set the Frequency a little lower. To 0.008 instead of 0.01 . Not sure how much that affected it. But it actually plays smoother than I remember….

      Example on iPhone 7

      That speed workable for your app?

    • February 27, 2018 at 8:00 pm #180761

      Oh, yeah!
      That´s exactly what I need! Fantastic!
      Many Thanks Justin!
      I really appreciate your help!

You must be logged in to reply to this topic.

Know what an affiliate program is? You make money just by sharing links to our site! Win. Win.

Earn when you refer any buyer here! 30 day tracking. Commissions are 33%-50% and recur on subscription products!

Uh oh, missing your affiliate ID. Create one real quick