Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 10 Nov 2006
Offline Last Active Today, 05:45 AM

#5204471 What is a good average vertex-per-face count?

Posted by Ashaman73 on 15 January 2015 - 07:43 AM

The vertex processing is fairly expensive.

The relation between number of vertices and number of faces doesnt really matter a lot, only the number of final vertices count. With final vertex I mean after splitting vertices accordingly to UV, color, normals, tangentspace etc, which can't be easily estimated in a modelling tool.The relation of vertices to faces depends more on the model topology, material variance etc. A simple sphere has an other factor than a tree with leafs.


But to be honest, no artist would try to model his model to reduce the number of shared vertices in a significant way, thought they will try to optimize when possible. And having 1.2 vertices for each tri, with an worst case of 3, sounds neither bad nor good.



What would you think is a good scene average?

What is a good value for a character mesh?

What is a good value for a props mesh?

You can't really tell.


There are lot of factors which count more than the number of vertices. Eg most modern videocards will be able to render props with 500-1000 vertices faster than you can feed the rendering API, but this will change completely once the engine use batching, instancing or a modern API (with less overhead). On last gen hardware cars in car racing games had sometimes more than 60k vertices, characters 10k , a zombie in L4D2 ~2k (?). Is your model animated ?  How many bones are used ? How many materials ? How many textures ?


Some hints:

1. If you work in a project context, you will be told what are the limits and requirements.

2. If you want to create some game art to show off, it is more important to show good skills and creativity, a good use of texture space, a sparse use of bones, a good mesh topology, avoidance of unnecessary surfaces etc.

3. If you want to write your own game and want to pin down your art requirements, then you need to create an (technical) art concept in the first place. How will the environment look like ? Which art style will be used ? Which target platform ? What about the dynamic part of the scenen (4 moving characters vs. 100 zombies) ? What will be the camera perspective ? Do you need higher quality models for cut-scenes ? Do a lot of prototyping,

#5204444 User & AI character movement Plumbing

Posted by Ashaman73 on 15 January 2015 - 04:46 AM

Does this make it difficult to program the AI? I haven't programmed AI before,

It depends on what kind of entity you want to steer and what kind of goal you want to archieve. A spaceship or car is steered in an other way, then a precise moving human who needs to jump from platform to platform. The first kind of entity is really suitable for a dynamic controller, the latter is really hard.




I need to send in Force as I am modelling Friction in my game & am doing proper physics calculations

Do you need proper physics calculation ? Do you have rigid bodys (car, boxes, spaceship) or softbody (human) ? Can you switch between physics calcution and direct control (AI/player controlled => use kinetic controller , death-sequence => use physics controlled rag-doll simulation) ? Why do you need friction (to avoid that entities slip down a slope ? ) ?


There's no general good way of handling it, I would sugguest to think about all (most) of your requirements, then try to think about a solution. I started with a dynamic controller in my game (steered by forces) and after years of frustration (dynamics are really hard to get under control ), I switched to a much easier kinematic controller..

#5204410 User & AI character movement Plumbing

Posted by Ashaman73 on 15 January 2015 - 12:33 AM

I use a similar approach in my game (MVC + "force" ). The controller (either player input or AI) would use the same model (force) to move (physics controller) the entities.


Just one thought, you spoke about force. This would usually result in a dynamic movement controller (entities which are moved by the physics engine). The other way to move an entity is to use of a kinematic controller (entities are moved directly, without physics, the physics engine is only used for collision detection). Both have advantages and disadvantages, but a simple kinematic controller is in my opinion an easier way to control the entites the way you expect them to move. Eg moving humanoid entities with a dynamic control could be very frustrating. If you want to save some time and nerves try to do some research in kinematic vs dynamic movement controllers.

#5204409 Narrow-scoped project involving slightly-more-than-basic AI

Posted by Ashaman73 on 15 January 2015 - 12:24 AM

The reason why I'm posting here is to get some pieces of advice from you about where to go.

My advice would be to stick to your goal and strip off all features you really dont need.

1. Use a ready to go engine like udk, unity for rendering/physics/input/tools.

2. Use abstract visuals, there are some video on youtube show off zombie AI. The environment is represented by blocks, the zombies are colored cubes. You don't need more !

3. You don't need a game in the first place to create game AI.

4. Don't make game design, just think about AI, that is , don't create interesting units, think what interesting AI behavior exists and build a unit from this one.

#5204406 Those last few jitters

Posted by Ashaman73 on 14 January 2015 - 11:50 PM

How do you get rid of that last little bit

Thought I don't use a home brew physics engine, I got rid of the last jitter by smoothing the rendering. This is, the rendered object does not copy the orientation of the physics model 1:1, but try to follow it using acceleration and damping, similar to what you would use in a multiplayer game.

#5204180 Unity Optimal Bone/Polygon Count

Posted by Ashaman73 on 14 January 2015 - 06:04 AM


#5203879 Weird framerate drop

Posted by Ashaman73 on 13 January 2015 - 04:52 AM

for one frame from 16ms to 33ms

How about v-sync ? 60Hz=1000/60=16ms vs 30Hz=1000/30=33ms

That is, if your frametime is around 16ms and you have vsync turned on, then just one additonal 1ms will drop your whole frametime to 33ms (the program needs to wait 15ms to continue). To measure your frametime, turn v-sync off.

#5203623 Alternative to Tutorials?

Posted by Ashaman73 on 11 January 2015 - 11:55 PM

There are at least two major groups of players when it comes down to tutorials. The first group contains playper who learn by doing, experiment with the game and learn the game while playing. The second group are players who want a description of how to play the game before they start doing it.


Both have in common, that they really dislike reading stuff, so tutorials in form of text is really hard to sell.


From my personal experience, I like manuals in paper form, but I start playing first (I'm the experimental type of player), often skipping tutorials and just after I've played the game for a few hours (gained enough knowledge about the game mechanism), I start to read the manual (check if there's still something new to learn).


Your approach is for the experiment group, which is often handled more easily, almost for free, because they discover your game on their own. The second group, the we-need-a-tutorial group, is much harder to hit, and most tutorials are tailored for this group of players.


Therefor I doubt that your approach gains a lot of popularity .

#5202513 What is the ideal solution for a repository in my case?

Posted by Ashaman73 on 07 January 2015 - 01:42 AM

I could make the user install and use a Service-based database (SQL)

Well, this has the advantage that you don't need any support, because nobody would play your game.... please , dont force the user to install and configure some (not common) thirdparty software for just playing a game.


I could save all the valid words in XML files

This would be ok. As example, german has around 5 million words, lets say in average 10 letters, that would be ~50 mb of data, nothing you should worry about holding in memory. With some simple searching structure, you will have really good lookup performance (for a start even a simple binary search would do). So, keep it simple and stupid smile.png


Btw I also was wondering how people fill dictionaries like the one in Letter Quest. I mean, are they sitting there for months inserting every single word they know into a repository?

I'm sure , that there are data bases around to get whole directories. Maybe you need to pay for them, at least you need to convert them into your own data format.

#5202238 Stupid question about graphics cards

Posted by Ashaman73 on 06 January 2015 - 08:25 AM

OpenGL is more like a construction kit. You have many features available (through extensions), which would run on every videocard which support this extension.


Many extensions start as nvidia or amd only extensions and you could use these feature only on the according videocard (often even older hardware of the same manufactory will not run newer extensions). From time to time these extensions are introduced as approved extension (ARB), which are often supported by more hardware providers and eventually some extensions are introduced to a core open gl version.


If you use OGL you usually stick to a fix core feature set (eg. minimum OGL3.3) and activate additional features if certain extensions are available. This way you will be able to support a very large range of hardware with the option, that it looks better on newer hardware or even only on nvidia hardware.


The most robust/easiest way is to support only a single core opengl version, the best and most expensive way would be to support different code paths for different extensions (feature sets), eventually it is your choice.

#5201916 XNA sprite gray edge artifact

Posted by Ashaman73 on 05 January 2015 - 06:44 AM

Look up pre-multiplied alpha smile.png

#5201883 a better fix your timestep?

Posted by Ashaman73 on 05 January 2015 - 02:28 AM

does it actually work? is it actually faster than f-y-t, and with no previous state, et based update, or tween required?

The question if f-y-t is faster or slower is already the wrong question. F-y-t is not for performance or against performance , it is more about robust and stablized system behavior. Regardless if you have a performance advantage or disadvantage, using non-fix timesteps will introduce some really ugly/nasty/unstable bugs in some code parts (e.g. if you use an approximation to calculate the integration of physics over time, non-fix timesteps is a no-go). Other parts are less prone to non-fixed timestep glitches  and therfore can be be handled in other ways like using multi threading, distribution over many frames or just using flexible timesteps (eg AI decision making).


The best way is to utilize f-y-t only where it is really necessary, eg. physics, and use other, more relaxed approaches where you don't need this degree of robust behavior.

#5201865 Rendering Transparency with only One Color.

Posted by Ashaman73 on 05 January 2015 - 12:26 AM

If you only have one fix color you could try to render the transparency value to the alpha channel and add the color in a postprocessing step. Here's some pseudocode:

0. init alpha channel with 1
1. render opaque meshes (to build up the z-buffer), leave alpha channel to 1
2. render the transparent surfaces to the alpha channel, use the z-buffer, but dont write to it. 
   Blending: new_alpha = transparency * old_alpha, with opaque = transparency 0.0 and fully transparent=1.0
3. use a post processing step to blend in the water color accordingly to the alpha channel:
   new_pixel = water_color * (1-alpha ) + old_pixel * alpha

But this will only work if you really have unlit, single colored water (depends on rendering style). There are other ways, but i depends on your rendering approach (deferred, forward, lighting, shadowing....)

#5197521 Help with 2D pathfinding

Posted by Ashaman73 on 11 December 2014 - 12:40 AM

This sounds a lot like homework (see forum rules).


Nevertheless, a good starting point for pathfinding/moving is waypoints/navigation mesh, A* (A star) , steering behavior.


Good luck.

#5197352 View Frustum Culling.+ BinarySpacePartioning (BSP). + Speed Issuses.

Posted by Ashaman73 on 10 December 2014 - 05:54 AM

But the problem is adding and deleting the objects regularly it slown down the project.Because everytime i am changing the vertexand atttribute buffer to delete and add the objects , isthere any other possiblity to cull the objects..

Well, culling by creating/deleting meshes on-the-fly isnt the standard way to go (sometimes it is useful for static batching, but not on a per-frame base). Usually you just create your meshes once (eg when loading the level)  and  just don't render them when you cull them and delete the meshes once they are no longer needed (eg when you finish the game, load an other level etc).


Btw. using a BSP is often slower in modern game architecture then to just render a few more objects then needed. Culling is often done by checking the bounding volume (eg a simple AABB) vs the camera frustum. If you have a larger scenes, you can use additional data structure to help you culling (quad/oct trees, sweep'n'prune).