Drawing

Hey guys!

Does anyone of you have a free template who showes me how to draw lines on gamesalad, or a video is also good :)

Cya

Comments

  • I saw a video with a straigt line but I want just a 'free line'

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited November 2014

    Here's a demo by @ORBZ‌. It was made with Mac Creator.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • SocksSocks London, UK.Member Posts: 12,822
    edited November 2014
  • ArmellineArmelline Member, PRO Posts: 5,331

    I've been having some fun experimenting with drawing in GameSalad recently. My version has the same basic limitation as the others - once enough actors are on screen, things start to slow down. I find this happens at around the 500-600 actors point, the same as with @ericzingeler's method.

    Mine, however, is individual actors spawning, so collisions and things are still possible, and I think it's overall very smooth and efficient. All the drawing is done with one "line" actor, and one rule in any other actor that registers the initial touch. No game attributes are required (though I use some for easy control of line thickness etc.).

    Still a couple of minor issues to work out, and ideally I want to find a way to eek some more performance out of it - even 600 actors is a bit low overall.

    I hope to find the time to work on it more soon, and even if I release the overall template as a paid template, the actual drawing bit will be made available for free. Send me a PM, @w.martens%40euronet.nlw.martens@euronet.nl, and I'll hit you up with an early copy.

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    @Armelline‌ Looks pretty smooth! :)

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • SocksSocks London, UK.Member Posts: 12,822

    @Armelline‌

    Very nice ! :)

  • ArmellineArmelline Member, PRO Posts: 5,331

    @tatiang @Socks Thanks! Hope to get something out to people soon so you can try it for yourselves!

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,879

    @Armelline‌ -- Thats great!

    Have you considered using particles instead of actors?

  • SocksSocks London, UK.Member Posts: 12,822

    @RThurman said:
    Armelline‌ -- Thats great!

    Have you considered using particles instead of actors?

    I tried something similar recently (a car's tyre tracks rather than a drawn line, but effectively the same thing) . . and the problem for me was that I couldn't get the Particle behaviour to produce a regular stream of particles, they always come out randomly in intermittent fits and spurts, so you can't produce a consistent output, the only way I found I could get - for instance - a solid line - was to ramp the particle output up so high that there were no gaps in the otherwise random intermittent line, I had to head towards the tens of thousands of particles just to fill in the line !

    And the other issue for me is the start up time / life time thing, it just seems to be random, get one of the numbers slightly wrong (and there's no telling what 'wrong' actually is) and you get a spurt of particles, then nothing, then they restart a second or two later !?

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,879

    @Socks said:
    And the other issue for me is the start up time / life time thing, it just seems to be random, get one of the numbers slightly wrong (and there's no telling what 'wrong' actually is) and you get a spurt of particles, then nothing, then they restart a second or two later !?

    One might try several different kinds of particle emitters -- some fast, some slow, some to fill in the line, etc,. (But I'm not a very discerning 'graphics' type, so perhaps the subtleties that make for a great presentation are lost one me.)

  • SocksSocks London, UK.Member Posts: 12,822

    @RThurman said:
    One might try several different kinds of particle emitters -- some fast, some slow, some to fill in the line, etc . . .

    Yep, that's probably the way to go with regards to a painting app, in fact the randomness might be actually be useful for a pencil/sketchy type of thing. I just wish GS had made particles linear / predictable and then left it up to us to introduce randomness if we wanted (using all the usual tricks).

  • ArmellineArmelline Member, PRO Posts: 5,331

    @RThurman said:
    Armelline‌ -- Thats great!

    Have you considered using particles instead of actors?

    I did briefly consider it, but rejected it for two reasons.

    Firstly, it was really important to me that physics and collisions remain in tact. I want to be able to select an eraser tool and erase the line, or to roll a ball down it. What I am experimenting with is a "spray can" brush (that goes in the empty brush space), that draws more widely spaced actors that then spawn a series of particles that creates the bulk of the line. Some level of eraseability and collision is left, and it creates a very cool effect.

    The second is what @Socks said. Particles have somewhat of a mind of their own, and I was never able to get as consistent a result as I wanted.

    Definitely worth some further exploration, though.

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,879

    Yes, thats> @Socks said:

    Yep, that's probably the way to go with regards to a painting app, in fact the randomness might be actually be useful for a pencil/sketchy type of thing. I just wish GS had made particles linear / predictable and then left it up to us to introduce randomness if we wanted (using all the usual tricks).

    Predictable particles -- now there is a worthy feature request!

    @Armelline said:
    Definitely worth some further exploration, though.

    Yes, think of it like this: Instead of the tool emitting the particles, it records the path in a table. Then you place actors at strategic spots along the path. The actors then control the particles using the table to offset particles where needed. (I use similar techniques to create figure-tracing games for preschoolers, and chalkboard / letter-tracing games for elementary students.)

    I suppose you could use a variation of this technique to also create invisible actors along the particle path to use for physics. The invisible actors could be larger (with less need to spawn hundreds of them) but still give the illusion that the (particle) path was solid.

  • Luke20wLuke20w Member, PRO Posts: 50

    @Armelline‌ Can you please try to get that out for download or send it to me I really need smooth drawing for my new game.

  • Luke20wLuke20w Member, PRO Posts: 50

    my email is " weidnerluke@gmail.con "

  • ArmellineArmelline Member, PRO Posts: 5,331

    I hope to have my drawing template ready this week, but you should note that it will be a full, paid for template. I do intend to release the drawing action itself for free, but that won't be a while yet.

    @RThurman Experimenting with particles for the spray can I wanted to implement, but I got all the way to the point where I had it spraying just as I wanted it and went to put it into the actual template when I remembered particles don't give anywhere near enough control over colour. So even if the physics problem gets solved, particles won't work for a drawing template/game that provides colour selection. You could manually duplicate the particle behaviour and adjust the colour in each one and throw them all in rules, but that won't work for any app/game with true colour selection. Sadly :( Would be a lot of scope with particles if it wasn't for that. Trying now to work out if I can fit the spray into my template while not compromising UI consistency too much.

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,879

    @Amerline -- yes, I see what you mean.

    Wouldn't it be great if GameSalad had a graphics layer where you could turn pixels on/off. Oh... and flood-fill too!

Sign In or Register to comment.