Diciembre 05, 2014, 10:56:00 PM Ultima modificación: Diciembre 09, 2014, 01:23:37 AM por am3500
hola amigos tengo una duda porque cuando pongo algo como un mapa ohh otra cosa por ejemplo una imagen porque yo le pongo la views buena a mi juego 3d  porque cuando yo lo pongo normal no se ve el mapa pero si le coloco un codigo que eh encontrado ahy si sebe el mapa ese :'( el codigo es este d3d_set_projection_ortho(0,0,800,600,0) pero cuando le coloco esto para poder ver el mapa ahy se ve bien pero por pedaso me explico cuando yo camino el mapa se mueve pero eso pasa cuando voy lejos y eso no es todo cada vez que le pongo ese codigo el Other se pone chiquitooooo no se porque porque mi juego es multijugador gracias si me responde esa duda de corazon gracias  :'( :'(  :D :-[ ;D :)

No entendí muy bien tu problema, pero según lo que entendí vos queres que se te dibuje el minimapa en proyección, si es así la proyección ortogonal es la correcta, tu problema radica en como estás dibujando el minimapa ya que lo estás dibujando en X lugar de la pantalla, si te moves el minimapa se va a quedar en los valores que le asignaste, sería bueno que pusieras el código completo de como lo dibujás. Tené en cuenta que las views en 3D cambian a diferencia del 2D. Si lo hicieras en :GMS: podrías ahorrarte todo esto con el evento "Draw GUI" que es indiferente de las views.

#2 Diciembre 06, 2014, 12:25:38 AM Ultima modificación: Diciembre 06, 2014, 12:28:22 AM por am3500
iros  ese mismo es el problema  mira este esl codigo del mapa me lo puedes areglar

en scripts
/*  draw_circle_sector()
**  by SoulRed12
**
**  General form: draw_circle_sector(dir,rad,ang,seg,col,ful)
**
**  Argument list:
**    argument0 (dir):  current direction
**    argument1 (rad):  circle radius
**    argument2 (ang):  size of arc in degrees
**    argument3 (seg):  arc segments
**    argument4 (col):  color of lines
**
**  Usage: Draws a circle sector on the screen
*/
draw_set_color(argument4); //Set the color

//Draw a bunch of lines to approximate an arc
for (cc=-argument2/2; cc<argument2/2; cc+=argument2/argument3)
{
    draw_line(x+lengthdir_x(argument1,argument0+cc),y+lengthdir_y(argument1,argument0+cc),x+lengthdir_x(argument1,argument0+cc+argument2/argument3),y+lengthdir_y(argument1,argument0+cc+argument2/argument3));
}

//Now draw lines to show sides of circle sector
draw_line(x,y,x+lengthdir_x(argument1,argument0+argument2/2),y+lengthdir_y(argument1,argument0+argument2/2));
draw_line(x,y,x+lengthdir_x(argument1,argument0-argument2/2),y+lengthdir_y(argument1,argument0-argument2/2));


OBJETO obj_minimapa
Citarevento create
rad=65; //the radius of the circle drawn for the base of the minimap
minRad=0; //the mini outline expanding circle's radius (starting) (this is only to give it that radar feel, you can take it out)
len=950; //the distance you want to see in the minimap
scale=len/rad; //the scale of the map (don't worry about why it's here)
alarm[0]=20; //the alarm which is used to increase the size of the mini expanding circle (if you don't want the expanding circle outline, take this out)


Citaralarm 0
//if you don't want the expanding circle outline, take this out
if (minRad < rad) //if the radius of expanding circle is smaller than the radius of the minimap base
{
    minRad+=1; //add 1 onto the radius of the expanding circle
}
else //if the radius of expanding circle is greater than or equal the radius of the minimap base
{
    minRad=0; //set the radius of the expanding circle to 0
}
alarm[0]=2; //set this alarm again


CitarDRAW
//Minimap base:
draw_set_alpha(9.0); //set alpha to make the minimap partially transparent
draw_circle_color(x,y,rad,c_green,c_green,false); //draw the minimap base
//Expanding mini circle outline:
draw_set_alpha(0.5); //set alpha to make the line partially transparent
draw_circle_color(x,y,minRad,c_green,c_green,true); //draw the expanding mini circle
draw_set_alpha(1); //reset alpha to 1
//Outline of minimap base:
draw_circle(x,y,rad,true); //draw a basic outline of the base

with (Other) //draw the enemies (this loops through them)
{
    if (point_distance(obj_player.x,obj_player.y,x,y) < other.len) //if the distance between the player and the enemy is less than the radar's range (len)
    {
        draw_circle_color(other.x+(cos(degtorad(point_direction(obj_player.x,obj_player.y,x,y)))*(point_distance(obj_player.x,obj_player.y,x,y)/other.scale)),other.y-(sin(degtorad(point_direction(obj_player.x,obj_player.y,x,y)))*(point_distance(obj_player.x,obj_player.y,x,y)/other.scale)),2,c_red,c_red,false); //draw the enemy icon (basic circle)
    }
}
with (obj_player) //draw the player
{
    draw_circle_color(other.x,other.y,2,c_yellow,c_yellow,false); //draw the player icon (basic circle)
}




y le eh puesto esto al draW
//views
d3d_set_projection_ortho(0,0,800,600,0)
x=view_xview[0]+725
y=view_yview[0]+62
//Minimap base:
draw_set_alpha(9.0); //set alpha to make the minimap partially transparent
draw_circle_color(x,y,rad,c_green,c_green,false); //draw the minimap base
//Expanding mini circle outline:
draw_set_alpha(0.5); //set alpha to make the line partially transparent
draw_circle_color(x,y,minRad,c_green,c_green,true); //draw the expanding mini circle
draw_set_alpha(1); //reset alpha to 1
//Outline of minimap base:
draw_circle(x,y,rad,true); //draw a basic outline of the base

with (Other) //draw the enemies (this loops through them)
{
    if (point_distance(obj_player.x,obj_player.y,x,y) < other.len) //if the distance between the player and the enemy is less than the radar's range (len)
    {
        draw_circle_color(other.x+(cos(degtorad(point_direction(obj_player.x,obj_player.y,x,y)))*(point_distance(obj_player.x,obj_player.y,x,y)/other.scale)),other.y-(sin(degtorad(point_direction(obj_player.x,obj_player.y,x,y)))*(point_distance(obj_player.x,obj_player.y,x,y)/other.scale)),2,c_red,c_red,false); //draw the enemy icon (basic circle)
    }
}
with (obj_player) //draw the player
{
    draw_circle_color(other.x,other.y,2,c_yellow,c_yellow,false); //draw the player icon (basic circle)
}



ve a ver si puedes hacer que el mapa sea normal la resolucion del juego es 800x600

Tu problema está en que estás forzando que se dibuje en coordenadas según la view, y las views en 3D cambian por completo, tratá de darle las coordenadas a mano o definir xx para el valor de X e yy para el valor de Y, entonces simplemente agragás una x y una y más a las coordenadas de todos los draw. Leete la documentación oficial para entender mejor el 3D.


[gml]
//views
d3d_set_projection_ortho(0,0,800,600,0)
var xx,yy;
xx=725
yy=62
//Minimap base:
draw_set_alpha(9.0); //set alpha to make the minimap partially transparent
draw_circle_color(xx,yy,rad,c_green,c_green,false); //draw the minimap base
//Expanding mini circle outline:
draw_set_alpha(0.5); //set alpha to make the line partially transparent
draw_circle_color(xx,yy,minRad,c_green,c_green,true); //draw the expanding mini circle
draw_set_alpha(1); //reset alpha to 1
//Outline of minimap base:
draw_circle(xx,yy,rad,true); //draw a basic outline of the base

with (Other) //draw the enemies (this loops through them)
{
    if (point_distance(obj_player.x,obj_player.y,x,y) < other.len) //if the distance between the player and the enemy is less than the radar's range (len)
    {
        draw_circle_color(other.x+(cos(degtorad(point_direction(obj_player.x,obj_player.y,x,y)))*(point_distance(obj_player.x,obj_player.y,x,y)/other.scale)),other.y-(sin(degtorad(point_direction(obj_player.x,obj_player.y,x,y)))*(point_distance(obj_player.x,obj_player.y,x,y)/other.scale)),2,c_red,c_red,false); //draw the enemy icon (basic circle)
    }
}
with (obj_player) //draw the player
{
    draw_circle_color(other.x,other.y,2,c_yellow,c_yellow,false); //draw the player icon (basic circle)
}

[/gml]

Fijate así.

iros tengo un problema con el radar el codigo que tu me diste esta bueno entero eso era lo que queria ya eh aprendido con las pociciones son diferente xx,yy XD pero tengo un problema con este radar los punto amarillo y rojo parece en la pocicion 0  como lo areglo mira como ehhhh areglado un poquito el codigo

//views
d3d_set_projection_ortho(0,0,800,600,0)
var xx,yy;
xx=725
yy=62
//Minimap base:
draw_set_alpha(9.0); //set alpha to make the minimap partially transparent
draw_circle_color(xx,yy,rad,c_green,c_green,false); //draw the minimap base
//Expanding mini circle outline:
draw_set_alpha(0.5); //set alpha to make the line partially transparent
draw_circle_color(xx,yy,minRad,c_green,c_green,true); //draw the expanding mini circle
draw_set_alpha(1); //reset alpha to 1
//Outline of minimap base:
draw_circle(xx,yy,rad,true); //draw a basic outline of the base

with (Other) //draw the enemies (this loops through them)
{
    if (point_distance(obj_player.xx,obj_player.yy,xx,yy) < other.len) //if the distance between the player and the enemy is less than the radar's range (len)
    {
        draw_circle_color(other.xx+(cos(degtorad(point_direction(obj_player.xx,obj_player.yy,xx,yy)))*(point_distance(obj_player.xx,obj_player.yy,xx,yy)/other.scale)),other.yy-(sin(degtorad(point_direction(obj_player.xx,obj_player.yy,xx,yy)))*(point_distance(obj_player.xx,obj_player.yy,xx,yy)/other.scale)),2,c_red,c_red,false); //draw the enemy icon (basic circle)
    }
}
with (obj_player) //draw the player
{
    draw_circle_color(other.xx,other.yy,7,c_yellow,c_yellow,false); //draw the player icon (basic circle)
}


mira aver si lo encuentra donde ponerle la direcion donde va eso va con el radar pero al parecer el radar o el circulo verde se fue a la direcio que quiero que es 725x62 pero el punto esta en la pocicon 0 ve aver y me lo dices amix  :'( :D

Cuando haces referencia a obj_player y other no tenes que ponerle .xx y .yy, a demás es raro que no te haya salido error al ejecutarlo al menos que hayas creado las variables xx e yy en esos objetos.

ahhhhhhhhhh ok  amix iros me puedes dar un radar o un mapa que pueda colocarle a mi juego uno que sea 3d para salir de este que al parecer esta dañado oh algo por el estilo XD  :D :-[ ;) ;D

Un consejo, no abrás un nuevo tema preguntanto lo que ya preguntaste en este, más que nada para mantener el orden.

Otra cosa, también podes usar Google para resolver tus dudas, por ejemplo poniendo "minimap 3d game maker" te van a salir varios resultados, en uno de los hilos de GMC había un ejemplo:

http://host-a.net/u/Merlocker_Games/Maze.gmk

Si hay algo que esté en ingles y no entendes, siempre podes usar el traductor.

#10 Diciembre 07, 2014, 04:46:17 AM Ultima modificación: Diciembre 07, 2014, 04:52:30 AM por am3500
gracias amix iros por el consejo y por el ejemplo del mapa el mapa funciona al 100 por % pero tengo un na duda porque al yo poner este codigo d3d_set_projection_ortho(0,0,800,600,0)
el Other se minimisa o se pone pequeño el Other es el que se ve cuando alguien esta conectado al juego pero el Other esta bien echo normal con los mismo codigo del draw del jugador pero cuando un objeto tiene el codigo este
d3d_set_projection_ortho(0,0,800,600,0)
el Other se vuelve chiquito no se porque pasa eso

y este es el DRAw del Other draw_set_color(c_white)
   

d3d_transform_set_identity()
d3d_transform_add_rotation_z(direction-180)
d3d_transform_add_translation(x,y,z)
d3d_model_draw(global.model_playerhead,0,0,0,background_get_texture(global.tex_face));
d3d_model_draw(global.model_playerneck,0,0,0,background_get_texture(global.tex_skin));
d3d_transform_set_identity()

//transforms left arm walk animation.
d3d_transform_set_identity()
d3d_transform_add_rotation_x(rotation+attrotation)
d3d_transform_add_rotation_z(direction-90)
d3d_transform_add_translation(x,y,z+12)
d3d_model_draw(global.model_playerleftarm,0,0,0,background_get_texture(global.tex_skin));
d3d_model_draw(global.model_playerleftarm2,0,0,0,background_get_texture(global.tex_shirt));
d3d_transform_set_identity()

//transforms right arm walk animation.
d3d_transform_set_identity()
d3d_transform_add_rotation_x(-rotation)
d3d_transform_add_rotation_z(direction-90)
d3d_transform_add_translation(x,y,z+12)
d3d_model_draw(global.model_playerrightarm,0,0,0,background_get_texture(global.tex_skin));
d3d_model_draw(global.model_playerrightarm2,0,0,0,background_get_texture(global.tex_shirt));
d3d_transform_set_identity()

//chest dont move so no animation
d3d_transform_add_rotation_z(direction-90)
d3d_transform_add_translation(x,y,z)
d3d_model_draw(global.model_playerchest,0,0,0,background_get_texture(global.tex_shirt));
d3d_model_draw(global.model_playerbelt,0,0,0,background_get_texture(global.tex_pants));
d3d_transform_set_identity()

//transforms left leg walk animation.
d3d_transform_set_identity()
d3d_transform_add_rotation_x(-rotation)
d3d_transform_add_rotation_z(direction-90)
d3d_transform_add_translation(x,y,z+6)
d3d_model_draw(global.model_playerleftleg,0,0,0,background_get_texture(global.tex_pants));
d3d_transform_set_identity()

//transforms right leg walk animation.
d3d_transform_set_identity()
d3d_transform_add_rotation_x(rotation)
d3d_transform_add_rotation_z(direction-90)
d3d_transform_add_translation(x,y,z+6)
d3d_model_draw(global.model_playerrightleg,0,0,0,background_get_texture(global.tex_pants));
d3d_transform_set_identity()


no creo que el problema este aqui pero ve aver si ves que es lo que pasa XD grax