New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove game code, refactor to "engine" level. #74

PJB3005 opened this Issue Apr 30, 2017 · 2 comments


None yet
3 participants

PJB3005 commented Apr 30, 2017

Stuff like job code, antag code, etc...

There are some files and stubs related to such things all over the code, removing this kind of crap would be useful.


This comment has been minimized.


ComicIronic commented May 1, 2017

What's the ultimate goal for game code? Is it going to come out of a scripting language, and if so, which one (I think Python would be good for easy scripting and OO)? Or are we going to expect people to use raw C#?


This comment has been minimized.


PJB3005 commented May 1, 2017

Definitely move to scripting I'd say yes.

@PJB3005 PJB3005 added Type: Design and removed Type: Design labels Jun 17, 2017

@PJB3005 PJB3005 modified the milestone: Alpha Jul 1, 2017

@PJB3005 PJB3005 removed the W: Design label Jul 2, 2017

@PJB3005 PJB3005 added the W: Ready label Jul 10, 2017

@wafflebot wafflebot bot added W: In Progress and removed W: Ready labels Jul 23, 2017

@PJB3005 PJB3005 closed this in #281 Jul 24, 2017

PJB3005 added a commit that referenced this issue Jul 24, 2017

Remove ComponentFamily, remove "game" components. (#281)
* Remove ComponentFamily, remove "game" components.

The entire ComponentFamily system has been removed entirely.
Components now require explicit registration into the IComponentFactory.
This registration spawns the component as dummy and checks reads some data off it like name, netID...
"Reference" types can also be registered using RegisterReference<TTarget, TInterface>().
These references allow you to get components from entities too, so you can reference by interfaces.
This should allow us to inverse the direct fetching and provide a component API available from Shared.
Note that these reference CANNOT be used to spawn a new component. Only a concrete registration can.

Targeted component family messaging no longer exists.
The messaging system still exist, but it's always to ALL components.
The system should probably be killed completely later.
To fill the gap, all cases where family-targeted messaging was used, it now uses references and simple interfaces.

To reference components accross the network, the component now needs to define a "Net ID".
These net IDs should be unique (but matching between client and server).
I made a set of constants for these IDs too in NetIDs.cs

Names are no longer used in netcode (replaced by net IDs). Should reduce bandwidth usage from string names.

Because a LOT of code got in the way, most "game" content was cut. This includes (among others) items and interaction.
This had to be reimplemented in content, and most of the code was terrible anyways.

Also removed the messaging profiling system. It got in my way and I don't understand it (and I doubt anybody does).
It's in the git history if somebody cares.

Fixes #262, Fixes #250, Fixes #74.

* Attempt to fix unit tests, not yet done.

* Fix unit tests, properly.

* Remove debug message.

* Fix rendering on WearableAnimatedSprite.

It wasn't being registered as ISpriteRenderableComponent because of a typo. The ComponentFactory now detects this error too.

@wafflebot wafflebot bot removed the W: In Progress label Jul 24, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment