nillerusr / source-engine

Modified source engine (2017) developed by valve and leaked in 2020. Not for commercial purporses
Other
1.42k stars 227 forks source link

Instructions to launch other source games #318

Open nickbailuc opened 1 year ago

nickbailuc commented 1 year ago

I dumped my entire HL2 folder which includes ep1, ep2, lostcoast, cstrike. I was wondering, what's the procedure to launch the others? Do they all have to be put in separate folders (but the others require hl2 assets afaik), or is there a simple launch option or in-game console command to launch the other games (or chainload the games like with Xash3D).

Could you also add a separate Wiki page regarding compatibility with the other games? Does the original Portal work?

Amazing work tho, it compiled perfectly on my M1 MacBook Air running Debian Linux. This is easier to get working than Xash3D which also requires recompiling HLSDK client.so for each individual game (valve, gearbox, bshift, tfc, dod, ...)

nickbailuc commented 12 months ago

any other game I try launching by placing the compiled files into its directory and specifying the name with the -game parameter, I get "Could not load library client. Try restarting. If that doesn't work, verify the cache."

shinra-electric commented 11 months ago

This is easier to get working than Xash3D which also requires recompiling HLSDK client.so for each individual game

Without specifying, hl2 will be built by default. Add --build-games=[gameid] to the waf configure. For example: python3 waf configure -T release --prefix='' --build-games=portal This should give you the same build output as before, but with an extra folder portal/bin that contains libclient.dylib and libserver.dylib. These are specific to each game and the bin directory should be put into their respective game data folder.

The exception for this is ep2, you should build episodic instead.

The games that work (as far as I'm aware) are:

hl1 = Half-Life 1: Source
hl2 = Half-Life 2 // Default - This will be selected if you don't specify a game
episodic = Half-Life 2 Episode 1
ep2 = Half-Life 2 Episode 2 // Do not build for ep2, use episodic instead.
hl2mp = Half-Life 2: Deathmatch
dod = Day of Defeat
cstrike = Counter-Strike: Source
portal = Portal

or is there a simple launch option or in-game console command to launch the other games?

You launch with ./hl2_launcher -game [gameid] For example: ./hl2_launcher -game portal

nickbailuc commented 10 months ago

just a minor note, I couldn't figure out how to build for multiple source games at once (if this is even possible) --build-games=portal,episodic for instance doesn't work, and having separate --build-games=portal --build-games=episodic only builds for the last --build-games mentioned.

Is there a way to compile multiple (or all) possible binaries at once? I think most people who are this passionate about source games to compile the engine most likely own the entire Valve Complete Pack, and it'd be easier to compile for everything at once

P.S. are there known forks of this project which support other games which are a little more modified to the hl2 engine (such as l4d2, portal 2, tf2...)?

And thank you for your work, I beat hl2 on my M1 Macbook (first time on an ARM device). The game worked phenomenally!!!

palmerj commented 10 months ago

portal 2 would be so cool. Do devs plan to RE the required code to make this work?

lacamar commented 9 months ago

What's the process for getting Half Life 1 to launch? I can't find any documentation for that.

nickbailuc commented 9 months ago

What's the process for getting Half Life 1 to launch? I can't find any documentation for that.

Compile with --build-games=hl1 Then put hl2 and hl1 dirs from steam in the same Dir and the bin Dir. Then launch with -game hl1 Itll launch HL: Source

nickbailuc commented 9 months ago

P.S. I guess I'm keeping this issue open to add documentation for doing this on the main page. It would also be great to be able to compile for multiple games at once instead of having to redownload the repo and compiling independently for each game

lacamar commented 9 months ago

What's the process for getting Half Life 1 to launch? I can't find any documentation for that.

Compile with --build-games=hl1 Then put hl2 and hl1 dirs from steam in the same Dir and the bin Dir. Then launch with -game hl1 Itll launch HL: Source

I have not been able to get the game running using these instructions, the hl2_launcher gives this output when executed with the -game hl1 flag

SDL version: 2.28.5 rev: SDL-release-2.28.5-0-g15ead9a40
LoadLibrary: path: /home/snow/games/half_life2/bin/libfilesystem_stdio.so
SDL video target is 'wayland'
SDL video target is 'wayland'
This system DOES NOT support the OpenGL extension GL_EXT_framebuffer_object.
This system DOES NOT support the OpenGL extension GL_EXT_framebuffer_blit.
This system DOES NOT support the OpenGL extension GL_APPLE_fence.
This system DOES NOT support the OpenGL extension GL_NV_fence.
This system supports the OpenGL extension GL_ARB_sync.
This system DOES NOT support the OpenGL extension GL_EXT_bindable_uniform.
This system DOES NOT support the OpenGL extension GL_APPLE_flush_buffer_range.
This system DOES NOT support the OpenGL extension GL_ARB_map_buffer_range.
This system DOES NOT support the OpenGL extension GL_ARB_vertex_buffer_object.
This system DOES NOT support the OpenGL extension GL_ARB_occlusion_query.
This system DOES NOT support the OpenGL extension GL_APPLE_texture_range.
This system DOES NOT support the OpenGL extension GL_APPLE_client_storage.
This system DOES NOT support the OpenGL extension GL_ARB_uniform_buffer.
This system DOES NOT support the OpenGL extension GL_ARB_vertex_array_bgra.
This system DOES NOT support the OpenGL extension GL_EXT_vertex_array_bgra.
This system DOES NOT support the OpenGL extension GL_EXT_framebuffer_multisample_blit_scaled.
This system supports the OpenGL extension GL_ARB_framebuffer_object.
This system DOES NOT support the OpenGL extension GL_GREMEDY_string_marker.
This system DOES NOT support the OpenGL extension GL_ARB_debug_output.
This system DOES NOT support the OpenGL extension GL_EXT_direct_state_access.
This system DOES NOT support the OpenGL extension GL_NV_bindless_texture.
This system DOES NOT support the OpenGL extension GL_AMD_pinned_memory.
This system DOES NOT support the OpenGL extension GL_QCOM_alpha_test.
This system supports the OpenGL extension GL_EXT_texture_sRGB_decode.
This system DOES NOT support the OpenGL extension GL_NVX_gpu_memory_info.
This system DOES NOT support the OpenGL extension GL_ATI_meminfo.
This system supports the OpenGL extension GL_EXT_texture_compression_s3tc.
This system supports the OpenGL extension GL_EXT_texture_compression_dxt1.
This system supports the OpenGL extension GL_ANGLE_texture_compression_dxt3.
This system supports the OpenGL extension GL_ANGLE_texture_compression_dxt5.
This system supports the OpenGL extension GL_EXT_color_buffer_half_float.
This system supports the OpenGL extension GL_EXT_texture_norm16.
This system supports the OpenGL extension GL_EXT_buffer_storage.
This system DOES NOT support the OpenGL extension GLX_EXT_swap_control_tear.
GL_RENDERER="Apple M1 Pro (G13S C0)" GL_VERSION="OpenGL ES 3.2 Mesa 24.1.0-asahi20240218" GL_VENDOR="Mesa" (3.2.0)
GL_EXTENSIONS="GL_EXT_blend_minmax GL_EXT_multi_draw_arrays GL_EXT_texture_filter_anisotropic GL_EXT_texture_compression_s3tc GL_EXT_texture_compression_dxt1 GL_EXT_texture_compression_rgtc GL_EXT_texture_format_BGRA8888 GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth24 GL_OES_element_index_uint GL_OES_fbo_render_mipmap GL_OES_mapbuffer GL_OES_rgb8_rgba8 GL_OES_standard_derivatives GL_OES_stencil8 GL_OES_texture_3D GL_OES_texture_float GL_OES_texture_float_linear GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_texture_npot GL_OES_vertex_half_float GL_EXT_draw_instanced GL_EXT_texture_sRGB_decode GL_OES_EGL_image GL_OES_depth_texture GL_OES_packed_depth_stencil GL_EXT_texture_type_2_10_10_10_REV GL_NV_conditional_render GL_OES_get_program_binary GL_APPLE_texture_max_level GL_EXT_discard_framebuffer GL_EXT_read_format_bgra GL_NV_pack_subimage GL_NV_texture_barrier GL_EXT_frag_depth GL_NV_fbo_color_attachments GL_OES_EGL_image_external GL_OES_EGL_sync GL_OES_vertex_array_object GL_OES_viewport_array GL_ANGLE_pack_reverse_row_order GL_ANGLE_texture_compression_dxt3 GL_ANGLE_texture_compression_dxt5 GL_EXT_occlusion_query_boolean GL_EXT_robustness GL_EXT_texture_rg GL_EXT_unpack_subimage GL_NV_draw_buffers GL_NV_read_buffer GL_NV_read_depth GL_NV_read_depth_stencil GL_NV_read_stencil GL_APPLE_sync GL_EXT_draw_buffers GL_EXT_instanced_arrays GL_EXT_map_buffer_range GL_KHR_debug GL_KHR_robustness GL_KHR_texture_compression_astc_ldr GL_NV_generate_mipmap_sRGB GL_NV_pixel_buffer_object GL_OES_depth_texture_cube_map GL_OES_required_internalformat GL_OES_surfaceless_context GL_EXT_color_buffer_float GL_EXT_debug_label GL_EXT_sRGB_write_control GL_EXT_separate_shader_objects GL_EXT_shader_framebuffer_fetch GL_EXT_shader_group_vote GL_EXT_shader_implicit_conversions GL_EXT_shader_integer_mix GL_EXT_tessellation_point_size GL_EXT_tessellation_shader GL_ANDROID_extension_pack_es31a GL_EXT_base_instance GL_EXT_compressed_ETC1_RGB8_sub_texture GL_EXT_copy_image GL_EXT_draw_buffers_indexed GL_EXT_draw_elements_base_vertex GL_EXT_gpu_shader5 GL_EXT_polygon_offset_clamp GL_EXT_primitive_bounding_box GL_EXT_render_snorm GL_EXT_shader_io_blocks GL_EXT_texture_border_clamp GL_EXT_texture_buffer GL_EXT_texture_cube_map_array GL_EXT_texture_norm16 GL_EXT_texture_view GL_KHR_blend_equation_advanced GL_KHR_blend_equation_advanced_coherent GL_KHR_context_flush_control GL_KHR_robust_buffer_access_behavior GL_NV_image_formats GL_NV_shader_noperspective_interpolation GL_OES_copy_image GL_OES_draw_buffers_indexed GL_OES_draw_elements_base_vertex GL_OES_gpu_shader5 GL_OES_primitive_bounding_box GL_OES_sample_shading GL_OES_sample_variables GL_OES_shader_io_blocks GL_OES_shader_multisample_interpolation GL_OES_tessellation_point_size GL_OES_tessellation_shader GL_OES_texture_border_clamp GL_OES_texture_buffer GL_OES_texture_cube_map_array GL_OES_texture_stencil8 GL_OES_texture_storage_multisample_2d_array GL_OES_texture_view GL_EXT_blend_func_extended GL_EXT_buffer_storage GL_EXT_float_blend GL_EXT_geometry_point_size GL_EXT_geometry_shader GL_EXT_texture_sRGB_R8 GL_EXT_texture_sRGB_RG8 GL_KHR_no_error GL_KHR_texture_compression_astc_sliced_3d GL_OES_EGL_image_external_essl3 GL_OES_geometry_point_size GL_OES_geometry_shader GL_OES_shader_image_atomic GL_EXT_clear_texture GL_EXT_clip_cull_distance GL_EXT_disjoint_timer_query GL_EXT_texture_compression_s3tc_srgb GL_MESA_shader_integer_functions GL_EXT_clip_control GL_EXT_color_buffer_half_float GL_EXT_texture_compression_bptc GL_EXT_texture_mirror_clamp_to_edge GL_KHR_parallel_shader_compile GL_EXT_EGL_image_storage GL_EXT_shader_framebuffer_fetch_non_coherent GL_EXT_texture_shadow_lod GL_MESA_framebuffer_flip_y GL_EXT_depth_clamp GL_EXT_texture_query_lod GL_MESA_sampler_objects GL_MESA_bgra "
GL_NV_bindless_texture: DISABLED
GL_AMD_pinned_memory: DISABLED
GL_EXT_buffer_storage: NOT AVAILABLE
GL_EXT_texture_sRGB_decode: AVAILABLE
LoadLibrary: pModule: engine.so, path: /home/snow/games/half_life2/bin/libengine.so
LoadLibrary: pModule: inputsystem.so, path: /home/snow/games/half_life2/bin/libinputsystem.so
LoadLibrary: pModule: materialsystem.so, path: /home/snow/games/half_life2/bin/libmaterialsystem.so
LoadLibrary: pModule: datacache.so, path: /home/snow/games/half_life2/bin/libdatacache.so
LoadLibrary: pModule: studiorender.so, path: /home/snow/games/half_life2/bin/libstudiorender.so
LoadLibrary: pModule: vphysics.so, path: /home/snow/games/half_life2/bin/libvphysics.so
LoadLibrary: pModule: video_services.so, path: /home/snow/games/half_life2/bin/libvideo_services.so
LoadLibrary: pModule: vguimatsurface.so, path: /home/snow/games/half_life2/bin/libvguimatsurface.so
LoadLibrary: pModule: vgui2.so, path: /home/snow/games/half_life2/bin/libvgui2.so
Can't find module - sourcevr.so
AppFramework : Unable to load module sourcevr.so!
LoadLibrary: path: /home/snow/games/half_life2/bin/libfilesystem_stdio.so
LoadLibrary: pModule: shaderapidx9.so, path: /home/snow/games/half_life2/bin/libshaderapidx9.so
Can't find module - video_bink
Can't find module - video_webm
Setup file 'gameinfo.txt' doesn't exist in subdirectory 'hl1'.
Check your -game parameter or VCONFIG setting.
shinra-electric commented 9 months ago

I have not been able to get the game running using these instructions, the hl2_launcher gives this output when executed with the -game hl1 flag

Setup file 'gameinfo.txt' doesn't exist in subdirectory 'hl1'.

You're missing the gameinfo.txt file from the hl1 game data folder

Edit: Valve posted the file online here.