Author Topic: Want to write an A* algo, need a few pointers for how to interpret the source  (Read 1811 times)

sayuke

  • Wayfarer
  • *
  • Posts: 5
    • View Profile
Hi, ive just compiled ps under linux, and as my first little contribution (i dont have the time to be an official member) i want to write an A* algo so that click and run is actually useful. Anyway, i written many A*'s, but usually for 2d apps and once for a lego mindstorms kit. Anyway, i want something a little bit more challenging, and i saw that planeshift characters like to make idiots out of themselves by walking into walls.
Anyway, right now im just studying the sources, but id like a few pointers as to what to look for. Ive been looking at the sources for about 2 hours now and ive still only got the faintest idea of how the map works but this is probably due the fact that im used to working with 2d tile based games. Anyway, where should i start looking. I just cant seem to find the starting point. Thank you.

Tuxide

  • Hydlaa Notable
  • *
  • Posts: 715
    • View Profile
    • Banker
I may be wrong, but as far as I know, pathfinding has been implemented in the source code for quite a while now, they just...uhmm, don't use it yet.

sayuke

  • Wayfarer
  • *
  • Posts: 5
    • View Profile
#if USE_EXPERIMENTAL_AUTOMOVE
huh check that out. O well thats a good starting point. Ill recompile it while im reading the sources and see what happens.
EDIT:
src/client/psmovement.cpp: In member function ‘void psMovementManager::UpdateRunTo()’:
src/client/psmovement.cpp:738: error: ‘movePropClass’ was not declared in this scope
lol more stuff to look at
« Last Edit: March 28, 2008, 03:01:36 am by sayuke »

saladasalad

  • Hydlaa Resident
  • *
  • Posts: 96
    • View Profile
    • Vivada - Band / Blog / Good People
The best way to get in touch with people who can help you is via #planeshift on  IRC.
Artisian Hooke  -  Guild Elder in The Organisation.
Alumolo Genare.
Divire Dighur.
--------------------------------------------------------------------
Vivada - Band / Blog / Good People

Lanarel

  • Testers
  • Hydlaa Notable
  • *
  • Posts: 782
    • View Profile
#if USE_EXPERIMENTAL_AUTOMOVE
This probably is added because it only works with the code the person who was working on it has :)
Also, the path finding will be for NPCs, who are walking routes between waypoints. Implementing something to make player characters walk from point A to B may be regarded as botting, if you take it too far.

sayuke

  • Wayfarer
  • *
  • Posts: 5
    • View Profile
Also, the path finding will be for NPCs, who are walking routes between waypoints. Implementing something to make player characters walk from point A to B may be regarded as botting, if you take it too far.
gees, if somebody wanted to "bot" theyd just set up the waypoints so they can walk in strait lines without being interfered. Pathfinding is just something so i can click on the other side of the central plaza and talk to ppl while im walking across. I really have to disagree about that.

Waylander

  • Veteran
  • *
  • Posts: 1562
  • Constantly correct since 1988
    • View Profile
The "If you take it too far" is the important part.  Lanarel is warning you of a slippery slope is all.
<Jeraphon>oh khado
<Jeraphon>you so khrazy

Xil|sleeps: I love cadoras

Waylander, A.K.A: Cadoras, Khado, Nurahk, Armeen, Nostra ... God.

sayuke

  • Wayfarer
  • *
  • Posts: 5
    • View Profile
do u have much of a problem with botters, i mean with an os client it would be pretty easy to write one, but i just did a quick google for planeshift bot and didnt find nething.

Karyuu

  • Forum Legend
  • *
  • Posts: 9341
    • View Profile
There are always problems with botters, in every single game. We do have the occasional player who thinks s/he can get away with it, but is then promptly banned by a GM.
Judge: Are you trying to show contempt for this court, Mr Smith?
Smith: No, My Lord. I am attempting to conceal it.