This post would be helpful if I knew what help you needed. What game? Do you have code? Images? Can we see what you have already? What still doesn't work? What are you trying to do?
I would like to ask help for the obstacles, which are the tiny stones to be a point. Example, if the car passes one rock then there is a corresponding point.
the stones shouldn't be allowed to be placed up in the sky...
also you call the method in line 32 /33 which has the same name as the class. Thus it is the constructor. Which shouldn't be called like this at all... This is not good...
Answers
This post would be helpful if I knew what help you needed. What game? Do you have code? Images? Can we see what you have already? What still doesn't work? What are you trying to do?
the image is saved as road.jpg
I would like to ask help for the obstacles, which are the tiny stones to be a point. Example, if the car passes one rock then there is a corresponding point.
The problem in our game is that the points correspond to the set instead of one stone only.
It is a convention to write class names with a capital as first letter
I would not recommend to have a one/2 letter class such as b1 - better say Building
Also the same name for class and object looks weird...
The object of that class starts with a small letter by convention so line 3 could be
or (not as good)
I don't understand why people don't use full names...
Same goes for o1...
I also recommend to have all classes together at the end of the sketch - and not in the middle as you have.
;-)
it looks nice btw
the stones shouldn't be allowed to be placed up in the sky...
also you call the method in line 32 /33 which has the same name as the class. Thus it is the constructor. Which shouldn't be called like this at all... This is not good...
name the method in 234 draw() or display() pls
read the tutorial on oop pls....
Car class is much better
I assume that o1 is the obstacle...
you want to give it random values for x and y - see random in the reference pls
you need to store the values in 5 vars or in an array
then display them from 5 vars or the array
do the collision check Car against 5 vars or the array
"I don't understand why people don't use full names..."
I fully agree, but it will be easier when the PDE will have auto-completion...