Example 'fps_game' error

When I compile and run the example ‘fps_game’ I get the following error:

castle_engine_error

Cheers,

Gary

Running “C:\Users\chike\Downloads\castle-engine-7.0-alpha.snapshot-win64-x86_64\castle_game_engine\bin\castle-engine.exe compile --mode=debug”

Compiling project “fps_game” for OS / CPU “win64 / x86_64” in mode “debug”.
castle-engine: Warning: Windows Resources: Icon in format suitable for Windows (.ico) not found. Exe file will not have icon.
FPC executing…
Compiling Debug Version
Free Pascal Compiler version 3.2.2 [2021/05/15] for x86_64
Copyright (c) 1993-2021 by Florian Klaempfl and others
Target OS: Win64 for x64
Compiling fps_game.dpr
User defined: Thread support enabled.
Compiling resource C:\Users\chike\Downloads\castle-engine-7.0-alpha.snapshot-win64-x86_64\castle_game_engine\examples\fps_game\castle-engine-output\compilation\x86_64-win64\fps_game.obj
Linking fps_game.exe
35 lines compiled, 2.5 sec, 6779680 bytes code, 1157380 bytes data

Command finished with status 0.
Running “C:\Users\chike\Downloads\castle-engine-7.0-alpha.snapshot-win64-x86_64\castle_game_engine\bin\castle-engine.exe run --mode=debug”

Running project “fps_game” for OS / CPU “win64 / x86_64”.
Running C:\Users\chike\Downloads\castle-engine-7.0-alpha.snapshot-win64-x86_64\castle_game_engine\examples\fps_game\fps_game.exe
Log for “fps_game”.
Version: 0.1.
Started on 2022-07-24 at 18:08:38.
Castle Game Engine version: 7.0-alpha.snapshot (commit 83fddab7cd22686f82e43bb319bf480f25025a78).
Compiled with FPC 3.2.2.
Platform: Desktop, OS: Win64, CPU: x86_64 (this exe is using 64-bit architecture).
ZLib detected (version 1.2.3).
LibPng detected (version 1.4.0).
Rendering Initialized: OpenGL 4.6 (for more info: LogGLInformationVerbose:=true)
Path: Program data path detected as “file:///C:/Users/chike/Downloads/castle-engine-7.0-alpha.snapshot-win64-x86_64/castle_game_engine/examples/fps_game/data/”
Sound: Initialized: OpenAL 1.1 (for more info: TSoundEngine.LogVerbose:=true)
Pool for “Gun” auto-determined as 1
Pool for “MedKit” auto-determined as 1
Warning: Animation “base” of “MedKit” has it’s own URL, this is deprecated. Use one URL for all animations. See Resources (creatures and items) | Creating Game Data | Castle Game Engine .
MaterialProperties: Using GPU compressed (and potentially downscaled) alternative castle-data:/example_level/textures/auto_generated/dxt1_rgb/concrete-normalmap.png.dds
MaterialProperties: Using GPU compressed (and potentially downscaled) alternative castle-data:/example_level/textures/auto_generated/dxt1_rgb/concrete-normalmap.png.dds
Warning: ImageTexture.flipVertically for DDS/KTX not implemented yet, the image will be inverted
MaterialProperties: Using GPU compressed (and potentially downscaled) alternative castle-data:/example_level/textures/auto_generated/dxt1_rgb/concrete.png.dds
MaterialProperties: Using GPU compressed (and potentially downscaled) alternative castle-data:/example_level/textures/auto_generated/dxt1_rgb/concrete.png.dds
Warning: ImageTexture.flipVertically for DDS/KTX not implemented yet, the image will be inverted
MaterialProperties: Using GPU compressed (and potentially downscaled) alternative castle-data:/example_level/textures/auto_generated/dxt1_rgb/large-stone-wall.png.dds
MaterialProperties: Using GPU compressed (and potentially downscaled) alternative castle-data:/example_level/textures/auto_generated/dxt1_rgb/large-stone-wall.png.dds
Warning: ImageTexture.flipVertically for DDS/KTX not implemented yet, the image will be inverted
MaterialProperties: Using GPU compressed (and potentially downscaled) alternative castle-data:/example_level/textures/auto_generated/dxt1_rgb/stone_wall_4.png.dds
MaterialProperties: Using GPU compressed (and potentially downscaled) alternative castle-data:/example_level/textures/auto_generated/dxt1_rgb/stone_wall_4.png.dds
Warning: ImageTexture.flipVertically for DDS/KTX not implemented yet, the image will be inverted
MaterialProperties: Using GPU compressed (and potentially downscaled) alternative castle-data:/example_level/textures/auto_generated/dxt1_rgb/tilable-img_0044.png.dds
MaterialProperties: Using GPU compressed (and potentially downscaled) alternative castle-data:/example_level/textures/auto_generated/dxt1_rgb/tilable-img_0044.png.dds
Warning: ImageTexture.flipVertically for DDS/KTX not implemented yet, the image will be inverted
MaterialProperties: Using GPU compressed (and potentially downscaled) alternative castle-data:/example_level/textures/auto_generated/dxt5/brushwalker437.png.dds
MaterialProperties: Using GPU compressed (and potentially downscaled) alternative castle-data:/example_level/textures/auto_generated/dxt5/brushwalker437.png.dds
Warning: ImageTexture.flipVertically for DDS/KTX not implemented yet, the image will be inverted
MaterialProperties: Using GPU compressed (and potentially downscaled) alternative castle-data:/example_level/sky/auto_generated/dxt1_rgb/sky_back.png.dds
MaterialProperties: Using GPU compressed (and potentially downscaled) alternative castle-data:/example_level/sky/auto_generated/dxt1_rgb/sky_back.png.dds
MaterialProperties: Using GPU compressed (and potentially downscaled) alternative castle-data:/example_level/sky/auto_generated/dxt1_rgb/sky_bottom.png.dds
MaterialProperties: Using GPU compressed (and potentially downscaled) alternative castle-data:/example_level/sky/auto_generated/dxt1_rgb/sky_bottom.png.dds
MaterialProperties: Using GPU compressed (and potentially downscaled) alternative castle-data:/example_level/sky/auto_generated/dxt1_rgb/sky_front.png.dds
MaterialProperties: Using GPU compressed (and potentially downscaled) alternative castle-data:/example_level/sky/auto_generated/dxt1_rgb/sky_front.png.dds
MaterialProperties: Using GPU compressed (and potentially downscaled) alternative castle-data:/example_level/sky/auto_generated/dxt1_rgb/sky_left.png.dds
MaterialProperties: Using GPU compressed (and potentially downscaled) alternative castle-data:/example_level/sky/auto_generated/dxt1_rgb/sky_left.png.dds
MaterialProperties: Using GPU compressed (and potentially downscaled) alternative castle-data:/example_level/sky/auto_generated/dxt1_rgb/sky_right.png.dds
MaterialProperties: Using GPU compressed (and potentially downscaled) alternative castle-data:/example_level/sky/auto_generated/dxt1_rgb/sky_right.png.dds
MaterialProperties: Using GPU compressed (and potentially downscaled) alternative castle-data:/example_level/sky/auto_generated/dxt1_rgb/sky_top.png.dds
MaterialProperties: Using GPU compressed (and potentially downscaled) alternative castle-data:/example_level/sky/auto_generated/dxt1_rgb/sky_top.png.dds
Exception: Exception “Exception”:
Camera “” of viewport “” is not part of this viewport’s Items. You must add the camera to .Items.

$00000001002E0BEA RENDERWITHOUTSCREENEFFECTS, line 2628 of …/…/src/scene/castleviewport.pas
$00000001004C63C3 RENDER, line 630 of …/…/src/scene/castlescreeneffects.pas
$000000010012FDB3 RECURSIVERENDER, line 1943 of …/…/src/ui/castleuicontrols_userinterface.inc
$000000010012D070 EVENTRENDER, line 1784 of …/…/src/ui/castleuicontrols_container.inc
$00000001000242FF DORENDER, line 3299 of …/…/src/window/castlewindow.pas
$0000000100028367 UPDATEANDRENDEREVERYTHING, line 4744 of …/…/src/window/castlewindow.pas
$0000000100022564 PROCESSMESSAGE2, line 168 of …/…/src/window/castlewindow_winsystem.inc
$000000010002250B PROCESSMESSAGE, line 71 of …/…/src/window/castlewindow_winsystem.inc
$0000000100028F2E DORUN, line 5005 of …/…/src/window/castlewindow.pas
$000000010009EF55
$00000001000227F6 RUN, line 202 of …/…/src/window/castlewindow_winsystem.inc
$000000010002563D OPENANDRUN, line 3711 of …/…/src/window/castlewindow.pas
$0000000100001F26 main, line 34 of fps_game.dpr
$0000000100001F46
$0000000100016240
$0000000100001EF7
$00007FFD57E654E0

Sound: Sound backend closed
Exception “Exception”:
Process “C:\Users\chike\Downloads\castle-engine-7.0-alpha.snapshot-win64-x86_64\castle_game_engine\examples\fps_game\fps_game.exe” (absolute path “C:\Users\chike\Downloads\castle-engine-7.0-alpha.snapshot-win64-x86_64\castle_game_engine\examples\fps_game\fps_game.exe”) failed with exit status 1

Command finished with status 1.

Thank you, fixed!

I was lately testing fps_game with UPCOMING_FPS_GAME_REDESIGN defined so often that I missed a trivial error in default version of fps_game :slight_smile:

1 Like

It’s working now Michalis. Thank you! :rocket: