Jump to content

  • Log In with Google      Sign In   
  • Create Account


FXACE

Member Since 18 Sep 2009
Offline Last Active Feb 18 2013 04:06 AM
-----

Topics I've Started

Windows .DLL vs Linux .lib.so

08 November 2012 - 03:25 PM

Hello anyone!
I wish to know: what difference between windows dynamic link libraries and linux shared objects? Does linux objects have entry points like DLLs (BOOL WINAPI DllMain(HINSTANCE hModule, DWORD dwReason, LPVOID data))? How to access public functions of lib.so?

Thanks forward, for any reply!

How to make my pc host "mygame.com"

16 May 2012 - 01:09 PM

Hi folks!

I'm trying to make PC host "mygame.com" (for example) on Windows XP Proffesional SP2. My actions:
1. My Computer -> (rigth mouse button) -> Settings.
2. Going to "Computer name".
3. Clicking on button "Change computer name". It opens a new window "Changing computer name".
4. On edit control typing: "mygame".
5. Clicking on button "Advanced". It opens a new window "DNS-suffix and NetBIOS-computer name".
6. On edit control typing: "com".
7. Pressing "OK". It closes a window ("DNS-suffix and NetBIOS-computer name").
8. Now on "full pc name" label I see: "mygame.com".
9. My pc is a member of a working group "LAN" (Does it make any sense?).
10. Pressing "OK". It closes a window ("Changing computer name") and Windows asks for restart pc.
11. Restarting pc.
12. Checking host by code: "HOSTENT *hostent = gethostbyaddr(<my ip-address given by internet provider>)" and it returns: "hostent->h_name : mygame.com".
13. Now, I'm trying to ping to my pc by this name: Command Promt = "ping mygame.com" and it's works as expected (it shows my ip-address).
14. Next step, also testing: creating a socket and binding to port 80 (default HTTP port) and debug/waiting for incoming packets.
15. On any web-browser on address line typing: "mygame.com". On loading my "web-server" catches this connection, so I can send a HTTP response which works too.

The problem is another pc which is connected to the internet can't find my pc by host name "mygame.com". (#13, #14 and #15 actions are fail).
I had searched any tips about that but nothing found to fix that.
The main question is how to tell to other PCs that host name "mygame.com" is my system(pc)?
Many resources which are closure to my topic, in conclusion: "You need Windows Server ($$$), network routers and other software which would be useless, I thing".

(P.S. "mygame.com" is just example. In real, I used host which is currently not busy)

Thanks forward for any help!

WebGL and Javascript...

28 December 2011 - 05:44 PM

Hello guys.Posted Image

I'm writing a web project with web-gl support. So, I have these questions:

"deleteBuffer,deleteTexture,... on WebGL ?"


var texture = gl.createTexture();
// setup...
// using...
texture = null; // does it removes from GPU or not??? It's a javascript machine (I think it should contain a destructor when object removing)...


"Framebuffer: COLOR_ATTACHMENT0 exists on specification but COLOR_ATTACHMENT1 is not..."

So, is this means that mrt (Multiple Render Targets) is not supported?


Also, looks like it doesn't support depth/stencil textures. Is it true?

Best wishes, FXACE.

writing function which creates an clone of NxActor...

07 September 2011 - 04:41 AM

Hello anybody!




I'm writing function which clones actor. But first I need to create some method which copies shapes of actor A to actor B.

By NxActor::saveToDesc(...) we don't have an information about shapes in NxActorDesc. So, there is need to write by using NxActor class.


#define NX_ALL_SHAPES ((1<<NX_SHAPE_COUNT)-1)

bool copyActorShapes(NxActor &destActor, const NxActor &sourceActor, NxU32 shapeFlags, bool updateCenterMass)
{
    NxActorDesc dstActorDesc;
    bool result = false;
    NxU32 num_shapes = sourceActor.getNbShapes();
    NxShape *const *shapes = sourceActor.getShapes();
    destActor.saveToDesc(dstActorDesc);
    for(NxU32 i = 0; i<num_shapes; i++)
    {
        NxShape *shape = shapes[i];
        NxU32 shapesCount = destActor.getNbShapes();
        if(shape->isConvexMesh() && (shapeFlags & (1<<NX_SHAPE_CONVEX)))
        {
            NxConvexShapeDesc convexShapeDesc;
shape->isConvexMesh()->saveToDesc(convexShapeDesc);
            destActor.createShape(convexShapeDesc);
        }
        else
        if(shape->isTriangleMesh() && (shapeFlags & (1<<NX_SHAPE_MESH)))
        {
            NxTriangleMeshShapeDesc triangleMeshShapeDesc;
            shape->isTriangleMesh()->saveToDesc(triangleMeshShapeDesc);
            destActor.createShape(triangleMeshShapeDesc);
        }
        else
        if(shape->isBox() && (shapeFlags & (1<<NX_SHAPE_BOX)))
        {
            NxBoxShapeDesc boxShapeDesc;
            shape->isBox()->saveToDesc(boxShapeDesc);
            destActor.createShape(boxShapeDesc);
        }        
        else
        {

.................................................................

copy other shapes

................................................................
        }
        if(shapesCount != destActor.getNbShapes()) // actor currently updated
        {
            result = true;
        }
    }
    if(updateCenterMass && dstActorDesc.density != 0.0)
        destActor.updateMassFromShapes(dstActorDesc.density,0.0);
    return result;
}




The question is:

Is this method correct to do that (I mean copying convex and triangle mesh shapes)?

Writing Network Support for Game Engine

27 July 2011 - 12:08 PM

Hello anybody!

1. Some games which were tested by me, where scale battles are break a secret due to that data which are on a server does not coincide with data which are in the computers of participants. As a result of it the activated game is interrupted or participants of network are quite in different games. What methods would you prompt, in order to avoid parallel instances?

2. Which way of organization of communication of data for networks, for example in the computer games of strategy genre when there are more than 400 units in game?

3. Should I to lay information in a package what would certify data "got for an address" when I pass data to other computer (UDP)?



PARTNERS