Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


Ashaman73

Member Since 10 Nov 2006
Offline Last Active Dec 24 2014 06:13 AM

#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).




#5197144 Animation-transitioning

Posted by Ashaman73 on 09 December 2014 - 07:00 AM


I am not storing the translation + rotation and then composing matrices from it each frame, I am simply using the finished matrix for each bone from the start.

This will simply not work, if you want more advanced stuff like animation blending. The interpolation/blending between bones is always done locally, therefor if you do it globally(=working with the final matrix), bones will suddenly start to travel in really funny ways (especially extremities like hands/feets etc.).The global interpolation could result in temporary disconnected bones which looks like shrinking/stretching of mesh parts.




#5197138 JRE vs JDK -Android Studio

Posted by Ashaman73 on 09 December 2014 - 06:02 AM

Running java code on a higher versioned JRE should not be a problem (sometimes you need to set some additional vm flags to properly support legacy code, but most often it will just run fine, like the switch from mergesort to timsort ... ).




#5196195 Accurately estimating programming cost?

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


what are reliable methods for me to estimate what my programming needs will cost?

Sorry, but the true question would be

What are reliable methods for me to estimate what my programming needs will cost?

There is no reliable method, at work we estimate hundreds of projects per year and it is incredible hard to do estimation which comes close to the final costs. Some projects runs super, some projects are desasters, if you need to estimate the costs of only a single project, the finacial risks are extremely high.




#5196050 A game idea, need help please

Posted by Ashaman73 on 03 December 2014 - 06:14 AM

You got a pretty mix of different game kinds and genres, which makes it really difficult to imagine a game. It is like saying, that you want to design a car which can dive, drive and fly and which is cheap enough, so that the middle class can afford it. Yes, it might be possible in the future, but I can't really see a way to realize it now or in the near future.

 

Best to pick up one core feature, you really find the most important, define it, write it down (GDD=game design document) and then try to extend your idea by adding more features to the core feature. It is important to actually define game mechanism, to write down a vision, how does it look like, how does it play.

 

To make it more clear, take the army feature of your game. Here are two, of many possible options:

1. Your army is only represeted by a simple number, which represents the army power on all of your land. You can buy new soldiers and the army counter increases. Combat is an instant event, the winner is calculate by the formula winner(armyA,armyB) = ...magic formula..., the winner looses 25% of his army, the looser 75%.

 

2. Your army is represented by individual soldiers, all have their own live, family, home. You can walk through your town like in skyrim, you can talk with your people. Combat is a massive battle where you can join, watching and fighting in a 3rd person perspective. You are the king, the ruler. All fighters will react to you in a special way, trying to protect or to kill you. Combat is executed in an interactive way, wounds are realistically displayed and will hinder your action...

 

As you can see, these are really two different games, which have the same idea. The first one is more a RTS game (which seems realisable at the first glance). The second one is more of a simulation, which will be much harder to realize. As soon as you add more features to the game, it gets ugly really quickly. The complexity will increase, game features will battle each other (eg from a RTS game view, you would need a top-down view with lot of number, from a 3rd person game view, you would prefer a more immersive design etc.), the vision will blur etc.




#5196027 Basic Shadow Mapping

Posted by Ashaman73 on 03 December 2014 - 02:21 AM

I would bet on selfshadowing of the plane. Turn of soft shadows (PCF?) to see the effect more clearly.




#5195868 SFX legal rights

Posted by Ashaman73 on 02 December 2014 - 06:04 AM


I would like to sell some sounds that I would make (not a full library but just a few on audiojungle for example), can I sell sounds that I made FROM a library (let's say a BOOM one) that I own (obviously I bought it it's not cracked from the internet)?

It depends on the license.

 

Take a careful  look at the license of the library. If you create a new sound based on atleast one sound(-part) included in the lib, you have created a derivation. Most of the  copyright elements of the original are transfered to the derivation, take a look at the according wiki article.

 

Usually the license will tell you what is permitted and what is forbidden.




#5195183 AexolGL - 3d game engine (web,pc,mobile)

Posted by Ashaman73 on 28 November 2014 - 07:46 AM

Just some thoughts.

Do you build a game engine or a render engine ? A game engine should support more game related features (eg. physics libs, entity system, AI sub systems, scripting system, network system, editors/tools ).

 

The name and notation of AexolGL remindes me of OpenGL. My first thought was, that it was some hardware related GPU API like Mantel.

 


What are you general expectations?

The honest truth is:

You need to surpass the free engines and will most likely be in direct competition with UDK4,crytek and unity if you want to take money. I would expect at least a single reference game if it costs money or lot of demos if it is free.

 


What can I do better?

The engine market is ruled by really large player (frostbite,udk4,unity,crytek), most offering some inexpensive license, resulting in  really tough competition.

Look at your competition, most likely you will be in direct competition with unity/udk4. Where is your product better then theirs ? Why should I use your product over theirs ? Why should I invest time and money to evaluate your product ?

Answer this questions yourself and you will know where you need to get better.

 

You don't need necessarily better rendering capacity or faster game AI or better physics behavior, but eventually you need something, a niche, where you beat your competition.




#5195132 Bone-animation | Offset-matrix

Posted by Ashaman73 on 28 November 2014 - 03:10 AM


My "inverse bindpos matrix" is needed to make the "local Matrix" be the delta of the current animation state and the one the skeleton was exported in. You could just render the mesh without the bones. The bindposition is just the untransformed mesh and the transformation of the bones in that state.



Let me explain my model-format on the example of a human model:

The bindposition is the position the model "rests" when not animated - legs a little open, arms to the sides (I'm sure you have seen those before).

The vertices I export are those, in modelspace. The origin(0/0/0) of the modelspace would be between the models feet.

I also export the skeleton in this position (each bones "local Matrix"). Inversing those gives me my "inverse bindpos matrices".



Therefore, each of my local matrices has to be multiplyed by its inverse bindpos matrix first, to get the delta transformation to the bindposition,

You are right here, the inverse bind position tranforms the mesh vertices from the T-pose (rest pose) to the bone local space, then the final bone matrix transformes the vertex from local bone space to (animation) object space. The steps to do it should look like this:

// 1. calculate the local space bone matrix for each bone
local_matrix_i = interpolate(frame_j,frame_j+1);
//2. calculate the final space bone matrix by considering the final space bone matrix of its parent
final_matrix_i = final_matrix_(parent_i) * local_matrix_i;
//3. apply inverse bone matrix, so that each vertex will transform like this 
//  rest_pose_object_space  ==inv_bone_matrix==>  bone_local_space  ==final_bone_matrix==>  final object space
final_render_matrix_i = final_matrix_i * inv_bone_matrix_i;




#5194951 AABB box intersection test

Posted by Ashaman73 on 27 November 2014 - 06:12 AM

I think your issue might be the wrong space. If you want to keep your AABB in object space, then you must transform the frustum into the objects object space too (in this case you would need the inverse MVP matrix). But if you want an easy, quick way,I wouldn't transform the frustum into object space of each object (you need to calculate the inverse transform).

 

To keep it simple, you should test the world space AABB vs the world space frustum. Calculate the frustum planes once and test it versus all world space AABBs. To create your AABB, you need to calculate the world AABB form your model orientation and object space AABB (which is althoug called OBB, oriented bounding box). Check this site for an example of how to get your world AABB from an OBB. The advantage of this is, that you only need to recaluclate the AABB of each object if its moves or rotates, which isn't needed for most static models.




#5194911 Equivalent Rotation in Bullet in OpenGL

Posted by Ashaman73 on 27 November 2014 - 01:20 AM

I like the MVC (model view controller) pattern to handle object orientation, that is, you only have one object orientation and many views/controls. This would mean, that if you rotate your object, then you only rotate a single (leading) data structure and not all data structures (physics, rendering etc.). If you rotate/translate all data structures all the time  then you will encounter most likely artifacts (physics no longer in sync with rendering).

 

 

Here's a basic example of how a MVC patter could look like in your case:

class MyObjectModel 
{
    matrix44 orientation;
    rotate()..
    translate()..
    setPosition()..
    getOrientation() { return orientation;}
    setOrientation( ...
}

class BulletController
{
   MyObjectModel* controlledObject;
   
  transferOrientationFromBullet() {
     .. get motion state/world transform...
     matrix44 newOrientation = .. transform it (eg. left handed to right handed etc).
     controlledObject->setOrientation( newOrientation);
  }

  transferOrientationToBullet() {
   btmatrix bulletOrientation = convertToBullet(controlledObject->getOrientation());
  ...update bullet data structures ...
  }
}

class RenderView
{
   MyObjectModel* viewedObject;

   renderObject()  {
     GlMatrix4 renderMatrix = convertToOGL(viewedObject->getOrientation());
     ... set up ogl matrices etc. ..  
     ... render object ...
  }
}

This is really useful, if you have different subsystems which handles coords/axis etc differently (eg OGL vs DX). The goal is , to handle your rotation/translation/scaling in one fix coord system and to have all other subsystems work only with the resulting transforamtion matrix (a single, homogene 4x4 matrix which holds all rotation,tranlsation,scaling).

 

This reduces your problem to find a proper transformation from your transforamtion matrix to the one used in bullet/ogl. With luck they will have all the same setup smile.png




#5194761 Search for matching string

Posted by Ashaman73 on 26 November 2014 - 07:35 AM

There are many ways of doing it, here are some hints:

1. Use a hashvalue as key instead of length.

2. If you have a static array, calculate the hashkeys of each string, then sort the arrays (hashkey array+string array) and use binary search to find the first hashkey. Then compare each string with the same hashkey.

3. If you have a dynamic array, I would recommend to use a hashmap which allows multiple entries with the same hashkey or use list/vector to save the list of strings having the same hashkey, something like this:

map<int,list<string>>




#5194756 Procedural generation for 2d tile game

Posted by Ashaman73 on 26 November 2014 - 06:50 AM

Here's a very simple approach:

Use perlin noise (always a good procedural content generation startpoint wink.png ) to generate the map and assign value ranges to certain materials, something like this

0.0 - 0.7 earth

0.7 - 0.95 rock

0.95-1.0 gems




#5194550 Shadow maps do not take perspective into account?

Posted by Ashaman73 on 24 November 2014 - 11:55 PM

Yes, it is correct that the values are all the same. In fact, it only saves the z-value (the standard z-buffer works in the same way) of the actual difference vector and it is enough to determine if a point in shadow or not.

 

You can reconstruct the real vector by the texture coord and the shadow depth value, like the position reconstruction in a deferred shader. Once you have the vector, just take the length and you have what you want , thought it is really unnecessary if you want to determine if a point is in shadow.






PARTNERS