Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
1 registered members (AndrewAMD), 599 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 4 1 2 3 4
Destroy a block-model && Cam rotation around a fix point #219905
08/05/08 14:12
08/05/08 14:12
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline OP
Expert
Espér  Offline OP
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
ok..

After i thought of adding thousand of block-models to my level, i tested it. At the end, the fps are unter 5.. really tooooo low ^^.

Now my new question about that:

If i create a BIIIG Block-Model. How i´m able to split it into 100x100 Faces ( from top view ) and 100x400 Faces( from sideview ).




AND..

How i´m able to select the top 100x100 face, and delete the complete miniblock under it. But adding texture to the hole-walls. The upper edge that´s facing to the hole, should be curved down a bit..


What i want to get:


That must explain all ^^








2. question:



Red = Floor in the Center of the Screen. ( the fix point )
green = An ENtity called "camobject"

I want "camobject" always watch into the direction of the floor point, and rotate around it. "camobject"´s Tilt is -50 and won´t change..
Problem: I´ve a Existing Script for the camera movement. And i can´t change it completely, because 11 other Scripts are using that code ( don´t want to change them all )..
So here´s the Script:
Click to reveal..

Code:
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

ENTITY* camobject;
ENTITY* cursors;

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

VECTOR temp;

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

var switcher  = 0;
var zoomcraft = 800;
var mausspeed = 30;
var mouse_move[3];

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

action lichtfeld()
{
	cursors = my;
	my.flags = INVISIBLE;
	wait(5);
	while(1)
	{
		temp.x = mouse_pos.x;
		temp.y = mouse_pos.y;
		temp.z = 10000;
		
		vec_for_screen(temp,camera);
		c_trace(camera.x,temp,IGNORE_MODELS);
		
		vec_set(my.x,target.x);
		
		my.lightrange = 300 + camobject.z + random(20);
		my.red        = 230 + random(20);
		my.green      = 210;
		my.blue       = 150 + random(20);
		wait(1);
	}
}


action cam_move()
{
	camobject = my;
	my.tilt = -50;
	my.z    = zoomcraft;
	while(1)
	{
		mouse_pos.x = mouse_cursor.x;
		mouse_pos.y = mouse_cursor.y;

		mouse_move[0] = ((screen_size.x-mouse_pos.x)>(screen_size.x-screen_size.x/10))-((screen_size.x-mouse_pos.x)<(screen_size.x/10)); 
		mouse_move[1] = ((screen_size.y-mouse_pos.y)>(screen_size.y-screen_size.y/10))-((screen_size.y-mouse_pos.y)<(screen_size.y/10));
		vec_set(temp.x,nullvector);
		temp.x = mouse_move[1]*mausspeed*time_step;
		temp.y = mouse_move[0]*mausspeed*time_step;
		
		if((mickey.z <= 0 | key_pgdn == 1) && my.z >= 400){my.z -= mausspeed*time_step;}
		if((mickey.z >= 0 | key_pgup == 1) && my.z <= 1200){my.z += mausspeed*time_step;}
		
		if(key_home == 1| key_q == 1)
		{
			//rotieren_links
		}
		
		if(key_end == 1| key_e == 1)
		{
			//rotieren_rechts
		}
		
		
		vec_rotate(temp.x,vector(camera.pan,0,0));
		vec_add(my.x,temp.x);
		
		vec_set(camera.x,my.x);
		vec_set(camera.pan,my.pan);
		wait(1);
	}
}


And the idea shorter:

on holding Pos1/Q or End/E =>
Save (X,Y,-155) of the Screen-Center
Rotate the camobject around it, and don´t change tilt ( but looking at these 3 points ).



Hope someone can help me here..



That´s all.. ^^ thanks for every help..

Last edited by xXReapeRXx; 08/07/08 14:54.

Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: Destroy a block-model && Cam rotation around a fix point [Re: Espér] #220341
08/07/08 02:15
08/07/08 02:15
Joined: Oct 2004
Posts: 4,134
Netherlands
Joozey Offline
Expert
Joozey  Offline
Expert

Joined: Oct 2004
Posts: 4,134
Netherlands
Hey, that's dungeon keeper 1.
Anyway.

Quote:
After i thought of adding thousand of block-models to my level, i tested it. At the end, the fps are unter 5.. really tooooo low ^^.
My game consists of a cube filled with 17x17x17 blocks, meaning ~5000 blocks. Those are simple cubes consisting of round and about 18 faces each. I get a framerate of 17 fps. So I don't know how you managed to get 5fps, but they must be very complex blocks...

Well, eventhough 17fps is a little more, it's still too low for me as I need to apply a number of various effects which will eat performance as well. Therefore I will remove every side of a block that is not visible by the player. I know this by just checking if surrounding blocks are covering a block (I keep track of 'em with a large array), and if so, you can remove that side (e.g. by not placing a side model there, or placing a block model missing one side). I think there are also certain vertex shaders that can do this. Not rendering the back culling vertexes. That would be even a better way, but I'm not yet sure if it's that easy to achieve.


Quote:
How i´m able to select the top 100x100 face, and delete the complete miniblock under it. But adding texture to the hole-walls. The upper edge that´s facing to the hole, should be curved down a bit..

Once you know where your blocks are located, you know where the holes are and replace the blocks next to a hole with curved blocks. In my case, I have water flowing through my blocks, and I needed to know if there was a 'hole' to place a waterfall, or to end a waterfall when reaching ground, to start spreading water again.
You just basically have to do alot of thinking when what should happen.

http://www.youtube.com/watch?v=kzmW7g2e5BA


Quote:
I want "camobject" always watch into the direction of the floor point, and rotate around it. "camobject"´s Tilt is -50 and won´t change..
Play a little around with the vec_ functions.

-vec_to_angle can let your cam watch into the direction of something (example in the manual).
-vec_for_angle can let you put the cam in a position somewhere around the object. Create a new vector which should be your "rotation vector". You rotate this vector to rotate the cam around.
-vec_scale can let you scale the camera way from the object after you applied vec_for_angle. Negative scaling means moving away from the object backwards, which you want.
Add some Z and you're done.

Last edited by Joozey; 08/07/08 02:19.

Click and join the 3dgs irc community!
Room: #3dgs
Re: Destroy a block-model && Cam rotation around a fix point [Re: Joozey] #220344
08/07/08 03:13
08/07/08 03:13
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
excuse my naivety, but why are you having all the blocks underneath?

surely you can just have the 100x100 blocks (saving you 30000 blocks (75%)) and change their scale to match up with what they're doing and the bottom blocks would be doing?

scale_z to .25 or start at 400? then reduce it down changing the texture and the position to what you need? probably you'll be doing half of that anyway...?

just a thought

Re: Destroy a block-model && Cam rotation around a fix point [Re: MrGuest] #220505
08/07/08 12:46
08/07/08 12:46
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline OP
Expert
Espér  Offline OP
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
because the Blocks are a bit more complex
Their roof is not flat, and tey´re stretched, whirled and morphed a bit on each vertex, to let em look like a earthcube..
First they´re just 30-Faces Cubes..
But after the imps make he walls stronger, the cubes at the dungeon walls morph to those:
http://www.box.net/shared/osqgsofy8o



because Q2:
I´ve this code:
Code:

		if(key_home == 1| key_q == 1)
		{
			vec_set(temp,vector(screen_size.x/2,screen_size.y/2,-150);   
			vec_sub(temp,my.x);
			vec_to_angle(my.pan,temp);
			vec_for_angle(my,???);
			vec_scale(my,camobject.z);
		}


There are ???. What i should write in there?

Ps.: How to manage, that the tilt of the camera is -50.. and always -50..

Last edited by xXReapeRXx; 08/07/08 13:22.

Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: Destroy a block-model && Cam rotation around a fix point [Re: Espér] #220793
08/09/08 15:50
08/09/08 15:50
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline OP
Expert
Espér  Offline OP
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Still need an Answer for Question 1...

tested to add 135x135 Entities in WED.. But i wasn´t able to compile the level.. too many ents..

So i need a way like Question 1 said...

HELP


Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: Destroy a block-model && Cam rotation around a fix point [Re: Espér] #220817
08/09/08 22:19
08/09/08 22:19
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Why do you need 400 faces in height? It it really necessary? whistle

Knowing Dungeon Keeper as I do from the old days, there was
only the 100x100 single-height blocks and a floor plane beneath them.

The appearance of 'breaking up" on diging was only animation frames of the
dirt-block or wall-block in action. This same animation sequence
also used in the FPS looking "Beast POV" and was quite
noticable there. grin

Couldnt you do the same? Or are you looking at making a 3D version
of Dungeon keeper with up/down as well as the old north/south digging?
grin I would love to see that come to fruition!!! grin

If you decide it IS necessary, another way to try it would be
to create the entities on-the-fly from inside lite-c rather than WED,
and see if it behaves any better.
I have found that Lite-C generated entities seem to behave more efficiently
than WED planted ones.

Hope this helps.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Destroy a block-model && Cam rotation around a fix point [Re: EvilSOB] #220826
08/10/08 00:03
08/10/08 00:03
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline OP
Expert
Espér  Offline OP
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Quote:
only the 100x100 single-height blocks and a floor plane beneath them.

What sais me, that you haven´t set the block high inside the menu to max ^^.
The Dungeon keeper2 Models of the Blocks are 100x100x400 ( extract via Data reader ).


I tried to create the entities on-the-run.. But the game hang off. and if i put a wait into the while-loop, the loading time of a 500x500 Level could be.. LOOOOOOOOOOONG.
Tried the code from the fog-of-war in AUM for the wall too.. same problem.


So i need a script that is able to do the things asked in question 1.

Last edited by xXReapeRXx; 08/10/08 00:04.

Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: Destroy a block-model && Cam rotation around a fix point [Re: Espér] #220888
08/10/08 14:39
08/10/08 14:39
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Ah, sorry.I though you meant
100 blocks wide by 100 blocks high by 400 blocks thick.
My bad...

Ive done some testing and I see what you mean, FPS drops badly when
the quantity of entity climbs. The more complex the model is also adds
to this problem. I can only see more CPU power solving this, but Hey,
Im only a noob to Gamestudio so I could easily be wrong.

But while I was testing, I put the following CAMERA code together from scraps
and documented it properly. Hope this helps.

And best of luck finding a result, I'm curious myself now...

Code:
//
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//  Complete Camera Management function
//
VECTOR*   CamTarget =    { x=0; y=0; z=0; }   //Globally accesable Target of camera
VECTOR*   CamOffset =    { x=0; y=0; z=0; }   //Globally accesable X,Y,Z Offset of Focus.  ie (0,0,0) = dead-on CamTarget
var       CamZoomFactor  = 50;                //Globally accesable ZOOM setting of camera
//
//
function Camera_Driver_startup()
{
   while(1)               
   {   
      //Optionally place limitations on available angles/positions
      camera.pan  = clamp(camera.pan, -175, 175);   //Limit possible Pan angle to keep Camera from Panning completely around
      camera.tilt = clamp(camera.tilt, -90, 0);     //Limit possible Tilt angle to keep Camera "above" play-field
      camera.roll = clamp(camera.roll, 0, 0);       //Limit possible Roll angle to disabled
      //
      //Position and Focus Camera
      camera.x = CamTarget.x + CamOffset.x - CamZoomFactor * cos(camera.tilt) * cos(camera.pan);
      camera.y = CamTarget.y + CamOffset.y - CamZoomFactor * cos(camera.tilt) * sin(camera.pan);
      camera.z = CamTarget.z + CamOffset.z - CamZoomFactor * sin(camera.tilt); 
      //
      //
      proc_mode = PROC_LATE;
      wait(1);         
   }
}
//
//
function Example_Camera_Controls_startup()
{
   VECTOR*   Offset = vector(0,0,0);
   while(1)               
   {   
      //Rotate/Zoom Camera
      if(key_pressed(280))   camera.pan    -= mickey.x/5;      // mouse movement left-right changes PAN       (when LeftClick held)
      if(key_pressed(280))   camera.tilt   -= mickey.y/5;      // mouse movement up-down    changes TILT    (when LeftClick held)
                             CamZoomFactor += mickey.z / 25;   // mouse Scroller up-down    changes ZOOM      (Anytime) 
      //
      //Change Positional Offset of Focus away from Target.  ie (0,0,0) = dead-on target
      if(key_pressed(72))   CamOffset.x      +=   time_step * CamZoomFactor / 25;      // Up  Arrow    Adjust 'North'
      if(key_pressed(80))   CamOffset.x      -=   time_step * CamZoomFactor / 25;      // Down Arrow   Adjust 'South' 
      if(key_pressed(75))   CamOffset.y      +=   time_step * CamZoomFactor / 25;      // Left Arrow   Adjust 'East'
      if(key_pressed(77))   CamOffset.y      -=   time_step * CamZoomFactor / 25;      // Right Arrow  Adjust 'West' 
      if(key_pressed(71))   CamOffset.z      +=   time_step * CamZoomFactor / 25;      // Home Key     Adjust Camera Height 'Up'
      if(key_pressed(79))   CamOffset.z      -=   time_step * CamZoomFactor / 25;      // End Key      Adjust Camera Height 'Down' 
      //
      //
      proc_mode = PROC_EARLY;
      wait(1);         
   }
}
//
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////




Last edited by EvilSOB; 08/10/08 18:46. Reason: Added comment and code.

"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Destroy a block-model && Cam rotation around a fix point [Re: EvilSOB] #220906
08/10/08 18:44
08/10/08 18:44
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline OP
Expert
Espér  Offline OP
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Ok..
Created these two Scripts:
Click to reveal.. ( Hauptscript)
Code:
#define PRAGMA_PATH "Umgebung"
#define PRAGMA_PATH "Monster"
#define PRAGMA_PATH "Helden"
#define PRAGMA_PATH "Fallen"
#define PRAGMA_PATH "Türen"
#define PRAGMA_PATH "Level_Data"
#define PRAGMA_PATH "Shader_Data"
#define PRAGMA_PATH "Postprocessingshaders"
#define PRAGMA_PATH "Objectshaders"

#include "acknex.h"
#include "default.c"
#include "OS_Main.h"
#include "PP_Main.h"
#include "cursors.c"
#include "blocking.c"

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

STRING* Levelfile = "Level_";
STRING* Downer = "_";
STRING* Levelcounter = "#20";
STRING* Maplayer = "#20";
STRING* farbe = "#20";

VECTOR pixelget;

BMAP* levelmap;
BMAP* startscreen = "Ladescreen_1.jpg";

var levelcount = 1;
var backside;
var mapcount = 1;
var range   = 1;
var bitmap_weite = 0;
var bitmap_hoehe = 0;
var range_x = 1;
var range_y = 1;
var pixel;
var alphas;
var form;
var testvar = 5;
var bioside_ani = 0;
var counters = 0;
var counterz = 0;
var level_loader = 0;
var row_index = 0;
var column_index = 0;
var zoomcraft = 800;

ENTITY* creatione;
ENTITY* dummylight;
ENTITY* biosideer;

PANEL* ladescreen =
{  
	pos_x = -900;
	pos_y = 0;
	layer = 1;
	bmap = startscreen;
	flags = VISIBLE;
}

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function sys_start()
{
	ladescreen.pos_x = -900;
	ent_create("testobjekt.mdl",vector(40,40,zoomcraft),cam_move);
	ent_create("testobjekt.mdl",vector(40,40,150),lichtfeld);
	while(1)
	{
		mouse_pos.x = mouse_cursor.x;
		mouse_pos.y = mouse_cursor.y;
		wait(1);
	}
}



function bitmap1()
{
	level_loader = 0;
	ent_remove(creatione);
	ent_remove(dummylight);
	ent_remove(biosideer);
	wait(1);
	str_for_num(Levelcounter, levelcount);
	str_for_num(Maplayer, mapcount);
	str_cat(Levelfile, Levelcounter);
	str_cat(Levelfile, Downer);
	str_cat(Levelfile, Maplayer);
	str_cat(Levelfile, ".bmp");
	wait(1);
	levelmap = bmap_create(Levelfile);
	form = bmap_lock(levelmap,0);
	testvar = form;
	bitmap_weite = bmap_width(levelmap);
	bitmap_hoehe = bmap_height(levelmap);
	counterz = bitmap_weite * bitmap_hoehe;
	wait(1);
	while (row_index < bitmap_weite)
	{
		while (column_index < bitmap_hoehe)
		{
			column_index += 1;
			
			pixel = pixel_for_bmap(levelmap, column_index,row_index);
			pixel_to_vec(pixelget,alphas,888,pixel);
			
			temp.x = column_index * 64;
			temp.y = row_index * 64;
			temp.z = 0;
			
			// weiß   = Boden_normal
			if (pixelget.x == 255 && pixelget.y == 255 && pixelget.z == 255){ent_create("Ground.mdl",vector(temp.x,temp.y,2),object_boden);}
			// schwarz = Wand_unabbaubar
			else if (pixelget.x == 0 && pixelget.y == 0 && pixelget.z == 0){ent_create("Erdwall_0.mdl",vector(temp.x,temp.y,64),object_fels);}
			// braun = Wand_abbaubar
			else if (pixelget.x == 60 && pixelget.y == 90 && pixelget.z == 156){ent_create("Erdwall_0-2.mdl",vector(temp.x,temp.y,64),object_erde);}
			// Frabe passt garnicht
			else {ent_create("ground.mdl",vector(temp.x,temp.y,2),object_boden);}
			counters += 1;
		}
		column_index = 0;
		row_index += 1;
	}
	bmap_unlock(levelmap);
	levelcount = backside;
	mapcount = 2;
	range = 1;
	range_x = 1;
	range_y = 1;
	Levelfile = "Level_";
	Levelcounter = "#20";
	wait(1);
   sys_start();
}



action bioside()
{
	wait(1);
//	dummylight.flags = INVISIBLE;
	dummylight.lightrange = 1500;
	wait(1);
	OS_CO_Normalmapping_init(my,10,30);
	wait(1);
	creatione = ent_create("Creations_TITEL.mdl",vector(-2000,180,-100),NULL);
	wait(1);
	OS_CO_Normalmapping_init(creatione,10,30);
	wait(1);
	while(my.y <= 200)
	{
		my.y += 50*time_step;
		dummylight.y += 20*time_step;
		wait(1);
	}
	wait(-2);
	while(bioside_ani <= 99)
	{
		ent_animate(my,"rotation",bioside_ani,NULL);
		bioside_ani += 10*time_step;
		wait(1);
	}
	creatione.scale_z = 0.0;
	creatione.x = my.x+25;
	creatione.z = my.z-10;
	creatione.y = my.y -20;
	while(creatione.scale_z <= 1.0)
	{
		creatione.scale_z += 0.1*time_step;
		wait(1);
	}
	wait(-3);
	while(my.y >= -100)
	{
		creatione.y -= 30*time_step;
		my.y -= 30*time_step;
		dummylight.y -= 30*time_step;
		wait(1);
	}
	wait(-1);
	camera.x = 150;
	camera.y = 150;
	camera.z = 300;
	camera.pan = 90;
	camera.tilt = -50;
	ladescreen.pos_x = 0;
	wait(1);
	bitmap1();
}




function main()
{  	
	fps_max = 60;
	video_mode = 7;
	wait(1);
	max_nexus = 2000;
	max_entities = 999999;
	level_load("Level_Grund.wmb");
	sky_color.red = 1;
	sky_color.green = 1;
	sky_color.blue = 1;
	wait(3);
	mouse_mode  = 2;
	camera.x = 0;
	camera.y = 0;
	camera.z = 0;
	camera.pan = 90;
	camera.tilt = 0;
	max_nexus = 2000;
	backside = levelcount;
	wait(1);
	dummylight = ent_create("testobjekt.mdl",vector(-1000,-2000,0),NULL);
	wait(1);
	biosideer = ent_create("Bioside_TITEL.mdl",vector(0,-1000,0),bioside);
}

Click to reveal..
Code:

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

action object_erde()
{
	set(my,SHADOW);
	OS_I_Normalmapping_init(my,1,30);
}

action object_fels()
{
	set(my,SHADOW);	
	OS_I_Normalmapping_init(my,1,30);
}

action object_boden()
{
	set(my,SHADOW);	
	OS_I_Normalmapping_init(my,1,30);
}


and these are the Models:
http://www.box.net/shared/bf2y7coyja

and my test bmp:


My Problem now:
The creating of the Models needs much time... Creating 100 Horizonal and 100 Vertical Entities needs more than 4 Minutes.. And that without a wait in teh code...

Perhaps you know why?


Ps.: After playing through DK2 last night ( yes.. only one night for the complete game )... i think a level maximum of 200-row x 200-column Models is enough.
I think i won´t go over 100x100.. ^^
But the game still crashes...

Last edited by xXReapeRXx; 08/10/08 22:42.

Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: Destroy a block-model && Cam rotation around a fix point [Re: Espér] #221017
08/11/08 16:26
08/11/08 16:26
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Sorry, but I cant get it to run at all, too many missing includes,
add on the language barrier and Im stuck.... blush

Anyway, Ive looked at the main builder loop in Bitmap1 and
tried to fine tune it a bit. Be carful to hang on to your old code though
as this has not even been compiled, let alone tested.

Let us know if it "improves" things at all.

PS Try to put your IFs im order of Most-Common Block(First) to Least-Common Block(Last)

Code:
   ...
   counterz = bitmap_weite * bitmap_hoehe;
   wait(1);
   /////////    vvvvvv  Replaced Code 
   //
   temp = vector(0,0,0);
   for(row_index=0;row_index<bitmap_weite;row_index++))
   {
      for(column_index=0;column_index<bitmap_hoehe;column_index++)
      {
         pixel = pixel_for_bmap(levelmap, column_index,row_index);
         pixel_to_vec(pixelget,alphas,888,pixel);
         // 
         // weiß   = Boden_normal
         if (pixelget.x == 255 && pixelget.y == 255 && pixelget.z == 255)
              {ent_create("ground.mdl",vector(temp.x,temp.y,2),object_boden);}
         // schwarz = Wand_unabbaubar
         else if (pixelget.x == 0 && pixelget.y == 0 && pixelget.z == 0)            
              {ent_create("Erdwall_0.mdl",vector(temp.x,temp.y,64),object_fels);}
         // braun = Wand_abbaubar
         else if (pixelget.x == 60 && pixelget.y == 90 && pixelget.z == 156)   
              {ent_create("Erdwall_0.mdl",vector(temp.x,temp.y,64),object_erde);}
         // Frabe passt garnicht = Boden_normal
         else {ent_create("ground.mdl",vector(temp.x,temp.y,2),object_boden);}
         //
         //counters += 1;            necessary????
         //camera.y = temp.y;        necessary????  Probably a big time user!
         temp.y += 64;
      }
      temp.x += 64;
   }
   //wait(20);         necessary????
   //
   /////////    ^^^^^^^  Replaced Code 
   //
   levelcount = backside;
   mapcount = 2;
   ...



"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Page 1 of 4 1 2 3 4

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1