GSoC Midterm Evaluation: Steam Workshop SDK/Third Party Integration
Reporter: k0T0z | Status: closed | Last Modified: June 12, 2024, 06:23:09 amCloses #1881. This PR is part of the Google Summer of Code 2023
program.
I will be updating my Logs inside my domain.
Note: ✔️ means that SOG/unit tests for the corresponding function are provided.
Steps To Run The Code In This PR (Ubuntu Linux 64-bit Only) (Working perfectly
):
Note: You may have to edit paths provided in the below steps depending on where you cloned enigma-dev
- Download Steam.
- Now edit the
.bashrc
and add these two important exports:
cd ~
vim .bashrc
- 64-bit
export LD_LIBRARY_PATH=~/Desktop/enigma-dev/ENIGMAsystem/SHELL/Universal_System/Extensions/Steamworks/gameclient/steambinder/Steamv157/sdk/redistributable_bin/linux64:${LD_LIBRARY_PATH}
export LD_PRELOAD=~/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so:${LD_PRELOAD}
- 32-bit
export LD_LIBRARY_PATH=~/Desktop/enigma-dev/ENIGMAsystem/SHELL/Universal_System/Extensions/Steamworks/gameclient/steambinder/Steamv157/sdk/redistributable_bin/linux32:${LD_LIBRARY_PATH}
export LD_PRELOAD=~/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so:${LD_PRELOAD}
- Now run:
cd enigma-dev
./emake -r CommandLine/testing/SimpleTests/steam_general.sog -e "DataStructures,GTest,Json,Steamworks" -o /tmp/test
Steps To Run The Code In This PR (Windows 64-bit Only) (Working perfectly
):
Note: Windows support will be postponed due to an ABI issue as ENIGMA doesn't support MSVC yet, I recommend using Ubuntu Linux - 20/06/2023 00:45
Note: You may have to edit paths provided in the below steps depending on where you cloned enigma-dev
- Download Steam (I'm using v2.10.91.91).
- Copy the
steam_api64.dll
fromenigma-dev\ENIGMAsystem\SHELL\Universal_System\Extensions\Steamworks\gameclient\steambinder\Steamv157\sdk\redistributable_bin\win64
(this is for 64-bit Windows so choose the one for your version) and then paste it intomsys64\tmp
directory. This must be done as LGM exports the executable in that location and we need that DLL to be with the executable. - Now run:
cd enigma-dev
./emake.exe -r CommandLine/testing/SimpleTests/steam_general.sog -e "DataStructures,GTest,Json,Steamworks" -o /tmp/test.exe
Steps To Run The Example (Ubuntu Linux 64-bit Only) (Working perfectly
):
Note: You may have to edit paths provided in the below steps depending on where you cloned enigma-dev
- As Windows above but before running LGM, you must edit the
.bashrc
and add the two important exports mentioned above in the Linux section. - Now open LGM and hit the run button
java -jar lateralgm.jar
Steps To Run The Example (Windows 64-bit Only) (Currently crashes
):
Note: Windows support will be postponed due to an ABI issue as ENIGMA doesn't support MSVC yet, I recommend using Ubuntu Linux - 20/06/2023 00:45
Note: You may have to edit paths provided in the below steps depending on where you cloned enigma-dev
- Currently Steamworks and Json extensions are enabled by default in
steam-sdk-integration
branch so you need only Steam to be running. Don't forget to log in with your Steam account.
Important Changes To My Plan:
- The final output of the project won't be a C++ wrapper for Steam SDK as declaimed in my proposal. A layer between Steamworks ENIGMA's extension and Steamworks API will be created instead.
- Project structure has entirely changed.
Done Before Coding Period:
- Started Implementing C++ wrapper.
- Started Implementing General API.
User Functions Progress (EDL Scripts Implemented):
- ✅ steam_init(); ✔️
- ✅ steam_update();
- ✅ steam_shutdown();
- ✅ steam_initialised(); ✔️
- ✅ steam_stats_ready();
- ✅ steam_get_app_id();
- ✅ steam_get_user_account_id();
- ✅ steam_get_user_steam_id();
- ✅ steam_get_persona_name();
- ✅ steam_get_user_persona_name();
- ✅ steam_is_user_logged_on();
- ✅ steam_current_game_language();
- ✅ steam_available_languages();
- ✅ steam_is_subscribed();
- ✅ steam_set_warning_message_hook();
- ✅ steam_is_overlay_enabled();
- ✅ steam_is_overlay_activated();
- ✅ steam_activate_overlay();
- ✅ steam_activate_overlay_browser();
- ✅ steam_activate_overlay_store();
- ✅ steam_activate_overlay_user();
- ✅ steam_set_overlay_notification_inset();
- ✅ steam_set_overlay_notification_position();
- ✅
OverlayType
constant - ✅
OverlayNotificationPosition
constant
- ✅ steam_set_achievement();
- ✅ steam_get_achievement();
- ✅ steam_clear_achievement();
- ✅ steam_set_stat_int();
- ✅ steam_set_stat_float();
- ✅ steam_set_stat_avg_rate();
- ✅ steam_get_stat_int();
- ✅ steam_get_stat_float();
- ⬜ steam_get_stat_avg_rate();
- ✅ steam_reset_all_stats();
- ✅ steam_reset_all_stats_achievements();
- ✅ steam_create_leaderboard();
- ✅ steam_upload_score();
- ✅ steam_upload_score_ext();
- ⬜ steam_upload_score_buffer();
- ⬜ steam_upload_score_buffer_ext();
- ✅ steam_download_scores();
- ✅ steam_download_scores_around_user();
- ✅ steam_download_friends_scores();
- ⬜
LeaderboardEntry
data type - ✅
LeaderboardDisplayType
constant - ✅
LeaderboardSortOrder
constant
Must Be Done Before Merging:
✅ Adding support for other platforms in the Makefile file.
✅ Switching the Default
property in the Steamworks & Json extensions YAML file to false
.
✅ Switching the cxxflags
property in Compilers/Linux/gcc.ey
to -fdiagnostics-color=always
.
⬜ Reviewing all error messages and documentation in newly added files.
✅ Adding the license to all newly added files.
✅ Providing installation instructions for all platforms.
✅ Modifying the extension to call steam_init();
automatically when enabled.
✅ Match all naming conventions with GMS's Steamworks extension.
⬜ Testing the APIs with the latest version of Steamworks SDK, Steam, OS version, etc.
⬜ Must test all EDL scripts in the example game provided.
⬜ Providing SOG/unit tests for all functions written (this needs to be studied carefully as in order to test the C++ wrapper tester must have steam installed and running or I may use mocks).
✅ Clearing garbage files.
✅ DEBUG_MESSAGE()
must exist only in APIs files. Try to remove it from wrapper files. Try to make the wrapper independent on ENIGMA.
✅ Fix example game background design.
⬜ Update the example game to match the latest version of GMS Steamworks extension.
✅ The compiler must write a file next to the exe.
⬜ Review includes.
⬜ Commit the example game again and remove it from .gitignore
file.
Differences With GMS:
steam_activate_overlay_user();
function
- GMS:
steam_activate_overlay_user(string dialog_name, int64 steamid);
- ENIGMA
steam_activate_overlay_user(int dialog, int64 steamid);
dialog constants:
- user_ov_steamid
- user_ov_chat
- user_ov_jointrade
- user_ov_stats
- user_ov_achievements
- user_ov_friendadd
- user_ov_friendremove
- user_ov_friendrequestaccept
- user_ov_friendrequestignore
- steam_set_overlay_notification_inset();
- GMS: Returns
bool
- ENIGMA: Returns
void
- The user can set the maximum leaderboard entries to fetch using the user variable:
lb_max_entries
Troubleshooting:
- If creating the
steam_appid.txt
file fails, just run the following commands for Linux:
cd /tmp
echo 480 > steam_appid.txt
For Windows:
Create a file steam_appid.txt
and place it inside msys64\tmp
directory. Don't forget to write 480
in that text file. IMPORTANT: This text file must be named steam_appid.txt
and has 480
- which is the default App ID - inside it. Note: This file also must be placed with the executable.
- On Linux, if there is something wrong with the exports, try to check the location of the lib using
find ~ -name gameoverlayrenderer.so
@RobertBColton please remove GSoC-Done
from this PR and add it to #2350.