Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (AndrewAMD, TipmyPip), 13,353 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
racing map questiion #225046
09/02/08 17:26
09/02/08 17:26
Joined: Jun 2008
Posts: 11
Manila, Philippines
P
Polygon_Digital Offline OP
Newbie
Polygon_Digital  Offline OP
Newbie
P

Joined: Jun 2008
Posts: 11
Manila, Philippines
Hi guys I'd like to ask.

In the racing game how can I generate a small map in the game

e.g.

When your in the racing a small that tells where you are.

Thanks

Re: racing map questiion [Re: Polygon_Digital] #225487
09/04/08 19:50
09/04/08 19:50
Joined: Sep 2003
Posts: 733
Whitefish, Montana
JazzDude Offline
User
JazzDude  Offline
User

Joined: Sep 2003
Posts: 733
Whitefish, Montana
I presume you mean a headsup display minimap.

Here's a code by Zarthor which I believe will work if your minimap has the same ratio as your terrain and is oriented in the same direction.

Code:
var map_ratio[2]; // saves the ratio from real world coordinates to map coordinates
var icon_pos[2]; // where the icon can be placed on the 2d map (screen position)

var map_size[2] = 1024,768;
var terrain_size[2] = 4000,4000;

function map_startup() //upper right quarter of terrain and screen
{
//  map_ratio.x = map_size.x / terrain_size.x; //may be backwards
//  map_ratio.y = map_size.y / terrain_size.y;
	map_ratio.x = terrain_size.x/map_size.x ; //may be backwards
  	map_ratio.y = terrain_size.y/map_size.y ;
}

function map_CalcIconPos(&_WorldPos)
{
  icon_pos.x = _WorldPos[0]   / map_ratio.x;// - (map_size.x);
  icon_pos.y = _WorldPos[1]  / -map_ratio.y;// -(map_size.y );
//		(vec_set(player.x) + 2000) / 3.90625 = icon_pos.x;
//		(vec_set(player.y) + 2000) / 5.2083 = icon_pos.y;

}

panel player_icon 
{
	bmap = player_tga;
	flags = d3d,refresh,overlay,visible;
	layer = 20;
}

function place_player_icon() //places the player icon on the chart
{
	if(land_chart.visible == on || land_chart_explored.visible == on)
	{
		map_CalcIconPos(player.x);
		player_icon.pos_x = icon_pos.x;
		player_icon.pos_y = icon_pos.y;
		
		player_icon.visible = on;
	}
	
}

 


Re: racing map questiion [Re: JazzDude] #225536
09/05/08 01:03
09/05/08 01:03
Joined: Jun 2008
Posts: 11
Manila, Philippines
P
Polygon_Digital Offline OP
Newbie
Polygon_Digital  Offline OP
Newbie
P

Joined: Jun 2008
Posts: 11
Manila, Philippines
Thanks..

Re: racing map questiion [Re: JazzDude] #249398
02/02/09 10:58
02/02/09 10:58
Joined: Jan 2009
Posts: 7
Palestine
N
Naila Offline
Newbie
Naila  Offline
Newbie
N

Joined: Jan 2009
Posts: 7
Palestine
HI There,

Thanks for the code, I used it and made some changes in it, for example I defined the land_chart as a panel, but I don't know what do you mean by land_chart.

I also connect this code with the player move script, it worked, and the icon is moving, I just don't know how to make a map that is lets say mapped to my level view and make boundaries to the moving icon not to exceed the edges of the map....

any help will be apprieciated, if you could suggest or explain to me some few things to make it work in a perfect way..

Thank you

Naila

Re: racing map questiion [Re: Naila] #249399
02/02/09 10:58
02/02/09 10:58
Joined: Jan 2009
Posts: 7
Palestine
N
Naila Offline
Newbie
Naila  Offline
Newbie
N

Joined: Jan 2009
Posts: 7
Palestine
sorry I mean by land_chart_explored, what do you mean of that?


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

Gamestudio download | 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