-
Notifications
You must be signed in to change notification settings - Fork 19
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
[Feature Request] **Game-Objects** #80
Comments
In regards to the indexing in further context, with the current way things are implemented, polymorphism would probably make the most sense. Although the indexing idea could be put to use with an Enum (although Python Enums are lame) to make it more readable. Additionally, we may want to consider incorporating functional programming as it can also be used for this purpose quite well. |
Before moving forward, perhaps we should agree on the encoding format of As far as initialization and implementation, I believe we can take inspiration from the current Node, Action and the classes that inherit Action. Specifically, |
PR #86 |
Is your feature request related to a problem? Please describe.
No.
Describe the solution you'd like
A GameObject class that would support the availability and storage of in-game objects such as Currency, Potions, and whatever a game developer would desire. The GameObject needs to have functions to pickUpObj, useObj, modifyUserProfileAfterUse, storeObj etc. It will also need a Bag type to store and allow efficient enumerations of GameObjects. This way, in-game objects can be trivially initialized and all relevant functions can be found in the GameObjects class.
Describe alternatives you've considered
We could implement all the in-game objects individually. However, its probably cleaner, easier to debug and logically simpler to channel all in-game objects into one GameObject class.
Additional context
One problem with a GameObject class is overgeneralization. Since most objects are different in terms of behavior to one another, there might be a need to index object types, for example, index 1 could represent currency, and index 2 could represent potions. In order to specify which type of object we're using (as an example), we might need to rely on the aforementioned indexing scheme, which is less elegant and throws off readability. However, there is probably a better way than what I suggested.
The text was updated successfully, but these errors were encountered: