Mr Sun Geo.js and additional plug-ins
Today I started yet another canvas example based off the Mr Sun source code that I started recently. This time I started out with the source code, and plug-ins that I worked out for my Mr Sun Temp example. So when Mr Sun Geo as I have come to call it thus far is yet even more on top of that example.
In the previous fork Mr Sun Temp I made just a few minor improvements to the source code itself, and the real additions where in the form of a few plug-ins. The main focus there was the temp.js plug-in for this project that just contained the logic that sets temperature for the sun object, and all the world section objects. In this fork I am focusing on creating additional plug-ins that will have to do with the Geology, the Hydrosphere, and Atmosphere of the Game World in what I am just calling Mr Sun. All of these plug-ins depend on the previous plug-ins worked out in Mr Sun Temp, when it comes to temp.js and also fusion.js.
So then Mr Sun Geo is just the next step forward when it comes to working out game logic that will create a cool little simulated world.
1 - The geo.js plug-in
The very first version of Mr Sun Geo is just the addition of one plug-in on top of what I worked out in Mr Sun Temp 0.5.0. Geo stands for Geology, and as such this plug-in adds properties such as magmatism, and elevation to the game world section objects.
The plug-in alone proved to be a little time consuming just to get some of the basics worked out with how the position of the sun object effects the increase of elevation. Values that are added in by way of the temp.js plug-in are used to set magmatimsm, and magmatism is used to find the rate at which elevation will go up for each game year. There is also an erosion property that is part of this module, the additional plug-ins that have to do with the hydrosphere, and the atmosphere will have will have an impact on that value.
|
|
There is much more that comes to mind when it comes to what should be part of this module, however for now one of the basic features that I had in mind is indeed working. In time the code here will likely change a lot, but in any case I am going to want some code that will effect elevation of the game world sections.
2 - The hydo.js plug-in
Another addition in terms of plug-ins here is the introduction of a plug in that will handle aspects of the hydosphere of the game world. For now as of 0.3.0 at least this hydo.js plug-in will just define the total amount of game water to work with, and how it will transfer from one section to another. For the most part this is just an exercise of a plug-in working on top of another plug-in which in this case is geo.js.
|
|
3 - The atmo.js plug-in for a starting plug-in that has to do with the atmosphere.
There is now a geo.js plug-in that has to do with increases in elevation, and a hydo.js that has to do with water, bit that brings up the question of evaporation and rain. Should that all be part of hydro.js, or should it be part of another plug-in that has to do with the atmosphere? In any case I am going to want a plug-in that has to do with the creating and updating of state that has to do with the atmosphere of the game world.
|
|
4 - Conclusion
So far I am happy with how this project is coming along, but there is still much more work ended until this will start to look like an actual game. I am going to want to add additional plug-ins that will have to do with life and civilization at some point, however maybe there are a few more that needed to be worked out before I get to that point.
I am going to want to add some additional plug-ins that have to do with graphics, and I might also want to return the working out what the very core of the game should be. There is much that I think still need to be worked out when it comes to game.js, and how to handle states. I think that I am going to want some additional features for plug-ins for this beyond just a simple create and update method.