Created
June 20, 2011 21:41
-
-
Save lonnen/1036651 to your computer and use it in GitHub Desktop.
#Processing irc partial log from 04 - 25 - 11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The topic for #processing is: P5 - processing.org - [Algorithmic Art] / [Generative Art] / [Art from Code] / [Design Interfaces] (10:21:20 AM) | |
cardamon [~mute@wn-0-22-43-57-13-41.wifi.gsu.edu] entered the room. (10:23:15 AM) | |
atrowbri left the room (quit: Quit: atrowbri). (10:24:18 AM) | |
10:32:49 AM abielins: \o | |
10:33:20 AM lonnen: clever | |
10:33:32 AM lonnen: aberry: just throw out the questions | |
10:33:40 AM lonnen: er.. abielins just throw out the question | |
10:33:55 AM aberry: OK | |
10:34:46 AM abielins: lonnen: What is the air speed velocity of an unladen swallow? | |
10:34:49 AM aberry: how can i get my manager to let me work on processing projects at my day job? :D | |
10:35:05 AM abielins: aberry: Tell him it's java | |
10:35:15 AM lonnen: they love java | |
10:35:20 AM Pomax: tell him you need a data visualisation front end | |
10:35:33 AM aberry: african or european? | |
10:35:45 AM medecau: if it is for personal projects don't even bother | |
10:35:58 AM hodapp: don't even bother? DON'T EVEN BOTHER? | |
10:36:05 AM hodapp: yeah, let's just stomp on his hopes and dreams. | |
10:36:11 AM Pomax: that certainly got everyone's attention O_o | |
10:36:17 AM Pomax: laudum to aberry | |
10:36:30 AM aberry: am not holding my breath. heh. | |
10:36:53 AM medecau: whatever he does on company hours belongs to the company, be it shit or the next monalisa | |
10:37:07 AM Pomax: depends on where he lives | |
10:37:34 AM medecau: in china it belongs to the government that is right | |
10:37:35 AM Pomax: and works. not everyone believes in the weird idea that you can "steal" time. | |
10:37:46 AM hodapp: *steals several seconds from Pomax * | |
10:37:52 AM aberry: 94105. it all belongs to the company. including this chat i guess. | |
10:38:21 AM medecau: one cannot reproduce his words without breaking the law | |
m00bles [~Pomax@d64-180-147-132.bchsia.telus.net] entered the room. (10:39:01 AM) | |
10:39:16 AM m00bles: it is fascinating how resetting network device #2, which goes from this machine to my workstation, also resets this machine's device #1, which goes to the router. | |
10:39:24 AM m00bles: or perhaps by fascinating I should say "really effing annoying" | |
Pomax left the room (quit: Disconnected by services). (10:39:42 AM) | |
m00bles is now known as Pomax (10:39:46 AM) | |
10:40:48 AM lonnen: abielins: http://www.wolframalpha.com/input/?i=What+is+the+air+speed+velocity+of+an+unladen+swallow%3F | |
10:41:28 AM Pomax: to answer aberry properlt though: the only way you can really make it happen is my somehow convincing your manager that Processing is cool, and that he thinks so because that's what he himself discovered. | |
10:41:45 AM Pomax: if you want it done right, you're basically going to have to apply propaganda theory | |
10:43:58 AM lonnen: or by starting your own shop, but I suspect that will be a good deal of administrative overhead | |
10:44:10 AM Pomax: that's not really convincing the manager | |
10:44:14 AM Pomax: that's replacing him =) | |
10:45:14 AM aberry: :-) | |
10:45:22 AM aberry: thanks for the thorough answers. | |
10:46:07 AM lonnen: then I'll answer the question with mu | |
medecau left the room. (10:46:13 AM) | |
10:46:15 AM lonnen: :) | |
medecau [~medecau@a95-92-40-18.cpe.netcabo.pt] entered the room. (10:46:19 AM) | |
10:47:02 AM Pomax: that's kind of insulting mu ;) | |
10:51:36 AM lonnen: its certainly frustrating | |
10:51:40 AM lonnen: meeting time! | |
You are now known as lonnen|mtg (10:51:51 AM) | |
10:57:24 AM medecau: anyone here familiar with controlP5 library? | |
sendark [~dvillanue@cpc6-dals16-2-0-cust109.hari.cable.virginmedia.com] entered the room. (11:00:20 AM) | |
11:02:37 AM Pomax: no I, I'm afraid. | |
sendark left the room (quit: Client Quit). (11:04:14 AM) | |
sol0 [~quassel@117.211.88.42] entered the room. (11:07:23 AM) | |
11:08:28 AM abielins: controlP5 looks pretty nifty | |
11:10:58 AM medecau: that's why I'm thinking of using it | |
11:11:01 AM medecau: :) | |
11:11:41 AM abielins: Is it normal for a processing library to include other libraries? | |
yeshuah [~Adium@75.221.95.255] entered the room. (11:15:14 AM) | |
11:15:26 AM Pomax: it is normal for a processing library to import java libraries. | |
11:15:32 AM sol0: hey.. gsoc mentors reply please!! | |
11:15:50 AM Pomax: and there are some processing libraries that require other processing libraries to have also been loaded. | |
11:22:25 AM abielins: Thanks | |
11:22:50 AM abielins: and sol0: Gsoc announce is in 40 minutes, calm down ;) | |
11:23:58 AM aberry: what means gsoc? | |
11:25:04 AM abielins: aberry: Google Summer of Code | |
11:25:04 AM lonnen|mtg: google summer of code | |
11:25:27 AM aberry: ahh tyvm | |
11:25:42 AM abielins: It's a neat initiative by Google where they pay students to work on open source projects. Processing was one you coudl apply for. | |
11:28:00 AM aberry: maybe i can get my work to send me to school, then apply for GSOC to work on processing. ;-) | |
11:28:16 AM abielins: aberry: What do you do at work? | |
11:28:32 AM aberry: web production | |
11:28:50 AM abielins: So just use Processing.js | |
11:29:03 AM abielins: It's almost the same | |
11:29:40 AM aberry: looked at that and shared with team. maybe someday | |
marco_ [~marco@5e049068.bb.sky.com] entered the room. (11:34:19 AM) | |
11:36:04 AM Pomax: plus, you get to report any inequalities which then get fixed | |
11:39:10 AM aberry: inequalities? like bug reports you mean? | |
11:39:51 AM lonnen|mtg: if you find something that doesn't work in p.js that works in p5, p.js is pretty responsive about fixing it | |
yeshuah left the room (quit: Quit: Leaving.). (11:40:58 AM) | |
11:41:39 AM aberry: ah, inequalities. i get it. | |
yeshuah [~Adium@75.221.95.255] entered the room. (11:48:25 AM) | |
12:07:23 PM sol0: please tell me if i'm in for gsoc!!! | |
12:07:29 PM sol0: email is getting late | |
12:07:36 PM sol0: and i'm geeting on nurves | |
mrflick [~mrflick@c-68-42-79-167.hsd1.mi.comcast.net] entered the room. (12:08:53 PM) | |
sol0 left the room (quit: Ping timeout: 260 seconds). (12:21:35 PM) | |
notmasteryet [~notmaster@ip68-12-128-49.ok.ok.cox.net] entered the room. (12:35:04 PM) | |
sol0 [~quassel@117.211.88.42] entered the room. (12:39:55 PM) | |
12:44:42 PM abielins: so, sol0? | |
12:44:52 PM lonnen|mtg: sol0: I know you're nervous, but I don't think anyone in the channel can answer | |
You are now known as lonnen|busy (12:45:09 PM) | |
12:45:45 PM abielins: Harshani Nawarathna and Peter Kalauskas got the Processing spots | |
harshanianu [6fdf80a1@gateway/web/freenode/ip.111.223.128.161] entered the room. (12:51:55 PM) | |
mrflick left the room (quit: Quit: mrflick). (12:53:45 PM) | |
BlueThen [BlueThen@68-184-245-251.dhcp.stls.mo.charter.com] entered the room. (1:02:57 PM) | |
sol0 left the room (quit: Remote host closed the connection). (1:08:03 PM) | |
1:09:34 PM abielins: I guess sol0 didn't take that well :( | |
1:13:52 PM cardamon: abielins: You're following my crappy repos? | |
1:29:56 PM abielins: Yeah! | |
1:29:58 PM abielins: Why not? | |
1:30:07 PM abielins: I don't know many people into processing | |
1:33:34 PM cardamon: Hah. | |
1:41:03 PM harshanianu: join #gsoc-lk | |
harshanianu left the room (quit: Quit: Page closed). (1:41:36 PM) | |
1:44:41 PM Pomax: was... that spam? | |
1:45:35 PM lonnen|busy: that was one of the gsoc Processing people | |
1:45:47 PM lonnen|busy: but technically, yes, probably | |
2:06:41 PM abielins: lol | |
2:36:11 PM marco_: hi | |
2:37:15 PM aberry: hello | |
2:39:04 PM marco_: i dont understand what this.x is used for in processing | |
2:39:25 PM marco_: for example this is something i got from a player class but i have no idea what it is | |
2:39:27 PM marco_: Player (int x) | |
2:39:27 PM marco_: { | |
2:39:27 PM marco_: this.x = x; | |
2:39:27 PM marco_: } | |
2:39:27 PM marco_: | |
2:40:42 PM abielins: marco_: it has to do with object oriented programming | |
2:41:00 PM marco_: i know what object oriented programming is but it still doesnt make sense | |
2:41:03 PM marco_: to me anyway | |
2:41:13 PM marco_: i mean if you had void display () { in a class | |
2:41:26 PM marco_: then you would do player.display() in draw right | |
2:41:39 PM marco_: how does that got to do with this.x?? | |
2:41:45 PM marco_: what exactly is 'this' | |
2:44:14 PM Pomax: it refers to the object that you're calling the method/contructor for | |
2:44:39 PM marco_: i dont think i understand pomax | |
2:46:04 PM abielins: marco_: Player has an internal int variable called x, right? | |
2:46:07 PM Pomax: by calling "new Player(5)", you are saying "make a new Player object, with an int argument '5', referred to as 'x'" then in the method body, it says "there is a variable name collision, because the Player class has an 'x' and the method has an 'x'. Which 'x' do I use for what? this.x = x" which means "this Player object's 'x' should get the value that this method's 'x' has" | |
2:48:22 PM marco_: ahh i think i understand | |
2:48:54 PM marco_: so this.x is referring to the method's x and making it equal to x which is the Player class's x? | |
2:49:23 PM abielins: yes | |
2:49:40 PM Pomax: no | |
2:49:45 PM marco_: Player (int x) | |
2:49:45 PM marco_: { | |
2:49:45 PM marco_: this.x = x; | |
2:49:45 PM marco_: } | |
2:49:47 PM Pomax: the other way wround. | |
2:49:50 PM Pomax: *around | |
2:50:02 PM Pomax: this, in java and thus also in Processing, always refers to the object's things | |
2:50:23 PM marco_: riight | |
2:50:27 PM Pomax: so "this.x" is the Player object's "x", while "x" is the method argument | |
2:50:46 PM marco_: oh right, that's kinda confusing | |
2:50:55 PM Pomax: not really, but IRC is not ideal to explain | |
2:51:07 PM marco_: what would be the point of the example i've given above though, there are no values just int x? | |
2:51:19 PM Pomax: Look at it using some code: class Number { int num = 0; public void add(int num) { this.num = num; } int getNum() { return num; }} | |
2:51:31 PM Pomax: first we build a number: Number n = new Number(); | |
2:51:43 PM Pomax: this object has a variable in it called "num", which has value 0. | |
MikhX left the room (quit: Quit: MikhX). (2:51:48 PM) | |
2:51:48 PM abielins: Pomax: oh, thanks. My bad. | |
2:52:00 PM Pomax: the we add some number: n.add(10); | |
2:52:29 PM Pomax: the method body says "this.num = num", which is my mistake, that should have said "this.num += num" | |
2:52:54 PM marco_: okay hold on let me copy pasta cos its confusing all in one line | |
2:53:03 PM Pomax: with that correction, that line says "add the value 'num', which is the method's argument, to this object's variable that's called "num" | |
2:55:42 PM marco_: n.add(10) where do you get the n from? | |
2:58:34 PM Pomax: marco, http://pastebin.com/UVaY7exn | |
foocraft left the room (quit: Ping timeout: 240 seconds). (2:58:45 PM) | |
3:00:35 PM Pomax: and with some code that uses this class: http://pastebin.com/kTZP9Nm5 | |
3:00:41 PM marco_: Pomax: thanks man! | |
3:01:42 PM Pomax: "this" always refers to "the object that you're doing something with, right now" | |
3:02:07 PM aberry: laudum to Pomax ;-) | |
3:02:31 PM Pomax: it's essential for dealing with name-clashes | |
3:05:16 PM marco_: Yeah, thanks a lot dude you're a legend =] | |
3:05:30 PM marco_: i've got loads of work ahead of me im probably gonna pull an all nighter | |
foocraft [~dsc@dyn-86-36-41-74.wv.qatar.cmu.edu] entered the room. (3:11:16 PM) | |
Metroknow [~Adium@c-98-246-18-25.hsd1.or.comcast.net] entered the room. (3:11:51 PM) | |
3:11:51 PM Pomax: hth | |
medecau left the room (quit: Quit: medecau). (3:13:23 PM) | |
Metroknow left the room (quit: Client Quit). (3:13:33 PM) | |
3:46:22 PM marco_: Hey guys i need some help with some codeeee | |
3:46:26 PM marco_: anyone still here? | |
3:46:45 PM aberry: im here but suck at coding | |
3:47:43 PM marco_: i've got a Player class and im trying to move it left and right to make a space invaders game | |
3:47:52 PM marco_: im using keyPressed but its not really working | |
3:47:55 PM marco_: http://pastebin.com/phVUvidK | |
3:48:06 PM marco_: am i going about it the right way? | |
3:48:12 PM Pomax: let me look | |
3:48:15 PM marco_: thanks | |
3:49:07 PM aberry: those keypressed functions look strange to me, but that is an uneducated view | |
3:49:12 PM Pomax: keyPressed is sketch-level, so you will need to call your player's keyPressed in the sketch, too | |
3:49:53 PM marco_: what does sketch-level mean? | |
3:49:55 PM aberry: so they go in the void display? | |
3:50:00 PM Pomax: no | |
3:50:02 PM marco_: in draw? | |
3:50:05 PM Pomax: hang on, finishing up a meeting | |
3:50:11 PM marco_: ok | |
3:50:38 PM aberry: i have yet to try this class based approach to processing | |
3:50:49 PM aberry: am still doing the basics | |
3:50:55 PM Pomax: alright, done. | |
3:51:10 PM Pomax: the idea is as follows: Processing offers keyhandling already, for your convenience. | |
3:51:19 PM Pomax: so if you have a class with it's own key handling, we do the following. | |
3:51:56 PM Pomax: in your sketch: Player pl; void setup() {... pl = new Player(); } void draw() { ...} void keyPressed() { pl.keyPressed(key,keyCode); } | |
3:52:32 PM Pomax: and in your player class, you have a method "void keyPressed(char key, int keyCode) {...}" which does the player-specific handling | |
3:52:41 PM Pomax: so you're halfway there: you already have the key handling | |
3:53:35 PM marco_: so all i need to do is add void keyPressed() { player.keyPressed(key,keyCode);} ? what goes in (key,keyCode)? | |
3:53:37 PM Pomax: now you just need to make sure that the sketch's "master" key handling methods call your player's key handling methods | |
3:53:58 PM marco_: the sketch's master key handling? im a bit lostt | |
3:54:05 PM Pomax: Processing offers some "global" values for use in sketches, such as "width" and "frameRate", etc. | |
3:54:12 PM marco_: oh yeah | |
3:54:22 PM Pomax: "key" and "keyCode" are also globals, however, they're only really "safe" to use inside keyhandling methods | |
3:55:05 PM Pomax: the general java practice of "if your method relies on something, pass it as arguments" always applies, | |
3:55:21 PM Pomax: so even though they're globals, it's a good thing to use them as globals ONLY at the global level. | |
3:55:36 PM Pomax: so you give your Player class a keyPressed(char key, int keyCode), and pass the values explicitly | |
3:56:40 PM Pomax: (it's not "wrong" to keep using them as globals, so it won't break if you keep it the way it is now, but it will make things a little bit harder to trace bugs once you run into them) | |
3:58:07 PM marco_: im really confused so in Player class i do void keyPressed(char key, int keyCode) {...} and then in the sketch i type player.keyPressed(37) :S | |
3:59:19 PM Pomax: first things first: you know that Processing sketches consist of the global sketch code, to which you can add your own class definitions? | |
4:00:41 PM marco_: i can't say i do nooo | |
4:00:58 PM marco_: either i dont know or i dont know what exactly you're referring to when you say global sketch code | |
4:01:38 PM marco_: im thinking global variables thats all i've learnt with the word global | |
4:03:57 PM Pomax: http://pastebin.com/A7Fb4azS | |
4:04:08 PM Pomax: here's what you wanted to have happen =) | |
4:04:20 PM Pomax: there's the "main" code, which is where everything Processing-ish happens. | |
4:04:33 PM Pomax: there's the setup() method, the draw() method, and the master keyPressed method. | |
4:04:47 PM Pomax: note that in setup, we build a Player object. | |
4:05:23 PM Pomax: now, whenever a key is pressed, the master keyPressed method is invoked. | |
Metroknow [~Adium@c-98-246-18-25.hsd1.or.comcast.net] entered the room. (4:05:50 PM) | |
4:05:56 PM Pomax: when it is, there will be two global variables available to us: "key" (representing the actual key pressed) and keyCode (representing a special code, since not all keys are letters) | |
4:06:44 PM Pomax: in order to make the Player object do something, this master "keyPressed" method basically hands off the values to our player object, going "you take care of it" by calling Player's "keyPressed(char key, int keyCode)" method. | |
4:07:35 PM Pomax: because the Player knows what keyinputs are supposed to mean, it gets to decide what to do (in the case of this pastebin, 'a' moves the player left, and 'd' moves it right, by manipulating the player's "x" value) | |
4:08:44 PM Pomax: And in this specific pastebin, rather than running at 60fps without anything really happening most of the time, animation has been turned off using "noLoop", and a redraw is requested everytime keyPressed is triggered, after telling the player object to do whatever it does on keypress events. | |
4:09:53 PM marco_: ahh right, is that so it runs smoother without using so much memory | |
4:10:35 PM marco_: why do we need this master keyPressed what happens if it isn't there doesn't the keyPressed in the player class do anything? | |
4:12:33 PM marco_: also with (char key, int keyCode) do we need to have both or would the method choose just one? | |
4:12:42 PM marco_: i could have keyPressed (37) can't I? | |
4:12:49 PM marco_: that would be the left arrow key | |
4:16:05 PM marco_: okay i think i understand i didn't realise key and keyCode were inbuilt processing things | |
4:16:42 PM marco_: the Player isn't moving though | |
4:16:43 PM marco_: oddly | |
4:17:34 PM marco_: oh wait it is | |
4:17:40 PM marco_: i had to change key to keyCode i get it now | |
4:17:41 PM marco_: :) | |
4:17:46 PM marco_: thanks dude! | |
4:22:40 PM Pomax: As for the "why do we need this master keyPressed", the answer is "because this is Processing, and Processing has a master key event handler" =) | |
4:23:12 PM Pomax: all interaction has master handlers at the sketch level. If you want it handler in some specific object, you are responsible for making that happen. | |
4:23:28 PM marco_: ahh okay =] haha | |
4:23:38 PM Pomax: remember, "key" represents "the actual letter that was pressed" | |
4:24:05 PM Pomax: works great for 'a', but when you press ← there is no letter that shows up, so there is no "key" | |
4:24:08 PM Pomax: only a key code | |
4:24:34 PM Pomax: (and the same holds for keys such as enter, home, shift, etc) | |
4:25:04 PM marco_: yeah | |
4:25:30 PM marco_: I would like to constrain the Player to the window's width can i constrain() the x position? | |
4:25:45 PM Pomax: you most certainly can. | |
cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] entered the room. (4:25:52 PM) | |
4:25:55 PM marco_: where would that go anywhere in the class right? | |
4:26:18 PM Pomax: if(x<0) { x=0; } elseif (x+playerWidth>width) { x = width-playerWidth; } | |
4:26:29 PM Pomax: as a post-correction after changing the 'x' value | |
4:26:48 PM Pomax: or, alternatively, you can check whether changing 'x' will violate those contrains, and not even change the value if it will | |
4:26:51 PM marco_: ahh i see so i dont need the constrain () function | |
4:27:30 PM Pomax: no, but here's the thing: it's good object oriented design to write one. | |
4:28:14 PM Pomax: keyPressed(char key, int keyCode) { if(key==37) { moveLeft(); } else if(key==39) { moveRight(); } constrainPosition(); } | |
4:28:27 PM Pomax: void moveLeft() { x += horizontal_step; } | |
4:28:31 PM Pomax: void moveRight() { x -= horizontal_step; } | |
4:28:50 PM Pomax: void constrainPosition() { if(x<0) { x=0; } elseif (x+playerWidth>width) { x = width-playerWidth; }} | |
4:30:39 PM marco_: i've typed | |
4:30:39 PM marco_: if (x<0) {x=0;} elseif (x+playerWidth>width) {x=width-playerWidth;} | |
4:30:39 PM marco_: in the Player class but it gives me 'expecting RCURLY, found 'if'' | |
4:31:08 PM Pomax: aye, look closely at that "elseif" | |
4:31:15 PM Pomax: then ask yourself "does elseif exist in java" | |
4:31:31 PM Pomax: it doesn't. | |
4:31:31 PM marco_: can i use || | |
4:31:35 PM Pomax: if() {} else if {} | |
4:32:17 PM Pomax: (elseif is a different language... ) | |
4:33:34 PM Pomax: so it's actually: void constrainPosition() { if(x<0) { x=0; } else if (x+playerWidth>width) { x = width-playerWidth; }} | |
4:34:59 PM marco_: do i need to write a new method? | |
4:35:06 PM marco_: constrainPosition()? | |
4:35:40 PM Pomax: I would recommend that | |
yeshuah left the room (quit: Quit: Leaving.). (4:36:26 PM) | |
4:37:12 PM marco_: ahh okay | |
4:38:53 PM marco_: yup its working great! kinda jiggles a bit when it reaches either side of the window but its fine :) | |
4:40:43 PM marco_: and now for the bullet class *sigh* :( | |
4:42:35 PM Pomax: if your step is greater than 1 pixel, the only way to ensure it doesn't jitter at the edges is to size the sketch so that it's a multiple of your playerWidth/playerHeight | |
4:43:17 PM marco_: ahh, thanks, didn't know that! =] | |
4:52:15 PM marco_: Pomax: Reallly sorry for bugging you but how do i go about creating the Bullet class? How can I tell processing where to shoot a bullet relative to the player's position etc? I feel bad for pushing it - you've helped a lot already | |
4:52:58 PM marco_: maybe if you could just hint the first step i could try and figure it out maybe | |
4:54:26 PM aberry: "You are defeated. Instead of shooting where I was, you should have shot where I was going to be. Muahahahaha! " | |
4:55:12 PM Pomax: make the Player responsible for shooting. | |
4:55:26 PM Pomax: class Bullet {...} | |
4:55:51 PM Pomax: and somewhere in player: "Bullet shoot() { return new Bullet(x,y); } | |
4:56:10 PM Pomax: your bullet class now needs your decision on how you're going to deal with bullet trajectories. | |
4:56:40 PM Pomax: frame based (easy, synchronised on frame updates) or time-dependent impulse based (harder, framerate independent) | |
4:57:10 PM marco_: probably frame based so y-=3 or something | |
4:57:20 PM Pomax: if the first, you're looking at storing a list of all Bullets that exist, and at the beginning of every call to draw(), moving them "forward" | |
4:58:47 PM marco_: do i need an array of bullets | |
5:00:12 PM Pomax: you will most definitely need to build an array of bullets | |
5:00:17 PM Pomax: or an arraylist | |
5:00:29 PM Pomax: you will also now make a choice on how to deal with tracking bullets. | |
5:00:51 PM Pomax: instead of blindly passing keypressed events to your player, you may in fact want all the logic in your sketch | |
5:01:30 PM Pomax: so that the master keyPressed does "keyPressed() { if(key==37) { player.moveLeft(); } else if /* right*/ else if (key==pewpew) { bullets.add(player.shoot()); }} | |
5:01:56 PM marco_: lool | |
5:01:59 PM Pomax: with an ArrayList<Bullet> bullets = new ArrayList<Bullet>(); at the top of your sketch | |
5:02:23 PM marco_: yeh | |
5:02:51 PM marco_: i'll try it outt i guess | |
5:02:55 PM marco_: seems really complicated! | |
5:03:13 PM Pomax: getting things right is much harder than messing things up =P | |
5:03:22 PM marco_: yup! | |
5:03:55 PM aberry: i want to play this space invaders game when its ready! :-) | |
5:04:21 PM marco_: Haha, i'll definitely put it up online as soon as it is :) | |
5:05:29 PM aberry: compare to my lame pac man code as i follow the tutorials in the book: http://alexberry.me | |
5:06:19 PM Pomax: wakka. | |
5:06:24 PM aberry: lol | |
5:07:39 PM marco_: lol, pretty cool! | |
5:07:59 PM marco_: i hate working with radians in processingg | |
5:08:10 PM aberry: i was proud to figure out how to make it chomp on my own | |
5:08:35 PM Pomax: marco, welcome to trigonometry. | |
5:08:47 PM Pomax: time to remember your sohcahtoa | |
5:09:14 PM Pomax: (also time to read up on "RT" or rotation-translation transforms ;) | |
5:10:14 PM marco_: ooh i think i've done some translation | |
5:10:19 PM marco_: with push and pop matrix etc | |
5:10:28 PM marco_: that's pretty funn | |
5:11:33 PM Pomax: aye, but it's also a good idea to understand 2D tranforms yourself | |
5:12:09 PM Pomax: although I doubt you'll run into that immediately in your space invaders game =) | |
davidnunez [~davidnune@209-6-45-76.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com] entered the room. (5:12:17 PM) | |
5:12:22 PM marco_: hope not! | |
5:13:06 PM Pomax: that would be erring on the side of silly =) | |
5:13:36 PM Pomax: understanding all the 2D stuff people worked on during the start of computer games is really helpful, even if you don't immediately put it to practice | |
5:14:13 PM Pomax: at least you learn about all the things lots of people before you had to learn. saves you reinventing enough wheels to outfit a semi-truck, with several spares =) | |
yeshuah [~Adium@141.sub-72-100-194.myvzw.com] entered the room. (5:15:50 PM) | |
5:16:34 PM marco_: lool thats true | |
5:17:48 PM aberry: reminds me of a video i watched recently of the guy who invented pitfall talking about his work on that back in the day | |
5:19:04 PM aberry: and here it is http://www.gamespot.com/wii/action/pitfallthebigadventure/video/6302614 | |
atrowbri [~atrowbri@2908.artic.edu] entered the room. (5:24:14 PM) | |
cardamon left the room (quit: Ping timeout: 240 seconds). (5:37:31 PM) | |
cafesofie left the room (quit: Remote host closed the connection). (5:48:10 PM) | |
cardamon [~mute@64.134.60.14] entered the room. (5:49:45 PM) | |
cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] entered the room. (5:50:16 PM) | |
5:52:02 PM marco_: Pomax: I've made a bit of a mess it says Cannot invoke keyPressed(char,int) on the array type | |
5:52:28 PM aberry: gtg. good luck marco. maybe see you later or tomorrow. | |
aberry left the room. (5:52:30 PM) | |
cardamon left the room (quit: Ping timeout: 264 seconds). (5:54:44 PM) | |
6:01:07 PM Pomax: marco_, that makes sense | |
6:01:15 PM Pomax: you can only invoke it on a Player object | |
6:01:39 PM Pomax: so players.get(0).keyPressed(key,keyCode), or players[0].keyPressed(key,keyCode), etc. | |
6:02:29 PM marco_: ahh kk | |
6:02:47 PM marco_: okay i've managed to get a bullet to shoot from the middle every time i click | |
6:02:54 PM marco_: but not from the players position lol | |
6:04:27 PM marco_: also whenever i click again it resets the bullet to the starting point ahhhh | |
6:05:00 PM Pomax: then you are not building new Bullets with every click. | |
6:07:35 PM marco_: okay i've got that sorted | |
6:07:45 PM marco_: i just need to poistion it at the player's x value | |
6:14:59 PM Pomax: http://pastebin.com/W0yuD1TT | |
cardamon [~mute@c-66-56-9-77.hsd1.ga.comcast.net] entered the room. (6:16:05 PM) | |
6:16:43 PM Pomax: that for(Shot s: shots) is actually deficient. It should be for(int s=shots.size()-1; s>=0; s--) { if(shots.get(s).update()) shots.remove(s); else shots.get(s).draw(); } | |
6:16:57 PM Pomax: because otherwise shots that have left the screen are never cleaned up | |
6:18:49 PM Pomax: so more http://pastebin.com/gM8aN49H | |
yeshuah left the room (quit: Quit: Leaving.). (6:24:09 PM) | |
6:25:14 PM marco_: im sorry im supperr confusedd! This is what I have so farr | |
6:25:14 PM marco_: http://pastebin.com/8x9gGHLa | |
6:26:23 PM marco_: i know i shuoldnt have initalised the x and y in the bullet class as hard-coded values but i dont know what else to putt | |
6:37:07 PM Pomax: modification of your code: | |
6:37:08 PM Pomax: http://pastebin.com/kRgmbz3A | |
6:37:21 PM Pomax: 1) make the Player responsible for bullets, because the Player object knows its own location | |
6:37:46 PM Pomax: 2) don't use a fixed array, use an arraylist, because you don't have a fixed number of bullets. | |
6:38:02 PM Pomax: 3) not put in by me, but should be there: make sure to remove bullets that are off the screen) | |
6:38:53 PM Pomax: 4) not put in by me, but should be there: call constrainPosition after you move, not after you display. | |
6:39:21 PM Pomax: so every time player.x is modified, you want to make sure constrainPosition gets called | |
6:40:17 PM marco_: Oh yeah thats true about the constrain, thanks! reading noww one sec | |
6:41:17 PM Pomax: and should you want to take it further (full keyboard input with persistent triggers), http://pastebin.com/gM8aN49H will give you an indication on how to achieve that. | |
6:47:16 PM Pomax: I must head out, good luck on the rest of your programming adventure =) | |
atrowbri left the room (quit: Quit: atrowbri). (6:47:25 PM) | |
6:47:40 PM marco_: Hey thanks man! Dude, I really appreciate your help I hope to see you around again soon! | |
6:47:51 PM marco_: :) | |
6:48:00 PM Pomax: np, I'm pretty much in here 24/7 | |
6:48:06 PM Pomax: though not necessarily "here" ;) | |
6:48:23 PM marco_: haha, good I will hopefully have done everything by the time you come back next | |
6:48:29 PM marco_: so i could show you the game | |
6:48:34 PM marco_: I'll see you around ! =] | |
mrflick [~mrflick@c-68-42-79-167.hsd1.mi.comcast.net] entered the room. (7:14:50 PM) | |
atrowbri [~atrowbri@c-24-14-52-222.hsd1.il.comcast.net] entered the room. (7:35:28 PM) | |
mrflick left the room (quit: Quit: mrflick). (7:43:17 PM) | |
7:45:18 PM cardamon: Asteroids or Space Invaders? | |
7:45:26 PM marco_: Asteroids :P | |
7:45:29 PM marco_: well | |
7:45:30 PM marco_: i think | |
7:45:31 PM cardamon: Me too. | |
7:45:36 PM marco_: its basically space invaders but asteroids | |
7:45:36 PM marco_: kidna | |
7:45:40 PM cardamon: >_> | |
7:45:47 PM cardamon: Two different games. | |
7:45:58 PM marco_: okay its a spacecraft shooting at asteroids | |
7:46:19 PM marco_: but the asteroids come at the space craft and only shoot up | |
7:46:33 PM cardamon: That's space invaders. | |
7:47:10 PM marco_: oh | |
7:47:10 PM marco_: lol | |
7:47:26 PM cardamon: I ran into a problem with mine. Trying to get a keyListener to work. The fact that I'm trying to get it to work within Javadoesn't help. | |
You have disconnected (7:47:37 PM) | |
You have connected (9:22:06 AM) | |
The topic for #processing is: P5 - processing.org - [Algorithmic Art] / [Generative Art] / [Art from Code] / [Design Interfaces] (9:22:06 AM) | |
9:22:32 AM aberry: program some time for sleep ;-) | |
9:23:16 AM marco_: lol yh | |
9:23:16 AM marco_: =p | |
rodinal [~rodinal@79.202.110.129] entered the room. (9:37:46 AM) | |
rodinal left the room (quit: Client Quit). (9:38:22 AM) | |
Marco_ left the room (quit: Read error: Operation timed out). (10:07:36 AM) | |
cardamon [~mute@wn-0-22-43-57-13-41.wifi.gsu.edu] entered the room. (10:17:04 AM) | |
10:21:48 AM Pomax: looks like you didn't quite pick up on what my earlier pastes "taught" you ;) | |
10:22:01 AM Pomax: also, the dot notation is general java. | |
10:22:14 AM Pomax: Object.something means "something, belonging to Object" | |
10:22:30 AM Pomax: that something can be a variable, a method or even an internal class. | |
10:23:45 AM aberry: @Pomax are you talking to Marco? are there paste URLs we could see too? :-) | |
10:24:04 AM aberry: am following your teachings too... | |
10:24:30 AM Pomax: I gave him http://pastebin.com/gM8aN49H yesterday | |
10:25:06 AM Pomax: and explained why not to use a fixed size array, and that shots should beare removed once they're out of the screen. | |
10:25:10 AM Pomax: *should be removed | |
cardamon left the room (quit: Ping timeout: 240 seconds). (10:26:41 AM) | |
10:27:25 AM aberry: cool. are you looking at Marco's project somewhere too? | |
10:28:09 AM Pomax: no, I am reading the talk in this channel, from which it is very obvious he was still using a fixed size array | |
marco_ [~marco@5e049068.bb.sky.com] entered the room. (10:28:18 AM) | |
10:28:28 AM Pomax: and there he is. | |
10:28:32 AM Pomax: hi marco, | |
10:28:35 AM marco_: Hey Pomax! | |
10:28:35 AM marco_: :P | |
10:28:41 AM marco_: nice to see you again | |
10:28:41 AM Pomax: looks like you didn't quite pick up on what my earlier pastes "taught" you ;) | |
10:28:47 AM Pomax: also, the dot notation is general java. | |
10:28:50 AM Pomax: Object.something means "something, belonging to Object" | |
10:28:52 AM Pomax: that something can be a variable, a method or even an internal class. | |
10:29:42 AM marco_: ahh right, that makes life easier! | |
10:29:53 AM marco_: thats awesome | |
10:30:35 AM marco_: So i've managed to get the 'asteroids' to come down | |
10:30:45 AM aberry: marco_ found a youtube to inspire you: http://www.youtube.com/watch?v=LtUkphb_Pbg | |
10:31:05 AM marco_: i just need to have a checkIntersect to if the bullets are intersecting the asteroids | |
10:31:22 AM marco_: it would be fine except the bullets are rectangle and the asteroids are ellipses so im kinda confused on hwo to go about that | |
10:31:28 AM marco_: thanks aberry | |
10:31:58 AM aberry: wait you are making asteroids not space invaders. heh. my bad | |
10:32:05 AM Pomax: no he's not. | |
10:32:14 AM Pomax: he's making space invaders. but with asteroids, not invaders | |
10:32:19 AM aberry: ohhhhhhhh | |
10:32:51 AM medecau: marco_ just switch the rect()s to ellipse()s and you are good to go | |
cardamon [~mute@wn-0-22-43-57-13-41.wifi.gsu.edu] entered the room. (10:33:26 AM) | |
10:34:24 AM Pomax: that would be the easiest. | |
10:34:41 AM marco_: lol yup , medecau is there a way to keep the bullets as rectangles? unless i do them as literally lines and have a strokeWeight () | |
10:35:02 AM medecau: of course there is | |
10:35:13 AM medecau: it's just not has straightforward | |
10:58:36 AM marco_: Pomax: i get an error that says 'bullet.x' cannot be resolved or is not a field | |
10:58:40 AM marco_: with this function boolean intersecting = intersect (bullet.x, bullet.y,asteroids.x,asteroids.y,asteroids.r); | |
10:58:41 AM marco_: if (intersecting) { println("intersecting!"); | |
10:58:41 AM marco_: } | |
10:58:41 AM marco_: | |
11:00:04 AM marco_: i tried doing Bullet.x and it says | |
11:00:23 AM marco_: Cannot make a static reference to the non-static field Bullet.x | |
m00bles [~Pomax@d64-180-147-132.bchsia.telus.net] entered the room. (11:03:54 AM) | |
notmasteryet left the room (quit: *.net *.split). (11:05:31 AM) | |
Pomax left the room (quit: *.net *.split). (11:05:31 AM) | |
timfreund left the room (quit: *.net *.split). (11:05:31 AM) | |
11:05:39 AM medecau: marco_: pastebin or something | |
timfreund [~tim@cpe-69-76-214-114.kc.res.rr.com] entered the room. (11:08:19 AM) | |
notmasteryet [~notmaster@ip68-12-128-49.ok.ok.cox.net] entered the room. (11:08:45 AM) | |
11:09:39 AM m00bles: also, look at your code. | |
m00bles is now known as Pomax (11:09:41 AM) | |
11:09:45 AM marco_: http://pastebin.com/Ja9pbbfj | |
11:10:07 AM Pomax: before we help you: what is "bullet". | |
11:10:22 AM Pomax: look at your code, look at how you defined it, and then say which datatype it is | |
11:10:34 AM marco_: lol array | |
11:10:53 AM marco_: woops i've changed it to Bullet and it's giving me this static error | |
11:11:43 AM Pomax: now tell me why you're still using a blasted array | |
11:12:09 AM Pomax: I'm pretty sure both medecau and I said you will want to remove off-screen bullets | |
11:12:39 AM medecau: It makes sense to remove them... | |
11:12:49 AM Pomax: right now, that "for" loop that iterates over your bullets runs 1000 times | |
11:12:56 AM Pomax: *every time draw is called* | |
11:13:07 AM Pomax: that is madness. | |
11:13:19 AM Pomax: if you use an ArrayList instead of an array, then that for loop will run only as many times as there are actual bullets in the list. | |
11:13:32 AM medecau: not really, just a fixed size array tbh | |
11:13:33 AM Pomax: and it makes it much easier to remove bullets. | |
11:13:37 AM marco_: because I don't really understand how to use ArrayList and the .get and .add methods. It's for uni so I dont want to risk including things i totally don't have a clue about lol | |
11:13:44 AM Pomax: medecau, it still has to run 1000 checks. | |
11:13:54 AM Pomax: that is much slower than an array list with less than 100 bullets. | |
11:14:11 AM Pomax: there's nothing to get. | |
11:14:15 AM Pomax: ArrayList list = new ArrayList(). | |
11:14:25 AM Pomax: list.add(Object) adds an object to he list | |
11:14:26 AM Pomax: *the | |
11:14:42 AM Pomax: list.get(int value indicating index) does the same you're used to from array[int value indicating index] | |
11:15:02 AM Pomax: but crucially, UNLIKE array, you can do list.remove(index) and that item is removed | |
11:15:13 AM Pomax: list.add("moo") -> list.size() is now 1 | |
11:15:20 AM Pomax: list.get(0) gives "moo" | |
11:15:33 AM Pomax: list.remove(0) -> list.size() is now 0, becaue you removed the only thing in it | |
11:15:40 AM Pomax: *because | |
11:15:59 AM marco_: hmm yeah its starting to make sense | |
11:16:13 AM marco_: okay i promise i will remove the bullets off the screen once i get everything up and running :) | |
11:16:31 AM marco_: i will clean up the code | |
11:16:46 AM aberry: man this thread should be published. good schtuf. | |
11:17:21 AM medecau: aberry: are you starting in processing too? | |
11:17:23 AM marco_: yeah Pomax's explanations are really clear | |
11:17:56 AM aberry: i have done maybe 200 sketches over the past 5 years. dabbling but my programming skills are weak | |
11:18:11 AM medecau: oh, i see | |
11:18:47 AM marco_: Pomax: How do i sort out the Bullet.x problem? | |
11:19:13 AM aberry: love it though. | |
11:19:29 AM Pomax: marco_, look at your code, about 10 lines above the offending line | |
11:19:30 AM medecau: what is happening to Bullet.x if I may? | |
11:19:39 AM Pomax: bullet is an array | |
11:19:40 AM aberry: am reading Getting Started with Processing. three chapters to go | |
11:19:56 AM Pomax: so you want bullet[idx].x because you want the x position of a specific bullet | |
11:20:08 AM Pomax: your intersection check, and welcome to hell, is between EVERY bullet, and EVERY asteroid | |
11:20:38 AM medecau: marco_: Protip: change the name of bullet to bulletList | |
11:20:52 AM Pomax: unless you add smart code that segments your field into strips that can explicitly track asteroids and bullets to rule out most of the "this will never collide" checking | |
11:20:59 AM medecau: it gets easier to read | |
11:21:04 AM Pomax: or "bullets", also good. | |
11:21:19 AM Pomax: as long as it's not singular =) | |
11:21:26 AM medecau: exactly | |
11:22:10 AM medecau: now i feel like writing a space invaders from scratch | |
11:22:14 AM marco_: what is [idx] ? | |
11:22:40 AM medecau: idx is the number that you are iterating on the for loop | |
11:22:54 AM medecau: its actually "i" | |
11:23:43 AM marco_: cannot find anything names "idx" | |
11:24:21 AM Pomax: idx is not in your code. | |
11:24:31 AM Pomax: it's standard programmer shorthand for "index" | |
11:24:47 AM Pomax: and means "whatever index you need to use to get to your thing" | |
11:24:54 AM Pomax: so you're looking at a double for loop. | |
11:24:59 AM Pomax: let's write one. | |
11:26:24 AM medecau: Pomax: you're going to write a spaceinvaders? | |
11:27:34 AM marco_: i've changed it to boolean intersecting = intersect (bullet[i].x, bullet[i].y,asteroids[i].x,asteroids[i].y,asteroids[i].r); | |
11:27:44 AM Pomax: o use to get to your thing" | |
11:27:44 AM Pomax: <Pomax> so you're looking at a double for | |
11:27:51 AM Pomax: http://pastebin.com/t0Pr6twe | |
11:28:00 AM Pomax: medecau: I have no reason to. | |
11:28:04 AM Pomax: it'd take me an hour at most >_> | |
11:28:32 AM Pomax: I was more saying "let's write a double for look to make these intersections work" | |
11:28:37 AM medecau: probably gonna do it anyway | |
11:29:07 AM marco_: ohhhh i get it | |
11:29:20 AM Pomax: marco, the real point here is actually what's missing. | |
11:29:46 AM Pomax: you want your bullets and asteroids to update, but I don't know in which order =) | |
11:31:10 AM Pomax: also, and this is a bigger pickle, you have two 1000 entry arrays. However, not all of those will be actual objects. | |
11:31:25 AM Pomax: so you still need to check whether calling "update" etc. is even possible | |
11:34:20 AM marco_: Pomax: where did the boolean intersecting go in your paste? | |
11:36:04 AM Pomax: http://pastebin.com/wyUyYeEY | |
11:36:37 AM Pomax: oops, var collision | |
11:37:18 AM Pomax: http://pastebin.com/iYiiy81Q | |
11:41:40 AM marco_: Ahh, thanks Pomax ! that makes more sense now | |
11:42:13 AM marco_: Im sorry im so new to processing I hvae a lot to learn | |
11:42:14 AM marco_: lol | |
11:45:40 AM aberry: +1 im so new to processing I hvae a lot to learn | |
11:46:45 AM marco_: my first year using it :P | |
11:46:51 AM marco_: plus my lecturers suck | |
11:46:57 AM marco_: Pomax will you be my lecturer xD | |
11:46:59 AM marco_: haha | |
11:47:18 AM Pomax: this is of course not exactly optimal code (for a space invaders setting, for instance, you can segment your playing field into width/bulletwidth strips, and record which strip a bullet is shot up in, with every strip recording which asteroid is in there too, so for each bullet you only check collissions between it, and the asteroids it can reach) | |
11:47:21 AM aberry: transfer to san jose state university and study with steve durie | |
11:48:08 AM Pomax: further optimisable by the fact that the bullet can only collide with the lowest asteroid, so per strip you only record the lowest asteroid | |
11:48:55 AM medecau: that would require that the strip be sorted, but nice | |
11:49:18 AM Pomax: not necessarily, you can do a position lookup to get "your" strip as bullet | |
11:49:59 AM Pomax: then any collision is simply if(bullet.getStrip().collided()) { Asteroid poof = bullet.getStrip().getAsteroid(); } | |
11:50:33 AM Pomax: or, in proper java, getStrip().hasCollision() | |
11:50:51 AM medecau: is this already coded somewhere? | |
11:50:57 AM medecau: that I can look at | |
11:52:17 AM medecau: btw: https://gist.github.com/942818 - I'm calling it earth savers | |
11:54:54 AM Pomax: "old games" =) | |
11:55:07 AM Pomax: it's an optimisation trick used in computers with, say, 64kb or ram =) | |
11:55:38 AM aberry: general question... is collision detection a common enough feature that processing has a readymade class or solution for it? a pattern or something? | |
11:55:43 AM medecau: yea, it sounds pretty optimized | |
11:56:05 AM medecau: aberry: look at dist() | |
11:56:18 AM Pomax: collision detection for simple primitives is simple enough to really not require any fancy algorithms for it | |
11:56:41 AM Pomax: collision detection between circles and ellipses is simply "is the distance between the centers equal to the sum of the radii" | |
11:56:53 AM medecau: if it's less than the sum of both objets size than they collided | |
11:56:56 AM Pomax: between rectangles it's a boundary check. | |
11:57:21 AM medecau: what Pomax said | |
11:57:28 AM aberry: i think i may have already worked on something like that with my simple tutorials in the GSWP book. seen here http://alexberry.me/ | |
11:57:36 AM Pomax: the really interesting collision detections are hard. | |
11:57:43 AM Pomax: and specific to the kind of objects you're using | |
11:58:07 AM Pomax: (collision detection between arbitrary path shapes, for instance) | |
12:02:06 PM aberry: dist() is the core of it all, i suppose i was wondering if there was a library or something more to use as starting point | |
12:02:30 PM Pomax: dist() is just a shortcut for one line of math =) | |
12:03:06 PM Pomax: dist(x1,y1,x2,y2) = return sqrt((x2-x1)*(x2-x1) + (y2-y1)*(y2-y1)) | |
12:03:48 PM aberry: gotcha | |
12:03:50 PM Pomax: (computes the euclidian distance) | |
12:04:28 PM aberry: *wishing i paid more attention in math class* | |
12:04:55 PM Pomax: rudimentary math skills essential for doing things with graphics ;) | |
12:04:56 PM medecau: never too late: http://www.khanacademy.org/ | |
12:05:46 PM aberry: :-) day job includes an education benefit.. | |
12:06:41 PM aberry: what types of math would y'all say are most useful for processing applications, like animation and games or maybe arduino? | |
12:07:01 PM Pomax: depends on what you want to do | |
12:07:12 PM lonnen: aberry: thats some range | |
12:07:13 PM medecau: I'd goo with anything geometric | |
12:07:18 PM Pomax: 2d/3d math: linear algebra | |
12:07:23 PM aberry: i want to make an arduino lawn mower robot | |
12:07:23 PM lonnen: linear algebra | |
12:07:34 PM Pomax: arduino: probably also gate logic. | |
12:08:07 PM Pomax: http://joshua.smcvt.edu/linearalgebra/ | |
12:08:09 PM lonnen: for the arduino a basic digital logic course would be better | |
12:08:55 PM Pomax: http://www.allaboutcircuits.com/ | |
12:09:08 PM Pomax: that should keep you busy for longer than you even need to be kept busy =) | |
12:09:15 PM aberry: nice. nice. nice. thanks! | |
12:09:25 PM lonnen: much of the arduino stuff can be learned on your own | |
12:09:30 PM lonnen: certainly the basics | |
12:09:39 PM lonnen: open courseware and the arduino sites are a great place to start | |
12:09:47 PM Pomax: although I'm pretty sure there are "get started with your arduino" books available | |
12:10:06 PM lonnen: there certainly are | |
12:11:05 PM Pomax: too popular a board not to =) | |
12:11:24 PM lonnen: for mathemagics, linear algebra is good, as is discrete math | |
12:12:05 PM aberry: as soon as i finish GSWP there is a follow up Aruino Processing book. both are from Make mag | |
You are now known as lonnen|lunch (12:12:05 PM) | |
12:12:48 PM Pomax: you may also be interested in http://tom.cs.byu.edu/~557/text/ | |
12:12:58 PM Pomax: (explained a little in http://tom.cs.byu.edu/~557/) | |
12:13:05 PM aberry: so if i have only basic algebra and geometry math skills, where should i start? | |
12:13:14 PM Pomax: it's basically "all you need to know" for geometric design. | |
12:13:28 PM Pomax: with "fiddling on things" =) | |
12:13:34 PM aberry: heh | |
12:13:44 PM Pomax: write a sketch to do something basic, figure out what you need to do, and look up how that's done. | |
12:14:08 PM Pomax: then read a little bit more on it than you need to solve your problem, and keep expanding your knowledge that way | |
12:14:11 PM aberry: http://tom.cs.byu.edu/~557/text/ looks cool but is over my head already at chapter 1 | |
12:15:01 PM aberry: yeah i can hack at stuff all day long and learn, but seems like i reach a programming / math limit pretty quickly | |
12:15:08 PM Pomax: read the linear algebra book's chapter 1 first | |
12:15:13 PM aberry: k | |
12:15:22 PM Pomax: tom's book assumes you already know the mathematical notations for things | |
12:15:29 PM Pomax: (since he's a university prof ;) | |
12:15:41 PM aberry: yeah. i was an art major. | |
12:16:45 PM Pomax: never an excuse not to know basic math. Even art majors need to do their taxes | |
12:17:10 PM Pomax: and if your art was something like psych... you better know your manovas and chi-tests | |
12:19:06 PM aberry: computer art.. here are some links to my senior project: | |
12:19:11 PM aberry: http://neoscenes.net/projects/difusion1/index.html | |
12:19:22 PM aberry: http://neoscenes.net/teach/cu/2002_1/index.html | |
12:19:30 PM aberry: http://neoscenes.net/projects/difusion1/difusion1/index.html | |
12:20:06 PM aberry: back when processing was just a baby | |
12:23:49 PM aberry: anyway | |
12:24:02 PM aberry: thanks for the math tips! | |
12:27:45 PM Pomax: np | |
12:38:57 PM medecau: going for dinner, leave you with this: https://gist.github.com/942818 | |
12:52:56 PM abielins: Is this the right place to ask questions about Processing.js? | |
1:00:16 PM lonnen: abielins: irc.mozilla.org#processing.js | |
1:00:31 PM lonnen: though there is some overlap between the people here and there | |
You are now known as linnen_ (1:06:03 PM) | |
You are now known as lonnen_ (1:06:06 PM) | |
1:10:42 PM abielins: lonnen_: Thanks | |
encrypt [57076012@gateway/web/freenode/ip.87.7.96.18] entered the room. (1:26:34 PM) | |
1:26:52 PM encrypt: hi | |
1:27:10 PM aberry: hello | |
cardamon left the room (quit: Ping timeout: 276 seconds). (1:27:56 PM) | |
1:29:48 PM abielins: hello | |
encrypt left the room (quit: Ping timeout: 252 seconds). (1:37:41 PM) | |
cardamon [~mute@131.96.222.250] entered the room. (1:39:26 PM) | |
encrypt [57076012@gateway/web/freenode/ip.87.7.96.18] entered the room. (1:40:11 PM) | |
Pomax left the room (quit: Ping timeout: 252 seconds). (1:40:19 PM) | |
Pomax [~Pomax@64.180.147.132] entered the room. (1:40:38 PM) | |
MikhX left the room (quit: Quit: MikhX). (1:42:28 PM) | |
slvmchn [~slvmecha@c-24-91-117-140.hsd1.ma.comcast.net] entered the room. (1:46:58 PM) | |
MikhX [~FreeRadic@173-164-167-177-SFBA.hfc.comcastbusiness.net] entered the room. (1:48:45 PM) | |
harshanianu left the room (quit: Ping timeout: 252 seconds). (1:51:37 PM) | |
cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] entered the room. (1:56:39 PM) | |
cardamon left the room (quit: Ping timeout: 260 seconds). (2:16:45 PM) | |
cardamon [~mute@c-66-56-9-77.hsd1.ga.comcast.net] entered the room. (2:43:05 PM) | |
2:45:27 PM aberry: i would like to try this with processing and arduino some time: http://youtu.be/7VxCl6w3HS0 | |
agu10^_ [~ome@unaffiliated/agu10/x-1554175] entered the room. (2:45:32 PM) | |
encrypt left the room (quit: Ping timeout: 252 seconds). (2:52:29 PM) | |
potatodemon [~potatodem@72.14.187.73] entered the room. (2:53:41 PM) | |
2:54:29 PM potatodemon: Howdy, I want to try to do some crude image processing - from a webcam - with processing. Can someone point me to exaples. | |
2:54:55 PM potatodemon: I just want to check to see if the camera seems lots of white (for detecting flashing of lighthing) | |
davidnunez left the room (quit: Quit: Leaving.). (2:55:43 PM) | |
MikhX left the room (quit: Quit: MikhX). (2:58:03 PM) | |
2:59:03 PM aberry: potatodemon, i have some code that does that at home, but suspect somebody will help you before i can get there and share | |
3:00:43 PM aberry: but if you can wait a few hours.. | |
cardamon left the room (quit: Ping timeout: 240 seconds). (3:03:42 PM) | |
cardamon [~mute@c-66-56-9-77.hsd1.ga.comcast.net] entered the room. (3:04:26 PM) | |
3:06:11 PM potatodemon: aberry: that would be great! I am in no rush. I am at work myself. I will idle here for a while | |
3:06:44 PM aberry: srsly tho, the webcam input for processing is super simple if i recall | |
MikhX [~FreeRadic@NEXTSPACE.edge1.SanFrancisco1.Level3.net] entered the room. (3:07:31 PM) | |
MikhX left the room (quit: Client Quit). (3:08:17 PM) | |
3:09:39 PM aberry: did you try this? http://processing.org/reference/libraries/video/Capture.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment