Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 2 3 [4] 5

Author Topic: GUM: Grand Unified Model—Weather shenanigans  (Read 5079 times)

alway

  • Bay Watcher
  • 🏳️‍⚧️
    • View Profile
Re: GUM: Grand Unified Model, Bay12 collab
« Reply #45 on: February 12, 2013, 02:33:12 am »

Don't get me wrong, I'm not opposed to using a message system as such, it's just that from experience from group projects, the probability of them being implemented in a way which actually helps rather than hinders is rather low. An example of a really good message system can be found with Ogre's event system*, which is similar to that Normandy is proposing. However, all too often, they turn into terrible messages-for-messages'-sake which do nothing to actually help development. Which is why I'm rather cautious about it; I've seen way too many 'systems for speeding up development and making things look nice' sink entire group projects. Or in short, if the message system isn't pulled off perfectly, we garrote ourselves with our own code.

*In summary, it acts like Normandy's description, in that messages are sent out to listeners almost as if they are RSS feed readers subscribing to RSS feeds, which are then received and processed by their listeners. A system pushes the event onto the message handler, then the message handler sends it out to subscribers of that sort of message. In that way, the original sender doesn't need to know about the existence of anything using its messages, which allows for getting the data without specifically sending it to something from the original sender (which would involve editing said sender to 'aim' it at something; which we want to avoid).

As for worrying about a messaging system being too complex to code, I would say don't worry. There are a couple of experienced coders on this forum, and experienced coders know how to make things easy for themselves.

There are also many tricks up the sleeve of a computer scientist that will make the performance loss basically unnoticable.
Also, you can cut that out; you aren't the only who has coded before. >_>
« Last Edit: February 12, 2013, 02:45:11 am by alway »
Logged

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile
Re: GUM: Grand Unified Model, Bay12 collab
« Reply #46 on: February 12, 2013, 04:50:20 am »

@Siquo:
Thanks for the feedback, it indeed lacks the features you describe (nice threadpool etc), but it's the first one I built. It's also meant to have only 3/4 components, with multiple writers and a single reader per message-queue. For this project we'll need something different, indeed, like you and alway describe.

alway, creating a new action is indeed a chore (I really need to figure something out for that), but directly accessing the object will create locking and that's just asking for problems. I personally don't like Ogre3D's string-based-everything, but that's just personal :)

Logged

This one thread is mine. MIIIIINE!!! And it will remain a happy, friendly, encouraging place, whether you lot like it or not. 
will rena,eme sique to sique sxds-- siquo if sucessufil
(cant spel siqou a. every speling looks wroing (hate this))

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: GUM: Grand Unified Model, Bay12 collab
« Reply #47 on: February 12, 2013, 06:33:40 am »

Interesting stuff. Any link to repository? Github/bitbucket?

Edit: also any ideas of running this as a service/server? Multiple games (different) using same world is my long time dream.
« Last Edit: February 12, 2013, 06:37:19 am by Warmist »
Logged

chaoticag

  • Bay Watcher
  • All Natural Pengbean
    • View Profile
Re: GUM: Grand Unified Model, Bay12 collab
« Reply #48 on: February 12, 2013, 06:42:27 am »

To the bes tof my knowledge, there's noextant code base right now, it's mostly figuring architecture out before committing to coding.
Logged

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: GUM: Grand Unified Model, Bay12 collab
« Reply #49 on: February 12, 2013, 06:51:02 am »

To the bes tof my knowledge, there's noextant code base right now, it's mostly figuring architecture out before committing to coding.
an empty repository would be okay. Easier to follow. Forums are too linear for me :)

As for general architecture: i really like the dfhack way of doing things. It would probably not work for this, as generally the dfhack plugins do not talk to each other.

chaoticag

  • Bay Watcher
  • All Natural Pengbean
    • View Profile
Re: GUM: Grand Unified Model, Bay12 collab
« Reply #50 on: February 12, 2013, 06:57:52 am »

Well, Skyrunner seems to be the closest thing we've got to a leading figure, so if possible, I think it'd be best for her to start a Github page thing soon, or whether to try something different altogether. Plus it sounds like she has a decently big chunk of programming experience, so she might be best for the job.

Mostly waiting for there to be something on a lower level for me to handle anyway.
Logged

Skyrunner

  • Bay Watcher
  • ?!?!
    • View Profile
    • Portfolio
Re: GUM: Grand Unified Model, Bay12 collab
« Reply #51 on: February 12, 2013, 09:35:57 am »

I made a github repository.

GUM—Grand Unified Model.

I think I need your IDs to add you people as collaborators.
Don't mind the seven commits; it's mostly me messing around with git and deleting redundant files.

For starters, I have added a vector3 utility class (two simple files) and its doxygen documentation. Can someone download the html folder in vector3 and check if the documentation (1) works, and (2) makes sense? I think you have to click class.html to view it.

vector3 has an issue of global binary operators (defined in the cpp file) not working. Otherwise, it has functions for most common vector3 uses. No dependencies. #include "vector.h" will be enough to use it.

Now, vector3 isn't actually a "module", in that it doesn't simulate anything. I need to finish up the example Mendel module I was planning to wrap up, but I got lost, spending three hours today to get all this working. >.>
« Last Edit: February 12, 2013, 09:38:19 am by Skyrunner »
Logged

bay12 lower boards IRC:irc.darkmyst.org @ #bay12lb
"Oh, they never lie. They dissemble, evade, prevaricate, confoud, confuse, distract, obscure, subtly misrepresent and willfully misunderstand with what often appears to be a positively gleeful relish ... but they never lie" -- Look To Windward

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: GUM: Grand Unified Model, Bay12 collab
« Reply #52 on: February 12, 2013, 09:42:19 am »

I made a github repository.

GUM—Grand Unified Model.

I think I need your IDs to add you people as collaborators.
<...>
I think we could just fork and then you would merge (at least thats what happens in dfhack). Or do you want to do it differently? If so, how would it work?

Skyrunner

  • Bay Watcher
  • ?!?!
    • View Profile
    • Portfolio
Re: GUM: Grand Unified Model, Bay12 collab
« Reply #53 on: February 12, 2013, 09:43:32 am »

This is the first time I've used git and github, so I don't really know how to manage it. >.> It does sound reasonable... I guess? xD
Logged

bay12 lower boards IRC:irc.darkmyst.org @ #bay12lb
"Oh, they never lie. They dissemble, evade, prevaricate, confoud, confuse, distract, obscure, subtly misrepresent and willfully misunderstand with what often appears to be a positively gleeful relish ... but they never lie" -- Look To Windward

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile
Re: GUM: Grand Unified Model, Bay12 collab
« Reply #54 on: February 12, 2013, 09:52:16 am »

It's the way most do it. Until it gets too much and you want to add another admin who can do merges, just let others (us) fork from it, and we'll send you what to merge with the main project.
Logged

This one thread is mine. MIIIIINE!!! And it will remain a happy, friendly, encouraging place, whether you lot like it or not. 
will rena,eme sique to sique sxds-- siquo if sucessufil
(cant spel siqou a. every speling looks wroing (hate this))

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: GUM: Grand Unified Model, Bay12 collab
« Reply #55 on: February 12, 2013, 09:54:53 am »

I'll get home in few hours and check things out. Imo we should put doxygen (and other docs, like designs, ideas, etc...) in root/docs. That way we could access all the info in one place as it grows. Unless there doxygen does work like that. I imagine there will be non-module things (e.g. like intermodule object tracking or something...)?

Edit@home: okay html looks good. Although an empty screen greets me (from index.html) i imagine there is a way to add something there (e.g. module description or something...)
« Last Edit: February 12, 2013, 10:40:33 am by Warmist »
Logged

Skyrunner

  • Bay Watcher
  • ?!?!
    • View Profile
    • Portfolio
Re: GUM: Grand Unified Model, Bay12 collab
« Reply #56 on: February 12, 2013, 10:43:46 am »

I just realized that boost::random is included in C++11, as <random>.

What do you think the standards for using C++11 should be? MSVC seems to support C++11, or at least some of it, and gcc (g++?) supports C++11. @_@ Those are the two main compilers (more gcc than msvc), though, so...
Logged

bay12 lower boards IRC:irc.darkmyst.org @ #bay12lb
"Oh, they never lie. They dissemble, evade, prevaricate, confoud, confuse, distract, obscure, subtly misrepresent and willfully misunderstand with what often appears to be a positively gleeful relish ... but they never lie" -- Look To Windward

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: GUM: Grand Unified Model, Bay12 collab
« Reply #57 on: February 12, 2013, 11:02:54 am »

Another suggestion: namespaces LOTS OF THEM :D. Reason being if you don't want to you can write "using namespace X" but it lets you avoid all of the nasty name collisions. Also "using namespace std;" in header files is frown upon. This is because when you include this header (in this case vector3.h) you don't have any say if you want to continue using std namespace or not.

Edit: if i'm criticizing too much please tell me ;D
Edit2: first commit: https://github.com/warmist/GUM--Grand-Unified-Model/commit/3e0da4940d161af5d2aaf39aea5f24d4d25ab120
about c++11 i'm all for it :) using gcc4.7 here.
« Last Edit: February 12, 2013, 11:18:07 am by Warmist »
Logged

Skyrunner

  • Bay Watcher
  • ?!?!
    • View Profile
    • Portfolio
Re: GUM: Grand Unified Model, Bay12 collab
« Reply #58 on: February 12, 2013, 11:16:57 am »

Nah, criticism's fine. It's how we all grow :P

A quick search verifies that using namespace is bad in headers, especially because there's no unuse namespace std; in C++, while youcan always #undef macros. I'll fix it when I get to my PC later on.
Logged

bay12 lower boards IRC:irc.darkmyst.org @ #bay12lb
"Oh, they never lie. They dissemble, evade, prevaricate, confoud, confuse, distract, obscure, subtly misrepresent and willfully misunderstand with what often appears to be a positively gleeful relish ... but they never lie" -- Look To Windward

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: GUM: Grand Unified Model, Bay12 collab
« Reply #59 on: February 13, 2013, 04:36:01 am »

Other random idea: instead of using "void step(float delta_time)" or something like that, i thought about something like an action vector:
Each thing could add actions with time when it would happen. Make it some autosorted structure (by time) and then pop first action, do it, pop, do etc... Because we don't (necessarily) use graphics which polls stuff each "delta time" it would allow engine to run as fast as possible (e.g. if you geological movement, then 1 sec delta_time will have to run for ages, while in this system it would be next action that advances whole system time by say 1000 years). This ofcourse has some complexity in it: function pointer for callbacks. But if we are using c++11 it should be relatively painless. One other benefit you could have reactions (e.g. arrow flies, and you get your turn in mid flight of arrow, you could add delayed action to then time when it is close enough)
Pages: 1 2 3 [4] 5