Jump to content

  • Log In with Google      Sign In   
  • Create Account

Dawoodoz

Member Since 16 Aug 2010
Offline Last Active Jun 15 2016 10:47 AM

#5060515 Making a texture 'point' at something?

Posted by on 09 May 2013 - 03:30 AM


You can use a tangent function to compute the offset in the head's space.

Could you elaborate on this?

What would you be comparing to get the tangent?

 

 

EDIT: On Hodgman's suggestion, there's code to calculate the UVs of a point on a sphere based on a normalized direction (i.e: a radius connecting the center of the sphere to the point where you want to find the UVs). It's from the wikipedia article on UV Mapping:

 

761ef477fca2de40aed0cbbae3cbf9ca.png

ad415e568bc911ec29c8233d7c26bef2.png

 

So I could take the vector from [center of eye] to [object being looked at], normalize it and use that as d.

 

It all depends on how you projected the textures in the first place and flat eyes will always be a rough approximation. if you want real precision, you can rotate 3D spheres instead.




#5060223 Making a texture 'point' at something?

Posted by on 08 May 2013 - 01:58 AM

Apply a UV offset from a constant buffer to move the eyes like that. Then you cover the edges by lerping the eyes to visibility where the skin's alpha is low. You can use a tangent function to compute the offset in the head's space.




#5060220 Another X vs. Y thread: Java + GWT vs. JavaScript

Posted by on 08 May 2013 - 01:43 AM

Java is better for beginners than JavaScript because you don't have to learn HTML and you get consistent compilation to bytecode instead of randomly not working on a certain browser with a certain combination of plugins.




#5050260 How do I get feedback from my engine's users?

Posted by on 05 April 2013 - 05:31 AM

I only hear from the users of my engine in the guestbook when they can't register the component and I have never recieved a bug report. I don't know if my engine is too good so that they never found a bug or too bad so that they don't use it. Making a forum did nothing since they don't believe that anyone will answer in an empty forum. The only answer I got in my survey is from when someone pressed the button by mistake.




#5050255 DirectX Window drops to 30fps when it is not the foreground window in Win7

Posted by on 05 April 2013 - 05:17 AM

I think it is implemented in the DXUT code. One of the many reasons for throwing it away and making your own.




#5050244 Programming -The Game

Posted by on 05 April 2013 - 04:24 AM

It is called University. Sometimes a professor give us 2 minutes to write an algorithm according to a specification and then everyone try to find errors in the code.




#5050243 Looking for engine.

Posted by on 05 April 2013 - 04:16 AM

You need a company to make that happen unless you want to be tied up to Facebook or something. There are server costs, admins that have to get paid, patches that have to be synchronized for all players, hackers that want to cheat the game and ruin it for others... I suggest to start making a singleplayer prototype on one platform before thinking about multiplayer or cross platform since over 90% of game prototypes are thrown away for not being fun to play.




#5050241 Finished my first C++ book, where to go from here?

Posted by on 05 April 2013 - 03:54 AM

Most of the safety conventions in C++ like clearing new allocations are already built in to C#. It is a big advantage to know both C# and C++ since C# is for rapid and safe development while C++ is dangerous to get more performance and control. Scripting is a powerful thing if you know where to use it because it allow you to replace modules at runtime when loading new levels and items that anyone can create.




#5049563 Matrix post-shader multiplication explosion

Posted by on 03 April 2013 - 08:11 AM

One slow but always working method is to disable one feature at a time until the leak stops. For example, start your engine without loading any models to see if it is connected to the model.




#5049552 TestCooperativeLevel causing exception

Posted by on 03 April 2013 - 07:37 AM

Check if d3ddev is null. Your sound engine might be initiated before the graphics part.




#5049503 Real-Time Tessellation Techniques of Note?

Posted by on 03 April 2013 - 03:49 AM

If the model editor can preview the result while editing (like my own editor), normal based tessellation is not so terrible since it feels like drawing triangle patches and only require geometry shaders on DirectX 10 hardware.




#5012009 Which physics library can also step backwards in time?

Posted by on 18 December 2012 - 06:29 AM

Since there are multiple previous states that can lead to the same state, you have to remember how you got there. Something like this was done in "Prince of persia the sands of time".


#5012003 Does making a game like fruit ninja/angry brids require a large team

Posted by on 18 December 2012 - 06:14 AM

With a game maker, it might be done within a week but with more limitations.
If you use high level tools and languages, you should be able to make a good game in one or two years.
If you search for the ultimate tools or pay too much attention to small details, you will get bored with the project before it is finished.
If you have more than 5 programmers in the team, 90% of the time will be wasted on poor communication.


#4949641 Using static MFC library and implementing DllGetClassObject

Posted by on 15 June 2012 - 01:31 PM

Now the dynamic library is back somehow and causing link errors.

Compiling the same code again caused the error to disappear. Posted Image


#4948560 Following an A Path

Posted by on 12 June 2012 - 11:10 AM

I would use a tolerance radius that gets bigger with a higher speed (depending on the stopping distance). When the unit is inside the circle, start moving to the next goal for a smooth move around the corner. You need to set a maximum allowed speed to prevent the circle from getting bigger than a tile.




PARTNERS