Jump to content
  • Advertisement

Java Tower Defense Indie Game Dev Blog #5: New turret and enemy types

EddieK

1251 views

This week

Hello everyone! This week, as always, I fixed few bugs, did few tweaks and implemented small features. Here's a list of things I've done this week:

  • Tweaked enemy prices and levels.
  • Added object picking
  • Added sounds and music
  • Tweaked audio gains for different sounds and music
  • Added capability of selling towers
  • Added new cursor
  • Implemented support for multiple enemy waves
  • Added new enemy: Tank
  • Added new turret type: Rocket turret

Screenshots:

Screenshot from 2018-06-03 17-29-52tank_meshtank_textured

 

Important decision

Yesterday I came to important realization while making my game. I realized that I need to build a fully working prototype of the game, figure out all the mechanics, implement all the tower and enemy types first and only then continue doing the minor things and polishing things up. I also realized that I should spend less time on music and 3D models. All these things will be done, but not now. I need to make my game fun first, and only then worry about all the assets. I don't want to repeat same mistake which I did with my previous games where I spent too much time on graphics, sounds, performance optimizations and too little time for actual gameplay mechanics.

Problems

There's one problem which I currently face, and it has to do with the "Tesla Coil" tower. As of now it slows down the enemies in its range, but there's a problem with that. The problem arises when you put the tower at the very end of the maze. When you do that, it not only slows down the enemies in its range, but it also slows down any enemies which came before them. This is because of the obstacle avoidance which makes it so that the enemies couldn't go through each other like some sort of ghosts. The only solution which I can think of right now is to remove this type of tower and replace it with something else.

Next week

This coming week I'll start thinking of and implementing all the different tower and enemy types. I might do some very basic 3D models to use as placeholders as well.

 

That's all for now, thanks for reading :)

 

Twitter: https://twitter.com/extrabitgames
Facebook: https://www.facebook.com/extrabitgames
Website: http://extrabitgames.com



7 Comments


Recommended Comments

Good going Eddie! I have a slow down tower but yes my enemies walk through each other like ghosts lol. Don't know a good solution yet. :)

Share this comment


Link to comment
23 minutes ago, lawnjelly said:

Good going Eddie! I have a slow down tower but yes my enemies walk through each other like ghosts lol. Don't know a good solution yet. :)

Thanks! It seems that you are progressing very quickly with your game. Are you using some kind of premade engine, or are you writing it in OpenGL/DirectX? Because most of my time is spent getting through my mess which I call code :D

Share this comment


Link to comment

Hi I like your lowpoly models, but I was wondering why do your wheels and other circural shapes (like canon) have so many polygons? Your models are pretty small on screen, and since you are using blender, you could use fewer polys, and when you use soft shading it wont be even noticable with texture. I think it could improve your performance when you instantiate a lot of models (especially tanks).

Keep up the good work! Darthy

Share this comment


Link to comment
18 hours ago, EddieK said:

Thanks! It seems that you are progressing very quickly with your game. Are you using some kind of premade engine, or are you writing it in OpenGL/DirectX? Because most of my time is spent getting through my mess which I call code :D

Sorry Eddie I took a while to get back, am currently trying to find / buy a new house so have only been able to spend a few days at a time on the Tower Defence, I probably won't get to do too much more before the end day (June 30th I think it was?), maybe implement some more game modes.

Although I am normally an OpenGL / low level guy, I forced myself to learn Unity from scratch for the challenge (and c#). It seems very much for rapid development and to be beginner friendly, and makes certain things a lot easier as long as you keep it very simple. I'll try and do a full review of Unity etc when I do a post mortem. And my code for the game is definitely messy too, I will have to clean it up majorly afterwards so it will make any sense to a reader, especially as it is sprinkled liberally with comments like 'c# sucks monkey b*lls'.

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 Josheir
      I have rewritten this function a few times now and I am having trouble getting every other row to have the triangles face the reverse direction.  The image enclosed demonstrates the faulty behavior which includes only one row facing the reversed direction.  
       I am also confused by how many indexes I should have for the g_vertex_buffer_data_land variable, could someone show me a breakdown like : 18 vertices times 2 sets  times 8 columns times 8 depth.
      In another post fleabay mentioned I was not setting a VAO in core profile, however It seems to be.  
      here is the code:
       
      float* getVertices(void) { //using defines int incol = _colus; int depth = _depth; int i = 0; float scaleit = .5; float tempdepth = 0; int startindexat = 0; int counter = 0; int secondcounter = 0; //for (; (tempdepth+1) <= (depth);) //don't forget to change this back! for (int q=0;q<3;q++) { //odd rows for (int col = 0; (col+1) <= (incol ); col++) { GLfloat matrix1[3][3] = { {(col + 1),0,(tempdepth)},{ (col),0,(tempdepth)}, {(col),0,(tempdepth + 1) } }; // //vertex 1 g_vertex_buffer_data_land[startindexat + 0 + counter] = matrix1[0][0] * scaleit; g_vertex_buffer_data_land[startindexat + 1 + counter] = matrix1[0][1] * scaleit; g_vertex_buffer_data_land[startindexat + 2 + counter] = matrix1[0][2] * scaleit; //vertex 2 g_vertex_buffer_data_land[startindexat + 3 + counter] = matrix1[1][0] * scaleit; g_vertex_buffer_data_land[startindexat + 4 + counter] = matrix1[1][1] * scaleit; g_vertex_buffer_data_land[startindexat + 5 + counter] = matrix1[1][2] * scaleit; g_vertex_buffer_data_land[startindexat + 6 + counter] = matrix1[2][0] * scaleit; g_vertex_buffer_data_land[startindexat + 7 + counter] = matrix1[2][1] * scaleit; g_vertex_buffer_data_land[startindexat + 8 + counter] = matrix1[2][2] * scaleit; int matrix2[3][3] = { { (col + 1),0,(tempdepth + 1)},{ (col + 1),0,(tempdepth)}, {(col),0,(tempdepth + 1) } }; g_vertex_buffer_data_land[startindexat + 9 + counter] = matrix2[0][0] * scaleit; g_vertex_buffer_data_land[startindexat + 10 + counter] = matrix2[0][1] * scaleit; g_vertex_buffer_data_land[startindexat + 11 + counter] = matrix2[0][2] * scaleit; g_vertex_buffer_data_land[startindexat + 12 + counter] = matrix2[1][0] * scaleit; g_vertex_buffer_data_land[startindexat + 13 + counter] = matrix2[1][1] * scaleit; g_vertex_buffer_data_land[startindexat + 14 + counter] = matrix2[1][2] * scaleit; g_vertex_buffer_data_land[startindexat + 15 + counter] = matrix2[2][0] * scaleit; g_vertex_buffer_data_land[startindexat + 16 + counter] = matrix2[2][1] * scaleit; g_vertex_buffer_data_land[startindexat + 17 + counter] = matrix2[2][2] * scaleit; counter = counter + 18; }//end col startindexat = 17 + counter+ 1; for (int col2 = 0; (col2+1) <= (incol); col2++) { //first triangle : even rows GLfloat matrix3[3][3] = { {(col2 + 1) ,0,(tempdepth + 2)} , {(col2 + 1),0,(tempdepth + 1)}, {(col2),0,(tempdepth +1)} }; // //vertex 1 g_vertex_buffer_data_land[(startindexat + secondcounter)] = matrix3[0][0] * scaleit; g_vertex_buffer_data_land[(startindexat + 1 + secondcounter)] = matrix3[0][1] * scaleit; g_vertex_buffer_data_land[(startindexat + 2 + secondcounter)] = matrix3[0][2] * scaleit; //vertex 2 g_vertex_buffer_data_land[(startindexat + 3 + secondcounter)] = matrix3[1][0] * scaleit; g_vertex_buffer_data_land[(startindexat + 4 + secondcounter)] = matrix3[1][1] * scaleit; g_vertex_buffer_data_land[(startindexat + 5 + secondcounter)] = matrix3[1][2] * scaleit; g_vertex_buffer_data_land[(startindexat + 6 + secondcounter)] = matrix3[2][0] * scaleit; g_vertex_buffer_data_land[(startindexat + 7 + secondcounter)] = matrix3[2][1] * scaleit; g_vertex_buffer_data_land[(startindexat + 8 + secondcounter)] = matrix3[2][2] * scaleit; // even (2) int matrix4[3][3] = { {(col2 + 1),0,(tempdepth+ 2)},{ (col2),0,(tempdepth+ 1)}, {(col2),0,(tempdepth + 2) } }; g_vertex_buffer_data_land[(startindexat+9 + secondcounter)] = matrix4[0][0] * scaleit; g_vertex_buffer_data_land[(startindexat+10 + secondcounter)] = matrix4[0][1] * scaleit; g_vertex_buffer_data_land[(startindexat+11 + secondcounter)] = matrix4[0][2] * scaleit; g_vertex_buffer_data_land[(startindexat+12 + secondcounter)] = matrix4[1][0] * scaleit; g_vertex_buffer_data_land[(startindexat+13 + secondcounter)] = matrix4[1][1] * scaleit; g_vertex_buffer_data_land[(startindexat+14 + secondcounter)] = matrix4[1][2] * scaleit; g_vertex_buffer_data_land[(startindexat+15 + secondcounter)] = matrix4[2][0] * scaleit; g_vertex_buffer_data_land[(startindexat+16 + secondcounter)] = matrix4[2][1] * scaleit; g_vertex_buffer_data_land[(startindexat+17 + secondcounter)] = matrix4[2][2] * scaleit; //one column of 4 triangles //(three vetices per triangle) secondcounter = secondcounter + 18; } startindexat = 17 + secondcounter + 1; tempdepth = tempdepth - 1; } return gvertices; }  
      I am hoping someone might have the experience to help me solve this problem.  Or, what could I check and do I need to show more repo code? 
       
      Thank you,
      Josheir

    • By sevenfold1
      I'm looking for a open source PBR rendering engine that I can use.  Basic requirements are Windows (C/C++) and free to use type license.

      The first two hits I get on Google are:

      Filament
      https://github.com/google/filament/

      LuxCoreRender
      https://luxcorerender.org/

      Does anybody have any experience using any of these, or do you recommend something else that's better?
      Thanks.
      Pluses: Active development, easy to compile, zero dependencies.
    • By HappyCoder
      What is the game like
      I'm working on a game where the main mechanic is the player creates their own spells. They create spell using a sort of visual programming language
      Here is a diagram showing how the spell system would work

      The top spell would shoot fire out of the casters hand
      The second spell would shoot a projectile in a straight line until it hit something with no other effects
      The third spell would shoot a projectile and when it hits, explodes in a fireball
      Armed with only their knowledge of magic the player must navigate through caves and dungeons looking for artifacts and spells to allow them to become a master of the magic arts.
      What I have so far
      I prototype of the spell creation system. The user can draw symbols using an oculus touch controller in the air. The computer recognizes the symbol and the user can then move the symbols around to construct spells.
      List of spells I have working at the moment
      Fire - does damage, burns wood, and can light torches Wind - pushes objects and puts out torches Levitate - causes the target to become weightless, when used with wind you can push even heavy objects Light - a bright light used to light up dark areas What I need
      It would be great to have an artist to work with. I am going ahead doing the artwork on my own but having somebody who could take that too let me focus on the other aspects would be of great help
      I would also like if somebody would take on the role of designing levels. I think this game will rely on having many different interesting encounters to force them to come up with clever solutions to problems using their magic. It would be helpful to have somebody to collaborate with for ideas in the category and to focus on trying different levels out to help me focus on the programming.
    • By Servant of the Lord
      I have a texture I'm reading from like this:
      vec4 diffuseFrag = texture2D(DiffuseMap, fDiffuseCoord); Sometimes, for special effects, I'd actually like to do something this:
      vec4 uvFrag = texture2D(UVMap, fUVCoord); vec4 diffuseFrag = texture2D(DiffuseMap, uvFrag.rg); ...basically, I'm using a texture's Red and Green color channels to store the frag coordinates I want to read from DiffuseMap.
      My probably is, both the UV map and the Diffuse map are spritesheets with multiple images in them. This means, I'm actually wanting uvFrag.rg's (0-1) texcoord to be multiplied against the *subportion* of the texture that all four vertices of my fDiffuseCoord are referring to.
      Something like: 
      vec4 uvFrag = texture2D(UVMap, fUVCoord).rg; vec4 upperLeftOfSubrect = ...; vec4 bottomRightOfSubrect = ...; vec4 subrectSize = (bottomRightOfSubrect - upperLeftOfSubrect); uvFrag = upperLeftOfSubrect + (uvFrag * range); vec4 diffuseFrag = texture2D(DiffuseMap, uvFrag.rg);  
      Where my mind is going blank is, how can I get upperLeftOfSubrect / bottomRightOfSubrect, without bloating my vertex struct further with additional attributes?
      It mentally trips me up that I'll have to copy upperLeftOfSubrect / bottomRightOfSubrect into all four of my vertices... and triply annoys me because I'm already passing them in as fDiffuseCoord (just spread between different vertices).
      Is there a simple solution to this that I'm missing?
    • By jb-dev
      This is a picture of a regular room. 
      Each rooms has a chance to have props with a certain layout.
      If a rock is spawn the player can try to break it by exploding it. These can spawn common collectibles like money and such...
      There are many different type of layout possible, including a totally random one.
      The generator simply picks a shape, an anchor position and the type of prop to be generated.
      The process itself is simply a 2D boolean array. We simply draw on that array like we would in a bitmap using traditional image manipulation algorithms.
      Once the array is set, then we simply add a given prop for each true cell of the array 
      We then finally remove every props that are either outside its room or obstructing an entry/exit point.
      Right now, only two types of props can be generated, although the algorithm itself is kinda flexible.
×

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!