Jump to content

  • Log In with Google      Sign In   
  • Create Account

Calling all IT Pros from Canada and Australia.. we need your help! Support our site by taking a quick sponsored surveyand win a chance at a $50 Amazon gift card. Click here to get started!


Ashaman73

Member Since 10 Nov 2006
Offline Last Active Today, 09:51 AM

#5150056 Game Animation Resources?

Posted by Ashaman73 on 28 April 2014 - 02:04 AM


A lot of tutorials I find on animating are for film animation, but with game animation, it is different.

From an artist standpoint, the concept of animation doesn't differ much. The advantage of film/cut-scene animation is, that you have more freedom when doing animation for it.

 


which has to be designed to work well interactively

Now we enter the realm of the technical aspect of game animation. The need to change the animation in a game to react to its environment is the reason, that the artist part of the animation needs special requirements. Eg you create a walk animation and a gun-fire animation and blend them in the game engine. This goes as far as, that certain animation are done in-game on the fly (ragdoll death-animation or IK feet placement etc.).

 


Anyone have any tips or links on this topic?

The issue is, that the technical part of the animation depends on engine and game, therefor it doesn't make much sense to describe a common game-animation tutorial. To make it even worse, the requirements of animation depends often on the implementation of the AI-system, because the AI-system managed the interaction of a character with the environment and other characters (locomotion). If you really want to learn something about game-animation, I would sugguest to look out for game specific animation tutorials (eg how to create animations for hl2), thought these are really technically.

 

If you want to learn something about animation creation (the artists view), then any animation tutorial will do, even 2d animation tutorials !




#5149119 copy/assignment/move constructors and private data

Posted by Ashaman73 on 24 April 2014 - 02:18 AM


Do we have to invoke the friend keyword in order for these constructors to get access to the private data?

If you dont have any public interface (eg public getter) and the target class is not a specialisation of the source class (in this case you could copy the protected variables), only using friend comes to mind.




#5149108 Issue combining matrix components

Posted by Ashaman73 on 24 April 2014 - 01:13 AM

It is just a matter of interpretation. Keeping the components isolated for bone animation to use slerp for the rotation is common. The interpretation of the 3 components should be: I have a bone at position X(=translation) which point in the direction of Y (=rotation) of size Z(=scale). This way you need to combine the matricies like this

// Order: first scale, then rotate, then move, applying from right to left:
final = translation * rotation * scale;

If you need the inverse, you need to reverse the order too:

// Order: first scale, then rotate, then move, applying from right to left:
inv(final) 
= inv(translation * rotation * scale) 
= inv(scale) * inv(rotation) * inv(translation)  




#5148933 point Light,directional light...

Posted by Ashaman73 on 23 April 2014 - 06:17 AM

Could you give more details:

1. What graphics API are you using (OpenGL,DirectX, other) ?

2. Do you have some screenshots ? (you know, pictures tell more than 1000 words).

3. Do you have some code sniplet to demonstrate how you setup your lighting ?




#5148931 Your most valuable debugging techniques for Networked games?

Posted by Ashaman73 on 23 April 2014 - 06:11 AM


Then create a small program to scan the file and check the values of the packets, throwing an error if any differentiate?

Yes, this is one option. More important are protocol msg order, eg

Client 1 request game slot
Client 2 request game slot
Client 1 assign slot 3
Client 1 sends user data
Client 2 assign slot 4
Client 2 sends user data
Client 1 accepted user
Client 2 denied user
Client 1 request level data
Client 1 sends join signal
Client 2 sends join signal
<crash....>

One option would be a filter like this

Client 1 msg:
- request game slot
- assign slot 3
- sends user data
- accepted user
- request level data
- sends join signal

An second option would be analysing the protocol:

Client 2 sends join signal after being denied !!

Which could be the cause of the crash.




#5148911 Your most valuable debugging techniques for Networked games?

Posted by Ashaman73 on 23 April 2014 - 03:50 AM

I would focus on the log-file. How about writing a log-file analyser,which looks out for certain errors, check protocol messages, compares protocol server msg with client msg etc. It could be a valuable investment. 




#5148670 How to debug a game more efficiently?

Posted by Ashaman73 on 22 April 2014 - 01:56 AM


So I'm wondering if there's a way to speed up this procedure?

First of all, you should be able to save and load your game at any time, even if it is not part of the game design. This way you can prepare a game situation, save it, and reload it for debugging purpose on demand.

 

Further on, changing code while continuing the program, often called hot-deployment, depends on the language and tools you use. It is possible to do it with scripting languages more easily, because many scripting languages like lua have the ability to compile a text string at runtime and add it to your running environment (or replace existing functions). But this is only half the truth, because changing the code base will not help you in all cases. Often bugs change the state of the game (corrupting gameplay data). In this case changing the code will not help you.

 

Here is a quick list of tools/features which helps you, top is most important in my opinion:

1. Debugger !

2. Logfile !

3. Save/Load

4. Ingame console and/or web interface to check the game state and change parameters.

5. Quick start: start the game and load the current game level immetiadly

6. Hotdeployment (be aware of chaninging game state !)




#5148664 Slicer & Surge- My Own Game Ideas

Posted by Ashaman73 on 22 April 2014 - 12:53 AM

I can't tell you which one would be more fun. It is a fundamental issue of measuring gameplay on paper. People can tell you, if they like certain settings (I would love to play a game in the LotR universe, or Starwars), if it matches a certain known genre (FPS, RTS, adventure), or if they like an art style. But imaginating how a game would feel theoretically is really hard.

 

Games with limited volume, like many casual and mobile games, needs some testing to get measured correctly. You just pick up a game and play it, and it either feels right or wrong, but there isn't often enough gameplay to measure it upfront.

 

Would you have guessed, that flappy bird would be such a hit by just reading:

Hit the screen mulitple times to increase the altitude of your agent to avoid obstancles.

 

But the benefit of mobile games is, that you can create them really quickly, so try to prototype both games and test them :D




#5147809 Writing model 3D Model data to a new file as a new format

Posted by Ashaman73 on 17 April 2014 - 11:06 PM


What are the restrictions?

The restrictions are just what the format does not provides , but what you need. MD5 was developed for id tech engines with their needs, but sometimes your engine need additional data, eg vertex color, different uv coords, multiple textures etc. which might not be covered by MD5. Collada/FBX on the other hand contains a lot of stuff, most which you dont need. It depends on what you need. If MD5 contains all data you need, than use it :D




#5147617 Writing model 3D Model data to a new file as a new format

Posted by Ashaman73 on 17 April 2014 - 06:19 AM

It is possible and a lot of games, including my own, do it this way. Thought I wouldn't recommend md5 as basic format (it has its restrictions), but either FBX or Collada from which you should create your own files.




#5147566 Designing a central goal in exploration games without RPG elements.

Posted by Ashaman73 on 17 April 2014 - 12:36 AM


It seems like "exploration" on its own isn't strong enough to be the central focus of an entire game.

Exploration is a very good focus, you just need to get rid off the RPG idea and add an interesting game mechanism to make it a game (puzzels in this case). Take a look at 3d environment puzzel games. Portal or tomb raider, the latter contains combat, but the main purpose is still solving environment puzzels. Games like Ico or the upcoming game The witness, are nice examples of games which do not contain RPG elements, dont focus on combat at all, are 3d and really successful (or hyped in the case of witness ).




#5147558 Optimising my renderer

Posted by Ashaman73 on 17 April 2014 - 12:00 AM

To improve it further, you need to get rid of alpha transparency (performancewise this is really evil). Ok, if you dont want to get rid off it, you can atleast render the solid sprites in a more effective way. To do this, utilize the z-buffer. The videohardware is really good in utilizing the zbuffer, preventing a lot of texture fetches. To utilize it, you should use the z-coord and render the sprites in front to back order. This only works for solid sprites (alpha masking is ok, but alpha blending will not work). In general a pipeline could look like this (pseudo code):

List sl = sprite_list
List solidList = getAllNonAlphaBlendedSprites(sl);
List alphaBlendList = getAllAlphaBlendedSprites(sl);

List buckets[NUMBER_OF_DIFFERENT_TEXTURE_ATLASES];
for(sprite in solidList) {
   int atlasIndex = sprite.getAltasIndex();
   buckets[atlasIndex].add(sprite);
}

// const buffer, you only need to initialise this once
Vertex quadBuffer[MAX_SPRITES_PER_BUFFER*4];
int indexBuffer[MAX_SPRITES_PER_BUFFER*6];
for(i=0 to MAX_SPRITES_PER_BUFFER) {
  indexBuffer[i*6+0] = i*4+0;
  indexBuffer[i*6+1] = i*4+1;
  indexBuffer[i*6+2] = i*4+3;
  indexBuffer[i*6+3] = i*4+1;
  indexBuffer[i*6+4] = i*4+2;
  indexBuffer[i*6+5] = i*4+3;
}

// render phase
for(singleBucket in buckets) {
  // sort from front to back
  singleBucket.sortFrontToBack();

  // activate atlas texture
  ...

  // fill batch
 int batchedSprites = 0;
 while(singleBucket.isNotEmpty()) {
   Sprite sp = singleBucket.removeFirstSprite();
   // transfer sprite to batch
   quadBuffer[batchedSprites*4+0] = ...sprite.getVertex(0)..
   ..
    batchedSprites++;

   // render ?
   if(batchedSprites==MAX_SPRITES_PER_BUFFER) {
      DrawIndexTriArray(quadBuffer,indexBuffer,batchedSprites*2 /*count of tris*/);
      batchedSprites = 0;
   }
 }
 // render last batch
 if(batchedSprites>0) {
     DrawIndexTriArray(quadBuffer,indexBuffer,batchedSprites*2 /*count of tris*/);
 }
}




#5147553 Optimising my renderer

Posted by Ashaman73 on 16 April 2014 - 11:41 PM


for(int i=0;i<1000;i++) mRenderer->getDevice()->DrawPrimitive(D3DPT_TRIANGLESTRIP,0,2);

You are on the right track. One of the most time demanding things are API calls ! So, the trick is, to reduce your API calls alot. When using quads (the right way), the next step would be to group quads and render them in a single call. This is called batching. You are quite new to 3d rendering, but here are some hints in which direction you should investigate to render a few millions sprites in the same time wink.png

1. Use indexed primitives, that is, you have an array of vertices and an array of indicies into this vertices.

2. Use batching by putting multiple sprites into a single array (10 sprites = 40 vertex array) and draw them with a single index draw call. Either use triangle list (6 indicies per quad) or a triangle strip and connect them. The triangle list is much easier and the performance impact would not be hard.

3. Use a texture atlas, that is, put multiple sprites on a single larger texture. Then group (->batch) all sprites which use the same texture into a single batch and draw it.

 

The trick is, to get rid of too many API calls !




#5147296 Scaling in 3D aircraft game, objects look too small!

Posted by Ashaman73 on 16 April 2014 - 01:25 AM

It is quite common in games to not use realistic measures. A rule of thumb is, to measure your scene by the main character, in your case your plane. Define your plane and measure other objects by the size of your standard plane. This way you can get a suitable size of your plane first (how does it look from far away etc.) and then create other objects in realation to this (a house should be much larger, therfor the size is 5x plane etc). It could be useful to use the bounding box of your plane as measurement due to the non-compact form of a plane.




#5147292 Interpolation between pixels

Posted by Ashaman73 on 16 April 2014 - 01:14 AM


So with the sampling, is this something you can just instruct directX to do or would you have to apply a shader to do this?

No shader needed, it was one of the first hardware supported features and DX9 will have all support you need out-of-the-box, it is most likely only a simple flag you need to set. Best to start here.






PARTNERS