joinner's Forum Posts

  • 13 posts
  • dop2000 buddy, thank you very much, I had the solution before my eyes and could not see it, I appreciate it is just what I needed.

  • https://www.youtube.com/watch?v=vOpkRpLKvII

    I want to make a game of trucks top view 2d, I would like to recreate the movement of the load of a truck as in real life, I achieved some results but they are not very stisfactory or real, if anyone has any idea how to do it I would be great help.

  • Found this to be a fascinating subject. Apparently there's been a lot written on group behaviour and lots of code written to simulate ants, flocks of birds and schools of fish.

    So, I decided yesterday to play around with this a bit. Here's my half-assed attempt at ant AI

    https://www.twistedvoid.com/antz/

    I'm only using a maximum of 300 ants so that it runs on my old laptop well. Since each ant is animated I didn't want to lag things out with gobs of ants.

    Ants exit the ant hill periodically and begin searching for food in a mostly random pattern. If food is located, it then uses the pathing behaviour to find it's way back home. As it travels back home it looks for a trail of 'pheromones' to see if another ant has found the food and went home. If so, it refreshes the trail. If not, it lays a new trail. The trail lasts 10 seconds if not refreshed.

    Rather than pathing, the trail is used to help ants find the food source (somewhat like real ants).

    Ants that step on the trail examine it to see which way the trail points and then, attempt to follow it's direction to the food source. Since they don't yet know if the food exists, they don't refresh the trail.

    Each food item has 100 points and each time an ant takes some it reduces those points by 100. If the food reaches 0, it despawns.

    When ants carrying food return to the ant hill, they despawn.

    If an ant has been wandering around for a while and steps on the ant hill, it despawns.

    You can download this very crude experiment here:

    https://www.twistedvoid.com/antz/Antz.c3p

    I find it very interesting but I can not open the file because it was saved in version r158 and I have version r157, could you upload a version for r157 please?

  • I present my first android game made in Construct 3, help me with the Tom guide at construct.net/en/courses/color-switch-game-8.

    I decided to make some improvements, I gave a system of life and levels, also from a certain level is established the value and generation of bubbles to a static value, the idea is to resist as much as you can as long as you can, try to give a flashy and colorful design, and also save your score in local storage, I hope you like this simple but addictive game.

    Note: the game will soon be updated in English

    play.google.com/store/apps/details

  • WRSOf course, I have more ideas for this simulator since it is helping me to learn many things, I plan to make the ants dig their own caves like an anthill of acrylic, there will be a queen that will generate the ants, and the worker ants will have to to be able to grow their food so that it becomes the mushroom they can eat, they will have a system of hunger and thirst and I was thinking of making a pheromone system but it would complicate my life, so for now I will not, maybe I will I'm late in uploading videos because I'm with other projects and this project I'm doing just as a learning method.

  • Thank you very much. I removed the line UID 2 but it only helped half. I added a line to check the speed when moving and if it drops to 0 then reload the search path.

    But this is not the right decision. Since UID 2 is food. And if food is absent ants should go about their business.

    That is, we can not remove the UID 2

    Hello, I'm glad to see what I did help you.

    WRS so that the zombies can have a random movement you just have to eliminate the UID2 line that refers to foopile, because if you eliminate the line destroy at the beginning of the scene, then the foodpile exists, and the condition says yes there is UID2 so that they move randomly.

    If you want them to only move from one side to another, just remove the UID2 line, that's it, I already tested it in the original file and it works.

  • youtube.com/watch

    Hi everyone again, in this video you can see a bit of the progress I've had with the simulator, I have not had a significant progress because I've been busy with other projects.

    In this occasion they can observe how the ants can go for the food and establish a route to the cave and after leaving the food again establish a route to the food while it exists, when the food no longer exists in the scene the route disintegrates.

    In the upper left corner, place a real-time fps counter and a counter of objects created in the scene so you can observe the performance at runtime.

    If you are interested a little more about this project, you can download the original file that I have been working on from here, something very important to note is that the comments are written in Spanish because it is my native language, I hope it will help them in something .

  • Hello WRS, in this project what I did was create a single sprite for the ant and then create multiple instances of the ant.

    To the sprite of the ant add its own variables of instances in this case the variables keep the coordinates generated by the system in a random way and so each instance of the ant behaves independently since each instance keeps its own random coordinates in the instance variables

    At the moment the simulator is a bit more advanced than in the video, they already have a different behavior and look for food, but now if I'm starting to have a bit of memory problems, as soon as I solve it I'll post a new video with the results here and what I did to improve it.

  • youtube.com/watch

    Hello everyone, I told you that I was working on the idea in my free time and here I share the first results.

    This simulation was done with a swarm of 1000 ants, in the tests it reaches up to 3,000 ants but unfortunately the program broke.

    In the video you can see that it manages to give them an autonomous behavior for each ant, although all the ants on the screen are multiple instances of the same object. A very interesting behavior that I do, is that the ants go to the place where I clicked on the screen and then continue with their autonomous behavior, I did it this way because it is the beginning of the behavior I want them to have when they get food.

    Another behavior that I gave them is to update their route in real time when I press any key on the keyboard, of course it is not ready yet and they are still very robotics, but I hope I can improve it, if they have any comments, opinions or suggestions it will be a pleasure to receive them.

    thank you very much for the information, I suffered the first few hours thinking about what time I broke my application by just placing some comments on some lines haha

  • Comes under the "all sources, one destination" category apparently. Usefully this article specifically covers this technique for making a tower defence game. It's obviously not using Construct, but he explains the concept as opposed to showing code so it should doable.

    You want to produce a "vector field" for your ants to follow.

    Yes, I was analyzing a bit more the video there is a moment of the video where you can see some lines, apparently it is where the ants move and this line is painted blue, establishing a diameter that tells the ants that there is a cave, but on the other side the diameter is painted yellow.

     What I could deduce is that the ants inside the diameter detect the coordinate where the food is and when having a piece of food their destination is the coordinate where the cave is, basically it is as said , it is a Pathfinding, since the Pathfinding is Handles by 16x16 grids in its natural state.

    Reviewing the article that you sent me from Red Blob Games, I see that your example has the same behavior as Pathfinding, when frontiers are redrawn, and doing some tests today with Pathfinding, I could do that in real time while traveling the subject from point A to point B if you place an object recalculates the route to point B without establishing a cut in its route, this is achieved only with an object.

  • You do not have permission to view this post

  • youtube.com/watch

    Since I saw this video I have not been able to get out of my mind the idea of doing something similar in construct 3, unfortunately I have no experience in artificial intelligence, but maybe someone can tell me what could be a good starting point, know which way take in my research and creation of this algorithm.

    For now I just want to get the subject to detect where the food is and take it from point A to point B, and when there is no food that has that characteristic behavior and movement of the ant.

    If I can get a starting point I will share my progress and how I have been doing it openly in the forum.

    Note: I ask for an advance apology for my English.

  • Hello, I had the same problem today, do not modify anything in my project, just add some comments between lines, after exporting my apk debug it did not work on my android device, however after disabling google play protect, even so it did not work correctly, but running my application in the browser I decided to open the google chrome console, I discovered that an error related to Ads pluging appeared, I decided to delete all the instances of that plugin to try again and after exporting an apk again debug, it worked correctly on my device.

    I find it a bit strange since yesterday I did not have that problem with pluging, but today after the update I failed my app without adding any extra code, just a few comments.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You do not have permission to view this post

  • 13 posts