Debian Codegraph @

examples/fps_game/README.md

raw symbols SCIP
1 # First-Person Shooter example
2
3 **TODO: This example is in the middle of a rework. It not yet fully functional, there's no creature AI, no items pickup, weapon doesn't work. See `examples/deprecated_to_upgrade/fps_game_old_ai/` for a working version but using deprecated API.**
4
5 Example of a fully-working 3D FPS game using _Castle Game Engine_.
6
7 With level designed using _Castle Game Engine_.
8
9 ![Screenshot working in editor](screenshot_editor.png)
10 ![Screenshot 2](screenshot_2.png)
11 ![Screenshot](screenshot.png)
12
13 We have:
14
15 - level,
16 - creatures,
17 - items (medkit and weapon),
18 - inventory,
19 - player can be hurt and die,
20 - player can shoot and kill the creatures,
21 - bump mapping,
22 - move limit,
23 - sectors/waypoints (for AI),
24 - buttons,
25 - notifications,
26 - custom viewport,
27 - sounds,
28 - sky,
29 - water,
30 - footsteps
31 - and a *lot* of comments.
32
33 ## Inputs
34
35 Attack (with currently equipped weapon) by clicking with left mouse button.
36
37 Move and rotate:
38
39 - use AWSD or arrow keys,
40 - you can activate "Mouse Look" by F4 or holding the right mouse button,
41 - hold Shift to run.
42
43 TODO: Inventory:
44
45 - use current item by Enter,
46 - change current item by [ ] or mouse wheel,
47 - drop item by R.
48
49 Misc:
50
51 - screenshot: F5.
52 - fake win: P,
53 - fake death: O.
54
55 A lot more keys and mouse shortcuts are instantly working
56 (and they all are configurable, too).
57
58 The `MapViewport` in right-bottom part of the screen shows a map view top.
59 "Examine" view is available and you can zoom in/out using scroll.
60
61 ## Building
62
63 Using [Castle Game Engine](https://castle-engine.io/).
64
65 Compile by:
66
67 - [CGE editor](https://castle-engine.io/editor). Just use menu items _"Compile"_ or _"Compile And Run"_.
68
69 - Or use [CGE command-line build tool](https://castle-engine.io/build_tool). Run `castle-engine compile` in this directory.
70
71 - Or use [Lazarus](https://www.lazarus-ide.org/). Open in Lazarus `fps_game.lpi` file and compile / run from Lazarus. Make sure to first register [CGE Lazarus packages](https://castle-engine.io/lazarus).