Jump to content

My projects work only on my computer in what a problem?


zinador
 Share

Recommended Posts

All greetings, have compiled game, for me at the permission 640,480 work perfectly if to put the permission more that at start of my game Windows swear that cannot allocate memory, But an essence not in it. I give to the friend the compiled project with different permissions, and at it Windows too swears that Cannot to allocate memory, in what a problem and how it to correct? I so understand that it in project options it is necessary to climb? Help please

 

source code game

#include "engine.h"

int main( int argn, char* argv[] )
{
Initialize() ;

SetAppTitle( "MyGame" ) ;
Graphics(640,480 ) ;
AFilter() ;
TFilter() ;

TWorld	world;
TBuffer gbuffer;
TCamera camera;
TMesh	mesh;
TLight	light;
TMesh	ground;
TMaterial material;

world = CreateWorld() ;
if (!world) {
	MessageBoxA(0,"Error","Failed to create world.",0);
	return Terminate();
}

gbuffer=CreateBuffer(GraphicsWidth(),GraphicsHeight(),BUFFER_COLOR|BUFFER_DEPTH|BUFFER_NORMAL);




camera=CreateCamera();
mesh=CreateCube(camera);


ground=CreateCube();
ScaleEntity(ground,Vec3(10,1,10));
PositionEntity(ground,Vec3(0,-2,0));


light=CreateDirectionalLight();
RotateEntity(light,Vec3(45,45,45));
//Управление
TVec3 camrotation=Vec3(0);
float mx=0;
float my=0;
float move=0;
float strafe=0;
// Игровой цикл
while(!KeyHit(KEY_ESCAPE) && !AppTerminate() )
{
	//Управление и мышь
	mx=MouseX()-GraphicsWidth()/2;
	my=MouseY()-GraphicsHeight()/2;
	MoveMouse(GraphicsWidth()/2,GraphicsHeight()/2);
	camrotation.X=camrotation.X+my;
	camrotation.Y=camrotation.Y-mx;
	if(camrotation.X>80)
	{
		camrotation.X=80;
	}
	if(camrotation.X<-40)
	{
		camrotation.X=-40;
	}
	RotateEntity(camera,camrotation);
	move=Curve(KeyDown(KEY_W)-KeyDown(KEY_S),move,1000);
	strafe=Curve(KeyDown(KEY_D)-KeyDown(KEY_A),strafe,1000);

	MoveEntity(camera,Vec3(strafe,0,move));

	if( !AppSuspended() ) 
	{


		// Обновление времени и мира
		UpdateAppTime();
		UpdateWorld(AppSpeed()) ;

		// Отрисовка
		SetBuffer(gbuffer);
		RenderWorld();
		SetBuffer(BackBuffer());
		RenderLights(gbuffer);


		Flip(0) ;
	}
}
return Terminate() ;
}


Link to comment
Share on other sites

Jebus, what? I think it would be wise to just type your question in Russian (based on your comments I would guess you are Russian) and pull it through Google Translate.

 

Also get yourself registered as an SDK developer to get access to the programming forums.

 

http://leadwerks.com/werkspace/index.php?/topic/127-if-you-need-access-to-the-forum/

 

Cheers!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...