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

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.

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.

2 Likes

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

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.

Is this homework…?

I have seen this before…

@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.

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

DO NOT DUPLICATE QUESTIONS!

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

Link to original discussion

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

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 as to how it might be achieved.

1 Like

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

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

There are also several excellent youtube channels and books geared toward the beginning coder, not to mention 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.
:slight_smile:

1 Like