Maescool / Catacomb-Snatch

Mojang's Humble bundle source
Other
295 stars 99 forks source link

Major refactoring of MojamComponent #854

Closed fierydrake closed 11 years ago

fierydrake commented 12 years ago

Cross-posted from #840:

I have a huge refactor of MojamComponent I'm working on in my local copy. You may or may not think this is a good idea. Basically, it splits into a bunch of bits:

Other changes:

This is a means to an end: that is to allow an easy interface (GameInput/GameView) to making adding SynchronizedNetworkView and UDPNetworkView (and corresponding RemoteGameLogic and potentially LocalGameLogic and ServerGameLogic -- may make these the same).

That way the RemoteGameLogic can implement response prediction and ServerGameLogic can inherit from LocalGameLogic and additionally implement lag compensation (in their UDP implementations, at least.) The SynchronizedNetworkView would use the current synchronized random approach.

This should also allow for other elements to be replaced. I might try and create a split-screen mode to test that the abstractions work okay.

Flet commented 12 years ago

Really looking forward to this :) Thank you in advance for untangling the mess.

danielduner commented 12 years ago

Major refactoring work! <3 :D

fierydrake commented 12 years ago

Very partial and broken refactoring in progress is visible at https://github.com/fierydrake/Catacomb-Snatch/commits/huge_refactorings