atmas's Recent Forum Activity

  • atmas why use overlapping points for a pretty intensive graphic game? i would've used "distance again" (i know dop2000 ) because its less heavy on systems logic. using overlapping points of images the computer or system has to measure each pixel in each frame and see if they are colliding. you could use bbox left right top bottom of the car and target imagepoint.x,y and measure the distance if distance is a surtain safety number car stops. you will notice with this approach a 50% to 90% cpu usage drop, depending on your project how heavy is from graphic point of view.

    Hello, how are you? I simplified this problem by creating some stop signs before the intersection, so the AI car now stops on the line for some time and then, he start moving again. Could you help me with another issue please? It's

    the following: AI cars that are on the same layer, won't detect each other. I tried to use the L.O.S behaviour, so each AI car would know each other and would avoid crashing one into another, but this won't work. I'm saying that because when i use the L.O.S behaviour in the AI cars to detect the player that is in another layer above, it works 100%. What can i do to fix this? Thank you man!!!

  • Hi folks! I got a problem that i really don't know how to solve it. Can you help me please? AI cars that are on the same layer, won't detect each other. I tried to use the L.O.S behaviour, so each AI car would know each other and would avoid crashing one into another, but this won't work. I'm saying that because when i use the L.O.S behaviour in the AI cars to detect the player that is in another layer above, it works 100%. What can i do to fix this? Thank you!!!

  • Hello! How are you? After sucessfully create random vehicles on street of my test city, i would like to make them to stop on some image points of my intersection for some seconds, but this is not working. I really not good with expressions, but i was trying to guess what to write to make it work properly. Please, take a look on my images below:

    PS: (In the IMG Nº1, each of the 4 ''Parameters for ''inter'' codes, there's a different number for the ''inter'' imagepointX and Y.)

    1-

    2-

    Question 1: As my codes are not right, what should i do to make it work?

    Question 2: How can i make the cars that come from behind to stop and avoid hitting the car in front? Because i tried a lot of codes using ''Line of sight behaviour'', but they still hitting the others AI cars on intersections and etc.. The L.O.S behaviour only works if i set them stop when they has the player on his line of sight.

    Thank you in advance!

  • atmas

    In the capx it just creates the roads. at the start of the layout. You could just do what you said and only pick the roads off screen and within a certain distance of the player to create cars on.

    Pedestrians could probably be done in the same way, although you probably could ignore the collision detection. Here's another idea along those lines:

    Hello! R0J0hound! As i said before, i downloaded your .capx road2, and then, i tried to write the same codes you did and now it's working very well! I'm not good with math, but now i guess i will be able to keep creating my game. The only thing i have is creativity. You don't know how much you're helping me now. I created 30/ 40 vehicles, an inventory system, some fake 3d buildings months ago. And this and the .capx city walk, were the things i been searching all over the internet. that i never found before. Thank you so much once again!

  • Here's and old capx experiment of mine that may give some ideas.

    https://www.dropbox.com/s/df8jtstjva45m ... .capx?dl=1

    The cars don't really follow any traffic laws, they just go while trying to not overlap each other. It can fail when multiple cars enter an intersection at the same time, so some right of way is needed. The hack fix was to make the stop temporary and they'll eventually just drive over each other to keep things going.

    Hey R0J0hound! I really don't know how to thank you buddy! Let me ask you one more questions please: How dospawn vehicles only near the player, but the condition is: The player won't see the cars spawning? And about the PED'S, can i do the same thing to pedestrians? I'm creating a game like gta 1, and i been searching for things like that for 8 months! Do you have any more .capx related to this? And if not, where can i find it please? I already searched all over the internet. Thank you!

  • Anything now will be very helpfull! The good thing of Construct, is that we can adapt the codes and the stuffs to get what we want. And thank you very much buddy!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hello! I'm getting nut trying to search for any tutorial that could answer my questions that will make almost 9 months old now. I tried to learn how Construct 2 works, and because of that, i sucessfully created a little part of a city, 40 vehicles with physics, some fake 3D buildings, guns, a 100% drag and drop working inventory and etc. But i just can't find a single tutorial explaining 100% how to create AI vehicles driving on streets and PED'S on sidewalks randomly just like GTA 1 and GTA 2 does. I swear, i searched all over the internet for something like this since 8 months ago. I tried to looking for every tutorial here, on every Youtube video i could find and even on Facebook realtioned groups. I not good with coding, and i really don't have too much ideas how to do it for this problem. I know we have some codes of: ''Every tick > spawn ''vehicle'' on layer x, on x.y positions and etc.. Or i could use the ''bullet'' behavious on my vehicles, but this wouldn't work very well with a sandbox game. I downloaded the .CAPX called: ''multi_catmull_rom, but i really don't know how to use it properly for my game. Sorry for my english and thank you very much if you read my question. I don't want you to finish game for me. I'm saying that because i just found 2 videos on internet of russians that did a little bit of what i want to do. If someone could answer it for me, i would be very, very, very happy. Thank you!! Here's the link:

    Subscribe to Construct videos now

    and the second video is:

atmas's avatar

atmas

Member since 26 Jan, 2017

None one is following atmas yet!

Trophy Case

  • 7-Year Club
  • Email Verified

Progress

8/44
How to earn trophies