Ai for 2d platfoirm esk survival entity

ok so im going to skip the "im mad butthurt and have no idea what im doing par!!!’ and go strait to the chase

I have a 2d terraria like survival game in the works, and i need a basic ai that can navigate the basic terrain in the space. i need the Ai to be able to

  • be able to randomly walk around without getting stuck on itself or terrain
  • jump up on blocks, not get stuck on any, and turn around if it tries to jump somewhere for too long
  • dosent require external scoursec al around the map (preformance)

i probably didnt explain it the best but if theres a bundle or anything someone already has id much rather use that

1 Like

im kinda already making the same thing… so here’s the code {“data”:{“behavior”:{“v”:“2”,“nodes”:[{“inputCount”:0,“outputCount”:0,“name”:“enemy follow”,“behaviorType”:“logic.NodeGroup”,“x”:540,“y”:-704,“group”:“”,“id”:“9ac93d8ce959f04b”,“isMenuItem”:false},{“inputCount”:0,“outputCount”:1,“name”:“Always”,“behaviorType”:“logic.triggers.Always”,“x”:-90,“y”:-16,“group”:“9ac93d8ce959f04b”,“id”:“9ab320fc4b5e6b44”},{“inputCount”:2,“outputCount”:2,“name”:“Router”,“behaviorType”:“logic.logic.Router”,“x”:90,“y”:-32,“group”:“9ac93d8ce959f04b”,“id”:“9ab487ad0e64a84f”,“loop”:true,“routes”:2,“mode”:0},{“inputCount”:0,“outputCount”:1,“name”:“Always”,“behaviorType”:“logic.triggers.Always”,“x”:-270,“y”:144,“group”:“9ac93d8ce959f04b”,“id”:“9ab4a7d6ec5b6b42”},{“inputCount”:3,“outputCount”:1,“name”:“Global”,“behaviorType”:“logic.logic.Global”,“x”:-90,“y”:80,“group”:“9ac93d8ce959f04b”,“id”:“9ab4b4bee4957d4b”,“tag”:“playerX:Number”,“version”:2,“dataType”:2},{“inputCount”:1,“outputCount”:1,“name”:“Extractor”,“behaviorType”:“logic.properties.Extractor”,“x”:-90,“y”:192,“group”:“9ac93d8ce959f04b”,“id”:“9ab4d812f673644b”,“targetId”:0,“prop”:“x”,“version”:2},{“gateVal”:0,“mode”:“greater than”,“inputCount”:2,“outputCount”:2,“name”:“Filter”,“behaviorType”:“logic.logic.Filter2”,“x”:90,“y”:144,“group”:“9ac93d8ce959f04b”,“id”:“9ab4f403dff5644f”},{“inputCount”:3,“outputCount”:1,“name”:“Number”,“behaviorType”:“logic.logic.Value”,“x”:270,“y”:224,“group”:“9ac93d8ce959f04b”,“id”:“9ab51e685e400845”,“startVal”:2,“tag”:“”,“roundMode”:1},{“inputCount”:3,“outputCount”:1,“name”:“Number”,“behaviorType”:“logic.logic.Value”,“x”:270,“y”:112,“group”:“9ac93d8ce959f04b”,“id”:“9ab51f0f7ac0184f”,“startVal”:1,“tag”:“”,“roundMode”:1},{“inputCount”:3,“outputCount”:1,“name”:“Number”,“behaviorType”:“logic.logic.Value”,“x”:270,“y”:-112,“group”:“9ac93d8ce959f04b”,“id”:“9ab570a508483045”,“startVal”:-5,“tag”:“”,“roundMode”:1},{“inputCount”:3,“outputCount”:1,“name”:“Number”,“behaviorType”:“logic.logic.Value”,“x”:270,“y”:-16,“group”:“9ac93d8ce959f04b”,“id”:“9ab5c68f988c904c”,“startVal”:5,“tag”:“”,“roundMode”:1},{“inputCount”:2,“outputCount”:3,“name”:“Proximity”,“behaviorType”:“logic.components.Prox2”,“x”:-90,“y”:320,“group”:“9ac93d8ce959f04b”,“id”:“9ab75e9191a16848”,“targetEntityId”:0,“threshold”:18,“targetClassId”:18976984,“nearestOnly”:false,“firstObject”:true,“allObjects”:false,“contains”:false,“shape”:1,“oX”:0,“oY”:9,“pin”:false},{“inputCount”:0,“outputCount”:1,“name”:“Always”,“behaviorType”:“logic.triggers.Always”,“x”:-270,“y”:352,“group”:“9ac93d8ce959f04b”,“id”:“9ab76c6709802148”},{“inputCount”:3,“outputCount”:2,“name”:“RayCast”,“behaviorType”:“logic.components.RayCast”,“x”:90,“y”:336,“group”:“9ac93d8ce959f04b”,“id”:“9ab78cd2cd0d7b48”,“targetClassId”:0,“direction”:0,“length”:32,“earlyOut”:false,“oX”:0,“oY”:0,“pin”:true},{“inputCount”:3,“outputCount”:1,“name”:“Number”,“behaviorType”:“logic.logic.Value”,“x”:270,“y”:336,“group”:“9ac93d8ce959f04b”,“id”:“9ac4d7af0715c84c”,“startVal”:20,“tag”:“”,“roundMode”:1},{“inputCount”:3,“outputCount”:3,“name”:“Velocity”,“behaviorType”:“logic.properties.Physics”,“x”:450,“y”:-64,“group”:“9ac93d8ce959f04b”,“id”:“9ac65434f3631247”},{“inputCount”:3,“outputCount”:3,“name”:“Flip”,“behaviorType”:“logic.properties.Flip”,“x”:450,“y”:176,“group”:“9ac93d8ce959f04b”,“id”:“9ac847e1f9e37641”,“spriteOnly”:false},{“inputCount”:3,“outputCount”:3,“name”:“Impulse”,“behaviorType”:“logic.components.Impulse”,“x”:630,“y”:320,“group”:“9ac93d8ce959f04b”,“id”:“9aca40186872d442”},{“inputCount”:3,“outputCount”:1,“name”:“Switch”,“behaviorType”:“logic.logic.Switch”,“x”:450,“y”:320,“group”:“9ac93d8ce959f04b”,“id”:“9c48f30cbf75d74b”,“_startVal”:1,“dataType”:2},{“delay”:5,“count”:1,“version”:2,“inputCount”:3,“outputCount”:1,“name”:“Timer”,“behaviorType”:“logic.triggers.Timer”,“x”:450,“y”:448,“group”:“9ac93d8ce959f04b”,“id”:“9c492070946f0a47”}],“links”:[{“input_id”:“9ab487ad0e64a84fi1”,“output_id”:“9ab320fc4b5e6b44o0”},{“input_id”:“9ab570a508483045i1”,“output_id”:“9ab487ad0e64a84fo0”},{“input_id”:“9ab5c68f988c904ci1”,“output_id”:“9ab487ad0e64a84fo1”},{“input_id”:“9ab4b4bee4957d4bi1”,“output_id”:“9ab4a7d6ec5b6b42o0”},{“input_id”:“9ab4d812f673644bi0”,“output_id”:“9ab4a7d6ec5b6b42o0”},{“input_id”:“9ab4f403dff5644fi0”,“output_id”:“9ab4b4bee4957d4bo0”},{“input_id”:“9ab4f403dff5644fi1”,“output_id”:“9ab4d812f673644bo0”},{“input_id”:“9ab51f0f7ac0184fi1”,“output_id”:“9ab4f403dff5644fo0”},{“input_id”:“9ab51e685e400845i1”,“output_id”:“9ab4f403dff5644fo1”},{“input_id”:“9ab487ad0e64a84fi0”,“output_id”:“9ab51e685e400845o0”},{“input_id”:“9ac847e1f9e37641i1”,“output_id”:“9ab51e685e400845o0”},{“input_id”:“9ab487ad0e64a84fi0”,“output_id”:“9ab51f0f7ac0184fo0”},{“input_id”:“9ac847e1f9e37641i0”,“output_id”:“9ab51f0f7ac0184fo0”},{“input_id”:“9ac65434f3631247i0”,“output_id”:“9ab570a508483045o0”},{“input_id”:“9ac65434f3631247i0”,“output_id”:“9ab5c68f988c904co0”},{“input_id”:“9ab78cd2cd0d7b48i2”,“output_id”:“9ab75e9191a16848o0”},{“input_id”:“9ab75e9191a16848i1”,“output_id”:“9ab76c6709802148o0”},{“input_id”:“9ac4d7af0715c84ci1”,“output_id”:“9ab78cd2cd0d7b48o0”},{“input_id”:“9c48f30cbf75d74bi2”,“output_id”:“9ac4d7af0715c84co0”},{“input_id”:“9c48f30cbf75d74bi0”,“output_id”:“9c48f30cbf75d74bo0”},{“input_id”:“9aca40186872d442i1”,“output_id”:“9c48f30cbf75d74bo0”},{“input_id”:“9c492070946f0a47i0”,“output_id”:“9c48f30cbf75d74bo0”},{“input_id”:“9c48f30cbf75d74bi1”,“output_id”:“9c492070946f0a47o0”}]}}}
remember to make its collision shape a capsule
-pls give me credit