3ddelano / epic-online-services-godot

Unofficial Epic Online Services wrapper for Godot Engine 4.2 (EOSG) (includes demo project)
MIT License
174 stars 12 forks source link

Does this work with Easy Anti-Cheat? #10

Closed techsideofficial closed 5 months ago

techsideofficial commented 1 year ago

Does this work with Easy Anti-Cheat?

3ddelano commented 1 year ago

Currently the Anti cheat functions are not implemented in the wrapper but there isn't reason why it shouldn't work.

techsideofficial commented 1 year ago

@3ddelano How would I make it work? I am not that experienced with C#.

3ddelano commented 1 year ago

The c# version of the EOS SDK was used for Godot 3 Mono and the wrapper for Godot 3 is deprecated. Right now for Godot 4 we use the EOS C SDK v1.15. The general steps to wrap a new interface like Easy Anti Cheat are the following:

  1. Read about the interface in EOS docs
  2. List all the functions that need to be wrapped from the EOS C SDK
  3. Wrap each function in gdextension so that it is available inGDScript. Refer the previous wrapped interfaces, it will mostly be similar syntax to those. We also have helpful macros to easier convert data structures.
  4. Test each function works as expected in GDScript
  5. Optionally make a sample scene for the interface with a UI
techsideofficial commented 1 year ago

@3ddelano Can I just use it with Godot Mono? I just learned a bit of C#

3ddelano commented 1 year ago

Yes you definitely can! For the Godot mono it saves some time as you can directly code in c#. EOS C# requires a setup function where you initialise the SDK, following which you can then call the interface functions. A good reference would be IEOS.cs script initialisation function. Also read the Readme.md file of the godot3-mono branch for the installation steps (editing the .csproj, etc).

techsideofficial commented 1 year ago

@3ddelano ummmmm IEOS.cs image

3ddelano commented 1 year ago

What are the steps to reproduce this? Did you follow the installation steps in the readme? Also note this is for Godot 3. I haven't tested it out with Godot 4 where the .NET version was upgraded.

techsideofficial commented 1 year ago

@3ddelano That's my project folder: https://github.com/techsideofficial/XanEngine/tree/main/XanTestProjects/TestProj

3ddelano commented 1 year ago

The project looks fine. But Im unable to debug the issue. Does running the game from Godot work?

techsideofficial commented 1 year ago

@3ddelano that's what I'm doing. I'm using Godot 3.5.2 LTS

3ddelano commented 1 year ago

Can you try cloning the repo and running the sample project?

techsideofficial commented 1 year ago

@3ddelano The sample project runs fine.

3ddelano commented 1 year ago

Try deleting the .mono folder, sometimes the mono cache gets messed up.

techsideofficial commented 1 year ago

I'll try it tomorrow.

techsideofficial commented 1 year ago

@3ddelano image Screenshot 2023-09-09 071842

3ddelano commented 1 year ago

The issue is that somehow the project was converted to Godot 4 mono. Did you perhaps run the auto convert the project by opening it in Godot 4 mono?

3ddelano commented 1 year ago

Here 'RefCounted' is from Godot 4 while the Godot 3 equivalent is 'Reference'.

3ddelano commented 1 year ago

To resolve it, replace the existing files with a re-clone of the godot3-mono branch.

techsideofficial commented 1 year ago

@3ddelano nvm its fixed. How would I check if the game was launched via anticheat then?

techsideofficial commented 1 year ago

How do I check if the game has been launched from EAC?

3ddelano commented 1 year ago

EOS provides protected game session notifications. See this https://dev.epicgames.com/docs/game-services/anti-cheat/using-anti-cheat#protected-game-session-notifications

techsideofficial commented 1 year ago

How do I quit the app if it hasn't been launched through EAC?

3ddelano commented 1 year ago

A starting point would be to check out the official anti cheat sample project. https://dev.epicgames.com/docs/game-services/anti-cheat/anti-cheat-samples#step-1-configure-the-samples

3ddelano commented 5 months ago

@techsideofficial Anticheat features are implemented in v2.1.2 https://github.com/3ddelano/epic-online-services-godot/releases/tag/2.1.2