How would you go about creating a drawing game?

balore

  • Posts: 11
I'm working on a project, that requires the player to trace over a shape. The trace does not have to be completed in one movement, it can be as many strokes as needed with a timer between each (example 3 seconds inactive = fail/retry).
 All of these are just requirements the game its the actual tracing part i'm interested in knowing how you would go about it. The trace should also be visible, that is you can see the lines being drawn.

Approaches ive considered:

Checkpoints, the shape has a somewhat-large number of checkpoints covering it, hitting them in the right order produces a correct response. This approach does not cover the visual element.

Creating lots of actors, Creating a new circle shaped actor every 0.2 seconds or thereabouts. Cons: VERY memory heavy and will slow the game down easily.

Drawing Lines between key spots, Lines are less memory eating but they do not create a fluid motion, circles and curves will look jagged.

Any thoughts on this? Is there a drawing function I have overlooked in Stencyl?
Games Designer / 3D Modeler - Visit my Blog/Portfolio: www.badennett.co.uk

Sunflower

  • Posts: 591
Maybe you would like to try Drawing >> Adv. Drawing >> Curves? I never tried it, but it may be what you look for.

balore

  • Posts: 11
I've played with the curves thing, but it can't draw in real-time.
Games Designer / 3D Modeler - Visit my Blog/Portfolio: www.badennett.co.uk

Sunflower

  • Posts: 591
It can't? O.o
Have you tried making a four lists attributes (sort of table)? These would contain X and Y coordinates of control points and anchor points (two lists for control X/Y, two for anchor X/Y), and then you would just add in "when drawing" something like:
Code: [Select]
begin drawing curve at [startX attribute] [startY attribute]
repeat [number of items in [ControlX List]]
  add to curve: control point [item #[current loop count] in [ControlX List]] [item #[current loop count] in [ControlY List]]; anchor point [item #[current loop count] in [AnchorX List]] [item #[current loop count] in [AnchorY List]]
stop drawing curve

Then, during drawing, you would just add proper points (best using custom block, like: "add control point [CX] [CY] and anchor point [AX] [AY] to draw") or something like that. ^^'

balore

  • Posts: 11
Aha! Very clever and works brilliantly! Thank you :)

Going to add multiple sets of lists creating new ones on the fly so i can have multiple curves that arent linked together.
Games Designer / 3D Modeler - Visit my Blog/Portfolio: www.badennett.co.uk