Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (AndrewAMD, 7th_zorro, ozgur, Quad), 841 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 3 1 2 3
need a simple minimap example. #350023
12/13/10 11:33
12/13/10 11:33
Joined: Aug 2008
Posts: 81
J
jpxtreme Offline OP
Junior Member
jpxtreme  Offline OP
Junior Member
J

Joined: Aug 2008
Posts: 81
Guys, please help me find a working example for a simple minimap which uses a bitmap. I tried radar.c example but when i try to execute the dot won't move. Any other example? please help me.

Re: need a simple minimap example. [Re: jpxtreme] #350026
12/13/10 11:36
12/13/10 11:36
Joined: Dec 2010
Posts: 20
V
Varanos5897 Offline
Newbie
Varanos5897  Offline
Newbie
V

Joined: Dec 2010
Posts: 20
Try google earth.Very simple minimap...

Re: need a simple minimap example. [Re: Varanos5897] #350032
12/13/10 12:13
12/13/10 12:13
Joined: Sep 2010
Posts: 97
C
carla_mariz Offline
Junior Member
carla_mariz  Offline
Junior Member
C

Joined: Sep 2010
Posts: 97
lol @Varanos, that wasn't funny...really..

@jpxtreme, we have the same problem.. frown
i've been asking for that about a month ago, but unluckly, no one gives any..

Re: need a simple minimap example. [Re: carla_mariz] #350035
12/13/10 13:02
12/13/10 13:02
Joined: Aug 2008
Posts: 81
J
jpxtreme Offline OP
Junior Member
jpxtreme  Offline OP
Junior Member
J

Joined: Aug 2008
Posts: 81
@carla_mariz

hehehe 3d din yung thesis nyo.

@topic

I need a minimap in which a dot will move according tot the direction of the player. A very simple one indeed.

Re: need a simple minimap example. [Re: jpxtreme] #350057
12/13/10 15:08
12/13/10 15:08
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Hey look into the AUM magazines. There was a mini map example. Good luck.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: need a simple minimap example. [Re: 3run] #350133
12/13/10 23:23
12/13/10 23:23
Joined: Sep 2010
Posts: 97
C
carla_mariz Offline
Junior Member
carla_mariz  Offline
Junior Member
C

Joined: Sep 2010
Posts: 97
@3run, i've been looking for that at the AUM online.. from 48-95, but its not there. any suggestions?

@jpextreme, hahahaha...tamaaaaaaa!!! laugh

Re: need a simple minimap example. [Re: carla_mariz] #350151
12/14/10 06:55
12/14/10 06:55
Joined: Aug 2008
Posts: 81
J
jpxtreme Offline OP
Junior Member
jpxtreme  Offline OP
Junior Member
J

Joined: Aug 2008
Posts: 81
@carla_mariz
I think it's in AUM 27 but it's not in the site anymore.

Anyone have AUM 27, I've read somewhere that there's a minimap example in it.

Re: need a simple minimap example. [Re: jpxtreme] #350152
12/14/10 07:26
12/14/10 07:26
Joined: Sep 2010
Posts: 97
C
carla_mariz Offline
Junior Member
carla_mariz  Offline
Junior Member
C

Joined: Sep 2010
Posts: 97
@jpxtreme,
its still on the site and its available. i found it and it was in wdl format. the sample map is not that good.. tongue

you can find it here.

and if you find another sample map pls do inform me.
i can feel that we are studying @ the same school with the same course.. grin

Re: need a simple minimap example. [Re: carla_mariz] #350446
12/16/10 03:27
12/16/10 03:27
Joined: Jan 2006
Posts: 245
PA
Garrettwademan Offline
Member
Garrettwademan  Offline
Member

Joined: Jan 2006
Posts: 245
PA
Hello all. I believe I can send you in the right direction. Please look at my code below for my minimap and I can explain what I am doing here too.

First, declare your variables:
Code:
BMAP player_pointer = "textures//icon_player.tga";
BMAP map_border = "textures//map_border.tga";
BMAP admin_map = "textures//admin_map.bmp";
BMAP finish_flag = "textures//icon_finish.tga";


-The player pointer is a little dot in a 32BIT TGA file so the portions of the circle are transparent.

-The Map Border is to clean up the window to make it have a solid border like a picture frame

-The admin map is the actual map. I think this image of the map was approx 1000x1000 pixels, but don't hold me to it.

-The finish flag showed a checkered flag of the finish point of the map

Second declare a few panels for the map, border and window
Code:
PANEL pnlMapBorder{
	bmap = map_border;
	pos_x = 0;
	pos_y = 0;
	layer = 1;
	flags = OVERLAY;
}

PANEL pnlPlayerIcon{
	bmap = player_pointer;
	pos_x = 75;
	pos_y = 75;
	layer = 3;
	flags = OVERLAY;
}

PANEL pnlFinishIcon{
	bmap = finish_flag;
	pos_x = 0;
	pos_y = 0;
	layer = 3;
	flags = OVERLAY;
}
PANEL pnlAdminMap{
	pos_x = 0;
	pos_y = 0;
	layer = 0;
	window(0,0,175,175,admin_map,player_map_x,player_map_y);
}


-The map border is going to be second from the bottom, so use the layer of 1

-The player icon is the very top of this map, so make it a layer 3

-The finish icon also is on the top layer, it shows a checkered flag

-Admin map is the very bottom of this panel, it sits under all other layers


Below is my function that runs in a loop the entire time the player is in game or is moving.
Code:
function update_map(){
//SOME CODE
  //Rotate player icon for pointing
  pnlPlayerIcon.angle = my.pan;
 
  //Update position on map for player
   if(player.x <= 14672){
    player_map_y = (420 - ((((my.x + reference_x) / 27800)* 100) * 4.2)) - 150;
   }
   else{
    x_compensation = 75 - (((player.x/12578)) * 75);
    if(player.x < 27250){
     pnlPlayerIcon.pos_y = 75 + x_compensation;
    }
   }
   if(player.y <= 0){
    player_map_x = (((((abs(my.y) + reference_y) / 21000)* 100) * 4.2)) - 55;
   }
   else{
    y_compensation = ((player.y/3000)) * 75;
    if(player.y < 3000){
     pnlPlayerIcon.pos_x = 75 - y_compensation;
    }
   }
//SOME CODE
}



As for the finish flag, you will need to develop code similar to what is above and keep it in the window (even if it is on the border). This minimap is similar to the GTA versions where you find jobs.

Also, you will need to find out how big your map is by tracing the distance from one side to another, it will need to be a rectangle type...this is where I am getting my 278000 and 21000 numbers above. I just used F11 and did a small subtraction to find how big my map was.

Basically, find the size of your minimap in pixesl 1000x1000 or similar, then find out how big your level is. All you need to do now is just do a relational math equation. If your player is physically 67% across the map on the X axis, then your minimap should show 67% moved. Use the numbers to compensate 4.2. You will need to play with some numbers here as you test to compensate the player icon to always be in the center of the minimap...this code will allow your minimap to stop moving if the player gets to the edge of a map, and allow the player icon move freely to be truly at the border texture.

Hope this puts you in the right direction...good luck.

By the way, how would you feel about me writing an official guide to minimaps?


Current Project: Computer Repair Simulator
https://www.computer-repair-simulator.com
Re: need a simple minimap example. [Re: Garrettwademan] #350451
12/16/10 06:54
12/16/10 06:54
Joined: Oct 2002
Posts: 2,256
Oz
L
Locoweed Offline
Expert
Locoweed  Offline
Expert
L

Joined: Oct 2002
Posts: 2,256
Oz
Here is a link to a very old .wdl example of minimap and radar example. It used templates for movement and stuff so you have to put it the GStudio7 folder for it to work. I am not going to explain anything about it, but it might help get started. Use arrow keys to move in game. Run the TestMiniMap.wdl for it to work, and no, I am not going to convert to Lite-C at this time, I am too busy at the moment, you will have to do that. 3DGS has changed alot since this was written. array of panels instead of creating a bunch of silly single panels would work now.

http://www.darkdawnstudios.com/3DGS/Radar.rar

Goodluck dude,
Loco


Professional A8.30
Spoils of War - East Coast Games
Page 1 of 3 1 2 3

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