GameSDK :- Player entity

0

Hi all,

I have to add a component to the player in GameSDK, but I cannot find the player entity anywhere in the editor.

Where should I look, I've tried everything I can but with no success.

This is a blocker for me.

Cheers

Paul

asked 7 years ago197 views
10 Answers
0
Accepted Answer

I went for a walk on the beach, and a few pints... hmmm...

Anyway, I'm thinking I can do something better.

If I change my code to work as an input device, then I can integrate the demo code cleanly and still do things in a Lumberyard manner.

The UI elements can read from the input device, the renderer can read from the input device, I just need something with a Tick event to poll the input device.

Before I write the code I will have to identify a point in the engine I could attach an input device to though, so it's not really a solution. More a redefinition of the problem.

I still need something I can attach code to, but once I have it everything else is neat

answered 7 years ago
0

Hi @REDACTEDUSER

You can't add a component to the player in GameSDK, because the player entity uses the old entity system that doesn't support the new component entity system.

Please note that the GameSDK is just a legacy example that was "inherited" from CryEngine, but it will not be updated to the new LY systems.

But the old entity system still works, so it's possible for you to implement your features without the new component entity system.

The player entity (spawn point) can be found under: RollupBar -> Objects -> Entity -> Browser -> Others -> SpawnPoint

answered 7 years ago
0

I went for a walk on the beach, and a few pints... hmmm...

Anyway, I'm thinking I can do something better.

If I change my code to work as an input device, then I can integrate the demo code cleanly and still do things in a Lumberyard manner.

The UI elements can read from the input device, the renderer can read from the input device, I just need something with a Tick event to poll the input device.

Before I write the code I will have to identify a point in the engine I could attach an input device to though, so it's not really a solution. More a redefinition of the problem.

I still need something I can attach code to, but once I have it everything else is neat

answered 7 years ago
0

I was having the same issue. You CAN modify this "player entity" and add "components", but not in the Lumberyard sense of those terms. I believe the player start is implemented in a different manner, at the project level instead of the "level" level, as you can create a new level and it will use the standard actor by default without adding an entity. I'm thinking a default script (certainly not a global flow graph from what I can tell). I will let you know if I find out how it is activated in the editor, but if you want to modify the scripts I believe they are located in ..\dev\GameSDK\Scripts\Entities\actor

answered 7 years ago
0

Hi Oldsparky,

Thanks, I see what is going on now.

It's put me in a bad position as I have to do two jobs.

  1. Create a demo
  2. Provide a coding example for others to use. GameSDK is the only fully featured demo in Lumberyard, so I have to use it. I don't have a team of artists and designers available to sit and create a new demo.

However now I have to write code to get the demo working which will be no use as an example.

I know Lumberyard is still beta, but a choice has to be made. GameSDK has to be dropped and replaced with a demo of equal quality, or it needs to be brought up to date so it can be used as a demo of how to write a game using Lumberyard rather than a demo of what CryEngine could do when Lumberyard was forked from it.

At the moment, it's very poor.

answered 7 years ago
0

Hey @REDACTEDUSER

answered 7 years ago
0

In Cryengine, players are managed by the Actor system, which is init in CryAction. The SDK then implements IActor for both AI and Players, and then the Player class inherits the IActor implementation; and registers it with the Actor system. All the C++ code should be in the Player filter in Visual Studio. Including PlayerInput, PlayerMovement, Player...etc. You can augment actors via Lua script, as Andrewg suggested in Scripts\Entities\Actors. Hope that helps.

answered 7 years ago
0

Thanks Binky,

In the end I extended IInput and added my code to that.

It is then visible to all elements in the system.

The gaze tracker debug UI element works almost perfectly, I think I am half the width of the displayed sprite out, but that's an easy fix.

I am now moving on to the shader side of my code.

Cheers

Paul

answered 7 years ago
0

Let me know if you need additional assistance with this. The team seems to think @REDACTEDUSER

answered 7 years ago
0

Awesome! Nice work on this. Can't wait to see what you are creating. Also, I'm going to make your above reply an answer and select that as accepted. If you run into any more issues we'll reopen this one.

answered 7 years ago

This post is closed: Adding new answers, comments, and votes is disabled.