bbjGames's Recent Forum Activity

  • This is a pretty simple neural network, 2 input neurons, 1 hidden layer with 2 neurons, and two outputs.

    https://drive.google.com/file/d/1468Tll ... sp=sharing

    Here it is optimized to use one array and loops for setting values and changing weights (I would suggest looking at the first link if you don't understand this one)

    https://drive.google.com/file/d/1EixlNG ... sp=sharing

  • Well then it comes full circle to my issue of LOS not working with the tilemap in my original capx. LOS would serve the same purpose as an extra collision box pinned to the ants

  • Well I just used the array since it's more or less the same as the tilemap and I mean I'll be honest I'm not entirely sure how else to do it, I need to reset the wet variable otherwise they won't try to find a new path the next time they hit water

  • Capx: https://drive.google.com/file/d/1lTSbKI ... sp=sharing

    This is kind of rough but I think this is what you were saying? I don't think this will work unless I make the tiles much smaller since the ants can't fit through gaps without stuttering a lot. The problem with that is that the might be too close to the water to actually avoid it at the point. The only other thing I could think of to get around that is to make the cell border size bigger but that would mean they would need at least two or three blocks clearance to move through an area

  • If I check their angles then I guess I could compare the tile in front of them to check if it's got water on it. I'll give that a shot

  • In a game I am making the players control ants who go to places that the player clicks. The ants die if they run into water and since the water flows around it would be pretty infuriating if they just suicide all the time. To try and remedy this I want to make it so that if an ant sees water too close to itself it will back off and regenerate its obstacle map. My problem is that LOS seems to pick up the origin point of the map instead of the position of individual tiles.

    Can LOS be used to 'see' individual tiles in the tile map?

    (As a side note if anyone has a better idea on how to do this I'd love to know)

    Here is a capx:

    https://drive.google.com/file/d/1pUnLZx ... sp=sharing

  • Well I'm glad I got a good conversation going ^-^ This is for a game I'm making and I decided to make a much simpler version where the amount of water change so it will basically just fill the map up to .its level. Thank you so much for your help and I'm glad you had fun tinkering with this problem as much as I did

  • I had a thought but am having some trouble implementing it. Instead of looping once to find how the water levels should change and then a second loop to implement it, what if you save the changes until the loop has progressed far enough away from a spot in the array and then change it. For example in your original program you compare the values at x,y with x+1,y and x,y+1. That means once the array reaches x=1 you could replace the values at x=0 with their updated values. I'm trying to implement that but am having a bit of trouble, this code doesn't work properly but maybe it can better show what I'm trying to say

    https://drive.google.com/file/d/1wmAOHa ... sp=sharing

  • Wow, I wonder how this can be optimized considering the creeper world game works in much the same way but with much less computing power. I wonder how it was done, but this code is really great. Thanks so much ^-^

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I had to give this a go too, even though dop's example is pretty cool. I found it helped to solve the problem first with 1d water:

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

    Then do 2d water later.

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

    Anyways, it's something you can play with and see if any of the ideas help.

    I was looking at your code, why do the water spread calculations loop "50-1" times for x and y instead of 50? I tried changing it and couldn't see much of a difference

  • Man, I have a lot to learn. That makes my best attempt look pretty bad lol

    https://drive.google.com/file/d/1Pln9Mt ... sp=sharing

    Thank you both for the help, I hope you don't mind if I study and use your code in the little game I'm making

  • Yeah, I want to make a limited amount of water to move around and make it so areas are slowly filled instead of being filled instantly but this is great! I did not even know stuff like this could be done with tile maps. I'll see if I can implement the rest on my own and post a capx of it when I'm done (or if there's anything I get stuck on)

bbjGames's avatar

bbjGames

Member since 16 May, 2015

Twitter
bbjGames has 1 followers

Trophy Case

  • 9-Year Club
  • Popular Game One of your games has over 1,000 players
  • Email Verified

Progress

11/44
How to earn trophies