Proposal to Kill StandardGameState

It is my opinion StandardGameState really has no usefulness to jME as all it really contributes is the creation of a camera and is continuing to cause me frustration. :)  Does anyone have any problems with it simply being deleted?  If anyone is currently using it I would suggest moving to BasicGameState instead.



If anyone has a lot of dependencies on this class I would be okay with simply renaming it to something else (maybe CameraGameState?).

Depricate it first for a while…

llama said:

Depricate it first for a while..


That's just crazy enough to work....  }:-@

DEPRECATION COMPLETE!



Bwahahahaha!  }:-@

I really don't understand why you're deprecating StandardGameState, when the fix is so simple.



FWIW, I'm using StandardGameState in my (multi-threaded) application.  I expect that many single-threaded users are as well.

I created my own version of StandardGameState.  Most of the functionality is the same.  The biggest exception is the creation of the camera.  I use a singleton CameraManager to hold all of my different camera views so I didn't need this… it was a matter of preference, I'm sure.



I'll post the code here if need be, however, I've put a zip file out on my server at http://cm3demeter.com/gamestate.zip that you can view the code for the gamestate changes that I did.



I also need to refactor one of the classes, I really don't need that extra level of inheritance, since it doesn't do anything special (the StandardGamecamera whatever class)



basically, the changes are leaving a lot up to the subclass to do what it needs.  some of the documentation is off, and I'm sure I didn't do something correctly, but you'll get the idea.

ok, why kill StandardGameState? whats the problem with it? I use it for my "ingame" state as well as menu states. If I use BasicGameState I will have to add in the functionality I lose from standardGameState such as onActivate, creation of zbuffer,rootNode, and camera. all because you dont like the name? I dont get it. am I missing something?

mud2005 said:

I use it for my "ingame" state as well as menu states. If I use BasicGameState I will have to add in the functionality I lose from standardGameState such as onActivate, creation of zbuffer,rootNode, and camera.


Like mud2005, I use it for my "ingame" as well as menu states... I think that StandardGameState free me from a lot of line programing... I think that StandardGameState is very usefull from people that don't have much time for it

Fine, then come up with a new name for it and I'll 'un-deprecate' it and rename it for you.  :stuck_out_tongue:

I think that your earlier name suggestion was good: "CameraGameState".



Then you can just make "StandardGameState" be a deprecated trivial subclass of CameraGameState to preserve backwards compatibility, at least for a while.

I have no problem with "CameraGameState" :slight_smile:

Great, then I'll try to get that changed ASAP.

df,

  I think you could merge StandardGameStateDefaultCamera and StandardGameState together into the same class CameraGameState or whatever.  StandardGameStateDefaultCamera doesn't really do anything with the camera… it's StandardGameState that actually does the work to build the camera.



thoughts, comments, suggestions?

StandardGameStateDefaultCamera is really something more like StandardGameStateNoCamera.  DefaultGameState or NoCameraGameState or CameralessGameState might be reasonable renamings.  I use it as a base class for HUD layers, so that might provide additional renaming ideas.



"class CameraGameState extends NoCameraGameState" or "class CameraGameState extends DefaultGameState"…



Really, BasicGameState and StandardGameStateDefaultCamera should both be given better names which describe what they are and what their differences are.  "BasicGameState" seems closer to "AbstractGameState", in that it creates default implementations of the abstract methods for you; StandardGameStateDefaultCamera might be called RootNodeGameState.  (Although currently BasicGameState also creates the root node.)



I don't have a real good answer, but it seems there are multiple "better than what we have" options.

I think they should all be renamed to "OhDarkfrogWhatMadnessHaveYouStartedGameState"! 

Gentleman Hal said:

I think they should all be renamed to "OhDarkfrogWhatMadnessHaveYouStartedGameState"! 


I'm on it!

After a long delay I've finally renamed StandardGameState to CameraGameState.  It was such a complicated change it took hours and hours for me to get it just right (just kidding).  :stuck_out_tongue: