Migrating from Unity

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
glebski
Posts: 2
Joined: Fri Nov 02, 2012 2:11 pm

Migrating from Unity

Post by glebski » Fri Nov 02, 2012 2:40 pm

Hi
My first post, yay!

I have been using Unity3d for a couple of years and really love it, however I now want to make a 2d app for which unity seems a bit overkill. So I have just started using LiveCode. For my first basic project I would like to develop a simple drawing app which uses built in LiveCode tools such as "oval", "polygon" etc. I have so far (playing with LiveCode for a few hours) managed to bring up a couple of buttons which initiate the tools and I can draw on the card with them. However I can only do this by pressing one button at a time as once the polygon tool is selected I can't exit it, or press on a button.

So to the question. Firstly, has anyone out there attempted a basic drawing app and can point me in the right direction in terms of logic, selecting tools, etc.
Secondly is LiveCode the right environment to do this kind of development?

Thanks for your patience.

Glebski

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: Migrating from Unity

Post by Dixie » Fri Nov 02, 2012 3:41 pm

Hi...

I have an app in the itunes store called 'skribble', that I guess could be caled a basic drawing app. I have attached a stack that should point you in the right direction...

be well

Dixie
Attachments
Draw.livecode.zip
(1.67 KiB) Downloaded 196 times

glebski
Posts: 2
Joined: Fri Nov 02, 2012 2:11 pm

Re: Migrating from Unity

Post by glebski » Fri Nov 02, 2012 4:13 pm

Hi Dixie

Thank you for the stack, I've been plying around with it! Had a look on the iTunes store too. In the stack you can draw with lines, which is great, but not quite what I'm looking for. I need to be able to draw and manipulate shapes such as a rectangle and oval. In Unity I could instantiate an object, like a cube by adding code to a GUI button and then code what I wanted to do with the resulting cube, move, scale, rotate etc. So essentially it seems that I need to do the same here but in 2d. I'm just trying to get my head around the logic of LiveCode.

All your code is on the card. How would I have switch cases depending on what button I clicked? Say, draw with a line, like in your example, then draw an oval?

Thanks again

Glebski

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10330
Joined: Wed May 06, 2009 2:28 pm

Re: Migrating from Unity

Post by dunbarx » Fri Nov 02, 2012 7:00 pm

Hi.

Have you used the "choose tool" command in your experiments, or are you just selecting tools and manipulating by hand?

My point is that you are limited, in the IDE, to use one tool at a time. After all, how could you use more? I am actually asking if you are actually "drawing" or are you controlling these gadgets under script control? If under script control, you can do anything you want.

The drawing tools in LC are not CAD, but then again, CAD program objects cannot be completely controlled by scripts. You can probably do all that you need to. Write back...

Craig Newman

Post Reply