AnvilfolkI'm gonna go ahead and agree with Normandy about the graphics stuff. Think about the Model-View-Controller paradigm. What GUM should be is the Model part of MVC. Someone can come in and design some View framework to make a visual representation of the model (using 3d, 2d, ASCII, or textual representations), but the model itself should be independent. To make a game, you'd need to initialise the Model, show it to the user using the View, and get a Controller so the player can effect changes on the Model.
GUM is, indeed, the model part. It's a back-end, and the front-end can be modular as well. Notice that I didn't say which graphics library GUM would use. Ideally, graphics would be modular too.
Also ... no Java. Just no. xD Besides, a vocal majority on the programming thread seem to hate it.
The module system is a huge must. Define what a module is, what capabilities it gives, etc. The messaging system also makes some sense, but I'm not sure how it would work for geographically huge areas. Perhaps some publish-subscribe system might be good for some stuff, but for others a query system might be better, i.e. "getInfo("weather", 50, 30)" where (50, 30) is some map area, and all the modules labelled with "weather" (e.g. humidity, wind, rain, clouds, etc) would respond to this query?
How I think modules would communicate is what I use in my own project: a weather module would have functions like
getMinTemp(time), getMaxTemp(time), getPrecipitation(time), getOvercastFactor(time), which all return doubles. A function that uses weather would have parameters like
calculateSeasonDegreeDay(minTemp, maxTemp), and when called the function would be like
calculateSeasonDegreeDay(weatherModule.getMinTemp(time), weatherModule.getMaxTemp(time)).
So... yes, query. It seems like the logical method when you don't know how many modules are producing what kind of information.
As for how time is going to pass: I mentioned in the OP that all modules that depend on time have a step() or an update() function that takes a float for time passed. It's here where I think C#'s properties would be nice, but eh. Some models don't need to track time, like the weather module example I mentioned.
Normandy:By modular, I mean the code is. To create a simulation from modules, you would merge the various folders containing the snippets of code, including libraries needed. Since all the include files will be in a subdirectory of the main project file, you don't have to add every single folder there. You would add all the dll files that are in the main directory, and all the lib files that are in the bin directory.
Banning use of the preprocessor: There are a few things that you can't do with zero overhead, mainly the commonly used min/max function. Of course, a global function would work, but those have call overhead... I actually never use the preprocessor except for
#pragma once and
#include and
using namespace, so I have no experience with any overhead.
By self-documenting code, I mean "don't use function names that are not descriptive". I think some documentation would be needed...
Why are relative paths terrible? The relative paths I am thinking of are all relative within the project directory.
I do think boost will be nice. xD Things like boost::random, boost::thread, and a few other boost libraries are really useful.
MagmaMcFryThe goals in the OP are higher than the goals of DF v1.0. Just saying.
Not so! xD Dwarf Fortress has to be able to do both fortress/adventure modes, and the world gen. Fortress mode is a huge time-sink, with all the features that make DF into the game we (probably) love.
I mean, creating a more exhaustive and still stochastic farming system isn't that hard, but Toady doesn't do that, instead focusing on more fun areas to develop.
Does anyone agree with my idea that some sort of time class will be needed? Time varies between models, be it the second time for erosion or day time for ecology. I envision a time class as...
class time
{
public:
double hours();
double days();
double seconds();
private:
double time; //seconds
}
Of course, it could be totally unnecessary. xD
I'm not sure about meetings. People live in wildly different timezones,
especially me. I live in GMT+9, I think.