4.2: Incrementing a Variable - Processing Tutorial

  Рет қаралды 117,277

The Coding Train

The Coding Train

Күн бұрын

Пікірлер: 82
@Yensnor
@Yensnor 6 жыл бұрын
I tried for several years to get into programming. I knew the syntax, operators, functions, variables. I knew about them. Tried to use them. But i never could wrap my head around the concept of what programming truly is. At the most basic level. The logic behind it. After 12+ languages and hundred+ hours over many years, failing and giving up. I FINALLY found a teacher who could make me truly understand. From the intro to here, even though this is all pretty basic stuff, still. I've understood it, not 70%, not 95, but 100%, because you're an amazing teacher. You revealed the puzzle of programming for me. It's amazing to me that this is a free resource for anyone to absorb. A thousand thanks to you sir. You've made a random 26 y old norwegian dude, extremely happy.
@jimbalbier8526
@jimbalbier8526 3 жыл бұрын
This sounds awesome. But there's one thing: why did you torture yourself so much when you didn't get the point of programming? Learning all these languages must've been hell, by all respect.
@ub-relax6800
@ub-relax6800 11 ай бұрын
Pseudorandom
@vjd7
@vjd7 8 жыл бұрын
I've been trying to learn coding skills forever.. to no avail. Your high-energy videos are actually something I can understand and process (pun intended)! Thanks for making them available!
@TheCodingTrain
@TheCodingTrain 8 жыл бұрын
+Jeremy Bessoff so glad to hear, thanks for the nice feedback!
@koodig759
@koodig759 8 жыл бұрын
Wow, this is so great, I am a Chinese and learning Processing by myself now. Wishing your book《LearningProcessing》can be translated in Chinese, but it is OK to me~I am so happy to improve my English and Processing both. HAHAHA, Thank you
@inesflih8011
@inesflih8011 Жыл бұрын
Thank you ! You literally saved me. I'm a graphic design student and we learnt Processing, i have an exam and I was so lost. Your explanations are clear and simple to understand !
@TheCodingTrain
@TheCodingTrain Жыл бұрын
So glad to hear!
@dancedonkey1
@dancedonkey1 8 жыл бұрын
4:02 is my favourite part :'D thanks for being a teacher that gets excited over the most simple stuff :D! it makes me feel like even as a starter I'm accomplishing great things haha, thanks!!!
@elijahjflowers
@elijahjflowers 6 жыл бұрын
dancedonkey1 agreed
@valentinDS96
@valentinDS96 Жыл бұрын
I knooow. I burst out laughing at that part. :d
@abevetrone1288
@abevetrone1288 6 жыл бұрын
Hello, I will teach a "Creative Coding" class next year in high school and am very glad to have come across your videos. Helpful. And I am glad you did not have the time to edit out all the entertaining tangents and digressions! I can't remember which video you said it in but I agree, there are few activities more relaxing than throughly wiping off a white board. Thank you again. Keep GOING!
@TheCodingTrain
@TheCodingTrain 6 жыл бұрын
thanks for the nice feedback!
@jennhott-leitsch7918
@jennhott-leitsch7918 9 жыл бұрын
Thank you sir, for taking the time to make all of these videos. I am studying Processing this summer, and I have been so lost. Your videos have helped me so much! And I might actually pass my final now!!
@rishoo6976
@rishoo6976 6 жыл бұрын
SAME
@XxkolowyxX
@XxkolowyxX 4 жыл бұрын
i love it when he talks to himself :) makes me feel less intimidated by programming
@ezangrobotsvideos9286
@ezangrobotsvideos9286 4 жыл бұрын
great , we are moving on, keep going - thanks
@chafikchaf5827
@chafikchaf5827 4 жыл бұрын
salam , Hi , you are the best , now i feel like i can be a programer , so funy plenty of info you making it so easy for us , I wish you were my teacher all this years . thanks man
@gawni1612
@gawni1612 2 жыл бұрын
Finally a teacher who teaches how my brain works
@understandinghumanity4653
@understandinghumanity4653 4 жыл бұрын
your videos are absolutely inspiring and when i first started watching i may have though " oh who tf is this human and his wild antics " but now i see the beauty in your humor and the nature of your persuasion towards becoming a more intellegent human being through humor and failure! /// DEF WORTH A SUBSCRIBE AND UPVOTE
@understandinghumanity4653
@understandinghumanity4653 4 жыл бұрын
also @ 00:40 LOL at flipping the bird to this damm assignment operation
@Sound8VisionVibe
@Sound8VisionVibe 8 жыл бұрын
Loving the book and videos. Thanks so much for helping me dive into this new artistic horizon!
@TheCodingTrain
@TheCodingTrain 8 жыл бұрын
+Sound8Vision so glad to hear, thanks for watching!
@MathyMahdi
@MathyMahdi 4 жыл бұрын
Hi Dan, the videos are excellent and I tried out speedX and speedY. It works great! By the way, I love your excitement for these videos float circleX = 0; float circleY = 0; float speedX = 1; float speedY = 1; float r = 24; void setup() { size(640, 360); } void draw() { background(0); fill(255); ellipse(circleX, circleY, r, r); circleX = circleX + speedX; circleY = circleY + speedY; }
@tsmupdatertsm7633
@tsmupdatertsm7633 7 жыл бұрын
Such a great video... really!!! Perfect explanation! I did not think so far that a half pixel doesn't exists...... Here comes logical thinking....
@TheCodingTrain
@TheCodingTrain 7 жыл бұрын
Thank you!
@ailen80
@ailen80 7 жыл бұрын
Love your videos, you put so much energy in them :)
@kounter2
@kounter2 6 жыл бұрын
dude i just love you so much, thanks.
@prekshamehta8273
@prekshamehta8273 3 жыл бұрын
Also love the lessons they're very helpful! The energy helps so much, thank you so much! @TheCodingTrain
@joincoder
@joincoder 3 жыл бұрын
2021 just saw your explanation , thank you
@anastasiaioannou1423
@anastasiaioannou1423 7 жыл бұрын
u make me love processing really ! i love u are energy i love u are aura! from cyprus xxx
@apprenticedtopicbookcritic101i
@apprenticedtopicbookcritic101i Жыл бұрын
So far I want to thank you so much as american are so decent and you are alike.
@genhur736
@genhur736 6 жыл бұрын
Love your videos! Question: When would we choose int over float, if float allows us to use integers and decimal numbers?
@MiledRizk
@MiledRizk 4 жыл бұрын
Hi, great tutorials, thanks! by the way, if we use the form circleX += 1 while the circleX type is still int we won't get an error but instead, the window will open up and the circle will simply not move.
@MichaelLD305
@MichaelLD305 11 ай бұрын
For the ball to bounce between its x axis float posX; float posY; float speed; float dirX; void setup () { size (640, 640); posX = 320; posY = 320; speed = 5; dirX = 1; } void draw () { background (50); fill (255); hitWall (); posX += speed * dirX; ellipse (posX, posY, 60, 60); } void hitWall () { if (dirX == -1) { if (posX = 640) { dirX = -1; } } }
@bryananthony3924
@bryananthony3924 8 ай бұрын
I don't really understand the animation logic from this code , I thought that if I want to animate something moving I would need some kind of time function to slow down the loop so we could see the different changes of the frame , but in here we don't use any time function so is the loop void draw () looping in a specific time interval ?
@philz417
@philz417 7 жыл бұрын
How would I make that circle re-appear again from the spot it began (left) once it runs of the screen?? Please help me!
@jorisalkema9590
@jorisalkema9590 7 жыл бұрын
you need to make an if statement
@aspasiabazakidou3407
@aspasiabazakidou3407 3 жыл бұрын
legend has it that the first ball is still moving
@Anarchivist343
@Anarchivist343 8 жыл бұрын
Do you have a video on drawing with trig? I am very confused by it.
@anapausantos7870
@anapausantos7870 7 жыл бұрын
HEYY!! i need help for a project! i need to make a fun code where i visualize sound!! any advice on where i can find tutorials of processing using beats?
@dalenassar9152
@dalenassar9152 7 жыл бұрын
So the circle will actually come back from the left after circlex=255 ? It still see's the "+1" increment.
@xzencombo3400
@xzencombo3400 7 жыл бұрын
Just tell if it is equal to width
@angelcaru
@angelcaru 3 жыл бұрын
It technically WILL come back after 2147XXXXXX frames (the XXX representing I don't remember the number) because it's a 32-bit value.
@Quidoute
@Quidoute 3 жыл бұрын
THE COD int circleX; void setup () { size (640,640); circleX = 0; } void draw () { background (255); circleX = circleX + 1; fill (0); noStroke (); ellipse (circleX,50,25,25);}
@noureldinehab2686
@noureldinehab2686 5 жыл бұрын
thanks(2019)
@jlghfe36
@jlghfe36 7 жыл бұрын
How fast is the ellipse being drawn over and over when its static?
@lironmeler4099
@lironmeler4099 7 жыл бұрын
James Gabbitus I don't know if I understand your question but i will answer what i think you said. Processing is running in 24 frames per second. It means that the circle is updating 24 times every second.
@jamesbradley3000
@jamesbradley3000 6 жыл бұрын
What would the logic syntax be for the python version?
@awsomeguy563
@awsomeguy563 8 жыл бұрын
it keeps on saying circlex cannot be resolved to a variable :((
@jorisalkema9590
@jorisalkema9590 7 жыл бұрын
you need to use a float type of variable
@medimarsh2376
@medimarsh2376 3 жыл бұрын
I'm thinking you can run a university course worldwide called processing
@alessandro.festuccia
@alessandro.festuccia 7 жыл бұрын
hi, thanks for your videos! just a question. if the increment is frame per frame, does processing use a certain number of frames per second as default? and if so, which one?
@JurajPecháč
@JurajPecháč 7 жыл бұрын
Alessandro Festuccia The default rate is 60 frames per second.
@adolfocarrillo248
@adolfocarrillo248 5 жыл бұрын
Hey Daniel, I have a cuestion. Why if I print a value on the screen using C++ a statement like CircleX = CircleX + 1; just adds one unit to my preceeding value of CircleX meanwhile in P5.js seems like the instruction keeps executing indefinitely(because the ellipse keeps moving )?, for me the ellipse in your program should move just 1 unit to the right and then the program should stops or the ellipse should stops to move, but it´s not in that way, is there a difference in the way C++ process a scan with reference to P5.js, seems to me like P5.js keeps executing the program over and over and over again in a none sense way, I mean seems like P5.js Keep scaning indefinitely mean the creator wants. Please Help me, I want to Straddle in the Coding Train too. By the way your tutorials are the best, thanks to investing your time sharing your knowledge.😀
@TheCodingTrain
@TheCodingTrain 5 жыл бұрын
This is related to how the draw() loop works in p5.js! kzbin.info/www/bejne/iJ-2YYyEqrGZh7M
@KotatsuInUnova
@KotatsuInUnova 4 жыл бұрын
Daniel
@alloftheabove1653
@alloftheabove1653 5 жыл бұрын
With this i made a really stupid Flappy Bird game :D just the ball floating from the left to the right and down, and always when i press a key the ball jumps up a bit :D
@tubattitobb
@tubattitobb Жыл бұрын
amo a este tipo dior
@teko773
@teko773 4 жыл бұрын
I don't know why this dude makes me laugh
@lucaspop51
@lucaspop51 5 жыл бұрын
In what language are you coding ?
@TheCodingTrain
@TheCodingTrain 5 жыл бұрын
This video uses Processing (which is built on top of the Java programming language). For more info, visit processing.org and also this video might help kzbin.info/www/bejne/d57PcpyBqM6sZtE.
@lolsword7
@lolsword7 5 жыл бұрын
Is it possible to change the speed without changing the incremental value? Ie - Pausing the code, or making the code run twice as fast *If the only way to speed up the animation is to increment by 10 pixels, it would be impossible to quickly reach a point on the screen which is not a multiple of 10 pixels away
@TheCodingTrain
@TheCodingTrain 5 жыл бұрын
You can change the frame rate (see processing.org/reference/frameRate_.html) but there's a limit to how fast a frame rate Processing can handle depending on a variety of factors.
@lolsword7
@lolsword7 5 жыл бұрын
@@TheCodingTrain Cheers, thats exactly what I was after!
@karliban1
@karliban1 8 жыл бұрын
never mind, i figured it out....
@TheCodingTrain
@TheCodingTrain 8 жыл бұрын
yay! thanks for watching!
@karliban1
@karliban1 8 жыл бұрын
so how the hell do you make something to grow??? make it smaller or bigger???
@TheCodingTrain
@TheCodingTrain 8 жыл бұрын
Variables! Thanks for watching!
@a17waysJackinn
@a17waysJackinn 5 ай бұрын
omg if circlex created and in somethibg like 360hz display that might be fast as wild
@en25minutes
@en25minutes 3 жыл бұрын
Dude, you're so funny
@Raycast74
@Raycast74 3 жыл бұрын
Why Is this eerily similar to my JS classes on khan academy?? Is Java JS?!?!
@tamy_br
@tamy_br 4 жыл бұрын
4:03 Daniel, can I hug you? :D
@jjkj8902
@jjkj8902 6 жыл бұрын
//How to draw rectangle like in paint. If smn know any easier variants pls tell float valueX = 0; float valueY = 0; void setup() { size(640, 360); } void draw() { background(102); fill(255,20,200); rectMode (CORNERS); if (mousePressed == true) { rect(valueX, valueY, mouseX, mouseY);; } else { rect(0, 0, 0, 0); } } void mousePressed () { valueX = mouseX; valueY = mouseY; }
@JAMES18005
@JAMES18005 8 жыл бұрын
It's saying variable circleX does not exist? I've copied yours
@JAMES18005
@JAMES18005 8 жыл бұрын
Ah, the float.
@furiouscakeface6964
@furiouscakeface6964 6 жыл бұрын
lol i used a for loop :)
@Jessi123B
@Jessi123B 5 жыл бұрын
pls write my CS exam for me that's tomorrow :(
@velvetdrgn
@velvetdrgn 8 жыл бұрын
so this is very confusing to me with the equals sign being used to assign a value to something cause in Delphi we use := it's much more easier to understand. these videos are messing with my brain.
@angelcaru
@angelcaru 3 жыл бұрын
You'll get used to it.
@NoyumiAo
@NoyumiAo 6 жыл бұрын
10:43 I'm dead HAHAH HI AGAIN
4.3: Using random() - Processing Tutorial
11:51
The Coding Train
Рет қаралды 165 М.
4.1: Variables - Processing Tutorial
19:02
The Coding Train
Рет қаралды 197 М.
Family Love #funny #sigma
00:16
CRAZY GREAPA
Рет қаралды 62 МЛН
Trapped by the Machine, Saved by Kind Strangers! #shorts
00:21
Fabiosa Best Lifehacks
Рет қаралды 41 МЛН
The IMPOSSIBLE Puzzle..
00:55
Stokes Twins
Рет қаралды 150 МЛН
“Hello, world” from scratch on a 6502 - Part 1
27:25
Ben Eater
Рет қаралды 4,8 МЛН
2.2: RGB Color - Processing Tutorial
24:00
The Coding Train
Рет қаралды 170 М.
Python Data Classes Are AMAZING! Here's Why
16:11
Tech With Tim
Рет қаралды 84 М.
3.2: Built-in Variables (mouseX, mouseY) - Processing Tutorial
13:35
The Coding Train
Рет қаралды 147 М.
The Problem with Time & Timezones - Computerphile
10:13
Computerphile
Рет қаралды 4 МЛН
why are switch statements so HECKIN fast?
11:03
Low Level
Рет қаралды 427 М.
The Midpoint Circle Algorithm Explained Step by Step
13:33
NoBS Code
Рет қаралды 121 М.
All Rust string types explained
22:13
Let's Get Rusty
Рет қаралды 182 М.
Being Competent With Coding Is More Fun
11:13
TheVimeagen
Рет қаралды 113 М.
Coding Challenge 180: Falling Sand
23:00
The Coding Train
Рет қаралды 1 МЛН
Family Love #funny #sigma
00:16
CRAZY GREAPA
Рет қаралды 62 МЛН