| Statistics | We have 852 registered users The newest registered user is xplinux557
Our users have posted a total of 22761 messages in 1101 subjects
|
| Who is online? | In total there are 4 users online :: 2 Registered, 0 Hidden and 2 Guests :: 2 Bots Daniferrito, NickTheNickMost users ever online was 443 on Sun Mar 17, 2013 4:41 pm |
| Updated Research Web | Wed May 08, 2013 5:20 pm by NickTheNick | Okay guys, here is my first Devblog to fulfill my responsibility as Strategy Team lead.
Finally I have procured some work to show for my efforts in conceptualizing the Strategy Mode. The Research Web is a pivotal component of post-sapience gameplay, as it is what drives your species forwards from the Awakening stage to their final steps into Ascension. Through a graphing program, I have managed …
[ Full reading ] | | Comments: 5 |
| | | Author | Message |
|---|
roadkillguy Experienced

Posts: 534 Reputation: 16 Join date: 2010-08-25 Age: 19 Location: Rhode Island
 | Subject: Class Structure Mon Jun 25, 2012 2:01 pm | |
| By Daniferrito: This no longer stands for our current codeHere's a class structure I was thinking of, that should take care of everything up through creature stage. | Code: | Resource WorldObject Organism Cell Creature Plant Particle Rock Organics Atmosphere Soil BodyOfLiquid
|
Where a Resource is a list of compounds, a WorldObject has a position, and an Organism has an eat() function.
Depending on the class, it might be useful to have a parallel definition class structure as follows.
| Code: | ResourceDef WorldObjectDef OrganismDef CellDef CreatureDef PlantDef ParticleDef RockDef AtmosphereDef SoilDef BodyOfLiquidDef
|
All of these will store data for a particular species, etc. Each class will contain a reference (const Def &) to its particular definition class.
EDIT:I'm pretty sure this will only be useful for Organisms, Particles, and Rocks.
That's my idea, let me know if you have questions.
Last edited by roadkillguy on Mon Jun 25, 2012 6:37 pm; edited 1 time in total |
|  | | Gawayno Newcomer

Posts: 22 Reputation: 0 Join date: 2012-06-23 Age: 20 Location: Chicago, IL
 | Subject: Re: Class Structure Mon Jun 25, 2012 3:30 pm | |
| So this is what the class structure in C++ looks like huh? We would use curly brackets and a specific term, such as string, int, etc in C#. Thanks for this, I'm starting to understand C++ even more. |
|  | | ~sciocont Overall Team Lead

Posts: 3172 Reputation: 99 Join date: 2010-07-06
 | Subject: Re: Class Structure Mon Jun 25, 2012 4:09 pm | |
| This seems pretty thorough. What about waste products/carcasses? They could be part of an "Organics" class under WorldObject, and that would round off anything that I can think of. They're essential to the game, given that you have to eat dead things. _________________ Remember our goals: simplicity, science, and playability. Keep them in mind always. [OE]| [FAQ]|[Wiki]|[My Blog]  |
|  | | roadkillguy Experienced

Posts: 534 Reputation: 16 Join date: 2010-08-25 Age: 19 Location: Rhode Island
 | Subject: Re: Class Structure Mon Jun 25, 2012 5:11 pm | |
| | Gawayno wrote: | So this is what the class structure in C++ looks like huh? We would use curly brackets and a specific term, such as string, int, etc in C#. Thanks for this, I'm starting to understand C++ even more. |
No. I used code tags to make sure the indentations were correct. That isn't c++ at all.
Legitimate c++ is this:
Creature.h
| Code: | #ifndef CREATURE_H #define CREATURE_H
class Creature : public Organism { //stuff public:
Creature(const CreatureDef & _def); };
#endif |
Creature.cpp
| Code: | #include "Creature.h"
Creature::Creature(const CreatureDef & _def) : m_def(_def) { //other stuff } |
| ~sciocont wrote: | | This seems pretty thorough. What about waste products/carcasses? They could be part of an "Organics" class under WorldObject, and that would round off anything that I can think of. They're essential to the game, given that you have to eat dead things. |
A dead animal is still an animal. If it doesn't behave any differently, it has no need to be a different class. (Its compounds will simply deteriorate) |
|  | | ~sciocont Overall Team Lead

Posts: 3172 Reputation: 99 Join date: 2010-07-06
 | Subject: Re: Class Structure Mon Jun 25, 2012 5:31 pm | |
| Ok, makes sense. Still there's waste products. I hate to bring up something that seems to inconsequential, but they do contain important nutrients, which coprophagous animals can benefit from. _________________ Remember our goals: simplicity, science, and playability. Keep them in mind always. [OE]| [FAQ]|[Wiki]|[My Blog]  |
|  | | roadkillguy Experienced

Posts: 534 Reputation: 16 Join date: 2010-08-25 Age: 19 Location: Rhode Island
 | Subject: Re: Class Structure Mon Jun 25, 2012 6:29 pm | |
| | ~sciocont wrote: | | Ok, makes sense. Still there's waste products. I hate to bring up something that seems to inconsequential, but they do contain important nutrients, which coprophagous animals can benefit from. |
Ahh yes of course. Adding to OP... |
|  | | |
Similar topics |  |
|
| | Permissions in this forum: | You cannot reply to topics in this forum
| |
| |
| |