User Interaction using "Game Pieces"

8 views
Skip to first unread message

Bill

unread,
Jul 24, 2009, 12:25:20 PM7/24/09
to Processing.js
I would like to create a game where the user interacts with individual
"game pieces" using processingjs.

Is it possible to manage drawn "game pieces" using user interaction
via mouse events: mouseX, mouseY, mouseButton, mousePressed,
mouseReleased, mouseMoved, mouseDragged? If so--could you suggest
steps to create a demo or a tutorial?

Thanks,
Bill

Cary Hull

unread,
Jul 24, 2009, 1:39:17 PM7/24/09
to proces...@googlegroups.com
You can easily do it using the mouse events and location. If the shape
of your game pieces are defined by a polygon just
use the point-in-polygon (google for it) algorithm to check for a hit.

-Cary
--
01100011 01100001 01110010 01111001

Bill

unread,
Jul 27, 2009, 4:48:32 PM7/27/09
to Processing.js
Cary,

Thanks for the suggestions!

Bill
Message has been deleted

Cary Hull

unread,
Aug 3, 2009, 11:05:32 AM8/3/09
to proces...@googlegroups.com


On Mon, Aug 3, 2009 at 7:47 AM, nico tübingen <hidde...@gmail.com> wrote:

Hi, I've made a sketch of an UI using draggable and linkable pieces :
http://vdqv.blogspot.com/2009/07/test-interface.html
The code is presently pretty crappy.

Hmm, but the code itself is obscured. I couldn't find it even with firebug
dom browsing. Got a link just to the code?
 

nico tübingen

unread,
Aug 3, 2009, 12:16:51 PM8/3/09
to Processing.js
I'm gonna clean it first (it's REALLY crappy) and then put it on the
blog.

On 3 août, 17:05, Cary Hull <cary.h...@gmail.com> wrote:

Bill

unread,
Aug 3, 2009, 12:47:17 PM8/3/09
to Processing.js
Nico,

What a great start! Is Dropbox a reliable way to host your
processingjs files? Seems to work great for hosting css files on
Tumblr.

Thanks for the preview,
Bill

nico tübingen

unread,
Aug 3, 2009, 1:08:40 PM8/3/09
to Processing.js
www.hascanvas.com is the coolest, but has limitations (typo)
dropbox allows you more flexible settings

dire...@hyper-metrix.com

unread,
Aug 3, 2009, 3:36:41 PM8/3/09
to proces...@googlegroups.com
Woah nice! :)

Quoting nico tübingen <hidde...@gmail.com>:
>
> Hi, I've made a sketch of an UI using draggable and linkable pieces :
> http://vdqv.blogspot.com/2009/07/test-interface.html
> The code is presently pretty crappy.
>

dire...@hyper-metrix.com

unread,
Aug 3, 2009, 3:40:03 PM8/3/09
to proces...@googlegroups.com
I really like this linking boxes thing, and think it should be usedon
the demos page of Processingjs when you think it's ready. Is that cool
with you?


Quoting Bill <isp...@gmail.com>:
>
> Nico,
>
> What a great start! Is Dropbox a reliable way to host your
> processingjs files? Seems to work great for hosting css files on
> Tumblr.
>
> Thanks for the preview,
> Bill
>
> On Aug 3, 10:16 am, nico tübingen <hiddenc...@gmail.com> wrote:
> > I'm gonna clean it first (it's REALLY crappy) and then put it on the
> > blog.
> >
> > On 3 août, 17:05, Cary Hull <cary.h...@gmail.com> wrote:
> >
> > > On Mon, Aug 3, 2009 at 7:47 AM, nico tübingen
> <hiddenc...@gmail.com> wrote:
> >
> > > > Hi, I've made a sketch of an UI using draggable and linkable pieces :
> > > >http://vdqv.blogspot.com/2009/07/test-interface.html
> > > > The code is presently pretty crappy.
> >
> > > Hmm, but the code itself is obscured. I couldn't find it even
> with firebug
> > > dom browsing. Got a link just to the code?
> >

Cary Hull

unread,
Aug 3, 2009, 3:53:29 PM8/3/09
to proces...@googlegroups.com
On Mon, Aug 3, 2009 at 9:16 AM, nico tübingen <hidde...@gmail.com> wrote:

I'm gonna clean it first (it's REALLY crappy) and then put it on the
blog.

Why not just post the direct link?
http://files.getdropbox.com/u/1604565/interface.html

No need to be self conscious about the code. It works, it proves a concept and can be improved later.
 

nico tübingen

unread,
Aug 3, 2009, 3:53:45 PM8/3/09
to Processing.js
Yep, no problems
Reply all
Reply to author
Forward
0 new messages