This Week in Science

Friday, December 24, 2010

If writing code had a mile high club....

I would be ruler supreme.

I actually wrote this post while writing code in the plane. yay me.

I am pasting:
5-ish -- Update: so, you know how I said that I may do things out of order? Go figure, I did.  So I did a fair share of work on my WAV Player.  It is almost back to running how I liked it back when it was built into my wall-E costume.

So! now I am working on the multiplayer sandbox thingy-majigger because I can't work on hardware in a plane.  Thats right, 5 in the AM and I'm working, on a plane. 

So, what pray tell am I working on? Simple! granting objects click and drag capabilities on the sandbox for things like cards, tiles, character markers, etc.  anything you can wag your pretty little cursor at....why do people get first class from DC to Boston...flight attendant has snack in a wicker basket....great now I'm hungry.  To Work!

a little after the ish: as I mentioned the WAV Player is in sorta working, so its what I'm listening to.  'She Blinded Me With Science' is playing.  I swear if I find a girl willing to have this as our wedding song, I will drop on my knee on the spot(must be sincere and appreciate it!!).
and what do I get? a small bag of granola/raisens served on a cheap plastic black tray....i hate raisens...oh and water, good thing I got my coffee fix in the terminal.
ands its snowing in Boston, not that I've landed, but still...landing in snow...FUN! now back to work.

time to stow the laptop.  I can now click and drag objects.  No snapping though :-/ bummer

:end paste

enjoy the play by play? yeah me neither.

So, what did I do?

simple.  a move-able object is actually a canvas of sorts.  You can add images, other components (like buttons or options or life counters...whatever), or make it your own thing, I really don't care.  This may seem a simple task, but it takes some grief, especially since I don't have internet *twitch* . 

There are 2 important things involved to make an object move by click and drag (snap will be added on the flight home because I should be spending time with the family....don't question the fact that they are upstairs doing something and I am in the basement writing this and playing a game... )
>.>
<.<
...
>.<

Those two things are a mouse listener and a mouse motion listener.
Mouse Listener: This bugger deals with mouse actions, click, press, release (a few others but these three are the only relevant ones)

MouseMotionListener: This guy here deals with moving and dragging of the mouse.  Whats the difference? you'll see.

So you just add these to an object and your done right?

.
.
.

yeah actually....but the hard part comes into play when you want to move an object to another object, like ownership of a card or a tile the character marker is on, stuff like that.

its a short flight, cut me some slack.

on the plane in the dead of morning, thought I saw something scary
I did, it was my code >.<

(was the only one with a light on)
:-D

Tuesday, December 21, 2010

001 - GOTO 1

So, I was told by a...reliable...source that starting a blog would be conducive to my fun gizmos and thinger-ma-bobs and what not that I do and make.  So, this is really a test post so I can play with the website and make it look aesthetically pleasing to me!

I will be making posts on separate pages as updates/new projects are made.  This being sad...i am a good few projects behind. SO!  I will be posting, in this order or any order I feel like, it is my blog after all:
-Door welcomer (its sorta been shifted to 'legacy' at this point.  Now I have an apartment and disposable income I may revitalize it!!!)
-WavPlayer (many have seen it! few have used it!)
-MultiBox (this has been scrapped and started a score of times hopefully this release will stay alive)
-Glove (potential name - Maestro)

and finally, I do a fair share of theory stuff in my spare time.  So I will be posting my thoughts here as well.  Most of this stuff is really going to be stream of conciousness, so if your bored or reallllly into this sorta thing, then read it! give me feedback!