On the other hand, a TD without real stats (and you have to guess) is not satisfying in my opinion. So maybe we can show stats but reduce their format: Instead of Armor: 120 we could display Armor: XX--- (=2/5) ? What do you think?
I agree with that. I few stats presented well in an organized way would definitely be useful. As long as you don't overwhelm the user with information I see nothing wrong with that.
1. Depth of strategy is best increased by having interesting combinations. For example, turret A and turret B my be okay on their own, but when combined they are much more powerful. You also want to make turrets counter specific enemies, but ideally there is more than one way to counter it. That lets the player choose a tower that best fits their strategy. This is a very tricky part of game design but if done right it can really make for a fun game. Another great thing to have in a game is some sort of risk reward system. They player should be able to choose something that has a higher risk of failure, but if they succeed they get a higher reward.
2. The player should never feel overwhelmed with options even though you want to give them many options. This is best done by incrementally introducing new gameplay elements into the game to create a gradual learning curve. Your towers and enemies should best convey their behavior based on appearance as much as possible through its design or attack animations. Any text descriptions of what things do should be kept very short. Most people aren't willing to read a paragraphs of text to learn how to play a game. If its clear what is happening when an enemy or turret attacks then the player can use that information when developing strategies.
I like them. They are very entertaining. I remember playing some as custom starcraft maps and put a lot of time into that.
Plants vs Zombies would be my favorite tower defense game. It certainly doesn't fit the mold of most tower defense games but some of the ways it varies from the norm is why I like it.
I think most tower defense games don't much to let you counter different types of enemies. Many don't let you know what is coming so you have to blindly make decisions or memorize the order of waves by trail and error. Many don't really have different kinds of enemies, just varying amounts of health. I also think many end up with a dominant strategy where you each level has a single solution that is obviously the best. Again, it often comes down to trail and error. Many of the games strategy simply comes down to determining the optimal places to place your turrets, other than that there aren't many interesting decisions to be made.
A few things I like about Plants vs Zombies. It lets you know what zombies to expect before each wave, this lets you prepare for that zombie type. There are many zombie types that are more than just a higher damage zombie. Each zombie type has a hard counter, magnet shrooms for buckets and football zombies, tallnuts for pole vaulters. The game has enough unique plants to let the player experiment with different strategies. A few strategies I like are using gatling peas with torchwood to produce a high damage per second. You can also you slow peas or blue watermelons to slow down zombies to allow for more damage over a longer time. A row of corn launchers is a fun one. Using onions to force zombies into only a few lanes full of spikes surrounded by gloom shrooms is also effective. There are probably many other strategies I haven't tried, that the freedom to play around with different ideas really adds a lot of replay value. One thing it lacks that I like from other tower defense games are the long winding paths that can very greatly between levels. I definitely see how that would not work in that game, but it would be fun to see a tower defense game that had a depth of strategy with interesting decisions like plants vs zombies, but with long winding paths that would vary greatly from level to level.
Pick a simple game to create. Just building an engine is nebulous. I've done it before, and I just ended up working on cool features that never actually get used. Feature creep was particularly bad. You can definitely still create the engine, but just view it as reusable code for your game projects. You could make a game as simple as 3d pong.
I've becoming more and more convinced that inheritance is a code smell. This article explains my sentiments http://www.javaworld.com/article/2073649/core-java/why-extends-is-evil.html I tend to agree with it because inheritance has caused me plenty of frustrations. I really appreciate what the makers of golang did. They got rid of inheritance and make use of embedding and interfaces instead.
Am I wrong to think that inheritance should be avoided?
Like JoeJ said, if you want to interpolate between to rotations I would convert them to a quaternion and do a slerp between them. You could even skip the rotation matrix and go straight from Euler angles to quaternions.
If you lerp the Euler inputs your rotation may not take the most direct path. A simple example is lerping between 10 degress and 350 degrees. Instead of rotation 20 degrees it will rotate 340 in the other direction.
Another simple example is if you have an airplane pointed upwards at 45 degrees. Now suppose you have a rocket also nearly pointed up at 45 degrees but rotated 180 degrees around the vertical axis. If you lerped the Euler angles from the plane to the rocket it would rotate 180 degrees around the vertical instead of rotating 90 degrees by continuing to pitch upward. This may be the desired lerping behavior if you were rotating a gun turret, for example. However, in most cases, the properties of a quaternion slerp are much nicer.
I don't have frustration in learning and developing games, despite constant discouragement. So should I give up and just turn away from all these discouragement? Maybe I'm not meant to be because people say I'm not meant to be a video game developer? Who can be a video game developer?
I remember when I started making games I felt a little discouraged because I saw what others could create and felt that it was out of my reach. Years later after just focusing on making simple games within my ability, I can now do the things that I thought I couldn't before. Just stick with it, your skills will improve, you can be a game developer.
This is a pretty tricky problem. The approach I would take would be to pick a direction and velocity, then calculate the path iteratively meaning you simulate the game forwards in time applying gravity and updating the projectile velocity etc. Do this for a few random directions then pick the one that is the best shot. You could then keep track of the best know shot from frame to frame then each frame, do the same thing but with slightly modified versions of the best current shot. If a slightly modified version improves the shot, then store that as the best shot.
You will determine the best shot based on a score. I would score it based on how close it comes to the target, and for moving targets, how much time it would take for impact. Further away shots wont score as high since it would be more likely for the target to move.
This would be a genetic algorithm approach. You could refine it by coming up with another method that can give a good initial direction and velocity, this would make it converge faster. You will also have to fine tune how much to modify the inputs each iteration. You will also need to set a max maximum time you will simulate out to.
Once you have a way to score your shots, you can set a threshold for the score. Once a shot score exceeds a threshold you take the shot. The threshold could slowly drop down each frame to ensure that the enemy eventually shoots, and once the enemy does shoot, you raise the threshold.
I may be over complicating this, but the nice thing about this approach is it pretty flexible. You could add multiple bodies with gravity and it would handle it just fine. You could also simulate moving targets assuming you could accurately predict their future position. The way you score a shot also gives you some flexibility. You could check for collision with things you don't want to hit as part of the score.
You could also reuse the same path predictor to determine if a projectile will hit the AI's ship.
Posted by HappyCoder
on 26 February 2016 - 03:46 PM
There are two approaches to collision.
1. When you move the player, you check to see if the player volume would hit any object and move them to the point of contact then slide along the wall.
2. Move the player then after they moved see if they are overlapping any object. This seems to be the approach you are taking.
Each approach has their advantages and disadvantages. #2 is usually simpler to implement and works well with many dynamic objects. However, fast moving objects can pass through walls or other objects. #1 will keep objects from passing through wall, but sweeping volumes can be tricky to implement
However, you could probably get unity to work how you want without having to resort to making your own collision detection. First of all, use a character controller to move your player around. Character controllers lets you specify how much you want the player to move and it will handle collision for you. https://unity3d.com/learn/tutorials/modules/beginner/2d/2d-controllers
Posted by HappyCoder
on 24 February 2016 - 09:13 PM
A few tips of mine
1. Don't use inheritance just to reuse code. Be sure your base class and sub class have a strong is a relationship
2. If you use class A inside class B, don't require that class B can only be used inside class A. As an example, if you have a Car class and an Engine class, don't require that the Engine can only be used in a Car. In other words, don't have cyclical dependencies.
3. Never use singletons or global state. Global variables are usually used because they an easy short term solution to problems, but you will pay for it later. Once you remove global variables you are forced to think about the design of your code more and come up with better designs.
Posted by HappyCoder
on 17 February 2016 - 02:49 PM
You will probably need an additional animation where the character bends over the edge. You would have to detect when the animation would put them hanging over the edge, and play the other animation in that case. As Orymus suggested, you would have to shift the position of the animation slowly to line up correctly. However, there really isn't a correct answer in this case. It really comes down to how much time you want to put into polishing details like this. Overhanging death animations is fairly common in video games and players aren't going to care that much, but those little details can add up to really improve the experience.