# Animating a scene with cars and planes (help and challenge)

**URL:** <https://discourse.processing.org/t/animating-a-scene-with-cars-and-planes-help-and-challenge/19232>\
**Category:** Project Guidance\
**Tags:** homework\
**Created:** [March 31, 2020, 7:59am UTC](https://discourse.processing.org/t/animating-a-scene-with-cars-and-planes-help-and-challenge/19232 "2020-03-31T07:59:39Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Booijink747](https://avatars.discourse-cdn.com/v4/letter/b/ee7513/32.png) [@Booijink747](https://discourse.processing.org/u/Booijink747)\
**Post date:** [March 31, 2020, 7:59am UTC](https://discourse.processing.org/t/animating-a-scene-with-cars-and-planes-help-and-challenge/19232/1 "2020-03-31T07:59:39Z")

</div>

[![](https://img.youtube.com/vi/eRyEViU_iKY/maxresdefault.jpg "kruispunt") ](https://www.youtube.com/watch?v=eRyEViU_iKY)

I would like to make something like this but then just a little bit different, I wondered whether some of you know how to make this exact thing in Processing 3, so I can look at the code and make my own variant of it.  
I really hope one of you can help me with this problem. By the way, all the cars, buildings, planes and stuf don’t have to be exactly the same.

---

<div class="post-metadata">

**Author:** ![quark](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/quark/32/26_2.png) [@quark](https://discourse.processing.org/u/quark)\
**Post date:** [March 31, 2020, 8:21am UTC](https://discourse.processing.org/t/animating-a-scene-with-cars-and-planes-help-and-challenge/19232/2 "2020-03-31T08:21:01Z")

</div>

The easiest way is to split the image up into layers . In this case you would have several layers

1. the image from the nearest curb to the top of the screen
2. some cars images with transparent areas round the car body
3. One of the near traffic lights
4. the image from the nearest curb to the bottom of the image
5. the images of the buildings on the far left and right

Then simply draw them to the screen in that order. Same idea as scenery in a theatre. Start with some simple images and get some code written, save the car movement for later.

---

<div class="post-metadata">

**Author:** ![Booijink747](https://avatars.discourse-cdn.com/v4/letter/b/ee7513/32.png) [@Booijink747](https://discourse.processing.org/u/Booijink747)\
**Post date:** [March 31, 2020, 8:29am UTC](https://discourse.processing.org/t/animating-a-scene-with-cars-and-planes-help-and-challenge/19232/3 "2020-03-31T08:29:16Z")

</div>

### FIRST ONE TO MAKE THE EXACT SAME THING WINDS! (against boredom and corona)

[![](https://img.youtube.com/vi/eRyEViU_iKY/maxresdefault.jpg "kruispunt") ](https://www.youtube.com/watch?v=eRyEViU_iKY)

requirements:

- there is an airplane or a bird in the air.
- the left-front and right-back light are connected. (they are ment for horizontal driving cars).
- when the light turns red, the cars stop
- vertical cars are not necessary
- ‘mousepressed’ for the traffic lights.
- ‘comments’ within the code for clarity.

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [March 31, 2020, 8:39am UTC](https://discourse.processing.org/t/animating-a-scene-with-cars-and-planes-help-and-challenge/19232/4 "2020-03-31T08:39:13Z")

</div>

Is this homework…?

I have seen this before…

---

<div class="post-metadata">

**Author:** ![Booijink747](https://avatars.discourse-cdn.com/v4/letter/b/ee7513/32.png) [@Booijink747](https://discourse.processing.org/u/Booijink747)\
**Post date:** [March 31, 2020, 8:42am UTC](https://discourse.processing.org/t/animating-a-scene-with-cars-and-planes-help-and-challenge/19232/5 "2020-03-31T08:42:49Z")

</div>

@Chrisir I’m 25 years old, so no homework lol. But I like to make something like this and I thought this would be a nice challenge for some of you guys.

---

<div class="post-metadata">

**Author:** ![quark](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/quark/32/26_2.png) [@quark](https://discourse.processing.org/u/quark)\
**Post date:** [March 31, 2020, 8:52am UTC](https://discourse.processing.org/t/animating-a-scene-with-cars-and-planes-help-and-challenge/19232/6 "2020-03-31T08:52:02Z")

</div>

You have already created a discussion about this topic and I gave advice on how you might do it.

DO NOT DUPLICATE QUESTIONS!

---

<div class="post-metadata">

**Author:** ![quark](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/quark/32/26_2.png) [@quark](https://discourse.processing.org/u/quark)\
**Post date:** [March 31, 2020, 8:53am UTC](https://discourse.processing.org/t/animating-a-scene-with-cars-and-planes-help-and-challenge/19232/7 "2020-03-31T08:53:42Z")

</div>

Why don’t you think of it as a challenge for you and put some effort into it .

---

<div class="post-metadata">

**Author:** ![quark](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/quark/32/26_2.png) [@quark](https://discourse.processing.org/u/quark)\
**Post date:** [March 31, 2020, 8:54am UTC](https://discourse.processing.org/t/animating-a-scene-with-cars-and-planes-help-and-challenge/19232/8 "2020-03-31T08:54:58Z")

</div>

[Link](https://discourse.processing.org/t/i-have-a-problem-can-anyone-help-me/19232) to original discussion

---

<div class="post-metadata">

**Author:** ![Booijink747](https://avatars.discourse-cdn.com/v4/letter/b/ee7513/32.png) [@Booijink747](https://discourse.processing.org/u/Booijink747)\
**Post date:** [March 31, 2020, 8:57am UTC](https://discourse.processing.org/t/animating-a-scene-with-cars-and-planes-help-and-challenge/19232/9 "2020-03-31T08:57:48Z")

</div>

Sorry quark, didn’t mean to offend you but I thought it would be an nice idea…

---

<div class="post-metadata">

**Author:** ![quark](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/quark/32/26_2.png) [@quark](https://discourse.processing.org/u/quark)\
**Post date:** [March 31, 2020, 9:05am UTC](https://discourse.processing.org/t/animating-a-scene-with-cars-and-planes-help-and-challenge/19232/10 "2020-03-31T09:05:16Z")

</div>

No problem but if you split a topic over more than one discussion you will get members posting possible solutions ideas on one duplicating the effort of different members in the other discussion.

Yes it is a nice idea and some would gain a lot by accepting the challenge and learn a lot by doing it. I am suggesting that you could learn a lot by accepting your own challenge.

Why not produce your own fake 3D scene post a video of it here and then get others to share their efforts there own efforts.

I have posted a suggestion in the other [discussion](https://discourse.processing.org/t/i-have-a-problem-can-anyone-help-me/19232) as to how it might be achieved.

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [April 1, 2020, 6:00pm UTC](https://discourse.processing.org/t/animating-a-scene-with-cars-and-planes-help-and-challenge/19232/11 "2020-04-01T18:00:41Z")

</div>

I’m merging this – then people can see it all in one place, and participate as they like.

---

<div class="post-metadata">

**Author:** ![debxyz](https://avatars.discourse-cdn.com/v4/letter/d/58956e/32.png) [@debxyz](https://discourse.processing.org/u/debxyz)\
**Post date:** [April 1, 2020, 6:53pm UTC](https://discourse.processing.org/t/animating-a-scene-with-cars-and-planes-help-and-challenge/19232/12 "2020-04-01T18:53:48Z")

</div>

If your approach to learning how to code is by reading the code of others, then I recommend reading the thousands of code projects available on the open processing site here — both processing and p5.js are represented:

[https://www.openprocessing.org](https://www.openprocessing.org)

There are also several excellent youtube channels and books geared toward the beginning coder, not to mention [processing.org](http://processing.org)’s own resource and tutorial pages.

However, you should note there are a myriad of ways to solve coding problems, each unique to the person who is writing the code. Asking others to solve _your_ code in it’s entirety so that you can learn something is a false construct. **It is like asking someone to paint a picture for you so you can learn how to paint.**  
🙂
