Setting only a part of the screen to be zoomed in

Posted By: darksmaster923

Setting only a part of the screen to be zoomed in - 10/28/09 23:02

I'm creating a scope, and I want only the center of the screen to have zoom, instead of the entire screen. Is there a way to do this? Also, can I blur the areas of the screen outside the zoomed area?
Posted By: MrGuest

Re: Setting only a part of the screen to be zoomed in - 10/29/09 01:11

yes with a shader, or used a foggy alpha image, and create another VIEW in the centre of the screen
Posted By: darkinferno

Re: Setting only a part of the screen to be zoomed in - 10/29/09 01:32

honestly, do you NEED that much, even AAA games only use a bitmap for their scopes, sure you wanna spend ages coding that effect, maybe do something else more important to your game and come back to that later?
Posted By: darksmaster923

Re: Setting only a part of the screen to be zoomed in - 10/29/09 02:36

I don't really like using a new view, just cause its in a box, but its probably the only way.

Originally Posted By: darkinferno
honestly, do you NEED that much, even AAA games only use a bitmap for their scopes, sure you wanna spend ages coding that effect, maybe do something else more important to your game and come back to that later?

I strive toward realism.
Posted By: Locoweed

Re: Setting only a part of the screen to be zoomed in - 10/30/09 00:37

Originally Posted By: darksmaster923
I don't really like using a new view, just cause its in a box, but its probably the only way.

Originally Posted By: darkinferno
honestly, do you NEED that much, even AAA games only use a bitmap for their scopes, sure you wanna spend ages coding that effect, maybe do something else more important to your game and come back to that later?

I strive toward realism.


Actually, there is a method to make a view not a box, it involves creating a entity the shape you want and placing it directly in front of the camera, creating a different view and then using bmap_for_entity() on the model you placed in front of camera.

I don't really have time to try to explain it all, but I will link some old C-Script code I wrote that does just this.

The main things to look at in this code is the circleview.mdl, action CircleView, and the view viewMap.

Also find the line:
viewMap.bmap = bmap_for_entity(pCircleEnt,0);
That is the main line that is putting the view onto the circular model's skin.

Even though when you look at the GTA circle minimap and it might not look like a view it really is, it's just the characters being placed in a view below the actual map as arrow sprites over a sprite with picture of level the same size as the level. Basically it is a view looking down at a picture of level under the level.

Anyhow, sorry this code is in C-Script and I don't have time to change it it to Lite-C, but if you want to try to figure it out, here is link to source example:

http://www.ecgames.com/video/LocoMapGTA.rar

It's like 50 times more complicated code than you need, but if you look at the main points I mentioned above I think you should be able to figure it out.

Hope it helps,
Loco
© 2024 lite-C Forums