rdpolarity / solaris Goto Github PK
View Code? Open in Web Editor NEWMC Plugin Minigame Engine
MC Plugin Minigame Engine
The Solaris editor will need to transition between the following states:
Play
onUpdate
and onStart
Edit
Debug
onUpdate
and onStart
Using kotlin MobX listen to changes from a StateManager
singleton instance. Then create an abstract class called StateListener
which will abstract the methods onStateChange(state)
, onStatePlay
, onStateEdit
and onStateDebug
. Any class which extends this class will be able to make use of these state changes by implemented the aforementioned abstract methods.
TODO
This is when a GameBehaviour dynamically creates a GameObject instance and instantiates it at runtime at X location. By default, a GameObject should instantiate at 0,0,0. Stacking will need to be implemented for this to work nicely (#7).
There must be a way to flag a build for production. Doing so will remove / strip code that is not necessarily related to being run in production. Production mode will also put all GameObject instances on all maps into Play mode indefinitely
This will require some more research but since it's related to the build, some more advanced Gradle logic or a plugin may be required.
There needs to be a way to easily inspect all objects in the entity pool at run time
Create a command eg. /map introspection
which will open up a chest GUI that has links to all active running GameObjects in the entity pool
GUI for changing Float, Double, String, Int... So on
Create interfaces for common events (on GameObject) eg. Player break block... only register those events if class method is overridden (using class path analysis)
Might allow this... need to consider a good use case. Players can get by simply placing 'Managers' underneath the map or somewhere they know they can go to inspect them. Went with an OOP oriented ECS so location is and should always be present
A global state is when a class is present in all maps, it needs to
Behaviors may pass a @GameProperty that is a requesting reference to another GameObject or its Behaviour.
Behaviors may pass a @GameProperty that is a requesting reference to another GameObject or its Behaviour.
Unfortunately, there are a lot of workarounds to get an engine like this working smoothly. However, there is no way to know what persistent changes the player has made when in play mode. For example; say a GameBehaviour spawns 10 zombies, when we transition back to Edit mode, there's nothing to say that those zombies should be removed.
An extra required abstract method is to be implemented on GameBehaviour called onCleanUp
. It will be called anytime we transition away from Play mode. Developers will need to put clean-up logic here to have a better debugging experience.
TODO
For the engine to actually function, it needs to run certain methods at certain times when the StateManager transitions to Play, Edit or Debug.
To start there will need to be some optional abstract methods like onStart
and onUpdate
. onStart
will be run as soon as PlayMode is active and onUpdate
will be run every tick. onUpdate
is a matter of contention because it's not necessarily a good idea to have things running every tick. In which case we'll leave it up to the developer and maybe even allow them to change the tick/update rate (eg. onUpdate runs every 3 ticks).
When PlayMode starts we will also need to clear the entity pool and instantiate classes from scratch using their overrides. When exiting PlayMode these classes will need to be purged from the entity pool again. This is so runtime changes don't pass into other states
bootstrap
method on MapManager; this will purge the entity pool and instantiate all game objects using their overridesstart
and stop
on GameObject; Start is called during Debug
and Start
states while stop
is called when entering the Edit State. start
will run onStart
and initialize onUpdate
for each behavior. stop
will run each behavior's cleanup method. Each state change will call MapManager's bootstrap
onUpdate
method has been implementedIt should be possible to have multiple GameObjects at a single XYZ coordinate.
When a player stacks a GameObject by either dynamically instantiating (#6) or placing a prefab on an existing object the following should occur:
TODO
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.