Jump to content

  • Log In with Google      Sign In   
  • Create Account


kalkas

Member Since 03 Sep 2008
Offline Last Active May 11 2013 08:46 PM
*----

Topics I've Started

Online Gaming, Basic Theory

28 April 2013 - 09:00 PM

Hi

 

I recently decide, with some friends, to make an online game. The questions I have may sound pretty basic to some of you but please don't sent me back to google. I have limited time and I was there the last 2 days. The bad thing with google is that you cannot converse with it. So here I am, looking someone to verify my understanding and cover some holes I have.( don't think like that you dirty people! )

 

When you rent some space on some server for some webpage, all you got is some space and nothing else and what you can do with that space is what you can do with the space of your PC. Save things, and possibly run some script with php to manipulate some database, which is also in that space, and/or cover some basic logic stuff. Now, I can imagine that for some very simple game I may cover my needs with php. I haven't heard this from anyone, I just figured it can be done. But, for a more complex game I may find php too weak, so I may need some real program. And then I will need to rent a whole PC?(or some "portion" of its CPU?? - you know what I mean portion ). Can I do anything I want with that PC?? And, I know there are some universally accepted architectures for servers, but with that thought, that is having in my dispossal a whole PC, I can build my server as I see fit and do whatever crazy stuff got in my head and actually work, right?? And I can use whatever language I want??

And, last, something more specific, for a game with money involved( you know, like poker or silly games on facebook) and in need for accuracy I will have to deal with 2 problems. First, I won't be able to be that accurate(I need accuracy below one second) and I will have to defend the players from cheaters.

Now, sorry for my english, I don't know exactly where the actual questions are, I just need you to say if I got all correct and where I have mistakes please correct me.

 

Thank you.


FON Files Format (Windows Font Files)

15 November 2011 - 05:57 PM

Hi

I'm looking for the FON files format struct so i can work with them in C++. I had looked everywhere but nothing.
I could only find the file struct for FON files from Fallout & Fallout 2.
If anyone knows something, please.

Tnx

C++ :: access violation error :: no source code :: show disassembly

07 July 2011 - 02:46 PM

Hi

I'm writing a library in C++ for OpenGL and in the same time a program to test this library. Recently I made some changes which produced an error.

Unhandled exception at 0x7c91ac4a in testOpenGL.exe : 0xC0000005:
Access violation writing location 0x00000010.

Pressing Break appears this message:

There is no source code available for the current location.

I can press Ok and Show Disassembly. I press Show Disassembly and the assembly code of my program (I guess) shows up. Here it is:

7C91ABEA  nop          	
7C91ABEB  nop          	
7C91ABEC  nop          	
7C91ABED  nop          	
7C91ABEE  nop          	
7C91ABEF  mov 		edi,edi 
7C91ABF1  push    	ebp  
7C91ABF2  mov 		ebp,esp 
7C91ABF4  sub 		esp,68h 
7C91ABF7  push    	ebx  
7C91ABF8  push    	esi  
7C91ABF9  mov 		esi,dword ptr [ebp+8] 
7C91ABFC  xor 		ebx,ebx 
7C91ABFE  cmp 		esi,7C97E178h 
7C91AC04  mov 		dword ptr [ebp-8],ebx 
7C91AC07  sete    	byte ptr [ebp+0Bh] 
7C91AC0B  mov 		eax,dword ptr fs:[00000018h] 
7C91AC11  movzx   	ecx,byte ptr [ebp+0Bh] 
7C91AC15  mov 		dword ptr [eax+0F84h],ecx 
7C91AC1B  cmp 		byte ptr ds:[7C97E0C4h],bl 
7C91AC21  jne 		7C91A4DB 
7C91AC27  mov 		al,byte ptr ds:[7C97E1E8h] 
7C91AC2C  neg 		al   
7C91AC2E  push    	edi  
7C91AC2F  sbb 		eax,eax 
7C91AC31  not 		eax  
7C91AC33  and 		eax,7C97E1E0h 
7C91AC38  mov 		edi,eax 
7C91AC3A  mov 		eax,dword ptr [esi+10h] 
7C91AC3D  cmp 		eax,ebx 
7C91AC3F  mov 		dword ptr [ebp-4],eax 
7C91AC42  je      	7C91ACE6 
7C91AC48  mov 		eax,dword ptr [esi] 
7C91AC4A  inc 		dword ptr [eax+10h]                       			<<----------------------------------------------------------------<<
7C91AC4D  mov 		eax,dword ptr [ebp-4] 
7C91AC50  and 		eax,1 
7C91AC53  mov 		dword ptr [ebp-18h],eax 
7C91AC56  mov 		eax,dword ptr [esi] 
7C91AC58  inc 		dword ptr [eax+14h] 
7C91AC5B  test    	byte ptr ds:[7FFE02F0h],1 
7C91AC62  jne 		7C9439C6 
7C91AC68  cmp 		dword ptr [ebp-18h],ebx 
7C91AC6B  push    	edi  
7C91AC6C  push    	ebx  
7C91AC6D  jne 		7C92BE6D 
7C91AC73  push    	dword ptr [ebp-4] 
7C91AC76  call    	7C90DF4E 
7C91AC7B  cmp 		eax,102h 
7C91AC80  je      	7C943A51 
7C91AC86  cmp 		eax,ebx 
7C91AC88  jl      	7C943B0E 
7C91AC8E  cmp 		byte ptr [ebp+0Bh],bl 
7C91AC91  pop 		edi  
7C91AC92  je      	7C91ACAC 
7C91AC94  mov 		eax,dword ptr fs:[00000018h] 
7C91AC9A  mov 		eax,dword ptr [eax+24h] 
7C91AC9D  mov 		dword ptr [esi+0Ch],eax 
7C91ACA0  mov 		eax,dword ptr fs:[00000018h] 
7C91ACA6  mov 		dword ptr [eax+0F84h],ebx 
7C91ACAC  pop 		esi  
7C91ACAD  pop 		ebx  
7C91ACAE  leave        	
7C91ACAF  ret 		4	
7C91ACB2  nop          	
7C91ACB3  nop          	
7C91ACB4  nop          	
7C91ACB5  nop          	
7C91ACB6  nop 

And here is the part of the source code of my library that has the problem:

bool myAnotherClass::myMethod(string name) {
	if(pointerTo_myStruct == NULL){
		pointerTo_myStruct = new myStruct();  // <<--------------------<< Source code of the myStruct (1)
		pointerTo_myStruct->Name = name;
		pointerTo_myStruct->pointerTo_myClass = new myClass(this);
	}else{
   	
    	//Does not enter here for the moment

		}
	};

	return true;                        	//          	<<-----------------------------<< Here is were the error pops up.
}

/*(1)*/ struct myStruct{

	myStruct(){ Name = "No Name"; pointerTo_myClass = NULL; Next = NULL; }
	//~myStruct(){ delete Next; };

	string Name;
	myClass* pointerTo_myClass;
	myStruct* Next;
};

I'm not pasting the source code of myClass because it's not new and it has no changes. All tested and working and irrelevant.
Now the changes I've made was: adding this struct and start using the string template class (#include string.h) which, I think, there is the problem. Something
that I'm not using right.

if anyone can think anything I'll appreciate it.
Ask anything you want.

Thanks

directx 9 - D3DXLoadSkinMeshFromXof problem

08 October 2009 - 03:13 AM

hi there i'm new in directx 9 programming and i'm trying to create a simple engine,kind of framework i think,and i have a problem loading skinned meshes. the code to load from x files is: //the declaration of variables LPD3DXMESH pMesh; DWORD numMaterials; LPD3DXBUFFER pbufShipMaterial; LPD3DXSKININFO pSkinInfo; //.......................................................... //the function for loading the mesh LoadSkinMesh(LPCTSTR filename) { LPD3DXFILE File = NULL; if(FAILED(D3DXFileCreate(&File))) return; File->RegisterTemplates((LPVOID)D3DRM_XTEMPLATES, D3DRM_XTEMPLATE_BYTES); LPD3DXFILEENUMOBJECT EnumObject = NULL; if(FAILED(File->CreateEnumObject(filename, DXFILELOAD_FROMFILE, &EnumObject))) return; SIZE_T Size = 0; EnumObject ->GetChildren(&Size); for(SIZE_T Counter = 0; Counter < Size; Counter++) { LPD3DXFILEDATA DataObject = NULL; EnumObject ->GetChild(Counter, &DataObject); GUID ObjectGUID; DataObject->GetType(&ObjectGUID); if(ObjectGUID == TID_D3DRMMesh) { LPD3DXBUFFER *ppAdjacency; D3DXLoadSkinMeshFromXof(DataObject, 0, d3ddev, ppAdjacency, &pbufShipMaterial, NULL, &numMaterials, &pSkinInfo, &pMesh); //------->this line } ProcessChildObjects(DataObject); DataObject->Release(); } EnumObject->Release(); File->Release(); } when i try to load an *.x file the application crashes in "this line" with an error: Unhadled exeption in line (i don't remember) access violation writing location 0x00000002 i tried to use malloc for the pMesh to allocate some memory.the app still crashes but this time the error is: access violation reading location 0x00000000 any ideas?

PARTNERS