Jump to content
  • Advertisement
Sign in to follow this  
  • entries
    7
  • comments
    12
  • views
    1334

Concept Functionality - Cell Stage

Lyfe

686 views

We're back with another update.

First a little recap of what happened this week:

We got our own banner and logo. Thanks go out logomakr.com where we made it.

Our website is now in develpoment. I got no idea when it will be online but we're working on it.

We started using Taiga.io to manage the development. It was frustraing to just have a good a idea or realised something that needed fixing/reworking in the concept and just forget about it or have it in an unorganised text file.

We got a new team member: Helices, who will function as a Biology Advisor to this project.

On that note: We are reworking the cell stage to be more realistic (as far as it doesn't sabotage fun gameplay in any way). We will do another entry on that once we deem it presentable.

On the actual development front:

The procedural meshes now work mostly as intended. They are being generated randomly from a basic cube shape with 26 vertices. For now that should work and adding more is basically just busywork if we really need more than that. When the player collides with this mesh all vertices with a distance to the player that's within a certain threshold will  move away from the player based on a vector from the player center to the vertex. This functionality is planned out so far but not implemented. Slicing the mesh will be the next, more complicated step.

Next thing I will be working on besides the website: The procedural environment. Since it would be pretty silly to just but up barriers around the map it should be infinite. To make this feasible all content has to be procedurally generated around the player. Logically it will be deleted again as soon as the player has a certain distance to it. This is true for all passive, floating objects, compound clouds and other cells. The distance should be high enough to feel natural for there to be change but also not so high that it affects the framerate.

The rework on the cell stage results in there being five new compounds replacing the previous ones: CO2, Oxygen, Amino Acids, Glucose and Lipids. The will definitely be differentiated by their color and maybe by the shape of the clouds if it is deemed useful for the player and doable for a programmer.

Interaction with other cells will be an interesting part. I don't want to unveil anything that will be part of the cell stage rework but I'll tell you everything we have for certain: To absorb other cells you simply have to move over them. If you have 30% more mass than they do - which is calculated via your organelles and your cytoplasm - you will absorb them and vice versa.

 

One thing we want to get sort of experimental with is sound. Despite the background music there will be no ingame sound effects. And even the background music will mostly consist of some atmospheric sounds. So far there was no time to prototype this but we will try to get to it soon but for now planning and coding has a higher priority.

 

That's it for this week's update. I'll leave you with a little insight into our code with which we generate the compound cloud mesh.

void ACompoundCloud_Cell::CreateCloudMesh()
{
	//vertex buffer
	//TArray<FVector> vertices;
	//Front
	vertices.Add(FVector(50.f, -50.f, -50.f));//0
	vertices.Add(FVector(50.f, 0.f, -50.f));
	vertices.Add(FVector(50.f, 50.f, -50.f));
	vertices.Add(FVector(StaticMaths::RR(50.f, 150.f), StaticMaths::RR(-150.f,-50.f), 0.f));
	vertices.Add(FVector(StaticMaths::RR(100.f, 200.f), 0.f, 0.f));
	vertices.Add(FVector(StaticMaths::RR(50.f, 150.f), StaticMaths::RR(50.f, 150.f), 0.f));//5
	vertices.Add(FVector(50.f, -50.f, 50.f));
	vertices.Add(FVector(50.f, 0.f, 50.f));
	vertices.Add(FVector(50.f, 50.f, 50.f));

	//Left
	//2
	vertices.Add(FVector(0.f, 50.f, -50.f));
	vertices.Add(FVector(-50.f, 50.f, -50.f)); //10
	//5
	vertices.Add(FVector(0.f, StaticMaths::RR(100.f, 200.f), 0.f));
	vertices.Add(FVector(StaticMaths::RR(-150.f, -50.f), StaticMaths::RR(50.f, 150.f), 0.f));
	//8
	vertices.Add(FVector(0.f, 50.f, 50.f));
	vertices.Add(FVector(-50.f, 50.f, 50.f));

	//Back
	//10
	vertices.Add(FVector(-50.f, 0.f, -50.f)); //15
	vertices.Add(FVector(-50.f, -50.f, -50.f));
	//12
	vertices.Add(FVector(StaticMaths::RR(-200.f, -100.f), 0.f, 0.f));
	vertices.Add(FVector(StaticMaths::RR(-150.f, -50.f), StaticMaths::RR(-150.f, -50.f), 0.f));
	//14
	vertices.Add(FVector(-50.f, 0.f, 50.f));
	vertices.Add(FVector(-50.f, -50.f, 50.f));//20

	//Left
	//16
	vertices.Add(FVector(0.f, -50.f, -50.f));
	//0
	//18
	vertices.Add(FVector(0.f, StaticMaths::RR(-200.f, -100.f), 0.f));
	//3
	//20
	vertices.Add(FVector(0.f, -50.f, 50.f));
	//6

	//Bottom
	//16
	//15
	//10
	//21
	vertices.Add(FVector(0.f, 0.f, -50.f));
	//9
	//0
	//1
	//2

	//Top
	//6
	//7
	//8
	//23
	vertices.Add(FVector(0.f, 0.f, 50.f)); //25
	//13
	//20
	//19
	//14


	//index buffer
	//+++++ Front
	//Lower Left
	indices.Add(3);
	indices.Add(1);
	indices.Add(0);
	indices.Add(1);
	indices.Add(3);
	indices.Add(4);
	//Lower Right
	indices.Add(4);
	indices.Add(2);
	indices.Add(1);
	indices.Add(2);
	indices.Add(4);
	indices.Add(5);
	//Upper Left
	indices.Add(6);
	indices.Add(4);
	indices.Add(3);
	indices.Add(4);
	indices.Add(6);
	indices.Add(7);
	//Upper Right
	indices.Add(7);
	indices.Add(5);
	indices.Add(4);
	indices.Add(5);
	indices.Add(7);
	indices.Add(8);

	//+++++ Right
	//Lower Left
	indices.Add(5);
	indices.Add(9);
	indices.Add(2);
	indices.Add(9);
	indices.Add(5);
	indices.Add(11);
	//Lower Right
	indices.Add(11);
	indices.Add(10);
	indices.Add(9);
	indices.Add(10);
	indices.Add(11);
	indices.Add(12);
	//Upper Left
	indices.Add(8);
	indices.Add(11);
	indices.Add(5);
	indices.Add(11);
	indices.Add(8);
	indices.Add(13);
	//Upper Right
	indices.Add(13);
	indices.Add(12);
	indices.Add(11);
	indices.Add(12);
	indices.Add(13);
	indices.Add(14);

	//+++++ Back
	//Lower Left
	indices.Add(12);
	indices.Add(15);
	indices.Add(10);
	indices.Add(15);
	indices.Add(12);
	indices.Add(17);
	//LowerRight
	indices.Add(17);
	indices.Add(16);
	indices.Add(15);
	indices.Add(16);
	indices.Add(17);
	indices.Add(18);
	//Upper Left
	indices.Add(14);
	indices.Add(17);
	indices.Add(12);
	indices.Add(17);
	indices.Add(14);
	indices.Add(19);
	//Upper Right
	indices.Add(19);
	indices.Add(18);
	indices.Add(17);
	indices.Add(18);
	indices.Add(19);
	indices.Add(20);

	//+++++ Left
	//Lower Left
	indices.Add(18);
	indices.Add(21);
	indices.Add(16);
	indices.Add(21);
	indices.Add(18);
	indices.Add(22);
	//Lower Right
	indices.Add(22);
	indices.Add(0);
	indices.Add(21);
	indices.Add(0);
	indices.Add(22);
	indices.Add(3);
	//Upper Left
	indices.Add(20);
	indices.Add(22);
	indices.Add(18);
	indices.Add(22);
	indices.Add(20);
	indices.Add(23);
	//Upper Right
	indices.Add(23);
	indices.Add(3);
	indices.Add(22);
	indices.Add(3);
	indices.Add(23);
	indices.Add(6);

	//+++++ Bottom
	//Lower Left
	indices.Add(21);
	indices.Add(15);
	indices.Add(16);
	indices.Add(15);
	indices.Add(21);
	indices.Add(24);
	//Lower Right
	indices.Add(24);
	indices.Add(10);
	indices.Add(15);
	indices.Add(10);
	indices.Add(24);
	indices.Add(9);
	//Upper Left
	indices.Add(0);
	indices.Add(24);
	indices.Add(21);
	indices.Add(24);
	indices.Add(0);
	indices.Add(1);
	//Upper Right
	indices.Add(1);
	indices.Add(9);
	indices.Add(24);
	indices.Add(9);
	indices.Add(1);
	indices.Add(2);

	//+++++ Top
	//Lower Left
	indices.Add(23);
	indices.Add(7);
	indices.Add(6);
	indices.Add(7);
	indices.Add(23);
	indices.Add(25);
	//Lower Right
	indices.Add(25);
	indices.Add(8);
	indices.Add(7);
	indices.Add(8);
	indices.Add(25);
	indices.Add(13);
	//Upper Left
	indices.Add(20);
	indices.Add(25);
	indices.Add(23);
	indices.Add(25);
	indices.Add(20);
	indices.Add(19);
	//Upper Right
	indices.Add(19);
	indices.Add(13);
	indices.Add(25);
	indices.Add(13);
	indices.Add(19);
	indices.Add(14);


	TArray<FVector> normals;
	for (int i = 0; i < vertices.Num(); i++)
	{
		normals.Add(vertices[i] / vertices[i].Size());
	}
	

	TArray<FVector2D> uv0;

	TArray<FProcMeshTangent> tangents;

	////The colors applied to every vertex and blended on the surfaces
	TArray<FLinearColor> vertexColors;

	mesh->CreateMeshSection_LinearColor(0, vertices, indices, normals, uv0, vertexColors, tangents, true);

	//Enable collision data
	mesh->ContainsPhysicsTriMeshData(true);
	mesh->bUseComplexAsSimpleCollision = false;
	mesh->SetSimulatePhysics(true);
}

 

If you made it to this part you probably read the code and in that case: We are still looking for anyone who wants to contribute to this journy into the unknown. And please don't look at me like that, the code is functional if not beautiful.

Thanks, bye.



2 Comments


Recommended Comments

Can we see a picture of what ever it is you made in the code you shared?

Share this comment


Link to comment
Lyfe

Posted (edited)

12 minutes ago, Awoken said:

Can we see a picture of what ever it is you made in the code you shared?

Of course you can.cloudsTop.thumb.PNG.9074b2a0132d0b9a847591f9e2c76d2f.PNGcloudsSide.thumb.PNG.f5de347aaa62a61fbd1ff5e461e8e285.PNG

These yellow blobs are the compound clouds or rather the colliders for the compound clouds so the player can interact with them.

Edited by Lyfe

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Advertisement
  • Blog Entries

  • Similar Content

    • By EnderStaffExe
      Hello! I'm new to the scene of video game developing and was wondering if anyone here has any experience developing 2D fighters and are up for making a little test demo to see if the idea would catch on to the public? I have no way of paying but I want to put the demo onto Kickstarter and I will pay a good amount if I get a good amount. Please, if you want to contact me for more info, add me on my Discord or Twitter. Thank you, and see you later!
      (Twitter: @enderstaffexe
      Discord: EnderStaffExe#3193)
    • By Heretic Arts
      Hello, 
      We are an American based videogame development team that crafts games utilizing neural networks, handcrafted art, studio quality audio, and immersive storytelling to provide the player with an unforgettable experience. Our current team comprises of a Software Engineer, Designer, Producer, Audio Engineer, and a systems admin. Obviously we are missing an art staff! Now, that being said, we have outsourced our concept art for the game to an experienced artist. We are wanting talent to join us to take it the rest of the way with animation and art. If you are interested in joining the team and feel that you are ready to work along a committed team, send a sample of your work and contact information to HereticRecruitment@HereticArts.com. 
      Job Specifics: 
      General: 
      Unpaid. This is normal. We all have fulltime careers outside of the team, but if there is money to be made upon release, it will be split evenly - no questions asked.  All expenses are paid by Administrative Team (GSuite account). So no worries - We want someone to join, have fun and create with us! Expectations of meeting weekly (via internet) and taking direction from producer.  Open minded  
      Skill sets: 
      Experience in designing and creating character art.  Full adobe suite.  Maya experience preferred.  Experience with developing for the Unity Engine.  Willing to work with design team to incorporate their ideas into art.  Knowledge of game design documentation and how it pertains to art creation.  In depth sprite animation knowledge. 
    • By ERASERHEAD STUDIO
      A new entry in the devlog for 13 Ronin, a retro 2d samurai fighting game, this time it's about implementing the logic for the computer player.
      Happy coding!
      https://www.eraserheadstudio.com
       
       
    • By sidbhati32
      Hey,
      So I have got this asteroid type game and today I encountered a new issue while testing this game.
      What happened was that two asteroids were close to each other and I shot a bullet at them. The asteroids were so close to each other that a single bullet could collide to both of them.
      It collided and my game crashed there itself. I figured out it happened because two asteroids and one bullet collided in the same frame.
      This is the code -
      ```void Collision::DoCollisions(Game *game) const
      {
          for (ColliderList::const_iterator colliderAIt = colliders_.begin(), end = colliders_.end();
              colliderAIt != end;
              ++colliderAIt)
          {
              ColliderList::const_iterator colliderBIt = colliderAIt;
              for (++colliderBIt; colliderBIt != end; ++colliderBIt)
              {
                  Collider *colliderA = *colliderAIt;
                  Collider *colliderB = *colliderBIt;
                  if (CollisionTest(colliderA, colliderB))
                  {
                      game->DoCollision(colliderA->entity, colliderB->entity);
                  }
              }
          }
      }```
       
      ```
      void Game::DoCollision(GameEntity *a, GameEntity *b)
      {
          Ship *player = static_cast<Ship *>(a == player_ ? a : (b == player_ ? b : 0));
          Bullet *bullet = static_cast<Bullet *>(IsBullet(a) ? a : (IsBullet(b) ? b : 0));
          Asteroid *asteroid = static_cast<Asteroid *>(IsAsteroid(a) ? a : (IsAsteroid(b) ? b : 0));
          Bullet *bulletMode = static_cast<Bullet *>(IsBulletMode(a) ? a : (IsBulletMode(b) ? b : 0));
          if (player && asteroid)
          {
              player->playerCollided = true;
              //AsteroidHit(asteroid);
              //DeletePlayer();
          }
          if (bullet && asteroid)
          {
              collidedBullets.push_back(bullet);
              collidedAsteroid.push_back(asteroid);
              //AsteroidHit(asteroid);
              //DeleteBullet();
          }
          if(bulletMode && asteroid)
          {
              collidedBulletMode.push_back(bulletMode);
              collidedAsteroid.push_back(asteroid);
          }
      }```
       
      ```
      void Game::CollisionResponse()
      {
          if(player_->playerCollided == true)
          {
              DeletePlayer();
          }
          else
          {
          if(!collidedAsteroid.empty())
          {
              for(AsteroidList::const_iterator collidedAsteroidIt = collidedAsteroid.begin(), end = collidedAsteroid.end(); collidedAsteroidIt != end ; ++collidedAsteroidIt )
              {
                  AsteroidHit(*collidedAsteroidIt);
              }
              collidedAsteroid.clear();
          }
          
          if(!collidedBullets.empty())
          {
          for (BulletList::const_iterator bulletIt = collidedBullets.begin(), end = collidedBullets.end() ; bulletIt!=end; ++bulletIt)
          {
              DeleteBullet(*bulletIt);
          }
          
              collidedBullets.clear();
          }
          if(!collidedBulletMode.empty())
          {
              for (BulletList::const_iterator bulletIt = collidedBulletMode.begin(), end = collidedBulletMode.end() ; bulletIt!=end; ++bulletIt)
              {
                  DeleteBulletMode(*bulletIt);
              }
              collidedBulletMode.clear();
          }
      }
          }```
       
       
      in my game->docollision() -
      whenever an asteroid and a bullet used to collide, the collided objects get collected in collidedasteroids and collidedbullets respectively. When two asteroids collided with the same bullet, the two asteroids got collected safely in collidedAsteroid but the single bullet got collected in collidedBullets twice, so when the deletion was happening, the second time iteration of the bullet couldn't find the respective bullet and it got crashed.
       
      How am I supposed to approach this problem now?
       
      Thanks
    • By sidbhati32
      How to calculate angle between two points from a third point with the help of D3DXMATH library?
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!