Jump to content

  • Log In with Google      Sign In   
  • Create Account

HappyCoder

Member Since 28 Apr 2007
Offline Last Active Yesterday, 04:14 PM

#5307458 I have an Idea..........

Posted by on Yesterday, 01:11 PM

My question is are there any easier engines that i can use to make this game. Also I dont really understand the tutorials online .


Making in through those online tutorials will be one of the easiest parts of making your idea. There are easier game engines, but easier to use generally means less capable. No game engine will make your idea simple enough that an inexperienced person can make it. You need to start much smaller to build your skills. Think pong or space invaders small.


#5307443 Scene graphs in an Entity-Component Framework

Posted by on Yesterday, 12:18 PM

I would go with option 3. It allows each system to handle the scene in the way best for itself. Keeping the systems decoupled will simplify your code making adding new features or fixing issues easier. I like to treat code complexity like a resource just like CPU usage and memory. Complex code will use up more developer time and be more bug prone. With that in mind, I like to write my code in a way that uses little complexity budget.


#5307423 if party strength changes, quest encounters can become imbalanced.

Posted by on Yesterday, 10:14 AM

If your party can drop power at any point in the game then you can allow the player grind or do other things to boost your party strength. Maybe even a temporary consumable boost. As long as the deficit can be overcome then I don't think such a scenario would be a problem. I think there is a sense of accomplishment to planning out on how to defeat said monster, executing the plan and succeeding.


#5307411 OpenGl or Vulkan?

Posted by on Yesterday, 09:16 AM

OpenGL is more stable and there is more tutorials available. If you just want something up and running quickly I would go with OpenGL. If you are more interested in the learning Vulkan, I would use Vulkan.

However, if it were me, I would just use Blender to build my scenes, export to the collada format add support for importing collada files in my ray tracer. Unless you really just want the learning experience of trying to make your own, I wouldn't make my own 3d modeler.


#5303997 Theory Behind These Uncharted 4 Bullet Trails

Posted by on 04 August 2016 - 09:38 AM

Try manually creating the smoke trail you want in a 3d modeling program such as blender first. Once you have figured out how to get the look you want manually, then try to write code to automate it.

If I had to guess how they made that effect, I would suspect they generate and manipulate a triangle strip with a texture/shader applied to it. Similar to a trail renderer but more customized.


#5303656 Use Of Static Variables

Posted by on 02 August 2016 - 09:09 AM

When something is global, it is easy to be accessing it in parts of the program that really shouldn't. For example, you may add some bit of code in a pathfinding algorithm that handle globals dealing with how sound works. You then try to reuse your sound code without the pathfinding and it doesn't work the same, or you reuse the pathfinding and it starts randomly playing sounds.

When using globals, the behavior of your classes no only depend on their internal values, but possibly the entire global state of the program. Often when programs are simple, globals aren't that bad but as your program grows they become a big pain.

I have found in my own projects when I have used globals, singletons included, it becomes difficult to maintain and add new features. When I remove global state, I come up with better program structure and code quality as a whole goes up.


#5299342 ddx, ddy reuse for better performance?

Posted by on 06 July 2016 - 10:46 AM

calculating ddx ddy is as cheap as a subtraction. I would recalculate it. tex2Dgrad is mostly useful for when you have branching paths in your shader. If you ever branch you cannot cacluate ddx and ddy. If you need to sample a texture inside an if statement, you need to calculate ddx and ddy before the branch and pass them into tex2Dgrad.


#5297276 [Solved] Rotate towards a target angle

Posted by on 19 June 2016 - 11:01 PM

Use complex numbers with modulus 1 instead of angles. That would be z = cos(alpha) + i * sin(alpha).

if (imag(desired / current) > 0.0)
  current *= Complex(cos(0.1), sin(0.1));
else
  current *= Complex(cos(0.1), -sin(0.1));
It's not just this piece of code: Pretty much anything you want to do with angles is easier with complex numbers.


I would upvote this twice if I could.

i have no idea what complex numbers are


You should learn them. They will benefit you greatly in game development and aren't that difficult to pick up.
http://www.euclideanspace.com/maths/algebra/realNormedAlgebra/complex/transforms/
It make take a bit of effort to learn them, but I will pay off big time.


#5296025 gameplay programming: when to use lua and when to use c++

Posted by on 10 June 2016 - 05:12 PM

Lua scripts are easier to treat a resource. You can have a file represent an enemy type or another dynamic object in your game. This file can include the name of a script to use as the object's behavior.
This makes extending the game easy to do, and you really begin to see the benefit when your game has many different types of dynamic objects. You do pay the cost of having to create a binding layer between lua and c++. So the benefit may not be worth it if you aren't going to have many types of objects in your game.


#5295878 Help With 2D Collision (Sticky Wall Sliding)

Posted by on 09 June 2016 - 04:39 PM

When you loop through your list of tiles, you use localBoundsRect against each tile. You move the location of the player but don't update the value of localBoundsRect. If your player intersects with two blocks then the overlap is corrected for each block moving the player twice as far as needed. I would recommend setting the position of the player relative to localBoundsRect using the depth as an offset. You can repeat that multiple times without any negative side effects.


#5293801 Blocking movement on collision

Posted by on 27 May 2016 - 08:46 AM

You have two options here.

If you have determined that two shapes do overlap, determine the smallest amount you need to push one of the shapes to correct the overlap. This however, can result in objects passing through each other if they move fast enough.
See separating axis theorem

The second option is to do a raycast aka swept collision detection. You find out how far in a given direction any obstacle is in front of the player and use that distance to determine if the player can move before moving them. Is actual practice, you usually do sphere casting or capsule casting. Its like ray casting except the ray has thickness. In essense it just determines how far a sphere or capsule shape can move before hitting something. Spheres and capsules, apart from being easier to do collision detection with, also have the benefit of not getting stuck on sharp corners. They just slide over them without a problem.
Here is a simple example for a sphere/plane swept collision. http://www.gamasutra.com/view/feature/131790/simple_intersection_tests_for_games.php


#5292770 effective solution to find 6 plane of frustum?

Posted by on 21 May 2016 - 10:27 AM

You can transform a plane by multiplying by a matrix like this.
 
                        |a|
inverse(transpose(M)) * |b|
                        |c|
                        |d|
Where ax + by + cz + d = 0 defines a plane

In normalized coordinates the 6 planes in opengl are
[1 0 0 1] [-1 0 0 1]
[0 1 0 1] [0 -1 0 1]
[0 0 1 1] [0 0 -1 1]
where [a b c d] defines a plane

For directx, the last two planes are
[0 0 0 1] [0 0 -1 1]
Since we want to transform a plane from normalized space to world space we simply take the transpose of the view projection matrix and
mutliply each of those six planes by that matrix
 
 transpose(view * projection) * p
You notice that we don't take the inverse of the matrix since it is already the inverse of the matrix we actually want to transform it by.
(view * projection goes from world to normalized space, we want to go from normalized space to world space)

The result of multiplying each plane will give a 4 dimensional vector. where x, y, z, w of the vector can be copied over directly to the
plane a, b, c, d respectively.

Notice that the 6 original planes have a lot of 1s and 0s. This means there is a lot of wasted work so when you simplify the multiply, just
end up with adding or subtracting two value from the matrix to get each plane. The simplified extraction can be found in this paper.
http://gamedevs.org/uploads/fast-extraction-viewing-frustum-planes-from-world-view-projection-matrix.pdf


#5290299 Problem requiring Box2d on NodeJs

Posted by on 05 May 2016 - 01:34 PM

what is the file structure look like? is box2d.js in the same directory as the file importing it?
Take a look at the section titled "All Together..." it describes how the require looks for files
https://nodejs.org/api/modules.html#modules_all_together


#5289346 Quaterion first person style camera

Posted by on 29 April 2016 - 05:30 PM

Try making these changes

Q q2 = glm::angleAxis(rs.y * (float)dTime, V(1, 0, 0)); // pitch
...
m_orientation = q1 * m_orientation * q2;



#5288678 Do you like Tower Defense Games?

Posted by on 25 April 2016 - 05:19 PM

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.




PARTNERS