| 1 | # Reading curve from XML |
| 2 | |
| 3 | Castle Game Engine contains a simple tool to design curves (piecewise cubic Bezier curves), called `castle-curves`, documented on |
| 4 | |
| 5 | https://castle-engine.io/curves_tool |
| 6 | |
| 7 | The created curves can be saved into a simple XML format and loaded into your own Castle Game Engine programs and used for any purpose (for example as a track along which something moves). |
| 8 | |
| 9 | This example show how to read an XML file with a curve, display such curve, and use it to follow something (in this case -- a sphere) along the curve. |
| 10 | |
| 11 | TODO: |
| 12 | - invent extension, like `.castle-curves`, for such files |
| 13 | - allow to automatically load and display them by TCastleScene |
| 14 | |
| 15 | Using [Castle Game Engine](https://castle-engine.io/). |
| 16 | |
| 17 | ## Building |
| 18 | |
| 19 | Compile by: |
| 20 | |
| 21 | - [CGE editor](https://castle-engine.io/editor). Just use menu items _"Compile"_ or _"Compile And Run"_. |
| 22 | |
| 23 | - Or use [CGE command-line build tool](https://castle-engine.io/build_tool). Run `castle-engine compile` in this directory. |
| 24 | |
| 25 | - Or use [Lazarus](https://www.lazarus-ide.org/). Open in Lazarus `cars_demo_standalone.lpi` file and compile / run from Lazarus. Make sure to first register [CGE Lazarus packages](https://castle-engine.io/lazarus). |