implementing a high level function in a script to call a low level function in the game engine
Posted
by
eat_a_lemon
on Game Development
See other posts from Game Development
or by eat_a_lemon
Published on 2014-06-07T16:52:45Z
Indexed on
2014/06/07
21:38 UTC
Read the original article
Hit count: 184
In my 2d game engine I have a function that does pathfinding, find_shortest_path. It executes for each time step in the game loop and calculates the next coordinate pair in the series of coordinates to reach the destination object.
Now I want to call this function in a scripting language and have it only return the last coordinate pair result. I want the game engine to go about the business of rendering the incremental steps but I don't want the high level script to care about the rendering. The high level script is only for ai game logic.
Now I know how to bind a method from C to python but how can I signal and coordinate the wait time between the incremental steps without the high level function returning until its time for the last step?
© Game Development or respective owner