Gamestudio Links
Zorro Links
Newest Posts
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
Data from CSV not parsed correctly
by EternallyCurious. 04/25/24 10:20
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (EternallyCurious, AndrewAMD, TipmyPip, Quad), 889 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
VIEW not taking into account entity distance for scaling #450944
04/25/15 11:17
04/25/15 11:17
Joined: Dec 2011
Posts: 1,823
Netherlands
Reconnoiter Offline OP
Serious User
Reconnoiter  Offline OP
Serious User

Joined: Dec 2011
Posts: 1,823
Netherlands
Hi,

VIEW not taking into account entity distance for scaling, how to do this?

Basically I want that an entity of the same type that is far away looks the same in size as an entity that is very close.

I have already set the view to Isometric, but I need to change the arc for zooming in and zooming out (changing the z does not do the trick).

tnx

Re: VIEW not taking into account entity distance for scaling [Re: Reconnoiter] #450945
04/25/15 11:19
04/25/15 11:19
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
If you are about to use ISOMETRIC view, take a look here.

Best regards


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: VIEW not taking into account entity distance for scaling [Re: 3run] #450947
04/25/15 11:36
04/25/15 11:36
Joined: Dec 2011
Posts: 1,823
Netherlands
Reconnoiter Offline OP
Serious User
Reconnoiter  Offline OP
Serious User

Joined: Dec 2011
Posts: 1,823
Netherlands
funny enough I just saw your thread, but thanks anyway its usefull. Still know how to the above?

Last edited by Reconnoiter; 04/25/15 12:32.
Re: VIEW not taking into account entity distance for scaling [Re: Reconnoiter] #450948
04/25/15 11:50
04/25/15 11:50
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Originally Posted By: Reconnoiter
funny enough I just saw your thread, but thanks anyway its usefull. Still know how to the above? I also about maybe using a shader but that would distort graphics in my other normal/camera view.
I missunderstood you at the first place, but try the following (I can't garantee that it will work perfect, but it works for me):
Code:
void main(){
	fps_max = 60;
	level_load("");
	
	vec_set(sky_color, COLOR_BLACK);
	
	var distToCamera[3];
	
	ENTITY* testEnt = ent_create(CUBE_MDL, vector(200, 0, 0), NULL);
	set(testEnt, UNLIT);
	testEnt.ambient = 100;
	
	ENTITY* testEnt2 = ent_create(CUBE_MDL, vector(1000, -250, 0), NULL);
	set(testEnt2, UNLIT);
	testEnt2.ambient = 100;

	ENTITY* testEnt3 = ent_create(CUBE_MDL, vector(1000, 250, 0), NULL);
	set(testEnt3, UNLIT);
	testEnt3.ambient = 100;

	while(1){
		
		testEnt.skill1 += 5 * time_step;
		vec_fill(testEnt.pan, testEnt.skill1);		
		vec_fill(testEnt2.pan, testEnt.skill1);
		vec_fill(testEnt3.pan, testEnt.skill1);
		
		distToCamera[0] = vec_dist(camera.x, testEnt.x) / 200;
		vec_fill(testEnt.scale_x, maxv(1, 1 * distToCamera[0]));

		distToCamera[1] = vec_dist(camera.x, testEnt2.x) / 200;
		vec_fill(testEnt2.scale_x, maxv(1, 1 * distToCamera[1]));
		
		distToCamera[2] = vec_dist(camera.x, testEnt3.x) / 200;
		vec_fill(testEnt3.scale_x, maxv(1, 1 * distToCamera[2]));

		wait(1);
	}

}



Best regards

Edit: btw, if I understood you correctly, it has nothing to do with VIEW at all (especially with ISOMETRIC projection). In the code above, I guess it needs better (more accurate) size correction, cause the one I've made is just for you to give an idea. Play with '200' value at the end of each 'distToCamera'.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: VIEW not taking into account entity distance for scaling [Re: 3run] #450949
04/25/15 12:29
04/25/15 12:29
Joined: Dec 2011
Posts: 1,823
Netherlands
Reconnoiter Offline OP
Serious User
Reconnoiter  Offline OP
Serious User

Joined: Dec 2011
Posts: 1,823
Netherlands
That would be very heavy with lots of ents (especially since the view can be moved) and would distort the other view.

edit; a postprocessing shader would do the trick I think, but I have no idea which one if there is a predefined one that does this effect.

Last edited by Reconnoiter; 04/25/15 12:36.

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