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

DevBlog #34



Hello dears!
It's been more than a month since the last diary. Frankly, it was a hard month for me in terms of development.

Most of the time was devoted to the construction of the structure of society, the interaction of the population, the transition from one stratum to another. It took a lot of time to build economic ties.

At one point, I decided to throw some scheme of our project, which allowed a little systematize all my thoughts and see the degree of implementation of certain tasks. Who is interested to assess the scale, you can see the resulting scheme: https://mm.tt/1209438933?t=mBE5c38pFT

In between work on the gameplay part of the thing with the mountains, and returned them again to the ice caps:


Alexey made new optimized palm trees-270-350 triangles on one subtile


Great result with such a landfill!

I also managed to experiment with the user interface and made this sketch:


And more or less brought him to mind:


I prefer this interface concept. Before the interface was very heavy and it looked as if looking into the tube. But now clearly lacks any curls :)

Then I experimented with transparent objects, we had an idea to implement such fields initially:



But, in the end, we decided to focus on such an option:



In a long box I had the task of building walls around our settlements. Alexey made models, already as half a year ago, but his hands did not reach them. I had to dust them off.:


The problem was not trivial, it was necessary to carry out a lot of calculations to determine the need for a wall with an entrance, here is an example of such a case:



And here is masterpiece deciduous trees on 800 triangles on subtil:


Then I broke everything.:



There came a ten-day period of optimization and rethinking of everything that was done on the render.
And all this is due to the fact that I came up with one idea, how else to optimize our render. Unfortunately, I was not able to implement all my ideas, so to speak, theoretical calculations went against the practical results.

But the result was still impressive. The first thing I want to mention — we now have 16 subtiles on the tile, and was 9. Before mesh subflow was 3x3, 4x4 now. 484 tops against 1089 now. The number of vertices per tile has increased 2.25 times, and the performance has remained at the same level and the map generation is now faster, as the most time-consuming process of normals calculation is now faster. This happened due to the fact that I removed from the calculations all the numbers with a period after the decimal point, such as 1\3 and 2\3. Now all calculations on both CPU side so GPU are faster.

This is especially noticeable on large and huge worlds:




The increase in the number of vertices and subflow allowed to implement more realistic mountains:







Now our render takes out 32 million polygons!!! True to my GTX660 IS only 10FPS



Alteration of the whole world on the structure of 4x4 sub-tails resulted in alteration of generation of mountains, hills, rivers, scaling of all models. Which together took those 10 days.



 - Also, the following points have been implemented about which I would like to briefly tell:
 - Normalmaps for the whole of terrane.
 - An error with the calculation of normalmap.
 - Corrected an interface error on the containers voznikayuschaya when the MouseEntered MouseExited events.
 - Go to / from full screen mode by pressing F11.


A lot of time I took one bug:




5 hours I killed on his the search :)

Thank you for your attention!


Recommended Comments

It looks nice! :) You might be able to use level of detail on the trees or imposters, and level of detail on the terrain. Also if you were prepared to use orthographic or constrained camera views when zoomed out, you could probably really simplify imposters / sprites.

Share this comment

Link to comment

In fact, this scale in the game will not. With this removal of the camera, the map will switch to strategic 2D mode. Therefore, there is no sense in Imposters.

Edited by Zemlaynin

Share this comment

Link to comment
3 hours ago, Zemlaynin said:

In fact, this scale in the game will not. With this removal of the camera, the map will switch to strategic 2D mode. Therefore, there is no sense in Imposters.

That sounds a good idea! 🙂 I look forward to seeing how the game develops!

Share this comment

Link to comment
14 hours ago, Awoken said:

Can't wait to play it :) 

Oh, there's a lot of work to do. :)

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
  • What is your GameDev Story?

    In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

    (You must login to your GameDev.net account.)

  • Blog Entries

  • Similar Content

    • By antoniorv6
      Hi. I am developing a sort of graphic engine for a project at the University and I have stepped into a problem that I don't really know how to interpret. I'll explain.
      In our game engine, when you load a texture, you read it with the function that STB image library provides: stbi_load(), and then bind it. This is done by the following code:
      void TResourceTexture::LoadResource(const std::string& c_resourceDocument_str) { std::string l_assetRoute = "assets/" + c_resourceDocument_str; LoadFromSTBI(l_assetRoute); BindTexture(); stbi_image_free(m_imageData_cch); } void TResourceTexture::LoadFromSTBI(const std::string& c_resourceDocument_str) { m_imageData_cch = stbi_load(c_resourceDocument_str.c_str(), &m_width_i, &m_height_i, &m_bDepth_i, 3); if(!m_imageData_cch) { std::cout << "[ERROR] - Texture could not be found"<<std::endl; stbi_image_free(m_imageData_cch); return; } } void TResourceTexture::BindTexture() { glGenTextures(1, &m_textureID); glBindTexture(GL_TEXTURE_2D, m_textureID); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, m_width_i, m_height_i, 0, GL_RGB, GL_UNSIGNED_BYTE, m_imageData_cch); glGenerateMipmap(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, 0); } This works fine and does not give any problems. However, if I change the first line of LoadFromSTBI and the seventh of BindTexture() with these:
      m_imageData_cch = stbi_load(c_resourceDocument_str.c_str(), &m_width_i, &m_height_i, &m_bDepth_i, 4); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, m_width_i, m_height_i, 0, GL_RGBA, GL_UNSIGNED_BYTE, m_imageData_cch); Valgrind triggers me the following memory leak:
      ==5745== 6,840 bytes in 1 blocks are possibly lost in loss record 137 of 140
      ==5745==    at 0x483777F: malloc (vg_replace_malloc.c:299)
      ==5745==    by 0x19A7A0AD: ??? (in /usr/lib/dri/i965_dri.so)
      ==5745==    by 0x19A7A178: ??? (in /usr/lib/dri/i965_dri.so)
      ==5745==    by 0x19A77FB6: ??? (in /usr/lib/dri/i965_dri.so)
      ==5745==    by 0x19A781E2: ??? (in /usr/lib/dri/i965_dri.so)
      ==5745==    by 0x19ACFC5B: ??? (in /usr/lib/dri/i965_dri.so)
      ==5745==    by 0x6DD54FE: __pthread_once_slow (in /usr/lib/libpthread-2.28.so)
      ==5745==    by 0x19AD0266: ??? (in /usr/lib/dri/i965_dri.so)
      ==5745==    by 0x19ADE107: ??? (in /usr/lib/dri/i965_dri.so)
      ==5745==    by 0x199C658E: ??? (in /usr/lib/dri/i965_dri.so)
      ==5745==    by 0x19A05B9E: ??? (in /usr/lib/dri/i965_dri.so)
      ==5745==    by 0x19A05EC0: ??? (in /usr/lib/dri/i965_dri.so)
      I thought it was a memory leak related to hardware and graphic drivers, but while testing in other different device, it triggered again. Does anyone know what's going wrong with this change or if it has to be done anything extra if you are using this function in order to avoid this leaks?
      Thank you in advance!
    • By Alio
      Hi I am trying to learn sdl 1 and open gl on linux, I have this  c code.
      int main()
      /*Inintialize SDL as usual */
      if (SDL_Init(SDL_INIT_VIDEO) != 0) {
      printf("Error: %s\n", SDL_GetError());
      return 1;
      /* Enable OpenGL double buffering */
      SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
      /*Set the colour depth (16 bit 565). */
      SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 5);
      SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 6);
      SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 5);
      /* Create a 640 x 480, 16 bit window with support for
      Open GL rendering. Unfortunately we won't know whether
      this is hardware accelerated. */
      if (SDL_SetVideoMode(640, 480, 16, SDL_OPENGL) == NULL) {
      printf("Error: %s\n", SDL_GetError());
      return 1;
      SDL_WM_SetCaption("OpenGL with SDL!", "OpenGL");
      /* We can now use any OpenGL rendering commands */
      glViewport(80, 0, 480, 480);
      glColor3f(1.0, 0, 0);
      glVertex3f(0.0, 1.0, -2.0);
      glColor3f(0, 0, 1.0);
      glVertex3f(1.0, -1.0, -2.0);
      glColor3f(0, 0, 1.0);
      glVertex3f(-1.0, -1.0, -2.0);
      /*Display the back buffer to the screen */
      /*Wait a few seconds. */
      return 0;
      why is it producing just a blank screen, it compiled fine with gcc linking to -lSDL and -lGL, did I miss any, also I ran glxinfo | grep "version"
      to see which version of opengl I got.
      server glx version string: 1.4
      client glx version string: 1.4
      GLX version: 1.4
          Max core profile version: 3.3
          Max compat profile version: 3.0
          Max GLES1 profile version: 1.1
          Max GLES[23] profile version: 3.0
      OpenGL core profile version string: 3.3 (Core Profile) Mesa 18.2.2
      OpenGL core profile shading language version string: 3.30
      OpenGL version string: 3.0 Mesa 18.2.2
      OpenGL shading language version string: 1.30
      OpenGL ES profile version string: OpenGL ES 3.0 Mesa 18.2.2
      OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00

      Please help me get started and get some shapes on my screen. Thanks.
    • By TreektusPL
      Hi everyone!
      I'd like to introduce you to my android game.
      Sphere Control is a simple adventure and recreation game. In the game, we move the ball. The game has currently completed 10 levels. Each level differs from the previous one and introduces new elements to the game, eg a new trap, obstacle, mechanism. Our task is to get all the crystals at a given level. We will be hindered by various traps, obstacles such as moving objects and tasks that we must solve earlier. The game is in a low-poly style.
      The game is now available on Google Play: play.google.com/Sphere-Control
      Website: worthout.com
      FB: facebook.com/Worthout

    • By calioranged
      *** Beginner question ***
      To my current understanding of mipmapping, If you have a 512x512 texture downsized to 256x256, then only 1 pixel can be rendered on the downsized version for every 4 pixels on the full sized texture.
      If the nearest neighbour method is used, then the colour of each pixel on the downsized version will be determined by which pixel has its centre closest to the relevant texture coordinate, as demonstrated below:

      Whereas if the linear method is used, then the colour of each pixel on the downsized version will be determined by a weighted average of the four full size pixels:

      But if mipmapping is not used, then how is the colour of each pixel determined?
    • By Brain
      This is my level editor workflow. Levels are represented by simple integers in the right hand column under a component called LevelInfo, and meshes are placed manually on the grid. The grid is replaced at runtime with actual gridactors.

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!