Solo decir una cosa: Precioso. En serio, tu paisaje es precioso, colorido, y bonito, me encanta.
Versión para imprimir
Solo decir una cosa: Precioso. En serio, tu paisaje es precioso, colorido, y bonito, me encanta.
Gracias Xarpo. Aquí muestro uno viejo que había hecho.
-- IMÁGENES ADJUNTAS --
https://foro3d.com/attachment.php?attachmentid=112135
Excelente el trabajo konker. Esos efectos están interesantes, esa de la transparencia, la niebla también le da un buen efecto.
Y sobre todo a mí me gustaría hacerte una pregunta.
Como haces para que todo quede metido en un exe único.
Buen trabajo, saludos (y).
Hola Cibertronic, pues para hacer ese ejecutable es sencillo mira.
paso-1:
Creamos el.bato.cmd y lo editamos con el nombre del.exe que compila Blitz3d.
Archivo adjunto 113756
paso-2:
Luego instalamos el quick Batch file compiler //de preferencia el portable o si es full da igual, porque este nos permite ocultar la consola de dos, y su función es pasar a ejecutable un.bat, cmd.
Archivo adjunto 113757
paso-3:
Archivo adjunto 113758
paso-4:
En la pestaña texto e icono ocupamos unos comandos básicos para llamar la aplicación.
Archivo adjunto 113759
resultado final:
Después de dar examinar el paso-4 buscamos un icono.ico especial y con eso solo aceptamos y crea el (*.exe) de todo el proyecto de Blitz3d o de cualquier otro programa (esto sirve para hacer portables y con esto puedes crear archivos maliciosos, pero no queremos llegar a eso, también puedes hacer bromas directamente desde el Blitz3d).
Archivo adjunto 113760
-- IMÁGENES ADJUNTAS --
https://foro3d.com/attachment.php?attachmentid=113756
https://foro3d.com/attachment.php?attachmentid=113757
https://foro3d.com/attachment.php?attachmentid=113758
https://foro3d.com/attachment.php?attachmentid=113759
https://foro3d.com/attachment.php?attachmentid=113760
Gracias konker. Excelente y genial forma de crear ejecutable. Nuevamente muchas gracias.
Provando Bump/normal.
Archivo adjunto 113761Archivo adjunto 113762Archivo adjunto 113763Archivo adjunto 113764Archivo adjunto 113765Archivo adjunto 113766
-- IMÁGENES ADJUNTAS --
https://foro3d.com/attachment.php?attachmentid=113761
https://foro3d.com/attachment.php?attachmentid=113762
https://foro3d.com/attachment.php?attachmentid=113763
https://foro3d.com/attachment.php?attachmentid=113764
https://foro3d.com/attachment.php?attachmentid=113765
https://foro3d.com/attachment.php?attachmentid=113766
Me encanta el efecto Bump del agua sobre todo, muy bueno, y muy profesional.
Jope, es super profesional eso, a ver cuándo llega el día que yo haga cosas así.
2cositas:
1) ¿alguien sabe cómo puedo conseguir el mapa del teclado (la tecla y u número corresondiente. Ejemplo: if keydown(número) then.), para elegir la tecla más adecuada para los programas de Blitz3d? (deseo hacerme algo más que juegos, con este programa).
2) ¿cómo podría simular un botón (del estilo widows, es decir botón-en-reposo=>botón-pulsado-ejecutar-algo). Gracias.
Esta lista tal vez te sirva, parece que faltan más, pero ahí están los más comunes.Cita:
2cositas:
1) ¿alguien sabe cómo puedo conseguir el mapa del teclado (la tecla y u número corresondiente. Ejemplo: if keydown(número) then.), para elegir la tecla más adecuada para los programas de Blitz3d? (deseo hacerme algo más que juegos, con este programa).
Gracias.
-- IMÁGENES ADJUNTAS --
https://foro3d.com/attachment.php?attachmentid=114479
Gracias.
Hola me gustaría aprender a usar al menos al 85% el Blitz3d. Tengo la versión 1.94 y de momento se hacer esto (ver adjuntos).
Si alguien me puede ayudar que me envié un mensaje a mi email: loestontitanium@gmail.com.
Posdata: yo y unos amigos hemos empezado ha crear un juego necesito un modelador 3d si a alguien le interesa que me mande un mail. Adiós, y gracias.
-- IMÁGENES ADJUNTAS --
https://foro3d.com/attachment.php?attachmentid=115849
Turriano: sobre lo que quieres hacer del botón:
Código:Global botón=loadanimimage (botón, (*.png),50,20,0,3). Global botonframe=0.
While not keyhit(1).
Cls.
X=mousex().
Y=mousey().
If mouseover(100,50,60,20)=true.
Botonframe=1.
If mousehit(1) then loquequierasejecutar().
Else.
Botonframe=0.
Endif.
Drawimage botón,100,50,botonframe.
Flip.
Wend.
End.
Function mouseover(xboton,yboton,anchoboton,altoboton).
If x > xbotón and x < (xbotón + anchoboton) and y > ybotón and y < (ybotón + altoboton).
Return true.
Else.
Return false.
Endif.
End function.
Gracias aprendiz. Lluk: un programa fácil de usar y barato, es milkhape 3d. Tienes 3d Studio Max, con un montón de tutoriales por ahí y mejor todavía es Blender, que encima es gratis. Aunque éste último tiene un, pero y es que su interfaz no se parece para nada al entorno Windows. No obstante, compensa de sobras el esfuerzo empleado, para los resultados obtenidos. Ánimo.
Bueno.(hace cuanto que no paso por aquí). Encontré este código interesante en el foro de Blitz3d. A ver si lo quieren probar. Es para juegos en tercera persona.
Simplemente crea una cámara inteligente que también reconoce si existe un objeto interfiriendo entre la cámara y el personaje y se ubica al frente del objeto.
saludos y, a ver nuevos proyectos..
-- IMÁGENES ADJUNTAS --
https://foro3d.com/attachment.php?attachmentid=116028
Esto. ¿Qué significa flip?
(Referencia de comandos en español).
flip [vwait].
definición:
En un entorno con doble buffering, invierte el backbuffer a la vista.
descripción de los parámetros:
Vwait = establece a true para esperar a la sincronización vertical para acabar.
Descripción del comando:
Cuando estés en doble buffering (o haciendo operación de dibujo en el backbuffer(), y hayas dibujado todos tus elementos) necesitarás voltear el backbuffer para que sea visible en el frontbuffer(). Este comando realiza esta función. Éste te permite dibujar muchos gráficos rápidamente y voltearlos a la vista. Mira backbuffer() para más información.
ejemplo:
Flip/backbuffer()/rect example.
Set graphics mode.
Graphics 640,480.
Go double buffering.
Setbuffer backbuffer().
Setup initial locations for the box.
Box_x = -20, negative so it Will start of screen.
Box_y = 100.
While not keyhit(1).
Cls, always clear screen first.
Rect box_x, box_y,20,20,1, draw the box in the current x, y location.
Flip, flip it into view.
Box_x = box_x + 1, move the box over one píxel.
If box_x = 640 then box_x=-20, if it leaves the right edge, reset its x location.
Wend.
Ok kluster.
Hola amigos. Hace ya bastante tiempo que no toco el Blitz, pero viendo este hilo me. Alegro me anime a reinstalar mi viejo Blitz, espero aportaros alguna ayuda a vuestro hilo.
De momento od diré que como colaboración podéis descargaros mi fuente de.
Space inavers en ni vieja web.
Vaya, el programa no me deja pegar enlace por ser mi primer mensaje.
Si buscar en google:
Fitopaisa space invader.
Te saldrá mi web, código y demás.
En el foro también podríes ver un tutorial de varibles, arrays, explicación del juego con el código por supuesto y demás funciones a modo tutorial que iré retomando y como no compartiré con vosotros.
De momento estoy con los tutoriales y códigos del principio de este hilo, me parecen muy interesantes.
Bueno, miraré más despacio el hilo ya que es bien largo. Un saludo de fito y de berdad hace tiempo que buscaba a programadores Blitz para continuar compartiendo códigos, hacéis un bueno trabajo.
Vieja prueba, que había hecho hace ya varios meses.
-- IMÁGENES ADJUNTAS --
https://foro3d.com/attachment.php?attachmentid=117986
https://foro3d.com/attachment.php?attachmentid=117987
Yo si quieres te puedo echar una manilla con el apartado 3d, me defiendo más o menos con 3d Studio Max.Cita:
Hola me gustaría aprender a usar al menos al 85% el Blitz3d. Tengo la versión 1.94 y de momento se hacer esto (ver adjuntos).
Si alguien me puede ayudar que me envié un mensaje a mi email: loestontitanium@gmail.com.
Posdata: yo y unos amigos hemos empezado ha crear un juego necesito un modelador 3d si a alguien le interesa que me mande un mail. Adiós, y gracias.
Yo, aunque no de señales de vida os leo cada día, y sigo con el tema en mis ratos libres, que ahora son pocos, salgo por la mañana a las 7:30 de la mañana y vuelvo casi a las 10 de la noche.
Aun así, espero publicar un juego que estoy haciendo con el Blitz en breve. Un saludo.
Hey juanyang es un honor verte por un hilo.Cita:
Buenas gente, he entrado por aquí de casualida. Primero me he entretenido viendo algunos dibujos hecho en 3d (son muy buenos).
Cute.
Hace unos años vi ese código tuyo que por cierto está en este ilo también.
Empecé a hacer algunos códigos, etc.
El caso es que me alaga verte por aquí. Gracias por esos códigos que has aportado, ya los descargue.
Estoy impaciente por examinarlos.
A mí me interesaría algo sobre TCP/IP.
Encontré documentación hace tiempo en inglés sobre eso.
Incluso me baje un código de ejemplo de un chat que fuenciona bastante bien.
Aunque el cñodigo para mí es algo complejo.
La idea seria abrir un chat cliente servidor para chatear.
Esa ventana seria útil para abrir una ventana en cualquier juego y mandar líneas de texto y que los clientes que estén conectados lean el chat.
Y ya de paso ya que están conectados a ese programa varios jugadores clientes aprovechar para leer las coordenadas de cada jugador eso te abriría la posibilidad de hacer un juego multijugador.
Chicos disculpad que todavía no he compartido algún código con vosotros. Este hilo es ya bien largo. Estoy leyendo despacito todo el seguimiento que habéis hecho.
Tengo algún código bien comentado para compartir.
Pero antes de subirlo leerle todo, uf bien largo.
Pero da gusto leerlo.
Tengo un buen ejemplo de gravedad, es fácil.
Un ejemplo para subir escaleras, bajarlas, caerte, etc.
De momento estoy flipando como os habéis currado la animación de barny.
Resumiendo, os estoy leyendo cada día, aunque todavía escriba poco.
Alguien me podría decir cómo puedo hacer para guardar partidas en Blitz3d, y si Blitz3d puede leer archivos de base de datos? Gracias de antemano.
Bueno aquí dejo un aporte, esta sacado de la web oficial de Blitz3d yo le hice algunas modificaciones, es una base para las personas que quieres hacer su propio juego on-line, no es gran cosa, pero bueno.
-- IMÁGENES ADJUNTAS --
https://foro3d.com/attachment.php?attachmentid=121168
https://foro3d.com/attachment.php?attachmentid=121169
Hola a todos, no sé si este es el lugar o no para hacer esta pregunta, pero bueno, si no es perdonadme. La cuestión es que estoy haciendo unos modelos en Blender y algo en 3ds Max para un videojuego. A la persona a la que se lo estoy haciendo utiliza Blitz3d y mi pregunta es la siguiente. Cuales son los pasos que tengo que dar para que los archivos lleguen perfectos para meterlos en Blitz3d, quiero decir, puedo hacer el modelo 3d, ponerle un material estándar, con una imagen en el difuso, un Normal Bump y puedo ponerle un mapa de reflejos? Y decirle que se le aplique a las dos caras? Algo más en general?
Muchas gracias antes de nada.
Hola taito. A mí el que menos problemas me ha dado es con el max, con el plugin pipeline. http://www.onigirl.com/pipeline/
con este plugin el max puede exportar directamente a formato b3d para efectos especiales yo promero.
Hago un rendertotexture, utilizando el 3dsMax o uno de los muchos que hay para ese fin.
Desde Blender lo he hecho exportadno a formato x, pero a veces desaparecen algunos vértices, bueno eso porque el modelo no era muy bueno.
Yo te recomiendo utilizar el pipeline.
Hola a todos. mi pregunta es si alguien me puede ayudar a arreglar el problema que tengo con la animación en mí juego. La cuestión es que, al empezar a correr el personaje, correr la animación, pero cuando la velocidad llega a su punto máximo la animación se traba.
Aquí dejo el juego para que lo puedan ver.
Archivo adjunto 122849
Desde ya muchas gracias. Saludos.
-- IMÁGENES ADJUNTAS --
https://foro3d.com/attachment.php?attachmentid=122849
Les dejo el mismo juego, pero organice un poco más el código y ordene los archivos en carpetas.
Archivo adjunto 122939
-- IMÁGENES ADJUNTAS --
https://foro3d.com/attachment.php?attachmentid=122939
Ya lo arregle era una tontería gracias a todos. Ahora sigo con el problema de la animación que va lenta. Saludos.
¿Alguien sabe de dónde me puedo bajar la carpeta help en español? Gracias. Nota: no tengo mula y el ares lo tengo desconectado.
Un enlace directo por favor. Que ya estuve en Blitz hispano y no va el enlace de descarga.
Hola a todos.primero, no he creado un mensaje nuevo, ya que mi duda/problema tiene mucho que ver con este mensaje, por lo que espero que no me regañen por subir un tema relativamente antiguo.
Pues bueno, yo ando haciendo un juego con un amigo, yo doy por hecho que no lo acabaremos, pero estamos aprendiendo mucho, por lo que nos lo tomamos como un auto aprendizaje.
Bueno, el es el guionista de momento, y yo ando modelando. Ya tengo algunos modelos y estaba probando de crear un pequeño programa para meterlos.
Hasta aquí perfecto, sé crear un programa para que me cargue un mapa, mi personaje, con la cámara y el movimiento del personaje tampoco tengo ningún problema.
El problema viene cuando uso las animaciones de mis modelos dentro del programa.
El tema del código creo que no tengo problemas, de hecho, el Biped se anima perfectamente, tal y como yo le digo, y como digo, el problema que tengo, es precisamente ese, el Biped se anima, pero la malla no.
O sea, si exporto solo Biped, se anima perfectamente, si exporto malla y Biped, se ve como el Biped se anima por dentro de la malla cuando éste lo traspasa, pero la malla nada de nada, y si solo exporto malla, no se anima.
Me he estado informando, y el formato (*.3ds), hace eso, exporta la animación de los huesos, pero no de la malla, pero creo, que el formato b3d, si lo hace, de hecho, en este mensaje hay ejemplo de barny, el policía de Half Life, donde lo exportan de max a b3d con el pipeline, y en el juego se les mueve la malla.
Además, encontré esto por internet, pero no entiendo lo que quiere decir con rotbone.Uso 3ds Max 9 y el pipeline para exportarlo a b3d.Cita:
Make character model.
Make texture.
Uv map texture todo character model.
Make Bones.
Rig Bones into character using skin modifier - Be careful with weighting - Read up on this maybe.
Ensure b3d pipeline is installed correctly - Not sure chek note on www.onigirl.com.
Hide any controls you dont want todo eport with the animatied Mesh.
Export b3d from max as either an animated Mesh with animation or export just the Mesh and then export the animation separately and use loadanimseque in b3d todo use them together (chek b3d docs).
Now todo get them todo animate you must animate the root - So you have todo find the root bone and tell b3d thats what you want todo use:
Animate rotbone,1,1,0,10make character model.
No sé si mi problema es que exporto mal con el pipeline.
Si alguien que lo haya hecho antes me puede explicar cómo lo hace, se lo agradecería.
Si necesitan más información, encantando de dársela. Un saludo y gracias de antemano.
Hola. Vamos gente, que no decaiga, estoy desde hace fácil 2 horas leyendo este hilo, desde el principio hasta el final. Es increíble como han progresado en todo éste tiempo, y espero que lo sigan haciendo.
Me baje el 99% de todos los archivos adjuntos, y ahora con todo eso que recopilé trataré de iniciarme en éste mundo del 3d, aunque estoy comparando con lo que me acuerdo del 2d en otros lenguaje (div, Fenix) y no es ni parecido, pero bueno, espero agarrarle la mano ya que el mundo tridimensional me encanta.
Les mando un saludo para todos y espero que sigan así.
Que no, que no decae. Yo sigo entrando y saliendo de el y sigo aprendiendo, además de estar en otros foros, como ideas4allcom.
Lo que ocurre, es que no he hecho nada practico en concreto.
Para poner tonterías no pongo nada, pero en cuanto tenga un proyecto decente, lo publicaré.
Palabra de turriano.
Por cierto, que si alguien tiene páginas o algún forro o blog sobre el tema, creo que le daría más vidilla a éste foro.
De todas las formas pretendo utilizar este foro para plantear mis dudas y demás. Recién me inicio con Blitz después de mucho tiempo, yo tenía un código, que se había subido a tutorialgames, net o algo así, pero ya no está más online.
Ánimo gente, están muy buenos los ejemplos que han publicado durante todo este tiempo.
Espero que sigan así, y si alguien tiene ganas de explicar para ayudar a los muy novatos bienvenido sean. Un saludo.
Hola a todos aquí. Ante todo quisiera presentarme. Soy cubano y he estado siguiendo este foro desde la 1era página me he pasado varios días leyendo cada publicación que han hecho y como han venido conformando poco a poco algo más genuino y complicado con cosas muy sencillas en el mejor sentido de la palabra, aquí tengo internet en un horario porque estudio en la universidad y aquí no hay servicio de internet a domicilio, si alguien pudiera publicarme aquí la última versión del Blitz 3d para descargarlo, además de los pluing que utilizan para el trabajo de gráficos y demás cosas. De veras quisiera agradecer la desinteresada ayuda de muchos de ustedes de los que más cosas he leído y de los que más cosas publican aquí, pero si lo hiciera y se me quedará alguno fuera no me lo perdónaría así que, para no ofender a nadie pues mis más sentidas gracias por todo el esfuerzo que hacen para mantener vivo este sitio.
Hablando de lo que me trae a este foro pudiera decir que quiero realizar una aplicación que haga un recorrido virtual por los centros históricos más importantes de mi país, quiero comenzar por la parte central que es donde estudio y donde vivo, para ello tengo algunos amigos que están estudiando arquitectura que me ayudan con el modelado de las zonas, yo hago mis aportes, pero estoy desnudo en el 3ds Max, trabajo el AutoCAD, pero no me gusta usarlo para estas cosas, no soy ciego y veo la superioridad en el 3ds Max, quiero comenzar a aprender lo mínimo para después ir complicándome más, por ahora quiero dedicarme a aprender bien el Blitz 3d y esto que han hecho aquí si lo recopilaremos seria el mejor libro de Blitz 3d jamás editado, la revista que publican esta divina, la comparto con mis amigos aquí en Cuba, aunque a veces pesa un poco y aquí la internet es muy lenta e intermitente. Bueno creo que me extendido un poco, después quisiera contactar con alguien que se dedique a hacer modelos en 3dsMax para que me de algunas ideas o a alguno de mis amigos para hacer un pionero cubano, es decir un escolar cubano, de primaria y secundaria. Gracias por los aportes o, k. Muy buenos.
Hola la última versión de Blitz3d es la 1.99, para tener la versión oficial lo haces en su web, es muy económico comparado con otros sistemas, pero si le metes ganas puedes hacer algo muy bueno.
Sobre una comunidad, para hablar sobre el tema tengo esta http://www.blitz3dspanish.com.ar y esta naciendo hasta ahora.
Ok, ok, ya pongo el enlace a los foros (administrador).
En la actualidad existen librerías externas que son de pago y otras gratuitas que expanden su funcionalidad, yo por ahora tengo pensado hacer un videojuego de coches. Un saludo.
Gracias amigos ya me descargue con un poco de trabajo el Blitz 3d, hacia unos cuantos días que estaba detrás de el, ustedes no se imaginan lo difícil que es aquí en Cuba descargar un programa, que no sea freeware. Ahora a ver cada cosa que han publicado aquí desde el 2008 que nostalgia debe darle esto a los que como Cibertronic han estado desde el comienzo de este gran proyecto, porque así es como lo denomino, proyecto conjunto Blitz 3d, más que una comunidad hemos fundado una familia de amigos creadores de sueños. De veras muchas gracias por ser así. Más adelante de seguro les pediré ayuda con las cosas que quiero hacer. Por ahora los dejo estoy en el último año de mi Carrera [5to] ing. Civil y estoy haciendo la tesis. Gracias de nuevo, nunca dejare de agradecerles.
Me parece una muy bonita idea thrall. Ahora mismo estoy algo liado, pero en cuanto, pueda, no dudes que haré lo posible por echarte un cable en lo que pueda.
Tengo personajes, vehículos y muchas cosas que podrás incorporar a tu trabajo. Saludos.
Buenas alguien sabe sobre alguna librería para utilizar base de dato en Blitz3d.
Que clase de base de datos quieres manejar, si no estoy equivocado se pueden crear en texto plano introduciento datos línea por línea, eso es manejo de ficheros.
Ok mira ya encontré algo: http://repeatuntil, online.fr/etna/. O busca este pack blitzxml v1.71. También te respondí en la comunidad de blitz3dspanish. Un saludo.
¿Con read-data?
Pero al hacerla en texto plano cualquier usuario podría modificarla y yo la necesitaría para que desde ay me cargue los mundo, cuentas de usuario, las Quest, las coordenadas de los NPC.
Hola amigos, tengo una duda muy sencilla, pero no sé que será, estoy tratando de cargar un modelo 3d en extensión *.b3d, pero cuando, por ejemplo, pongo este código me dice que la entidad no existe, por ejemplo.
Terreno= loadmesh( terreno, b3d).
Entitytype terreno,2.
Entonces veo ejemplos que lo utilizan y no me corren, por ejemplo, he descargado miles de ejemplos de aquí de este foro y el ejecutable que tienen esta perfecto, pero el.bb no me corre, no sé si será problema del programa o de que será. Gracias a todos por su ayuda.
Estoy comenzando en esto de la programación y tengo algunas dudas mas:
1- Esta es la forma de iniciar una variable con algún valor? Sp#=0.3.
2-como le doy a la variable el tipo de dato que guardara?
Hola bueno, para el primer paso el caso es que el modelo debe estar en la carpeta dónde está el respectivo archivo.bb, de lo contrario te dirá que no existe el modelo, otra cosa que veo es que el identificador del modelo dentro de las respectivas comillas no debe contener espacio. Terreno, b3d terreno, b3d.
Con respecto a las variables en lo básico existen tres tipos de datos que se pueden almacenar en las variables, por defecto es un número entero.
Vida_jugador = 100.
Se puede usar este identificador para decirle que es un número entero %, pero por ausencia del mismo se entenderá que es un número entero.
Las otras variables son números decimales o flotantes.
Dinero_jugador# = 100.5.
Y la otra es tipo cadena, dato que se le indica a la variable mediante $.
Nombre_jugador = yue.
Las cadenas, aunque sean números no se pueden realizar operación matemáticas.
Telefono_movil$ = 3155256636.
Edad$ = 31.
Print telefono_movil + edad.
El resultado en pantalla es la concatenación del valor de las dos variables, por lo tanto lo que se muestra en pantalla es:
15525663631.
Los identificadores para indicarle el dato que contendrá la variable solo es exclusivamente cuando se declara, por lo tanto si hablamos de variables existen dos tipos locales y globales.
Bueno eso es todo.
Hola amigo, gracias por las aclaraciones, todo lo que pasaba era cuestión del programa, como sabes soy de aquí de Cuba y aquí la internet es un gran problema, yo soy estudiante y gracias a eso tengo la posibilidad de tener acceso a ella, de ella descargue el software Blitz3d, pero con la demo que antes había descargado el código si funcionaba, es decir la demo reconocía la entidad, pero el full no, entonces busque un poco en la internet y con la instalación venían unas updates que tenía que instalar para que el mismo corriera a toda su plenitud. De todas las maneras un millón de gracias. Necesito si alguien sabe o tiene o ya hizo o le es fácil hacer, que me faciliten un modelo 3d lo más detallado posible de un bulldozer. Gracias.
Posdata: gracias especiales para ti Blitz3d. Ah tengo otra duda cuando compilo existe alguna opción para cambiar el icono con que se crea el ejecutable?
Alguien que pueda subirme un enlace directo de descarga para el pluing ese de 3dsMax para combertir en *.b3d, que mi internet es muy restringida.
Posdata: por favor que sea gratis que el acceso que tengo a internet es limitado, pero bueno gracias que puedo acceder a el ok. Gracias a ustedes familia por cooperar.
Ok me alegra que hayas resuelto el inconveniente, si como veraz tenias la demo, esa es muy restringida. Bien para cambiar el icono existen dos formas una es a fuerza bruta usando un programa llamado resourcehacker con el que abres el ejecutable final y le cambias el icono, la otra forma es con una librería externa llamada da séticon.
Cualquier duda me comentas y te ayudo ok.
Sobre el plugin creo que se llama pipeline, pero yo uso un programa llamado Milkshape que no es muy pesado y tiene esa opción, por otro lado, Blitz3d recibe en formato (*.3ds), o x también.
Sobre el modelo si deseas dibujarlo de frente, y de lado y yo te lo modelo, eso sí no se mucho de texturas, pero te puedo dar el modelo como tal. Un saludo.
Hola aquí está http://www.TurboSquid.com/3d-models/...d-model/195946 es gratuito. Un saludo.
Amigo gracias de veras, estoy más que agradecido por su ayuda. De veras un millón de gracias, a medidas que vaya adelantando en el proyecto se lo iré publicando aquí para que vaya viendo y así de paso si no conoce Cuba al menos lo hagas por este medio de lo digital. Y la historia del che aquí en Cuba.
Nueva actualización para Blitz3d, http://Blitz Basic.com/community/men...hp?Topic=89691, las funciones que encontramos son compilación en sistemas operativos de 64 bits, y corrección de multitud de errores, esa noticia es de hace un mes. Un saludo.
Hola, aquí quiero compartir una herramienta que más de una vez me ha sacado de apuros, su funcionalidad es crear mapas de luz, pero que es un mapa de luz? Bien el ámbito de los vídeo juegos, se utiliza efectos de luces estáticas, esto es para simular las sombras de un edificio, elementos en un interior de una habitación, sería no muy incorrecto usar luces dinámicas para este propósito con lo cual se desperdicia recursos. Por lo tanto, los mapas de luz son más que texturas que hacen de sombras, en Blitz 3d se puede establecer esto gracias a que tiene la opción de multitextura, pero este programa lo que hace es que toma un modelo y transforma la textura con las sombras incluidas, acepta b3d,3ds y otros tipos de modelos.
El programa es gratuito y su última actualización es del 2009, los creadores tienen un plugin para 3ds Max para abrir arhivos b3d. Un saludo.
Bueno otro aporte, ¿cómo hacer sombras en Blitz3d sin usar libreríasí pues bien les pongo a disposición las funciones necesarias para hacer eso de sombras dinámicas que en muchas ocasiones deseamos que sea mucho más fácil, pues no te has pillado el ejemplo de Blitz3d.
Todas las funciones están respectivamente encapsuladas, así que, te evitara el trabajo duro.
Así que no seas flojo y para sombras estáticas usa mapas de luz.
https://www.foro3d.com/images/upload...2010/06/61.jpg
-- IMÁGENES ADJUNTAS --
https://foro3d.com/attachment.php?attachmentid=134027
Hola a todos. Antes de nada agradeceros a todos vuestro desinteresado trabajo y esfuerzo. Espero no desviar el tema del mensajes. Estoy siguiendo un curso que salió hace varios años, y que imagino que todos conocéis sobre Blitz 3d en el que hay que crear un juego de una bionave, pues mi problema es que, al intentar texturizar la nave no lo consigo a pesar de tener el Deep pain3d, pero al parecer es una versión posterior y no tiene incorporado el mercatoruv que es el que se usa para mapearlo en el curso para luego pintar sobre la malla con el Deep pain3d, mi pregunta es la siguiente: se puede crear la nave con el 3dsMax y texturizarla y posteriormente usarla en Blitz3d? O cómo puedo hacerlo para mapearla con el Deep Paint sin el mercatoruv? Gracias de antemano.
Promedi.
-- IMÁGENES ADJUNTAS --
https://foro3d.com/attachment.php?attachmentid=135702
Hola se de que curso hablas, es uno de 20 capítulos si te falta algo del curso me avisas yo lo tengo completo.Cita:
Hola a todos. Antes de nada agradeceros a todos vuestro desinteresado trabajo y esfuerzo. Espero no desviar el tema del mensajes. Estoy siguiendo un curso que salió hace varios años, y que imagino que todos conocéis sobre Blitz 3d en el que hay que crear un juego de una bionave, pues mi problema es que, al intentar texturizar la nave no lo consigo a pesar de tener el Deep pain3d, pero al parecer es una versión posterior y no tiene incorporado el mercatoruv que es el que se usa para mapearlo en el curso para luego pintar sobre la malla con el Deep pain3d, mi pregunta es la siguiente: se puede crear la nave con el 3dsMax y texturizarla y posteriormente usarla en Blitz3d? O cómo puedo hacerlo para mapearla con el Deep Paint sin el mercatoruv? Gracias de antemano.
Promedi.
Bueno el caso es que la nave si se puede modelar en 3dsmax, pero con la versión 5 o 6 o 7, para usar el plugin pipeline, para exportar al formato nativo de bltiz3d (b3d), pero eso no es problema puedes modelar en una última versión pues Blitz soprotagonista formato (*.3ds), x y obj.
Sobre el prorama, bueno yo hice lo siguiente cuando hice ese curso, tome el Milkshape modele una nave, y las texturas las hice con Coreldraw.
Así que ya miro tu nave. Un saludo.
Ok me he pillado tu nave, yo la verdad no soy un experto en 3dsmax pero si me defiendo muy bien con el milkshape3d, la idea es que puedes dejar la nave con materiales, colores plateados o los que quieras, pero en materiales, así te evitas la texturizada, por el contrario si deseas texturizara toca echarle mano a otro programa externo como Corel Draw, hacer las texturas y ponérselas a la nave, otra cosa es que Milkshape exporta b3d.
Bueno un saludo.
Gracias Blitz3d por contestar y perdona mi ignorancia, pero para crear las texturas con Corel tengo que crear una para cada elemento de los que la nave está formada o puedo crear un bitmap con todas las texturas y aplicarlas a la vez, estoy un poco verde con el tema de las texturas.
He intentado mapear la nave para crear un mapa y poder pintar en un bitmap solo, toda la nave tal cómo está en el ejemplo del curso y no he podido crear el dichoso mapa, pero si me explicas lo de Corel seguro que lo consigo, pues el Corel lo toco bastante bien. Gracias.
Lo puedes hacer de juntas formas, te repito yo lo he realizado en Milkshape, veo que tú nave este agrupada en superficies, o sea partes, pero no uses bmp, si no más bien (*.png), ocupa menos espacio y tiene la misma calidad de un bmp.
Entonces lo que tienes que hacer es en un solo (*.png), dibujar las partes de la nave, alas, turbinas etc, y luego acomodarlas al modelo.
Cualquier inquietud me avisas.
Gracias Blitz3d he seguido tu consejo y lo he texturizado con Milkshape y guardado en la misma carpeta que el modelo con las texturas *.tga y funciona bien.
Bueno ahora seguiré con el resto del curso. Gracias.
Oye, una pregunta que versión tienes de Blitz3d? Yo tengo la 1.105.
Si lo acabas ya nos lo enseñaras. Yo empecé el curso, y lo dejé porque ahora estoy con un grupo diseñando otro videojuego, pero tengo pensado continuarlo una vez tenga algo de tiempo, ya que lo poco que hice me aprecio muy interesante. Un saludo y suerte, y espero verte publicar por aquí.
Blitz3d tengo la 1.98, he estado intentando bajar la 1.105 pero no lo he conseguido, te agradecería que me dijeses donde conseguirla, pues tengo entendido que soluciona algunos bug anteriores y trae algunos comandos nuevos.Cita:
Oye, una pregunta que versión tienes de Blitz3d? Yo tengo la 1.105.
Xarpo, muchas gracias por tus ánimos espero acabarlo y mejorarlo pues la intención que tengo, es de cambiar algunas cosas para mejorarlo y hacerlo con más jugabilidad, pues desde que el curso salió los ordenadores son más potentes y se les puede exigir más y lo cierto es que el curso está muy bien pues te enseña a hacer un juego desde cero creándote tu los gráficos los sonidos y la programación, personalmente creo que está muy bien, aunque yo personalmente habría creado otro juego tipo shooter, pero bueno lo importante es coger una buena base y lo demás vendrá después. Saludos y gracias.
Hola a todos soy nuevo por aquí y necesito un favor de quien pueda ayudarme, el hecho es que estoy muy interesado en el desarrollo de videojuegos, y he hecho hasta lo imposible por descargarme cualquier versión del Blitz3d, pero no puedo, en mí país descargar algo de rapidshare y Megaupload es imposible, al igual que 4shared pues los dos primeros nunca comienzan a descargar y 4shared lo hace y después quita la descarga, necesito alguno de ustedes que pueda subirme la versión que tengan del programa a mediafire pues es el único que hasta ahora se ha comportado bien, se los agradecería mucho, y así podría interactuar con ustedes aquí en el foro. Gracias de antemano.
Agregame al MSN.
Brother aquí no podemos usar ningún tipo de Messenger.Cita:
Agregame al MSN.
iris3d@hotmail.es.Cita:
Brother aquí no podemos usar ningún tipo de Messenger.
Hola a todos. Según kbzon_v8 y acabo de verlo yo también con cierto asombro que el plugin para 3dsMax 9 pipeline. Para lsok no lo conocen este plugin permite exportar las escenas, las animaciones y todo neustro trabajo de 3ds Max a formato b3d.
Ya no está disponible (el parche para mnax 9).
Este plugin es mi favorito.
Ya que con max es super fácil realizar neustrs mundos y exportarlos con u nsolo clic.
Esperemos que lo haya nquitado para poner uno mejor pero mientras tanto les dejo aquí el plugin.
-- IMÁGENES ADJUNTAS --
https://foro3d.com/attachment.php?attachmentid=136242
Grande Jorge. No sabes cómo te lo agradezco, lo busque por todos lados, lástima que no haya uno para el 3dsMax 2010, pero bueno ya es algo.
A ver si reanimamos este foro así llegamos lejos. Saludos.
Es una gran noticia, pues vemos que Blitz3d desde su perspectiva es una gran herramienta que, aunque usa DirectX 7, siempre va en auge de la mano con 3ds Max, ya que se puede crear un pipeline actualizado y corroboro que funciona perfectamente.
Posdata: si deseas DirectX 10 en Blitz3d, una opción es xors3d, o simplemente manejar las DirectX con librerías externas desde desde lenguajes de programación como c/C++. Saludos.
Hola aquí les pongo un código abierto de Blitz3d que se usa para crear terrenos, sin librerías externas.
https://www.foro3d.com/images/upload...2010/08/48.jpg
https://www.foro3d.com/images/upload...2010/08/49.jpg
https://www.foro3d.com/images/upload...2010/08/50.jpg
Descargar de la web oficial de Blitz3d. http://www.blitzBasic.com/community/...hp?Topic=84809. Un saludo.
Sólo me sale una palabra: Preciosos.
Liberacción del código fuente del envoltorio de física para Blitz3d, denominado PhysX Wrapper. El autor xors3d team, a anunciado que el proyecto se abandono debido a que el equipo de trabajo se centra en desarrollar la física para su motor denominado xors3d que en un comienzo era un complemento de Blitz3d y por lo tanto el código es liberado para que otros usuarios continúen con el proyecto, esto implica que toca programar en C++, algo que no es apetecido por la mayoría de usuarios noveles.
Yo por mi parte estoy en tramites para ver si puedo liberar mi key, y entregar la (*.dll) a otros usuarios que no quieran copilar el código por falta de conocimientos de programación. Un saludo.
Código fuente aquí:
Mycop.xors3d.com/public/pxw/physxwrapper, zip.
Hola, no sé si alguien continua este tema, la verdad que soy nuevo en el foro, pero tengo bastantes conocimientos de Blitz para responder casi cualquier duda creo.
Pero tengo una pregunta, a ver si alguien puede responder.
Cuando cargas en bliz3d una textura : textura = loadtexture (prueba.jpg).
Luego la borras : fretexture textura, no ocurre nada,xd, el caso es que, si haces este proceso un número de veces, Blitz da un fallo, y es memory Access violation. El juego que estoy haciendo necesito liberar memoria, ya sea con frentity enemigo, o fretexture para cargar nuevos niveles, pero al llegar un número de veces da ese error, si alguien pudiera solucinarme este problema le estaría muy agradecido.
Hola la textura se elimina de la memoria, más no visualmente del objeto donde se encuentra la textura, por ejemplo, tienes un cubo texturizado, y si has eliminado la textura de la memoria no podrás texturizar otro cubo con ese mismo identificador que apunta a la memoria, ya que la textura no está, aunque si la puedas ver sivualmente.
Como compruebas lo que te dijo? Sencillo usa el comando availvidmem() que te regresa la memoria disponible en tu ordenador y al liberar la textura dependiendo del tamaño de la misma veraz un aumento en la memoria disponible.
Lo del error sucede efectivamente por que has eliminado de la memoria la textura, esto si lo haces en modo de depuración no te dirá memory acces violation, si no que la textura no existe.
Ahora bien si eliminas unas entidades para dar paso al siguiente nivel, debes tener en cuenta que debes cargarlos de nuevo ya que no están en la memoria del computador y no tienen identificador para recuperar sus datos.
Otra cosa depende de qué versión que estés usando de Blitz3d, la versión actual va por la 1.106 y para evitar confusiones de la versión 1.99 paso a la 1.10.
Aprovecho para mostrar mi proyecto que hago cada vez que me prestan un computador.
https://www.foro3d.com/images/upload...2010/12/49.jpg
Edito: otra cuestión es que cuando carges de nuevo entidades para otro nivel no lo hagas con el mismo identificador, por ejemplo, hazlo de esta manera:
Código:enemigo_nivel1 = loadmesh(enemigo.3ds).
Enimigo_nivel2 = loadanimmesn(enemigo.3ds)
Muchas gracias, me ha servido mucho, al final la solución era la versión como dijiste, el error lo da con la última versión de blizt, sin embargo, instale la 1.90 y nunca falla, gracias. Y ahora tengo una nueva duda.
Como puedo hacer (con Milkshape o con lo que sea, yo uso Milkshape) para exportar transaparencias de textura a un.b3d. En el Milkshape cargo una textura (*.png) con transparencia a un plano (para hacer un árbol) pero al exportarla a Blitz 3d me sale sin transparencia. Además, sé que se puede acer porque he descargado un.b3d con dos texturas apartes y al cargarlo contiene transparencias, pero quiero saber hacerlo yo. Bueno, si alguien sabe muchas gracias de antemano.
Hola, el tratamiento de transparencias se puede hacer directamente desde 3dsMax (un ejemplo) donde al cargar el Mesh en Blitz salen automáticamente, por el contrario en Milkshape, se debe filtrar la textura con un flag.
Por ejemplo, tenemos un árbol, cuya textura de las hojas es hojas, (*.png), esta textura debe tener un canal alpha o una maskara, si es un canal alpha antes de cargar el Mesh se pone esto.Cita:
Texturefilters hojas, (*.png),2.
Muchas gracias Blitz3d, pero eso ya sabia, el caso es que, ahora encontré un programa que permite exportar a.b3d añadiendo los flags que me comentas e incluirlos directamente en el.b3d. El programa se llama gile[s], un poco difícil de encontrar, pero lo dejo aquí:http://www.frecle.net/index.php?Show...s&sub=download.
Es muy bueno a mi parecer, porque no necesitas escribir nada de código en blizt, tan solo cargar el.b3d, y con el se cargaran todas las transparencias, planos vistos por las dos caras (para árboles.) iluminaciones, varias capas de textura, todo en un solo.b3d. El nuevo problema que tengo ahora es que el.b3d exportado por dicho programa, no sé porque, pero no permite colisiones el modelo a polígono, si a esfera, pero si tengo un personaje con entityradius y un terreno exportado desde gile[s], pues no puedo hacer que el personaje colisione contra el terreno (polígono), es un gran problema, pero ando buscando si puedo solucionarlo ya que sin ese fallo, este programa es perfecto para texturizar.
A, y como haces para exportar desde max a.b3d y cargarlo directamente, que intente con el pipeline, pero no me funciona, eso sería de gran ayuda.
Hola de nuevo Blitz3d, ya he conseguido instalar el pipeline rebuscando por el hilo, pero me sigue ocurriendo lo mismo que con el giles, al exportar el.b3d, luego las colisiones a polígono no funcionan, sabes cómo solucionar esto?
Si giles es genial para hacer mapas de luz, es su especialidad y lo más importante es que es gratuito, el problema de las colisiones es el mapeado UV, entonces lo que sucede es que el modelo tiene varias texturas. El truco para esto que yo encontré es que el modelo tenga una sola textura y de esta manera si funcionado, por el contrario si tiene varias texturas es hacer otra copia del elemento y usar ese para las colisiones ocupando el mismo espacio y este estaría invisible, pero solo sería la malla.
https://www.foro3d.com/images/upload...2010/12/33.jpg
Gracias por la respuesta Blitz3d, pero estuve haciendo varias pruebas, porque el giles lo encontré (*.ace) poco, (ya veo que tú no,xd), y si cargo un modelo.b3d exportado del giles con loadmesh, no ai problema para colisiones. Si lo cargo con loadanimmesh para recoger coordenadas de los joints, o para animarlo simplemente, entonces es como si la malla no existiera, ya que ni colisiones de polígono funcionan, ni tampoco comandos de malla, como getsurface.
Lo que me dices de las texturas no lo entiendo muy, allá (ya te digo que soy nuevo en el giles) si pudieras explicarme también lo del mapa de luz, y cómo funciona, y como cargarlo en blizt, sería una gran ayuda. Yo para dar luz falsa a los modelos uso Mesh Light en blizt, pero sería bueno saber usar el mapa de luz. Cuando exporto en.b3d desde giles, me da la opción de guardar el mapa de luz, pero como te digo no sé cómo se modifica, ni cómo cargarlo. Gracias de antemano, me ayudas mucho.
Hola de nuevo, tengo un problema a ver si alguien sabe cómo puedo hacer. Necestio exportar desde giles un modelo con mapa de luz, texturas etc, pero conservar la animación que ice desde Milkshape. Como puedo hacer para tener un.b3d animado y además texturas, transparencias etc?
Muy buenas a todos alguien sabría decirme con qué programa puedo hacer terrenos con su vegetación y como cargarlo en Blitz3d.
Buenas a todos, gran hilo. Hace un par de años lo seguí desde que empezó y comencé a hacer un juego de coches, no lo terminé porque no tenía ordenador suficiente se me ralentizaba y me desmoralicé. Al cabo de dos años me ha picado el gusanillo otra vez y lo he retomado, bueno más bien he empezado de nuevo porque perdí las fuentes. Ahora ya está muy avanzado, aunque sólo tengo un circuito hecho o casi hecho, pero el online funciona de lujo hasta 16 jugadores, por lo menos en local no he podido probarlo todavía con gente que no comparta mí mismo router. Por cierto, no tengo ni idea de modelar, he usado el Google SketchUp para todo ya que exporta.3ds, el lenguaje lo conocía un poco porque tuve un amiga y hacía algún juego en amos basic que creo que es del mismo creador que el Blitz o por lo menos se parece enormemente.
Os dejo el enlace para que podáis ver el juego: http://www.racerphysics.com.
Muy bueno el juego, intenta mejorar las texturas del escenario, si puedes cambia el menú del principio, intenta meter un menú con imagen de fondo y demás que se vea mejor, porque que se vea así, como el símbolo del sistema, vamos, queda un poco cutre, si funciona lo del online, mi enhorabuena, solo mejoraría la forma de unirse a los servidores, es poco intuitivo para el usuario, si complica eso demasiado la cosa, intenta que en el menú del servidor este a la vista en una esquina la IP, para que sea accesible y no tenga que ponerse a buscarla el usuario para pasarsela a los amigos con los que va a jugar.
Un gran trabajo el que has hecho.
Gracias por el comentario, sobre las texturas, intentaré mejorarlo ya que me tengo que hacer muchos circuitos, las que he usado ahí son las que vienen por defecto en SketchUp, hierba, tierra, etc. Sobre el menú principal lo tengo en tareas pendientes todavía queda mucho trabajo, el online funciona perfectamente lo he probado ya con varios ordenadores, el sistema de conexión a otras partidas mi idea es tener un archivo colgado por la red, en el cual el juego pueda consultarlo para ver las partidas disponibles y si me ánimo un poco más una base de datos estaría bien para guardar las vueltas rápidas, resultados de carreras y esas cosas y poder ir descargando los nuevos circuitos.
Genial el juego, esta trabajado, ya me gustaría a mí saber programar todo eso. El tema gráficos es lo de menos, ya los mejoraras más adelante.
Eso sí, podrías ponerle un poco más de velocidad al coche.
Pero enhorabuena, sobre todo ves pasándonos tus avances.
Ya hay un menú gráfico, gracias a la librería etna, se pueden guardar las vueltas rápidas en un hosting con mysql. Por cierto, el que hace de server debe tener el puerto 6500 abierto.
Descarga -> http://www.racerphysics.com.
-- IMÁGENES ADJUNTAS --
https://foro3d.com/attachment.php?attachmentid=141718
Hombre, si somos casi vecinos. Me gusta la gente que bien poco, y hace mucho. Enhorabuena por el juego. Saludos.
Buenas a todos, estoy interesado en realizar un juego de estrategia, y mis dudas son las siguiente:
¿Qué es más fácil hacerlo 2d estilo age of empire o 3d estilo Warcraft 3?
¿Y si alguien tiene algún ejemplo de seleccionar un objeto ya sea 3d o 2d y que este se mueva?
¿Cómo podría hacer para limitar mi mapa?
Bueno ya tengo solucionado lo de seleccionar un objeto, quizás no sea la mejor forma, pero bueno por ahora me vale y estoy contento. Aquí dejo el código por si alguien le pudiera interesar, o ve alguna forma de hacerlo mejor que me lo diga.
-- IMÁGENES ADJUNTAS --
https://foro3d.com/attachment.php?attachmentid=142011
Me sirve para mí juego, concretamente en el menú de introducción donde las letras son entidades 3d, lo tengo por coordenadas del ratón en 2d, pero al cambiar de resolución, cambian ligeramente las posiciones 3d.
Interesante tu proyecto, ánimo, ya llevas 74 líneas de código, yo llevo algo más de 5000 y cuando no salen las cosas te da bajón, pero al final se consiguen. Si quieres ver los avances de mi juego están en http://www.racerphysics.com.
Si tienes dudas y puedo ayudarte en algo ves publicando.
Ya que lo dices si tengo una duda, y es que no consigo que cuando clickeo un objeto me salga una imagen y esta se mantenga, solo se ve la imagen cuando pulos, pero al instante desaparece.
Código:If mousehit (1) = true then.
Pickeentity = camerapik (Camera,mousex(),mousey()) tif pickedentity()=castillo then t entitycolor castillo, 255,0,0 drawimage guerrero_ico,413,375 tendif t.
Else tif pickedentity()=Terrain then t entitycolor castillo, 255,255,255 tendif t.
End if.
Hay muchas maneras de hacerlo, depende de cómo te quieras organizar, la más sencilla es: If mousehit (1) = true then. Pickeentity = camerapik (Camera,mousex(),mousey()) tif pickedentity()=castillo then t entitycolor castillo, 255,0,0 imagenguerrero=1 tendif t.
Else tif pickedentity()=Terrain then t entitycolor castillo, 255,255,255 tendif t.
End if.
If imagenguerrero=1 then drawimage guerrero_ico,413,375.
Luego cuando selecciones otra imagen debes poner:
Otraimagen=1.
Imagenguerrero=0.
Muchas gracias, no se me hubiera ocurrido eso en la vida, por cierto, no tendrás una ligera idea de cómo hacer para limitar la cámara para que no se salga por los lado del mapa, y la forma de hacer un minimapa.
La programación no es mi fuerte yo soy más de gráficos.
Tienes unas funciones para controlar las entidades, como entityx(), entity(y),entity(z), sólo tienes que poner, por ejemplo:
If entityx(tucamara)>300 then translatentity tucamara, entityx(tucamara)-1,0,0.
El -1 posiblemente te haga mucho rebote, lo vas cambiando y probando hasta que no notes rebote. Como todo hay muchas maneras de hacerlo, este es sólo un ejemplo.
Gracias de nuevo, voy a probarlo. Por cierto, si te te puedo ayudar en hago en tu proyecto solo tienes que pedírmelo, al modelo o algo.
Ya lo probé, pero cuando llega al límite no sé dónde me manda la cámara, pero se ve todo negro, voy hacer a lo bestia y voy a crear un cubo gigante y ponerlo con colisiones hacia la cámara.
Hay alguna forma de crar un minimapa como este:
Archivo adjunto 142103
No se me ocurre ninguna idea la verdad.
-- IMÁGENES ADJUNTAS --
https://foro3d.com/attachment.php?attachmentid=142103
Yo lo tengo en tareas pendientes, tengo que hacer un minimapa con los coches, supongo que, los tiros irán como adaptar el juego a todas las resoluciones, veras yo lo tengo todo diseñado para una resolución de 1280x800, pues en todas las coordenadas hago lo siguiente:
Global puntero=loadimage (osd/puntero, bmp) tmaskimage puntero,0,0,0 tximage=imagewidth(puntero) : yimage=imageheight(puntero) tresizeimage puntero, (ximage*gráficosx)/1280, (yimage*gráficosy)/800.
Drawimage marconombre, (920*gráficosx/1280), (220*gráficosy/800).
Todo esto cada vez que sale una coordenada que influye directamente con la resolución siendo gráficosx, gráficosy la resolución seleccionada.
No lo que me quieres decir, pero en tu caso si es un juego 3d puedes utilizar el comando cameraproject o algo así se llama para hacer el mapa, yo mi juego es en 2d y a mí no me vale, gracias de todos modos.
Por cierto ¿no sabrás alguna forma de empaquetar los archivos? Para que nadie los pueda modificar yo encontré el pakmaker empaqueta de miedo, pero el fallo que no es capaz de cargar los ficheros con el comando include.
Nueva versión disponible, v0.53 que incluye:
-Soporte para pad analógico/digital.
Mejorado el menú opciones.
Añadido compuestos blandos/duros.
Añadida opción de cambio manual/automático.
Mejoras notables en el osd.
Calculo de vueltas con el combustible restante.
Descarga-> http://www.racerphysics.com/download...hysics0.53.rar.
-- IMÁGENES ADJUNTAS --
https://foro3d.com/attachment.php?attachmentid=161435
https://foro3d.com/attachment.php?attachmentid=161436
Falco en hora buena se ve muy bien. Puedes mejorar el cielo haciendo un cubico, ya que se ven la unión de las caras de los cielos, no recuerdo bien debes aplicar unos flag a las texturas.
Creo que hace falta sombras. Un saludo.
Usa el packmachine te permite cifrar datos de hostia, es una lib free.Cita:
No lo que me quieres decir, pero en tu caso si es un juego 3d puedes utilizar el comando cameraproject o algo así se llama para hacer el mapa, yo mi juego es en 2d y a mí no me vale, gracias de todos modos.
Por cierto ¿no sabrás alguna forma de empaquetar los archivos? Para que nadie los pueda modificar yo encontré el pakmaker empaqueta de miedo, pero el fallo que no es capaz de cargar los ficheros con el comando include.
Falco sobre el cambio de resoluciones donde se mueven las imágenes, usa como partida la mitad de la pantalla tanto en altura como en anchura, por lo tanto al cambiar la resolución no se verá afectado.
Por ejemplo:
Al realizar esto el cambio de resolución no afecta los objetos que uses en el menú.Código:drawimage imagen,graphicswidht()/2-200,graphicsheight()/2 +200
Gracias Blitz, en cuanto al tema de las resoluciones no tengo ningún problema con el 2d, usé en su día una simple regla de tres, con resize image y drawimage y me va perfecto, el único problemas es el 3d, el menú de introducción los textos son entidades 3d, para así poder hacer los efectos de girar las letras, y cuando pasa el ratón por encima se iluminan y caminan hacia adelante, ahí está el problema uso un simple recuadro de coordenadas x, y para detectar la posición del ratón, pero cuando cambia el aspect ratio de 16:10 (que uso por defecto) a otro las letras se desplazan un poco hacia abajo por lo tanto se activan cuando el ratón pasa ligeramente por encima de lo deseado.
Bueno aquí pongo un código bastante interesante como crear el efecto blur.
Un saludo.Código:initgraphics(1024,1024). Global light = createlight().
Global Camera = createcamera ().
Positionentity Camera,0,1,-5.
Camerarange Camera.001,100.
Createplane ().
Local Cube = createcube ().
Positionentity Cube,0,1,0.
Rotateentity Cube,30,40,0.
Local overlay = createquad(1,1,-1,Camera).
Positionentity overlay,0,0.5.
Entityalpha overlay.8.
Local texture = createtexture (1024,1024,1+16+32).
Entitytexture overlay,texture.
Loockbuffer texturebuffer(texture).
For y = 0 todo texturewidth(texture)-1 tfor x = 0 todo textureheight(texture)-1 writepixelfast x y,0,texturebuffer(texture) tnext.
Next.
Unlockbuffer texturebuffer(texture).
Rendertexture (texture).
While not keydown(1) tturnentity Cube.5,1.5 tif keydown(200) translateentity Camera,0,0.1 if keydown(20 translateentity Camera,0,0,-.1 if keydown(203) translateentity Camera,-.1,0,0 if keydown(205) translateentity Camera.1,0,0 t updateworld t rendertexture (texture) t flip wend end t.
Function rendertexture (texture) trenderworld tcopyrect 0,0,1024,1024,0,0,frontbuffer(),texturebuffer(texture).
End function.
Function initgraphics(w = 1024, h = 768, title$=iris3d, exit_message$=) tgraphics3d w, 32, 2 tsetbuffer backbuffer() tsedrnd millisecs() tif exit_message <> apptitle title, exit_message telse apptitle title tendif.
End function.
Function createquad(width#, height#, order%=-1, parent%=false) tlocal v0, 1, 2, 3 tlocal point,surface tif not parent = false point = createmesh(parent) telse point = createmesh() tendif tif order <> 0 entityorder point, order tendif tentityfx point,1 tsurface = createsurface (point) tv0=addvertex(surface,-(width*.5), (height*.5),0,0,0) TV1=addvertex(surface, (width*.5), (height*.5),0,1,0) tv2=addvertex(surface,-(width*.5),-(height*.5),0,0,1) TV3=addvertex(surface, (width*.5),-(height*.5),0,1,1) taddtriangle (surface, 0, 1, 2) taddtriangle (surface, 1, 3, 2) treturn point.
End function
Muy bueno el código para hacer blur. Ahora estoy intentando comprenderlo del todo para poder variar la cantidad de blur. Gracias.
Ya me di cuenta, variando el entityalpha del ente overlay se consigue variar el blur.
Hola, estaba mirando un código de Blitz para leer píxeles y cuando utilizo el comando readpixelfast me pone en un mensaje memory acces violation. Que puede será gracias.
Hola. Aprendiz, me alegra que te haya gustado el código. Ahora el siguiente fragmento de código es una función que detecta la posición del modo gráfico especificado, tanto en altura, como anchura y su respectiva profundidad.
En mi caso retorna un 11, es la posición en la tarjeta gráfica donde se encuentra el modo gráfico, esto puedo variar de ordenador a ordenador, por ejemplo, en otros puede dar un 20 o un 30, esto se usa cuando se escanean los modos gráficos soportados por la tarjeta gráfica y este valor se toma como partida para mostrar las opciones disponibles en una lista dinámica para que el jugador lo cambie a su gusto.Código:function buscarmg(ancho%,alto%,profundidad%) tlocal itermodes tfor itermodes=countgfxmodes3d() todo 1 step -1 ;it more likely that searches would prefer higher - End resolutions if (gfxmodewidth(itermodes)=width)*(gfxmodeheight(itermodes)=height)*(gfxmodedepth(itermodes)=depth) then return itermodes if (gfxmodewidth(itermodes)<width) then return false tnext treturn false.
End function.
Local modo_gráfico = buscarmg(800,600,32).
Print modo_gráfico ().
Waitkey().
Esta parte se usa para que salte los modos de 16, 24 de profundidad, si desea que detecte estos modos puede anular esta línea de código. Un saludo.Código:if (gfxmodewidth(itermodes)<width) then return false
Continuando con otro código, este es la base de cómo hacer sombras volumétricas.
Código:Graphics3d 1024, 768, 32, 2.
Setbuffer backbuffer().
Globs.
Dim edge#(65000, 7).
Camera.
Cam = createcamera ().
Caster.
Cube = createsphere ().
Positionentity Cube, 0, 0, 7.
Light.
Light = createlight().
Positionentity light, 3, 3, 7.
Pointentity light, Cube.
While not keyhit(1) tturnentity Cube, 1. 5, 1.5 tvol = createvolume (Cube, light) trenderworld tfreentity vol tflip.
Wend.
End.
Function createvolume (model, light, volume_lenght = 1000000).
Volumemesh = createmesh().
Volumesurface = createsurface (volumemesh).
Entityalpha volumemesh. 5.
Entitycolor volumemesh, 255, 0, 0.
Entityfx volumemesh, 1.
Light_x# = entityx(light).
Light_y# = entityy(light).
Light_z# = entityz(light).
For n = 1 todo countsurfaces(model) tsurf = getsurface (model, n) tdwnumfaces = counttriangles(surf) - 1 tfor v = 0 todo dwnumfaces vert0 = trianglevertex(surf, v, 0) vert1 = trianglevertex(surf, v, 1) vert2 = trianglevertex(surf, v, 2) tformpoint vertexx(surf, vert0), vertexy(surf, vert0), vertexz(surf, vert0), model, 0 v1_x# = tformedx() v1_y# = tformedy() v1_z# = tformedz() tformpoint vertexx(surf, vert1), vertexy(surf, vert1), vertexz(surf, vert1), model, 0 v2_x# = tformedx() v2_y# = tformedy() v2_z# = tformedz() tformpoint vertexx(surf, vert2), vertexy(surf, vert2), vertexz(surf, vert2), model, 0 v3_x# = tformedx() v3_y# = tformedy() v3_z# = tformedz() a_x# = v3_x# - V2_x# a_y# = v3_y# - V2_y# a_z# = v3_z# - V2_z# bb_x# = v2_x# - V1_x# bb_y# = v2_y# - V1_y# bb_z# = v2_z# - V1_z# norm_x# = a_y# * bb_z# - A_z# * bb_y# norm_y# = a_z# * bb_x# - A_x# * bb_z# norm_z# = a_x# * bb_y# - A_y# * bb_x# normlight_x# = (v1_x# + v2_x# + v3_x#) / 3 - Light_x# normlight_y# = (v1_y# + v2_y# + v3_y#) / 3 - Light_y# normlight_z# = (v1_z# + v2_z# + v3_z#) / 3 - Light_z# if (norm_x# * normlight_x# + norm_y# * normlight_y# + norm_z# * normlight_z#) * (1.0 / float(sqr(norm_x# * norm_x# + norm_y# * norm_y# + norm_z# * norm_z#))) * (1.0 / float(sqr(normlight_x# * normlight_x# + normlight_y# * normlight_y# + normlight_z# * normlight_z#))) => 0 then Edge (cntfront, 0) = surf Edge (cntfront, 1) = Tri Edge (cntfront, 2) = v1_x# Edge (cntfront, 3) = v1_y# Edge (cntfront, 4) = v1_z# Edge (cntfront, 5) = v2_x# Edge (cntfront, 6) = v2_y# Edge (cntfront, 7) = v2_z# cntfront = cntfront + 1 Edge (cntfront, 0) = surf Edge (cntfront, 1) = Tri Edge (cntfront, 2) = v2_x# Edge (cntfront, 3) = v2_y# Edge (cntfront, 4) = v2_z# Edge (cntfront, 5) = v3_x# Edge (cntfront, 6) = v3_y# Edge (cntfront, 7) = v3_z# cntfront = cntfront + 1 Edge (cntfront, 0) = surf Edge (cntfront, 1) = Tri Edge (cntfront, 2) = v3_x# Edge (cntfront, 3) = v3_y# Edge (cntfront, 4) = v3_z# Edge (cntfront, 5) = v1_x# Edge (cntfront, 6) = v1_y# Edge (cntfront, 7) = v1_z# cntfront = cntfront + 1 endif tnext.
Next.
For a = 0 todo cntfront tif Edge (a, 0) > 0 then diverso = true p0_x# = Edge (a, 2) p0_y# = Edge (a, 3) p0_z# = Edge (a, 4) p1_x# = Edge (a, 5) p1_y# = Edge (a, 6) p1_z# = Edge (a, 7) for b = a + 1 todo cntfront p0_2_x# = Edge (b, 2) p0_2_y# = Edge (b, 3) p0_2_z# = Edge (b, 4) p1_2_x# = Edge (b, 5) p1_2_y# = Edge (b, 6) p1_2_z# = Edge (b, 7) if Edge (b, 0) > 0 then if (p0_x# = p0_2_x# and p0_y# = p0_2_y# and p0_z# = p0_2_z# and p1_x# = p1_2_x# and p1_y# = p1_2_y# and p1_z# = p1_2_z#) = false then if p0_x# = p1_2_x# and p0_y# = p1_2_y# and p0_z# = p1_2_z# and p1_x# = p0_2_x# and p1_y# = p0_2_y# and p1_z# = p0_2_z# then Edge (a, 0) = surf = 0 Edge (b, 0) = surf = 0 diverso = false exit endif endif endif next if diverso then pe0_x# = p0_x# - Light_x# pe0_y# = p0_y# - Light_y# pe0_z# = p0_z# - Light_z# do# = 1.0 / float(sqr(pe0_x# * pe0_x# + pe0_y# * pe0_y# + pe0_z# * pe0_z#)) pe0_x# = pe0_x# * do# * volume_lenght + p0_x# pe0_y# = pe0_y# * do# * volume_lenght + p0_y# pe0_z# = pe0_z# * do# * volume_lenght + p0_z# pe1_x# = (p1_x# - Light_x#) * volume_lenght + p1_x# pe1_y# = (p1_y# - Light_y#) * volume_lenght + p1_y# pe1_z# = (p1_z# - Light_z#) * volume_lenght + p1_z# va = addvertex(volumesurface, p0_x#, p0_y#, p0_z#) vb = addvertex(volumesurface, pe1_x#, pe1_y#, pe1_z#) addtriangle (volumesurface, va, addvertex(volumesurface, pe0_x#, pe0_y#, pe0_z#), vb) addtriangle (volumesurface, va, vb, addvertex(volumesurface, p1_x#, p1_y#, p1_z#)) Edge (a, 0) = 0 endif tendif.
Next.
Return volumemesh.
End function.
Y con este finalizamos hoy: efecto Glow.
Efecto blur FX.Código:Graphics3d 640,480,32,2. Setbuffer backbuffer(). Global Camera=createcamera ().
Moveentity Camera,3,3,0.
Rotateentity Camera,30,30,0.
Light=createlight().
Global Cube=createsphere ().
Positionentity Cube,0,0,5.
Tex0=createtexture (300,300).
Setbuffer texturebuffer(tex0).
Clscolor 255,255,255.
Cls.
Sedrnd(millisecs()).
For k=1 todo 50 tcolor Rand(256),Rand(256),Rand(256) trect Rand(600),Rand(600),Rand(600),Rand(600).
Next.
Entitytexture Cube, tex0.
Setbuffer backbuffer().
S=1.
Global sizex=640/s.
Global sizey=480/s.
Global glowtexture=createtexture (384,384,256).
Global sp=createsprite (Camera).
Moveentity service pack,-.25,-0.06,1.18.
Entityalpha sp.32.
Scaletexture glowtexture,graphicswidth()/sizex,graphicsheight()/sizey.
Entitytexture service pack, glowtexture.
Textureblend glowtexture, 5.
While not keydown(1) tturnentity Cube,0.5,0.5,0.5 tcameraviewport Camera,0,0, sizex, sizey trenderworld tcopyrect 0,0, sizex, sizey,0,0,backbuffer(),texturebuffer(glowtexture) tcameraviewport Camera,0,0,graphicswidth(),graphicsheight() trenderworld tflip.
Wend.
End.
Más blur.Código:Const texsize=1024, FX=7, o =-1.
Graphics3d 800,600,32.
Cam=createcamera ().
Positionentity Cam, 0,0,-6.
Rotateentity createlight(), 45,0,0.
Cube=createcube ().
Entitycolor Cube, 255,128,0.
Cone1=createcone (20).
Entitycolor cone1,0,255,255.
Positionentity cone1,-4,0,0.
Cone2=createcone (20).
Entitycolor cone2,0,255,0.
Positionentity cone2,4,0,0.
P=createpivot().
Sph=createsphere (20, p).
Positionentity SPH, 0,0,-4.
Select FX tcase 1:bl=createblurlayer(Cam, 1,0,1,1. 95,1, o) tcase 2:bl=createblurlayer(Cam, 1,0,1. 97,1,3, o) tcase 3:bl=createblurlayer(Cam, 1. 2,1.02. 97,1,3, o) tcase 4:bl=createblurlayer(Cam, 1,0,1.01,1. 95,1, o) tcase 5 bl=createblurlayer(Cam, 1,0,1.01,1. 9,1, o) entitycolor bl, 240,255,225 tcase 6 bl=createblurlayer(Cam, 1.1,0,1,1. 95,1, o) rotateentity bl, 1,1,0 tcase 7 bl=createblurlayer(Cam, 1.01,1,1,1. 9,1, o) bl2=createblurlayer(Cam, 1.02,-1,1,1. 8,1, o).
End select.
Setbuffer backbuffer().
While not keyhit(1) tturnentity Cube. 1. 2. 3 tturnentity p. 55. 35. 2 trenderworld tbltex=updateblurlayer(bl, bltex) tif bl2 then entitytexture bl2, bltex tif FX=4 then positionentity bl, rnd(-.01. 01), rnd(-.01. 01), 1 tflip.
Wend.
Function createblurlayer(Cam, z#, ang#, mgn#, bright#, alpha#, bmode, ord) tlocal xres=graphicswidth() tlocal yres=graphicsheight() tlayer=createmesh(Cam) ts=createsurface (layer) tvx#= 1.0*xres/texsize tvy#= 1.0*yres/texsize taddvertex,-1,-1,0,0,0 taddvertex, 1,-1,0, vx#, 0 taddvertex,-1,1,0,0, vy# taddvertex, 1,1,0, vx#, vy# taddtriangle, 0,1,2 taddtriangle, 3,2,1 tpositionentity layer, 1,1, z# tcameraproject Cam, entityx(layer, true), entityy(layer, true), entityz(layer, true) trx#= projectedx#()-.5*xres try#= projectedy#()-.5*yres tscalemesh layer. 5*xres/rx#.5*yres/ry#, 1 tpositionentity layer,-.5/rx#,-.5/ry#, z# trotateentity layer, 0,0, ang# tscaleentity layer, mgn#, mgn#, mgn# tentityalpha layer, alpha# tentityblend layer, bmode tcol=255*bright# tentitycolor layer, col, col, col tentityfx layer, 1 tentityorder layer, ord treturn layer.
End function.
Function updateblurlayer(layer, TeX) tif TeX=0 then TeX=createtexture (texsize, texsize) tentitytexture layer, TeX tcopyrect 0,0, graphicswidth(), graphicsheight(), 0,0, backbuffer(), texturebuffer(TeX) treturn TeX.
End function.
Código:Graphics3d 1024,768,32,1.
Setbuffer backbuffer().
Light=createlight().
Rotateentity light,45,45,0.
Cube=createcube ().
Translateentity Cube,0,0,3.0.
Scaleentity Cube.1,2.1.
Camera=createcamera ().
Camerarange Camera,0.01,100.
Cameraclscolor Camera,255,0,0.
Motion_blur_on=1.
Motion_blur_quad=create_blurquad(Camera).
Entityfx motion_blur_quad,2 or 1 or 16.
Motion_blur_tex=createtexture (1024,1024,256).
Entityalpha motion_blur_quad,0.333.
Entitytexture motion_blur_quad, motion_blur_tex.
Translateentity motion_blur_quad,-(1.0/2048.0),0-(1.0/2048.0), 0.995.
Entityorder motion_blur_quad,-1.
While keydown(1)=0 tif keyhit(57), tecla espacio motion_blur_on=motion_blur_on XOR 1 if motion_blur_on=0 then hideentity motion_blur_quad else showentity motion_blur_quad endif tendif t.
If motion_blur_on<>0 copyrect 0,0,1024,768,0,128,backbuffer(),texturebuffer(motion_blur_tex).
Endif.
Turnentity Cube.2.4.6.
Updateworld().
Renderworld().
Vwait:flip 0.
Wend.
Function create_blurquad(par=0) tlocal al1#, al2#, 0, 1, 2, tr tal1#=1.0 tal2#=0.2 tm=createmesh() ts=createsurface (m) tv0=addvertex(s,-1,-1,0, 0,1) TV1=addvertex(s,+1,-1,0, 1,1) tv2=addvertex(s, 0,0,0. 5.5) tvertexcolor, 0,255,255,255, al1# tvertexcolor, 1,255,255,255, al1# tvertexcolor, 2,255,255,255, al2# ttr=addtriangle (s, 0, 1, 2) tv0=addvertex(s,+1,-1,0, 1,1) TV1=addvertex(s,+1,+1,0, 1,0) tv2=addvertex(s, 0,0,0. 5.5) tvertexcolor, 0,255,255,255, al1# tvertexcolor, 1,255,255,255, al1# tvertexcolor, 2,255,255,255, al2# ttr=addtriangle (s, 0, 1, 2) tv0=addvertex(s,+1,+1,0, 1,0) TV1=addvertex(s,-1,+1,0, 0,0) tv2=addvertex(s, 0,0,0. 5.5) tvertexcolor, 0,255,255,255, al1# tvertexcolor, 1,255,255,255, al1# tvertexcolor, 2,255,255,255, al2# ttr=addtriangle (s, 0, 1, 2) tv0=addvertex(s,-1,+1,0, 0,0) TV1=addvertex(s,-1,-1,0, 0,1) tv2=addvertex(s, 0,0,0. 5.5) tvertexcolor, 0,255,255,255, al1# tvertexcolor, 1,255,255,255, al1# tvertexcolor, 2,255,255,255, al2# ttr=addtriangle (s, 0, 1, 2) tflipmesh tupdatenormals tif par <>0 then entityparent m, par treturn m.
End function.
Bueno aquí otro código, cuya función es tener una idea de cómo hacer un menú dinámico donde el usuario pueda elegir la resolución de pantalla, de acuerdo a lo que soporte la tarjeta gráfica. Lo siguiente es lograr que al cambiar la información en pantalla se cambie la resolución en tiempo real, algo de tener muy en cuenta es que directX 7 tiene como límite la resolución de pantalla máxima 1024 por 1536, es decir si en un ordenador moderna, se escanea este modo gráfica y se intente ejecutar dará un error.
Por tal motivo se recomiendo implementar un método que no escanee más, allá de ese limite. Un saludo.
Código:Code by yue.
Public domain 2011.
Graphics 800,600,32,false.
Local total_mg = countgfxmodes3d().
Local profu_p[50].
Local alto_p[50].
Local ancho_p[50].
=============================
Local t_escape = 1 : local numero_mg = buscarmg(1024,768,32).
Local x.
For x = 1 todo numero_mg talto_p[x] = gfxmodeheight(x) tancho_p[x] = gfxmodewidth(x) tprofu_p[x] = gfxmodedepth(x).
Next.
While not keyhit(1) t tcls ttext 0,0, alto_p[numero_mg] + + ancho_p[numero_mg] + + profu_p[numero_mg] t t tapptitle numero_mg t tif keyhit(200), up t numero_mg = numero_mg +1 if numero_mg > total_mg numero_mg = total_mg t telseif keyhit(20, down t numero_mg = numero_mg - 1 t if numero_mg = 0 numero_mg = 1 tend if t.
Wend.
Function buscarmg(width%,height%,depth%) tlocal itermodes tfor itermodes=countgfxmodes3d() todo 1 step -1 if (gfxmodewidth(itermodes)=width)*(gfxmodeheight(itermodes)=height)*(gfxmodedepth(itermodes)=depth) then return itermodes tnext treturn false.
End function.
Hola. Bueno aquí un ejemplo de cómo cifrar datos.
Saludos.Código:Tmp$=fbk_cryptstring$(mi nombre es yue rexie,$e2cdf032). Print tmp$.
Tmp2$=fbk_cryptstring$(tmp$,$e2cdf032).
Print tmp2$.
Waitkey.
Function fbk_cryptstring$(source$,key) tfor c=1 todo len(source$) char$=char$+chr$(asc(mid$(source$,c,1)) XOR key) tnext treturn char$.
End function.
Me han gustado mucho los códigos de Blitz3d, tanto es así que, los he comprendido y modificado y además los estoy usando en un proyecto que estoy haciendo.
Sin embargo, les he hecho unas pequeñas modificaciones. Aunque básicamente hacen lo mismo, lo hacen de otra forma la cual permite aplicar el blur para cualquier resolución (menor a 1024 por 1024) y además aplicar camerazom en tiempo real y el blur se mantiene.
Cualquier duda sobre el código o mejora estaré encantado de oírla.
-- IMÁGENES ADJUNTAS --
https://foro3d.com/attachment.php?attachmentid=142794
Hola aprendiz. Me alegre que los entiendas, te comento que descargue la prueba blur y se ve muy bien, una cosa es que debes implementar funciones en los modos gráficos para cada tarjeta gráfica, por ejemplo, en mi caso la tarjeta que uso ahora solo soporta 14 modos, en el ejemplo que me has pasado al legar al límite me da error, pues parece que busca un modo gráfico inexistente en mí PC.
Otra cosa es a ver si me ayudas a verificar los modos gráficos de mi proyecto. http://download143.mediafire.com/ell...e75ye6/demo.7z.
Y me pasas los modos gráficos que visualiza tu tarjeta.
Aún no tengo implementado el sistema de cambio de modo gráfico el cual lo hago mediante endgraphics o clearworld.
Espero me puedas colaborar.
Hola blizt3d, a ver si puedes subir el código fuente para ejecutarlo desde el Blitz, si no poco puedo hacer. Os dejo aquí un juego antiguo que había echo al cual le he aplicado el blur, a ver qué os parece a mí me parece relajante, prueben todas sus opciones que son bastantes y cada configuración hace un efecto diferente y divertido. Si a alguien le interesa como lo hice, preguntenme y les publico el código, que lo disfruten.
-- IMÁGENES ADJUNTAS --
https://foro3d.com/attachment.php?attachmentid=142816
Bueno solo quería una ayuda como tester. La idea era escanear los modos gráficos teniendo como máximo el modo 1536 x 1024 ya que este es el límite de directX 7, ya que, aunque los puede escanear al ejecutarlos daría error.
Ahora bien, lo que estoy tratando antes de hacer algo es optimizar un menú con todas las respectivas opciones.
http://www.youtube.com/watch?v=b0unphycggg
A, pues me detecta las resoluciones bien, hasta 1280 por 1024. Pero el juego no me funciona, no puedo andar con el coche ni nada.
Para los que hacen efectos desde Particle Illusion o cualquier programa que te genere una colección de imágenes (frames) de efecto, les gustara este código.
Lo que hace es convertir esa colección de imágenes a una sola imagen animada, lista para ser cargada desde Blitz con loadanimimage.
Para usarlo compilen el código o ejecutenlo en la carpeta donde se encuentre las imágenes, el generara un.bmp animado para Blitz.
Código:graphics3d 800,600,16,2.
Type sprite_animado tfield ruta$.
End type.
Print animación inversa? (1 - 0).
Reg_inverso = input ().
If reg_inverso <> 1 and reg_inverso <> 0 then end.
Crear_imagen_animada (reg_inverso).
Convertir una colección de imágenes en una sola imagen animada.
Function crear_imagen_animada (reg_inverso) truta$ = currentdir() tdir$ = readdir(ruta$) tarchivo1$ = tlocal sprite, sprite_animado[500] tfiltro1$ =.jpg tfiltro2$ =.bmp tfiltro3$ =.png twhile archivo1$ <> archivo1$ = nextfile$(dir$) ruta_archivo$ = ruta$ + archivo1$ ;filtrar imágenes ext1 = instr(archivo1$, filtro1$) ext2 = instr(archivo1$, filtro2$) ext3 = instr(archivo1$, filtro3$) ;contar archivos y obtener ancho y alto if archivo1$ <>. And archivo1$ <>. And archivo1$ <> and archivo1$ <> thumbs, db and (ext1 <> 0 or ext2 <> 0 or ext3 <> 0) then if reg_creado = 0 then imagen = loadimage (ruta_archivo$) ancho = imagewidth(imagen) alto = imageheight(imagen) freimage imagen reg_creado = 1 endif sprite[frame] = new sprite_animado sprite[frame]\ruta$ = ruta_archivo$ frame = frame + 1 endif twend t;crear textura animada tif frame <> 0 then tipo = 1 imagen = createimage (ancho * frame, alto, tipo) buffer_imagen = imagebuffer(imagen) setbuffer buffer_imagen if reg_inverso = 1 then x = ancho * (frame - 1) for dibujo = 0 todo frame -1 imagen2 = loadimage (sprite[dibujo]\ruta$) drawimage imagen2,x,0 freimage imagen2 delete sprite[dibujo] if reg_inverso = 0 then x = x + ancho if reg_inverso = 1 then x = x - Ancho next nombre$ = ancho + _ + alto + _ + frame +.bmp saveimage (imagen, nombre$) closedir dir tendif.
End function
Para saber el ascci y el scancode un sencillo programa. Solo pulsa las teclas.
-- IMÁGENES ADJUNTAS --
https://foro3d.com/attachment.php?attachmentid=142822
Hola bueno, la verdad el juego lo comencé de nuevo por problemas técnicos (no tengo ordenador) y el código almacenado en una usb se me jodido. http://download1057.mediafire.com/np...ma5u5/demo.rar.
Este ya hace los respectivos cambios, lo que no sé es si funcione correctamente.
Ya miro tu código. Saludos.
Hola muy bueno el programa, una duda que me asalta es porque los ejecutables quedan tan grandes?
Pues la verdad siempre ocupan eso al compilar, será por la versión de Blitz. Haces algo especial para que te ocupen menos? O al compilar te quedan ya así? Que versión usas?
Edito: viste el juego de gravedad puntos? Gracias a ti a quedado así, me sirvió y me está sirviendo mucho el código de blur.
Debe ser la versión yo uso la 1.109, y si acabo de mirar y es genial lo que has hecho, esos efectos son de 10.
Bueno, esto debería ir aquí. https://www.foro3d.com/f113/sombras-Blitz3d-92498.html. Saludos.
Más sobre sombras. Lo bueno de las sombras cartográficas es que permiten proyecciones de sombras en objetos animados, por el contrario en las sombras volumétricas si deseamos proyeciones animadas, las animaciones del modelo no deben ser por huesos si no por vertex.
Una de las cosas es que se puede implementar sombras con efecto blur manipulando el zoom de la cámara.Código:Type shadow tfield obj tfield shwtexsize tfield shwtex tfield shwinit t.
End type.
Graphics3d 1024,768,32,2.
Setbuffer backbuffer().
Ambientlight 0,0,0.
Global xscale#=1*(.8/2).
Shadowcam=createcamera ().
Cameraprojmode shadowcam,2.
Camerafogmode shadowcam,1.
Camerafogrange shadowcam,1,1.
Camerafogcolor shadowcam,255,255,255.
Hideentity shadowcam.
Local Camera=createcamera (), cámara que visualiza el game.
Positionentity Camera,0,5,-15.
Scene=createsphere ().
Local scene=createcube ().
Scaleentity scene,20,1,20.
Positionentity scene,0,-1,0.
Local idscene. Shadow = sw_addobject(scene).
Local caster=createcone (32).
Positionentity caster, 0,3,0.
Rotateentity caster,40,90,60.
Scaleentity caster, 1,2,1.5.
Updatenormals caster.
Entitycolor caster,200,0,0.
Local idcaster. Shadow = sw_addobject(caster).
Local caster1=createsphere (32).
Positionentity caster1,0,1,0.
Entitycolor caster1,0,0,200.
Updatenormals caster1.
Local idcaster1. Shadow = sw_addobject(caster1).
Local light=createlight(2).
Local vis_light = createsphere (12, light).
Entitycolor vis_light,0,200,0.
Entityfx vis_light,1.
Positionentity light,-20,8,-1.
=================================
While quit=0 t;===> tif keyhit(1) then quit=1 tif keyhit(203) then xscale#=xscale#*.9 tif keyhit(205) then xscale#=xscale#*1.1 t;===> tsw_resetshadow(), t;===> tmoveentity light,0,0,0.25:turnentity light,0,-1.25,0 tturnentity caster,0,0.5 tupdateworld tshadow_test1(shadowcam, Camera, light,idcaster,idscene) tshadow_test1(shadowcam, Camera, light,idcaster1,idscene) tshadow_test1(shadowcam, Camera, light,idcaster,idcaster1) trenderworld() t;===> ttext 500,10,xscale#: + xscale# ttext 500,20,zoom: +.06/xscale# ttext 300,30,hit <- & -> todo change the xscale# tflip t;===>.
Wend.
End.
=====================================================
Function shadow_test1(s_camera, g_camera, s_light, caster. Shadow, s_receiver. Shadow) t;===> t;stop t;===> thideentity g_camera tshowentity s_camera t;===> tif s_receiver\shwinit=true then cameraclsmode s_camera, false, true telse cameraclsmode s_camera, true, true s_receiver\shwinit = true tendif t;===> tlocal tsize = s_receiver\shwtexsize t;===> tcameraclscolor s_camera,255,255,255 tcamerazom s_camera.06/xscale# tcameraviewport s_camera,0,0,tsize,tsize tcameraprojmode s_camera,2 t;===> tsw_hideobject() t;===> tlocal s_caster=copyentity(caster\obj) tentityfx s_caster,1+8 tentitycolor s_caster,0,0,0 tshowentity s_caster t;===> tpositionentity s_camera,entityx(s_light,true),entityy(s_light,true),entityz(s_light,true) tpointentity s_camera, s_receiver\obj trenderworld() t;===> tcopyrect 0,0,tsize,tsize,0,0,backbuffer(),texturebuffer(s_receiver\shwtex) t;===> tlocal curobj = s_receiver\obj tfor s=1 todo countsurfaces(curobj) local surf=getsurface (curobj, s) for v=0 todo countvértices(surf)-1 tformpoint vertexx(surf), vertexy(surf), vertexz(surf), curobj, s_camera vertextexcords surf, (tformedx()/xscale#)/32+0.5,1-((tformedy()/xscale#)/32+.5) next tnext t;===> tsw_showobject() t;===> tshowentity g_camera thideentity s_camera tfreentity s_caster t;===> t.
End function.
Function sw_addobject. Shadow(obj) tlocal sw_size = 512 tlocal curmodel. Shadow = new shadow tcurmodel\obj = obj tcurmodel\shwinit = false tcurmodel\shwtex = createtexture (sw_size, sw_size, 16+32) tcurmodel\shwtexsize = sw_size tentitytexture curmodel\obj,curmodel\shwtex t;===> tsetbuffer(texturebuffer(curmodel\shwtex)) tclscolor 255,64,255 tcls tsetbuffer(backbuffer()) t;===> treturn curmodel.
End function.
Function sw_resetshadow() tlocal curmodel. Shadow tfor curmodel=each shadow curmodel\shwinit = false tnext.
End function.
Function sw_hideobject() tlocal curmodel. Shadow tfor curmodel=each shadow hideentity curmodel\obj tnext.
End function.
Function sw_showobject() tlocal curmodel. Shadow tfor curmodel=each shadow showentity curmodel\obj tnext.
End function.
Esto a veces a abrumador, pero si no deseas hacer esto desde cero se puede usar la lib gom puesta en unos mensaje más atrás. Saludos.
Gracias Blitz3d, la verdad que me gustaría hacer una librería propia para sombras, pero no acabo de entender el manejo de vertextexcords en ese código (sigo pensando).
Hola ese comando tiene como función establecer la coordenada de un vértice en una malla. Un automóvil va a 230 kilómetros por hora un circuito, para hacer pruebas de colisión, se detecta la normal con la que se ha estrellado el auto contra un muro de contención de acero, un bucle for next detecta las superficies del auto, uno los vértices, entonces de acuerdo a las normales con que colisiono se reposiciónan los vértices para emular latas retorcidas. Un saludo.
Por ejemplo, tengo un escenario desde giles en le que tengo dos texturas. En la capa 1 (tierra) en la capa 3 (hierba), en la capa 2 por defecto del giles está el mapa de luz.
He probado el código de sombra ortográficas y solo funciona estableciendo:
Vertextexcords superficie,índice, u#, #[,w#][, cord_set] donde cord_set = 0.
Al hacer esto lo que ocurre es que la sombra se aplica (más o menos bien) pero me modifica las coordenadas UV de la textura aplicada desde el giles. He estado buscando por la página oficial y el aprametro cord_set permite diferenciar a que capa de textura aplicas el comando. En mi caso necesito aplicar el comando a la capa 4, ya que en la 1,2,3 están las texturas de giles. Sin embargo, cuando pongo cord_set = 3 (capa1 = 0, capa2 = 1, capa3 = 2, capa4 = 3), no funciona la sombra, la textura se aplica, pero no lo (*.ace) bien. No sé si será un fallo de Blitz o quizás la exportación del giles.
Si no estoy mal giles tiene la opción de colapsar las texturas en una sola, por lo tanto solo se usarían dos capas en el Mesh, sobre las coordenadas de los verttices es que son sombras dinámicas y es para que la textura se mueva correctamente cuando se mueve el ente que proyecta la sombra.
Otra cuestión es que la capa de la sombra siempre debe quedar encima, es la última. Bueno otro aporte este pequeño manual sobre el poder de los types en Blitz3d. Algo, así como c. Se trata de entender un poco la programación orientada a objetos. Lo jodido es que me llego en ingles. http://www.mediafire.com/?Idr7qqzrbwj2291.
Sobre el comando vertexords solo tiene estos parámetros, [superficie],[x#],[y#],[z#], el otro es advertex, pero eso es cuando se crea mallas en tiempo real en Blitz3d.
Ya ya, el descabezado soy yo, si es este comando. http://www.blitzBasic.com/b3ddocs/co...rds&ref=3d_a-z.
El otro es vertexcords lo siento. Ahora me entero de eso, ya le estoy echando un vistazo.
Ok ya plante esa cuestión en el foro: posiblemente nos ayude a entender ese comando a cabalidad. http://Blitz Basic.com/community/men...hp?Topic=93806.
Pues gracias, ya que es algo confuso el comando. A ver si puedes decirme cómo hago para fusionar las texturas en una solo desde giles, sería de gran ayuda, que no encuentro la opción. Gracias.
Solucinado. Cuando exportas desde giles un modelo con un mapa de luz, el mapa de luz es asignado como una textura de sombras (por defecto en la capa 1). En la capa 0 estaría la textura que le asignas al modelo, bien, cuando usas el comando vertextexcords superficie,índice, u#, #[,w#][, cord_set] poniendo cord_set = 0, estas modificando las coordenadas UV de la textura que tú asignas (ladrillos, madera, etc), cuando pones cord_set = 1 modificas las coordenadas UV de la capa de textura asignada a la sombra, en este ejemplo, la capa 1. Pero sin embargo, para que surja efecto en la modificación (cord_set = 1) debes establecer otro comando : texturécords textura 1.
Si lo estableces a 0, aunque cord_set = 1, no tendrá efecto. Con esto se soluciona el problema y la duda que tenía. Sin embargo, surge otro problema,xd, y es que, al establecer sombras ortográficas mediante el uso de vertextexcords estableciendo cord_set = 1 y estableciendo texturécords a 1, se pierde el mapa de luz creado en giles, y se usa como mapa de luz el obtenido por el código de sombras ortográficas.
Edito: en resumen, hoy lo veo más claro. El parámetro cord_set = 1 modifica las coordenadas de todas las texturas establecidas como texturécords textura 1, cord_set = 0 modificas las coordenadas de todas las texturas establecidas como texturécords textura 0 (por defecto).
Hola, a ver si alguien me puede colaborar probando esto. Lo que necesito verificar es:
-Cambio de resoluciones de pantalla.
Cambio en detalle de la sombra.
Cambio en el brillo de la pantalla.
Aceleración para rendimiento óptimo.
Agradecería la ayuda y todos los datos posibles. http://download1129.mediafire.com/ks...1lxy0/demo.rar.
Hola, lo he probado y no note ningún error. Pero tengo varias preguntas. La primera es si la sombra la implementas ortográfica o volumétrica. También como consigues el cambio de gamma (es con ambienlight ==?) y por último a ver si podías subir el código una de las (*.dll) ya que se como crear librerías.dll, pero no tengo de dónde sacar información de los comandos y me gustaría ver un código en C++ para poder aprender. Gracias.
Hola aprendiz no he podido responder antes es que como he mencionado no tengo internet ni ordenador en casa, por lo que entro aquí cada vez que el bolsillo permite.
Así que estoy contra el reloj.
Son cartográficas.
La gamma se realiza mediante el comando setgamme y updategamma, esto es útil para hacer filtros como de visión nocturna, o poner la pantalla en blanco y negro cuando el personaje muere.
Bueno este este tema te lo quedo debiendo, la idea de hacer una (*.dll) es expandier la funcionalidad de Blitz3d, permitiendo migrar de direcx7 a 8 10 o yo qué sé, esto se logra mediante viusal Studio.net con el SDK respectivo, por ejemplo, si usas el SDK de DirectX 8.1, se puede hacer llamadas a la lib de DirectX 8.1.
Ahora bien de manera somera, lo que se hace son funciones, estas funciones se deben menter en archivos DCL, que luego se meten en userlib para que Blitz3d reconozca estos comandos, ya luego cuando regrese te mando une jemplo.
Por ahora mira mi web y me dices como va el nuevo demo. http://www.iris3d.tk. Un saludo, se acaba el tiempo.
Otra cosa es que he sido invitado a campus party 2011 Colombia, y no tengo ordenador eso me da risa.
Adiós pues.
Muchas gracias, no conocía el comando setgamma ni uptdategamma, muy útiles. Lo de las (*.dll) yo se programar en C++ pero lo más que llegue a hacer para el Blitz es una función que sume dos números o multiplique, (xd). Lo que quería saber es de dónde sacar los comandos del DirectX para programar una buena.dll.
Hola a los tiempos. En estos días me paso por aquí, para dejar un tutorial de mi autoría muy básico de Blitz3d. Venga que no soy escritor, ni mucho menos, pero espero sea de utilidad para alguien.
https://www.foro3d.com/images/upload...90dibujo-1.jpg
-- IMÁGENES ADJUNTAS --
https://foro3d.com/attachment.php?attachmentid=145908
Oye los comandos los sacas haciendo llamadas a las Api de Windows, eso lo haces instalado un SDK en visual.net, por ejemplo, un SDK para trabajar con directx9c, todo lo que hagas lo encapsulas en funciones que son pasadas de la (*.dll) Blitz.
Muy interesante tu aporte. En cuanto pueda, lo echo un ojo.
Muy bueno el manual, es bonito ver cómo alguien intenta hacer entender lo que ama. viva la programación.
Muy buenas a ver si alguien o entre todos me podéis ayudar a mejorar este código, pongo el código y los archivos para que los descargueis. Gracias de antemano.
-- IMÁGENES ADJUNTAS --Código:Graphics3d 800,600,32,2.
Setbuffer backbuffer().
Movemouse graphicswidth()/2.8, graphicsheight()/2.
Hidepointer.
Player = createpivot().
Camera=createcamera (player).
Cameraclscolor Camera, 0,162,232.
Camerarange Camera,0.1,10000.
Light=createlight().
Rotateentity light,90,0,0.
Cursor=loadimage (puntero1.png).
Plane=createplane ().
Grass_tex=loadtexture (textura_suelo_piedra.jpg).
Entitytexture plane, grass_tex.
Cerdo=loadanimmesh(asalto, b3d).
Scaleentity cerdo,0.01,0.01,0.01.
Rotateentity cerdo,0,180,0.
Cerdo_hijo=findchild (cerdo, cylinder01).
Extractanimseq(cerdo_hijo,1,10) ;anim seque 1: frames 0.10 are parado.
Extractanimseq(cerdo_hijo,11,20) ;anim seque 2: frames 11.21 are correr.
Animate cerdo_hijo,2. 020, 1.
Cerdo_spine1 = findchild (cerdo, bip01 spine1).
Cerdo_arma = findchild (cerdo, jamon_asalto).
Entityparent cerdo_arma, cerdo_spine1.
While not keydown(1) tif keydown(32)=true then Turn Entity Camera,0,-1,0 tif keydown(30)=true then Turn Entity Camera,0,1,0 tif keydown(32)=true then Turn Entity cerdo,0,-1,0 tif keydown(30)=true then Turn Entity cerdo,0,1,0 tif keydown(31)=true then if animseq(cerdo_hijo)=1 then t animate cerdo_hijo,1,0.2,2 endif moveentity cerdo,0,0,0.04 telseif keydown(17)=true then t if animseq(cerdo_hijo)=1 then t animate cerdo_hijo,1,0.2,2 endif moveentity cerdo,0,0,-0.04 telse if animseq(cerdo_hijo)=2 or animseq(cerdo_hijo)=3 then t animate cerdo_hijo, 2.020,1 endif tendif tmxs#=mxs# + mousexsped() tmys#=mys# + mouseysped() tif mxs# > 45 then mxs# = 45 tif mxs# < -45 then mxs# = -45 tif mys# > 30 then mys# = 30 tif mys# < -30 then mys# = -30 trotateentity cerdo_spine1, mxs#, mys#,0 tpositionentity Camera, entityx(cerdo),entityy(cerdo),entityz(cerdo) tmoveentity Camera,0.5,1,-1 trenderworld tupdateworld tdrawimage cursor,mousex(),mousey() ttext 0,0, para mover y girar son w,a,s,d y el ratón para apuntar o eso intento hacer tflip t.
Wend.
End.
https://foro3d.com/attachment.php?attachmentid=146086
Hola Damian, lo que querías conseguir es con cameraproject, el problema es que tú modelo animado tiene las coordenadas cambiadas, y aún encima al animarlo estas coordenadas no son reales. Por ello, o bien pones un join (hueso) en la punta del cañón del arma y luego proyectas sus coordenadas a la pantalla, o haces lo que hice yo, -> una animación manual echa con funciones. Luego todo lo que queda hacer es trabajo las coordenadas a la pantalla 2d y dibujar el cursor en ellas, por cierto, la más mínima duda que tengas del código te la explicaré sin ningún problema.
-- IMÁGENES ADJUNTAS --
https://foro3d.com/attachment.php?attachmentid=146160
Buenas aprendiz, antes de nada gracias por el código, lo descargo y me pongo a investigarlo, en verdad la programación no es mi fuerte, lo mío es más el diseño gráfico.
Bueno no pasa nada, el código es imprescindible en un juego al igual que el diseño. Si investigas y aprendes más código, podrás llegar a crear cualquier juego.
Podéis ver un juego nuevo que he hecho y que subí en esta página aquí -> https://www.foro3d.com/f113/videojue...z3d-95155.html <-- Comenten.
Hace dos meses empecé a hacer un remake de una recreativa del 85, king of boxer, al final le creé una base de datos con gestión de entrenamientos, economía, objetos, etc. Hoy por fin lo he acabado, quien quiera probarlo puede descargarlo aquí: http://www.racerphysics.com/download/boxking.rar.
Por supuesto en Blitz basic, aunque me ha tocado aprender php y mysql.
Hola, a los tiempos, bueno comparto algo que he realizado con Blitz3d, algo para matar el tiempo:
Archivo adjunto 148983
El efecto de luz se hace con los comandos de pixel.
Hola, soy nuevo en el foro y he aprendido mucho en este foro, pero dentro de lo que se ha hablado en este foro no he encontrado cómo se coloca una textura con un canal alpha será que ustedes me pueden explicar cómo se hace, por ejemplo, un árbol en un plano, agradezco la ayuda.
Pues con gile[s] puedes cargar el modelo de un árbol, le pones unos planos y le pones una textura y la textura le pones alpha activado, pero antes tienes que exportarla como (*.png) del Adobe Photoshop o así, o si no, puedes cargar la textura desde blizt3d, por ejemplo, se llama hojas, (*.png), pues bien, coges y haces, hojas = loadtexture (hojas, (*.png),2) y ya la cargas con alpha, y luego cargarías el árbol: árbol = loadmesh (árbol, b3d), y luego haces para aplicarle la textura: entitytexture árbol, hojas, y listo.
Muchos saludos y espero que te ayude.
Gracias me ha servido de mucho tu ayuda, ahora tengo otra duda, o mejor dicho es un grito de ayuda, como hago para poner un sistema de partículas que siga a una roca? Es para hacer una estela de fuego, me explico: estoy haciendo un juego de plataforma en 3d, pero debo hacer unas rocas que caigan del cielo y afecten al jugador, el cómo lo afecta ya lo tengo resuelto lo que me tiene pegado es cómo hacer que el sistema de partículas siga las rocas. Muchas gracias.
De nada amigo. Mira, para un sistema de partículas lo que debes hacer es coger las coordenadas de las piedras en todo momento y pasárselas a la función que se encarga de crear las partículas para que las partículas sean creadas en la posición dónde está la piedra, y si la piedra se mueve las partículas irán dejando un rastro detrás de la roca.
De todas maneras, te pueden ayudar estos tutoriales, en concreto yo te diría que leyeras el segundo tutorial, y dentro de el puedes ver sobre cómo hacer un sistema de particuals:r. https://www.foro3d.com/f17/tutorial-...smo-96787.html.
Hola, estoy tratando de hacer un sistema de partículas como el que necesita vaya, así que, espero pronto poner el código.
Creo que la idea es algo así. Un saludo.
-- IMÁGENES ADJUNTAS --
https://foro3d.com/attachment.php?attachmentid=154835
Hola que pena no a ver contestado antes apenas entre en la oficina, muchas gracias a aprendiz estoy estudiando los tutoriales de antemano te digo estoy aprendiendo mucho con ellos ha y para blizt3d también gracias, y si esa es la idea. Cambiando de tema, pero sin alejarme mucho, me sorprende la velocidad con que se responde en este foro es increíble, muchas gracias a todos por su interés y claro esta sacar el tiempo para explicarle a novatos como yo.
De nada, y este foro a veces parece como un MSN que te responden casi al momento, mola. Saludos.
Bueno, estoy planteándome aprender la parte de Blitz3d que está dedicada a internet, es decir, conexiones TCP, udp y directplay.
Sinceramente, no tengo ni idea de todo esto, empezando por no saber los conceptos como servidor, cliente, puerto. El IP si que sé lo que es, menos mal.
Pero es un tema que siempre me gustó, y ya que Blitz tiene comandos para trabajar con este tipo de cosas me gustaría algo de información sobre todo el tema de conexiones, envío de datos, etc.
Y me he puesto a mirar los comandos de Blitz, y ya puedo empezar diciendo que no entiendo por qué para enviar datos hay que escribir en un archivo? Valla, no entiendo el concepto de internet, siempre lo he visto como un ordenador macrogigante que sabe todo lo que hacer, pero parece que no, que es el servidor/cliente el que escribe los archivos, bueno que estoy perdido en este tema, cualquier ayuda, será bienvenida.
Bueno, algo para compartir, en estos días que he retomado el asunto de Blitz3d siempre ando en busca de solucionar dudas.
Blitz3d por su infraestructura solo permite trabajar en un solo hilo o proceso, así que, me tope con la necesidad de implementar dos procesos simultáneos debido a que necesitaba cargar recursos y poner una animación de una imagen. Esto aparentemente en Blitz3d no es posible hacer y toca recurrir a trucos sucios, como, por ejemplo.
Se carga un archivo y luego se avanza un poco en una barra de progreso, así que, toca hacer primero una cosa y luego otra, pero no se puede hacer simultáneamente.
Pero este método se puede falsificar, pero siempre será en un solo proceso, aunque parezca que son dos.
Esto es mucho código para lo que se conoce como falos threading en Blitz3d, así que, a solución de esto existe una lib llamada fastpointer que trabaja punteros, es desig asigna partes de la memoria para llevar a cabo varios threading a la vez, y los resultados parecen ser prometedores.Código:Global hilo_branch=0.
Global hilo_count=0.
Global hilo_percent=0.
Global filecount.
Global file_in$=image, img.
Global file_out$=image, img.
Global filein.
Global fileout.
Global x=0.
Global y=0.
Create the file you are loading later.
Savefile (file_out$).
Graphics 800,600.
Setup imagebuffer.
Global img=createimage (640,480).
Setup mousepointer.
Global mouseimg=createimage (10,10).
Setbuffer imagebuffer(mouseimg).
Color 250,250,250.
For q= 0 todo 9.
Plot que, que.
Plot 0, que.
Next.
Color 5,5,5.
For q= 1 todo 9.
Plot q+1, que.
Plot 1, que.
Next.
Setup doublebuffering.
Setbuffer backbuffer().
Starting values.
Thread_branch=1.
Main loop.
While not keyhit(1).
Branch todo file loading tif hilo_branch=1 then loadfile (file_in$).
Endif.
Draw on backbuffer.
Setbuffer backbuffer().
Cls.
Color 255,255,255.
Text 360,230,loading.
Draw the slider tif hilo_branch=1 then.
Thread_percent=((filecount*100)/filesize (file_in$)).
Color 255,255,255.
Rect 150,250,500,25,0.
Rect 150,250, hilo_percent*5,25,1.
Endif.
Draw the image when loaded tif hilo_branch=2 then drawblok img, 250,200.
Text 360,450,esc todo quit.
Endif.
Draw mouse pointer.
Drawimage mouseimg, mousex(), mousey().
Flip false.
Wend.
End.
Saving file.
Function savefile (file_out$).
Fileout = writefile (file_out$).
For x=0 todo 319 tfor y=0 todo 199 twritebyte (fileout, rnd(0,255)) twritebyte (fileout, rnd(0,255)) twritebyte (fileout, rnd(0,255)) tnext.
Next.
Closefile (fileout).
End function.
Loading file in lógical steps.
Function loadfile (file_in$).
Step one - Open file for reading.
If hilo_count=0 then tfilein = readfile (file_in$) tthread_count=1.
Filecount=0.
X=0.
Y=0.
Endif.
Step two - Read data and write todo imagebuffer.
If hilo_count =1 then ty=y+1 tif y=200 then x=x+1 y=0 tendif tread1 = readbyte (filein) tread2 = readbyte (filein).
Read3 = readbyte (filein).
Filecount=filecount+3.
Draw todo imagebuffer.
Setbuffer imagebuffer(img) tcolor read1, read2, read3 tplot x, y.
Chek for end of file tif eof(filein) then thread_count=2 tendif.
Endif.
Step thre - Close file.
If hilo_count=2 then tclosefile (filein) tthread_branch=2.
Endif.
End function.
Pues en un hilo o threading una animación muestra una imagen como esta. http://i50.tinypic.com/2wel47q.jpg.
Y el otro hilo en segundo plano carga los recursos necesarios. Esto implica que la pantalla no queda paralizada mientras se carga los recursos algo muy guapo, al igual que sucede en GTA IV, cuando carga los recursos.
Bien eso es todo.
Ha y la lib.
-- IMÁGENES ADJUNTAS --
https://foro3d.com/attachment.php?attachmentid=172169
Hola señores me presento soy Ricardo y estoy tratando de aprender el lenguaje Blitz basic, la consulta es por una cuestión puntual, es estado leyendo la ayuda del Blitz y no veo la forma de hacer que el puntero del mouse sea visible en el modo full screen, agredeseré cualquier ayuda.
Hola, en modo de pantalla completa no es posible ver el puntero del mouse a menos que cartes una textura con la figura del puntero y la dibujes en las cordenads del mouse (x, y), por ejemplo.Cita:
Hola señores me presento soy Ricardo y estoy tratando de aprender el lenguaje Blitz basic, la consulta es por una cuestión puntual, es estado leyendo la ayuda del Blitz y no veo la forma de hacer que el puntero del mouse sea visible en el modo full screen, agredeseré cualquier ayuda.
La variable puntero%, hace referencia a una imagen que ha sido cargada con anterioridad.Código:Drawimage (puntero%,mousex(),mousey()).
De esta forma ya en pantalla completa visualizas el puntero. Saludos.Código:Local puntero% = loadimage (media\puntero, png).
Este hilo está un poco dejado, he hecho un Pacman en Blitz, dejo el juego y el código para quien quiera verlo, saludos. descargar archivo.
-- IMÁGENES ADJUNTAS --Código:;---------------------------------------------------------------------------------------------------------------------
-Pacman by manufer--------------------------------------------------------------------------
Graphics 800,600,16,2.
Setbuffer backbuffer().
Creando un timer----
Frametimer=createtimer(60).
Carga de gráficos---
Logotipo=loadimage (GFX/logotipo, bmp).
Pantalla=loadimage (GFX/pantalla, bmp).
Maskimage pantalla,0,0,0.
Pacman=loadanimimage (GFX/sprites, bmp,32,32,0,32).
Maskimage Pacman,0,0,0.
Bola=loadimage (GFX/bola, bmp).
Maskimage bola,0,0,0.
Gran_bola=loadimage (GFX/gran_bola, bmp).
Maskimage gran_bola,0,0,0.
Nullimage=loadimage (GFX/null, bmp).
Frutas=loadanimimage (GFX/frutas, bmp,32,32,0,16).
Maskimage frutas,0,0,0.
Maskimage nullimage,255,255,255.
Shadow=loadanimimage (GFX/fantasma, bmp,32,32,0,4, rojo.
Maskimage shadow,0,0,0.
Spedy=loadanimimage (GFX/fantasma, bmp,32,32,0,4, rosa.
Maskimage speedy,0,0,0.
Bashful=loadanimimage (GFX/fantasma, bmp,32,32,0,4, azul.
Maskimage bashful,0,0,0.
Pokey=loadanimimage (GFX/fantasma, bmp,32,32,0,4, amarillo.
Maskimage pokey,0,0,0.
Color 250,250,250.
Carga de sonidos---
Andar=loadsound(sonidos/andando.wav).
Lopsound andar.
Dead=loadsound(sonidos/pacman_dead.wav).
Come_fruta=loadsound(sonidos/come_fruta.wav).
Pip=loadsound(sonidos/pacman_pip.wav).
Newlevel=loadsound(sonidos/comienza_nivel.wav).
Come=loadsound(sonidos/come_bola.wav).
Soundvolume come.5.
Azules=loadsound(sonidos/fantasmas_azules, wav).
Soundvolume azules.5.
Lopsound azules.
Azules2=loadsound(sonidos/fantasmas_azules2.wav).
Lopsound azules2.
Declaración de variables---
Skipframe1=0.
Frame_pacman=2.
Velocidad#=1.
Temp_velocidad#=0.
Xpacman#=0.
Ypacman#=0.
Dirección_pacman=4.
Pacman_status=1 ; 0=muerto, 1=vivo.
Level#=0.
Vidas=3.
Total_bolas=244.
Status_fantasma=1.
Contador_fantasmas#=0.
Dim status_fantasmas(4).
Puntos=0.
Dim bolas(460).
Dim granbolas(4).
Dim eyes(4).
Record=0.
Dim posx(10).
Posx(1)=192 : posx(2)=228 : posx(3)=280 : posx(4)=333 : posx(5)=385 : posx(6)=438 : posx(7)=490 : posx(=542.
Posx(9)=595 : posx(10)=628.
Dim Posy(10).
Posy(10)=519 : Posy(9)=465 : Posy(=410 : Posy(7)=357 : Posy(6)=302 : Posy(5)=248 : Posy(4)=192 : Posy(3)=139.
Posy(2)=86 : Posy(1)=12.
Sedrnd millisecs().
Flash=0.
Tips-------
Dim tip$(30).
Consejo=Rand(10).
Tip(1)=shadow (rojo) es el fantasma más rápido, si lo llevas pegado te costara deshacerte de él.
Tip(2)=speedy (rosa) es el más listo de todos, buscara hacerte una emboscada.
Tip(3)=bashful (cyan) es el más lento, pero no lo subestimes.
Tip(4)=pokey (naranja) es el tonto del grupo, incluso a veces tomara caminos evasivos.
Tip(5)=cuando Pacman come bolas, su velocidad se ve reducida, toma caminos despejados para escapar de los fantasmas.
Tip(6)=los carriles de teletrasnportación reducen la velocidad de los fantasmas, si los usas los dejaras atrás.
Tip(7)=la zona inferior de la pantalla es la más peligrosa, puedes caer en una emboscada fácilmente.
Tip(=a los 10.000 puntos conseguirás una vida extra.
Tip(9)=las bolas pequeñas dan 10 puntos, las grandes 50 puntos, además de convertir los fantasmas en comestibles.
Tip(10)=el tiempo que los fantasmas están de color azul, se irá acortando conforme pases niveles.
Tip(11)=las frutas que salen en el centro de la pantalla dan suculosos puntos, podrás comer 2 por nivel, pero si pierdes una vida mientras la fruta esta activa la perderas.
Tip(12)=cuando comas un fantasma cerca de su casa, ten mucho cuidado ya que se regenerara muy pronto y podrá darte caza.
Tip(13)=cada nivel aumentara el ritmo de juego, siendo extremadamente desafiante a partir del nivel 8.
Tip(14)=el nombre original en Japón que es donde salió el juego, es puck-man, pero debido a su similitud con fuck-man lo cambiaron por pac-man.
Tip(15)=el juego fue lanzado el 21 de mayo de 1980 y se vendieron 293.822 unidades, desbancando a space Invaders que hasta entonces era el rey de los salones recreativos.
Tip(16)=en el juego original, la ultima pantalla jugable es la 255, por un error de programación no contemplaron la posibilidad de pasar tantas pantallas y el byte encargado se desborda provocando errores gráficos.
Dim nivel_jugador$(11).
Nivel_jugador(1)=pringado del Pacman;hasta 2000.
Nivel_jugador(2)=jugador mediocre;hasta 5000.
Nivel_jugador(3)=aficionado;hasta 8000.
Nivel_jugador(4)=el típico jugador medio;hasta 12000.
Nivel_jugador(5)=espabilado en el Pacman;hasta 14000.
Nivel_jugador(6)=mareador de fantasmas;hasta 18000.
Nivel_jugador(7)=tragabolas avanzado;hasta 22000.
Nivel_jugador(=chuleando a esos fantasmas.;hasta 25000.
Nivel_jugador(9)=el crack del Pacman;hasta 30000.
Nivel_jugador(10)=el amo ;hasta 50000.
Nivel_jugador(11)=dios del Pacman.
Nivel_jugador_actual$=
--fantasmas-.
X_shadow#=posx(5) : y_shadow#=Posy(4) : frame_shadow=1 : velocidad_shadow#=1.2 :temp_velocidad_shadow#=0: dirección_shadow=4.
X_spedy#=posx(5) : y_spedy#=Posy(4) : frame_spedy=1 : velocidad_spedy#=1.1 :temp_velocidad_spedy#=0: dirección_spedy=1.
X_bashful#=posx(5) : y_bashful#=Posy(4) : frame_bashful=1 : velocidad_bashful#=1.1 :temp_velocidad_bashful#=0: dirección_bashful=1.
X_pokey#=posx(5) : y_pokey#=Posy(4) : frame_pokey=1 : velocidad_pokey#=1.1 :temp_velocidad_pokey#=0: dirección_pokey=1.
Filein=openfile (data, dat).
Record=readint(filein).
Closefile (filein).
Font20=loadfont(arcade normal,14,false,false,false).
Setfont font20.
Menu.
Menú----------------------------------------------------------------------------------------
Color 200,200,200.
X_pacman=1000.
X_text=600.
Dirección_pacman=4.
Dirección_spedy=4.
Dirección_shadow=4.
Dirección_bashful=4.
Dirección_pokey=4.
Vidas=3.
Vida_extra=0.
Puntos=0.
Level=0.
For a=1 todo 4.
Status_fantasmas(a)=1.
Next.
While not keydown(31).
Cls.
If keydown(1) then end.
X_text=x_text-2.
X_pacman=x_pacman-1.
If x_text<-1500 then x_text=1000 : consejo=Rand(10).
If x_pacman=-180 then x_pacman=800.
Skipframe1=skipframe1+1.
Skipframe_fantasma=skipframe_fantasma+1.
If Skipframe1>20 then Skipframe1=1.
If Skipframe_fantasma>30 then Skipframe_fantasma=0.
Contador=contador+1.
If contador>79 then contador=0.
If contador<50 then flash=1 else flash=0.
Gosub animación.
Nivel_jugador_actual=nivel_jugador(1).
If récord>5000 then nivel_jugador_actual=nivel_jugador(2).
If récord>7500 then nivel_jugador_actual=nivel_jugador(3).
If récord>9000 then nivel_jugador_actual=nivel_jugador(4).
If récord>12000 then nivel_jugador_actual=nivel_jugador(5).
If récord>14000 then nivel_jugador_actual=nivel_jugador(6).
If récord>18000 then nivel_jugador_actual=nivel_jugador(7).
If récord>22000 then nivel_jugador_actual=nivel_jugador(.
If récord>25000 then nivel_jugador_actual=nivel_jugador(9).
If récord>30000 then nivel_jugador_actual=nivel_jugador(10).
If récord>50000 then nivel_jugador_actual=nivel_jugador(11).
Drawimage logotipo,150,60.
Drawimage Pacman,x_pacman,250, frame_pacman.
Drawimage shadow,x_pacman+100,250, frame_shadow.
Drawimage speedy,x_pacman+125,250, frame_spedy.
Drawimage bashful,x_pacman+150,250, frame_bashful.
Drawimage pokey,x_pacman+175,250, frame_pokey.
Drawimage shadow,70,350, frame_shadow : text 130,360,shadow.
Drawimage speedy,70,390, frame_spedy : text 130,400,speedy.
Drawimage bashful,70,430, frame_bashful : text 130,440,bashful.
Drawimage pokey,70,470, frame_pokey : text 130,480,pokey.
Text 370,360,hi-score +récord.
Text 370,400, nivel_jugador_actual.
If flash=1 then text 270,200,pres s todo start.
Text 110,560,Manuel Fernández - Manuferhi@gmail. Com.
Text x_text,20, tip(consejo).
Waittimer(frametimer).
Flip.
Wend.
Newlevel.
Comienza el nivel (reset)------------------------------------------------------------------------
Stopchannel(andando).
Cls.
Stopchannel(fantasmas_azules).
Stopchannel(fantasmas_azules2).
Velocidad=1.3+level/10.
Velocidad_shadow=1.2+level/10.
Velocidad_spedy=1.15+level/10.
Velocidad_bashful=1.1+level/10.
Velocidad_pokey=1.1+level/10.
Contador_velocidad=50.
Level=level+1.
Total_bolas=244.
Fruta_level=level.
Fruta_activa=1.
Sedrnd millisecs().
For a=1 todo 460.
Bolas(a)=copyimage (bola), regénero las bolas pequeñas.
Next.
For a=1 todo 4.
Granbolas(a)=copyimage (gran_bola).
Next.
Playsound newlevel.
Drawimage pantalla,182,1,0.
Color 255,255,0 : text posx(5), Posy(6)+8,ready.
Flip.
Delay 3500.
If level=1 then fruta_level=1 :puntos_fruta=100.
If level=2 then fruta_level=2 :puntos_fruta=300.
If level=3 or level=4 then fruta_level=3 :puntos_fruta=500.
If level=5 or level=6 then fruta_level=4 :puntos_fruta=700.
If level=7 or level=8 then fruta_level=5 :puntos_fruta=1000.
If level=9 or level=10 then fruta_level=6 :puntos_fruta=2000.
If level=11 or level=12 then fruta_level=7 :puntos_fruta=3000.
If level=>13 then fruta_level=0 :puntos_fruta=5000.
Newlive.
Pacman_status=1.
Dirección_pacman=4.
Contador_fantasmas=0.
Status_fantasma=1.
Xpacman=posx(5)+26 : ypacman=Posy(;posición inicial Pacman.
X_shadow#=posx(5)+26 : y_shadow#=Posy(4) ;posición inicial shadow.
X_spedy#=posx(5)+26 : y_spedy#=Posy(5) ;posición inicial speedy.
X_bashful#=posx(5)-10 : y_bashful#=Posy(5) ;posición inicial bashful.
X_pokey#=posx(5)+62 : y_pokey#=Posy(5) ;posición inicial pokey.
Dirección_shadow=4.
Dirección_spedy=3.
Dirección_bashful=1.
Dirección_pokey=1.
Contador_fantasmas=0.
For n=1 todo 4.
Status_fantasmas(n)=1.
Eyes(n)=0.
Next.
Contador_fruta=0.
Stopchannel(fantasmas_azules).
Stopchannel(andando).
Andando=playsound(andar).
Comienza el bucle------------------------------------------------------------------------------------
While not keydown(1).
Waitkey.
Cls.
Contador_velocidad=contador_velocidad+1.
Velocidades.
If contador_velocidad<35 then temp_velocidad=velocidad*.9 else temp_velocidad=velocidad.
If temp_velocidad>2.5 then temp_velocidad=2.5.
If status_fantasmas(1)=1 then temp_velocidad_shadow=velocidad_shadow.
If status_fantasmas(1)=2 then temp_velocidad_shadow=velocidad_shadow*2.
If status_fantasmas(1)=0 then temp_velocidad_shadow=velocidad_shadow*.6.
If status_fantasmas(2)=1 then temp_velocidad_spedy=velocidad_spedy.
If status_fantasmas(2)=2 then temp_velocidad_spedy=velocidad_spedy*2.
If status_fantasmas(2)=0 then temp_velocidad_spedy=velocidad_spedy*.6.
If status_fantasmas(3)=1 then temp_velocidad_bashful=velocidad_bashful.
If status_fantasmas(3)=2 then temp_velocidad_bashful=velocidad_bashful*2.
If status_fantasmas(3)=0 then temp_velocidad_bashful=velocidad_bashful*.6.
If status_fantasmas(4)=1 then temp_velocidad_pokey=velocidad_pokey.
If status_fantasmas(4)=2 then temp_velocidad_pokey=velocidad_pokey*2.
If status_fantasmas(4)=0 then temp_velocidad_pokey=velocidad_pokey*.6.
If temp_velocidad_shadow>2.5 then temp_velocidad_shadow=2.5.
If temp_velocidad_spedy>2.5 then temp_velocidad_spedy=2.5.
If temp_velocidad_bashful>2.5 then temp_velocidad_bashful=2.5.
If temp_velocidad_pokey>2.5 then temp_velocidad_pokey=2.5.
If abs(x_shadow-posx(1))<40 and abs(y_shadow-Posy(5))<5 then temp_velocidad_shadow=temp_velocidad_shadow*.6.
If abs(x_spedy-posx(1))<40 and abs(y_spedy-Posy(5))<5 then temp_velocidad_spedy=temp_velocidad_spedy*.6.
If abs(x_bashful-posx(1))<40 and abs(y_bashful-Posy(5))<5 then temp_velocidad_bashful=temp_velocidad_bashful*.6.
If abs(x_pokey-posx(1))<40 and abs(y_pokey-Posy(5))<5 then temp_velocidad_pokey=temp_velocidad_pokey*.6.
If abs(x_shadow-posx(10))<40 and abs(y_shadow-Posy(5))<5 then temp_velocidad_shadow=temp_velocidad_shadow*.6.
If abs(x_spedy-posx(10))<40 and abs(y_spedy-Posy(5))<5 then temp_velocidad_spedy=temp_velocidad_spedy*.6.
If abs(x_bashful-posx(10))<40 and abs(y_bashful-Posy(5))<5 then temp_velocidad_bashful=temp_velocidad_bashful*.6.
If abs(x_pokey-posx(10))<40 and abs(y_pokey-Posy(5))<5 then temp_velocidad_pokey=temp_velocidad_pokey*.6.
Skipframe1=skipframe1+1.
Skipframe_fantasma=skipframe_fantasma+1.
If Skipframe1>20 then Skipframe1=1.
If Skipframe_fantasma>30 then Skipframe_fantasma=0.
Gosub animación.
If puntos>10000 and vida_extra=0 then vidas=vidas+1 : vida_extra=1.
If eyes(1)=0 and eyes(2)=0 and eyes(3)=0 and eyes(4)=0 then stopchannel(fantasmas_azules2).
Detección de colisiones.
Pacman_shadow=ImagesCollide (shadow,x_shadow, y_shadow,36, Pacman,xpacman, ypacman,14).
If pacman_shadow=1 and status_fantasmas(1)=1 then pacman_status=0.
If pacman_shadow=1 and status_fantasmas(1)=0 then.
Eyes(1)=1 : velocidad_eyes=3 : status_fantasmas(1)=2 :display_puntos_fantasmas=1.
Temp_x=xpacman : temp_y=ypacman.
Temp_frame=temp_frame+1.
If temp_frame=27 then puntos=puntos+200.
If temp_frame=28 then puntos=puntos+400.
If temp_frame=29 then puntos=puntos+800.
If temp_frame=30 then puntos=puntos+1600.
Stopchannel(fantasmas_azules2).
Fantasmas_azules2=playsound(azules2).
Playsound(come_fruta).
Endif.
Pacman_spedy=ImagesCollide (speedy,x_spedy, y_spedy,36, Pacman,xpacman, ypacman,14).
If pacman_spedy=1 and status_fantasmas(2)=1 then pacman_status=0.
If pacman_spedy=1 and status_fantasmas(2)=0 then.
Eyes(2)=1 : velocidad_eyes=3 : status_fantasmas(2)=2 :display_puntos_fantasmas=1.
Temp_x=xpacman : temp_y=ypacman.
Temp_frame=temp_frame+1.
If temp_frame=27 then puntos=puntos+200.
If temp_frame=28 then puntos=puntos+400.
If temp_frame=29 then puntos=puntos+800.
If temp_frame=30 then puntos=puntos+1600.
Stopchannel(fantasmas_azules2).
Fantasmas_azules2=playsound(azules2).
Playsound(come_fruta).
Endif.
Pacman_bashful=ImagesCollide (bashful,x_bashful, y_bashful,36, Pacman,xpacman, ypacman,14).
If pacman_bashful=1 and status_fantasmas(3)=1 then pacman_status=0.
If pacman_bashful=1 and status_fantasmas(3)=0 then.
Eyes(3)=1 : velocidad_eyes=3 : status_fantasmas(3)=2 :display_puntos_fantasmas=1.
Temp_x=xpacman : temp_y=ypacman.
Temp_frame=temp_frame+1.
If temp_frame=27 then puntos=puntos+200.
If temp_frame=28 then puntos=puntos+400.
If temp_frame=29 then puntos=puntos+800.
If temp_frame=30 then puntos=puntos+1600.
Stopchannel(fantasmas_azules2).
Fantasmas_azules2=playsound(azules2).
Playsound(come_fruta).
Endif.
Pacman_pokey=ImagesCollide (pokey,x_pokey, y_pokey,36, Pacman,xpacman, ypacman,14).
If pacman_pokey=1 and status_fantasmas(4)=1 then pacman_status=0.
If pacman_pokey=1 and status_fantasmas(4)=0 then.
Eyes(4)=1 : velocidad_eyes=3 : status_fantasmas(4)=2 :display_puntos_fantasmas=1.
Temp_x=xpacman : temp_y=ypacman.
Temp_frame=temp_frame+1.
If temp_frame=27 then puntos=puntos+200.
If temp_frame=28 then puntos=puntos+400.
If temp_frame=29 then puntos=puntos+800.
If temp_frame=30 then puntos=puntos+1600.
Stopchannel(fantasmas_azules2).
Fantasmas_azules2=playsound(azules2).
Playsound(come_fruta).
Endif.
If pacman_status=0 then stopchannel andando.
If status_fantasma=0 then contador_fantasmas=contador_fantasmas+velocidad.
If contador_fantasmas>800 then.
Contador_fantasmas=0.
For n=1 todo 4.
If eyes(n)=0 then status_fantasmas(n)=1.
Next.
Status_fantasma=1.
Stopchannel(andando) : stopchannel(fantasmas_azules) :andando=playsound(andar) topchannel(fantasmas_azules2).
Endif.
If contador_fruta>2000 then contador_fruta=0.
Contador_fruta=contador_fruta+velocidad.
If total_bolas=<0 then goto newlevel.
If display_puntos>0 then display_puntos=display_puntos+1.
If display_puntos>150 then display_puntos=0.
If display_puntos_fantasmas>0 then display_puntos_fantasmas=display_puntos_fantasmas+1.
If display_puntos_fantasmas>150 then display_puntos_fantasmas=0.
Detección de teclas---
-Horientación de los fantasmas.
Dirección_inversa_shadow=dirección_shadow+2.
Dirección_inversa_spedy=dirección_spedy+2.
Dirección_inversa_bashful=dirección_bashful+2.
Dirección_inversa_pokey=dirección_pokey+2.
If dirección_inversa_shadow>4 then dirección_inversa_shadow=dirección_inversa_shadow-4.
If dirección_inversa_spedy>4 then dirección_inversa_spedy=dirección_inversa_spedy-4.
If dirección_inversa_bashful>4 then dirección_inversa_bashful=dirección_inversa_bashful-4.
If dirección_inversa_pokey>4 then dirección_inversa_pokey=dirección_inversa_pokey-4.
If xpacman>x_shadow then.
If ypacman<y_shadow then horientación_shadow=5 else horientación_shadow=6.
Endif.
If xpacman>x_spedy then.
If ypacman<y_spedy then horientación_spedy=5 else horientación_spedy=6.
Endif.
If xpacman>x_bashful then.
If ypacman<y_bashful then horientación_bashful=5 else horientación_bashful=6.
Endif.
If xpacman>x_pokey then.
If ypacman<y_pokey then horientación_pokey=5 else horientación_pokey=6.
Endif.
If xpacman<x_shadow then.
If ypacman<y_shadow then horientación_shadow=8 else horientación_shadow=7.
Endif.
If xpacman<x_spedy then.
If ypacman<y_spedy then horientación_spedy=8 else horientación_spedy=7.
Endif.
If xpacman<x_bashful then.
If ypacman<y_bashful then horientación_bashful=8 else horientación_bashful=7.
Endif.
If xpacman<x_pokey then.
If ypacman<y_pokey then horientación_pokey=8 else horientación_pokey=7.
Endif.
If abs(xpacman-x_shadow)<4 then.
If ypacman<y_shadow then horientación_shadow=1 else horientación_shadow=3.
Endif.
If abs(xpacman-x_spedy)<4 then.
If ypacman<y_spedy then horientación_spedy=1 else horientación_spedy=3.
Endif.
If abs(xpacman-x_bashful)<4 then.
If ypacman<y_bashful then horientación_bashful=1 else horientación_bashful=3.
Endif.
If abs(xpacman-x_pokey)<4 then.
If ypacman<y_pokey then horientación_pokey=1 else horientación_pokey=3.
Endif.
If abs(ypacman-y_shadow)<4 then.
If xpacman<x_shadow then horientación_shadow=4 else horientación_shadow=2.
Endif.
If abs(ypacman-y_spedy)<4 then.
If xpacman<x_spedy then horientación_spedy=4 else horientación_spedy=2.
Endif.
If abs(ypacman-y_bashful)<4 then.
If xpacman<x_bashful then horientación_bashful=4 else horientación_bashful=2.
Endif.
If abs(ypacman-y_pokey)<4 then.
If xpacman<x_pokey then horientación_pokey=4 else horientación_pokey=2.
Endif.
If bloqueo>0 then bloqueo=bloqueo-1.
If bloqueo2>0 then bloqueo2=bloqueo2-1.
If bloqueo3>0 then bloqueo3=bloqueo3-1.
If bloqueo4>0 then bloqueo4=bloqueo4-1.
Ejes.
Casa de los fantasmas----
If sale_bashful<>1 then sale_bashful=Rand(80-level*.
If sale_bashful=1 then sale_pokey=Rand(80-level*.
If abs(x_bashful-posx(5)+10)<2 and abs(y_bashful-Posy(5)+15)<2 then.
Dirección_bashful=3.
Endif.
If abs(x_bashful-posx(5)+10)<2 and abs(y_bashful-Posy(5))<2 then.
If sale_bashful=1 then dirección_bashful=2.
Endif.
If abs(x_bashful-posx(5)+10)<2 and abs(y_bashful-Posy(5)-15)<2 then.
Dirección_bashful=1.
Endif.
If abs(x_pokey-posx(5)-62)<2 and abs(y_pokey-Posy(5)+15)<2 then.
Dirección_pokey=3.
Endif.
If abs(x_pokey-posx(5)-62)<2 and abs(y_pokey-Posy(5))<2 then.
If sale_pokey=1 then dirección_pokey=4.
Endif.
If abs(x_pokey-posx(5)-62)<2 and abs(y_pokey-Posy(5)-15)<2 then.
Dirección_pokey=1.
Endif.
Fila 1----------------------------------------------
If (abs(xpacman-posx(1))<2 or abs(xpacman-posx(6))<2) and (abs(ypacman-Posy(1))<2 or abs(ypacman-Posy(7))<2 or abs(ypacman-Posy(9))<2) then.
Dirección_pacman=0.
If keydown(205) then dirección_pacman=2.
If keydown(20 then dirección_pacman=3.
Endif.
If (abs(x_shadow-posx(1))<2 or abs(x_shadow-posx(6))<2) and (abs(y_shadow-Posy(1))<2 or abs(y_shadow-Posy(7))<2 or abs(y_shadow-Posy(9))<2) then.
If dirección_shadow=1 then dirección_shadow=2.
If dirección_shadow=4 then dirección_shadow=3.
Endif.
If (abs(x_spedy-posx(1))<2 or abs(x_spedy-posx(6))<2) and (abs(y_spedy-Posy(1))<2 or abs(y_spedy-Posy(7))<2 or abs(y_spedy-Posy(9))<2) then.
If dirección_spedy=1 then dirección_spedy=2.
If dirección_spedy=4 then dirección_spedy=3.
Endif.
If (abs(x_bashful-posx(1))<2 or abs(x_bashful-posx(6))<2) and (abs(y_bashful-Posy(1))<2 or abs(y_bashful-Posy(7))<2 or abs(y_bashful-Posy(9))<2) then.
If dirección_bashful=1 then dirección_bashful=2.
If dirección_bashful=4 then dirección_bashful=3.
Endif.
If (abs(x_pokey-posx(1))<2 or abs(x_pokey-posx(6))<2) and (abs(y_pokey-Posy(1))<2 or abs(y_pokey-Posy(7))<2 or abs(y_pokey-Posy(9))<2) then.
If dirección_pokey=1 then dirección_pokey=2.
If dirección_pokey=4 then dirección_pokey=3.
Endif.
If (abs(xpacman-posx(3))<2 or abs(xpacman-posx()<2) and abs(ypacman-Posy(1))<2 then.
If dirección_pacman=1 then dirección_pacman=0.
If keydown(205) then dirección_pacman=2.
If keydown(20 then dirección_pacman=3.
If keydown(203) then dirección_pacman=4.
Endif.
If (abs(x_shadow-posx(3))<2 or abs(x_shadow-posx()<2) and abs(y_shadow-Posy(1))<2 then.
If bloqueo=0 then.
Bloqueo=bloqueo+20.
Sorteo=Rand(2).
Dirección_shadow=0.
If horientación_shadow=7 then horientación_shadow=4.
If horientación_shadow=6 then.
If sorteo=1 then horientación_shadow=2 else horientación_shadow=3.
Endif.
If horientación_shadow<5 then dirección_shadow=horientación_shadow.
If status_fantasmas(1)=0 then dirección_shadow=dirección_pacman.
If dirección_shadow=dirección_inversa_shadow then dirección_shadow=Rand(2,4).
While dirección_shadow=1 or dirección_shadow=dirección_inversa_shadow.
Dirección_shadow=Rand(4).
Wend.
If status_fantasmas(1)=2 then dirección_shadow=3.
Endif.
Endif.
If (abs(x_spedy-posx(3))<2 or abs(x_spedy-posx()<2) and abs(y_spedy-Posy(1))<2 then.
If bloqueo2=0 then.
Bloqueo2=bloqueo2+20.
Sorteo=Rand(2).
Dirección_spedy=0.
If horientación_spedy=7 then horientación_spedy=4.
If horientación_spedy=6 then.
If sorteo=1 then horientación_spedy=2 else horientación_spedy=3.
Endif.
If horientación_spedy<5 then dirección_spedy=horientación_spedy.
If status_fantasmas(2)=0 then dirección_spedy=dirección_pacman.
If dirección_spedy=dirección_inversa_spedy then dirección_spedy=Rand(2,4).
While dirección_spedy=1 or dirección_spedy=dirección_inversa_spedy.
Dirección_spedy=Rand(4).
Wend.
If status_fantasmas(2)=2 then dirección_spedy=3.
Endif.
Endif.
If (abs(x_bashful-posx(3))<2 or abs(x_bashful-posx()<2) and abs(y_bashful-Posy(1))<2 then.
If bloqueo3=0 then.
Bloqueo3=bloqueo3+20.
Sorteo=Rand(2).
Dirección_bashful=0.
If horientación_bashful=7 then horientación_bashful=4.
If horientación_bashful=6 then.
If sorteo=1 then horientación_bashful=2 else horientación_bashful=3.
Endif.
If horientación_bashful<5 then dirección_bashful=horientación_bashful.
If status_fantasmas(4)=0 then dirección_bashful=dirección_pacman.
If dirección_bashful=dirección_inversa_bashful then dirección_bashful=Rand(2,4).
While dirección_bashful=1 or dirección_bashful=dirección_inversa_bashful.
Dirección_bashful=Rand(4).
Wend.
If status_fantasmas(3)=2 then dirección_bashful=3.
Endif.
Endif.
If (abs(x_pokey-posx(3))<2 or abs(x_pokey-posx()<2) and abs(y_pokey-Posy(1))<2 then.
If bloqueo4=0 then.
Bloqueo4=bloqueo4+20.
Sorteo=Rand(2).
Dirección_pokey=0.
If horientación_pokey=7 then horientación_pokey=4.
If horientación_pokey=6 then.
If sorteo=1 then horientación_pokey=2 else horientación_pokey=3.
Endif.
If horientación_pokey<5 then dirección_pokey=horientación_pokey.
If status_fantasmas(4)=0 then dirección_pokey=dirección_pacman.
If dirección_pokey=dirección_inversa_pokey then dirección_pokey=Rand(2,4).
While dirección_pokey=1 or dirección_pokey=dirección_inversa_pokey.
Dirección_pokey=Rand(4).
Wend.
If status_fantasmas(4)=2 then dirección_pokey=3.
Endif.
Endif.
If (abs(xpacman-posx(5))<2 or abs(xpacman-posx(10))<2) and (abs(ypacman-Posy(1))<2 or abs(ypacman-Posy(7))<2 or abs(ypacman-Posy(9))<2) then.
Dirección_pacman=0.
If keydown(20 then dirección_pacman=3.
If keydown(203) then dirección_pacman=4.
Endif.
If (abs(x_shadow-posx(5))<2 or abs(x_shadow-posx(10))<2) and (abs(y_shadow-Posy(1))<2 or abs(y_shadow-Posy(7))<2 or abs(y_shadow-Posy(9))<2) then.
If dirección_shadow=2 then dirección_shadow=3.
If dirección_shadow=1 then dirección_shadow=4.
Endif.
If (abs(x_spedy-posx(5))<2 or abs(x_spedy-posx(10))<2) and (abs(y_spedy-Posy(1))<2 or abs(y_spedy-Posy(7))<2 or abs(y_spedy-Posy(9))<2) then.
If dirección_spedy=2 then dirección_spedy=3.
If dirección_spedy=1 then dirección_spedy=4.
Endif.
If (abs(x_bashful-posx(5))<2 or abs(x_bashful-posx(10))<2) and (abs(y_bashful-Posy(1))<2 or abs(y_bashful-Posy(7))<2 or abs(y_bashful-Posy(9))<2) then.
If dirección_bashful=2 then dirección_bashful=3.
If dirección_bashful=1 then dirección_bashful=4.
Endif.
If (abs(x_pokey-posx(5))<2 or abs(x_pokey-posx(10))<2) and (abs(y_pokey-Posy(1))<2 or abs(y_pokey-Posy(7))<2 or abs(y_pokey-Posy(9))<2) then.
If dirección_pokey=2 then dirección_pokey=3.
If dirección_pokey=1 then dirección_pokey=4.
Endif.
Fila 2----------------------------------------------
If abs(xpacman-posx(1))<2 and abs(ypacman-Posy(2))<2 then.
If dirección_pacman=4 then dirección_pacman=0.
If keydown(205) then dirección_pacman=2.
If keydown(20 then dirección_pacman=3.
If keydown(200) then dirección_pacman=1.
Endif.
If abs(x_shadow-posx(1))<2 and abs(y_shadow-Posy(2))<2 then.
If bloqueo=0 then.
Bloqueo=bloqueo+20.
Sorteo=Rand(2).
Dirección_shadow=0.
If horientación_shadow=6 then.
If sorteo=1 then horientación_shadow=2 else horientación_shadow=3.
Endif.
If horientación_shadow=5 then.
If sorteo=1 then horientación_shadow=2 else horientación_shadow=1.
Endif.
If horientación_shadow<5 then dirección_shadow=horientación_shadow.
If dirección_shadow=4 then dirección_shadow=2.
If dirección_shadow=dirección_inversa_shadow then dirección_shadow=Rand(3).
If status_fantasmas(1)=2 then dirección_shadow=2.
Endif.
Endif.
If abs(x_spedy-posx(1))<2 and abs(y_spedy-Posy(2))<2 then.
If bloqueo2=0 then.
Bloqueo2=bloqueo2+20.
Sorteo=Rand(2).
Dirección_spedy=0.
If horientación_spedy=6 then.
If sorteo=1 then horientación_spedy=2 else horientación_spedy=3.
Endif.
If horientación_spedy=5 then.
If sorteo=1 then horientación_spedy=2 else horientación_spedy=1.
Endif.
If horientación_spedy<5 then dirección_spedy=horientación_spedy.
If dirección_spedy=4 then dirección_spedy=2.
If dirección_spedy=dirección_inversa_spedy then dirección_spedy=Rand(3).
If status_fantasmas(2)=2 then dirección_spedy=2.
Endif.
Endif.
If abs(x_bashful-posx(1))<2 and abs(y_bashful-Posy(2))<2 then.
If bloqueo3=0 then.
Bloqueo3=bloqueo3+20.
Sorteo=Rand(2).
Dirección_bashful=0.
If horientación_bashful=6 then.
If sorteo=1 then horientación_bashful=2 else horientación_bashful=3.
Endif.
If horientación_bashful=5 then.
If sorteo=1 then horientación_bashful=2 else horientación_bashful=1.
Endif.
If horientación_bashful<5 then dirección_bashful=horientación_bashful.
If dirección_bashful=4 then dirección_bashful=2.
If dirección_bashful=dirección_inversa_bashful then dirección_bashful=Rand(3).
If status_fantasmas(3)=2 then dirección_bashful=2.
Endif.
Endif.
If abs(x_pokey-posx(1))<2 and abs(y_pokey-Posy(2))<2 then.
If bloqueo4=0 then.
Bloqueo4=bloqueo4+20.
Sorteo=Rand(2).
Dirección_pokey=0.
If horientación_pokey=6 then.
If sorteo=1 then horientación_pokey=2 else horientación_pokey=3.
Endif.
If horientación_pokey=5 then.
If sorteo=1 then horientación_pokey=2 else horientación_pokey=1.
Endif.
If horientación_pokey<5 then dirección_pokey=horientación_pokey.
If dirección_pokey=4 then dirección_pokey=2.
If dirección_pokey=dirección_inversa_pokey then dirección_pokey=Rand(3).
If status_fantasmas(4)=2 then dirección_pokey=2.
Endif.
Endif.
If (abs(xpacman-posx(3))<2 or abs(xpacman-posx()<2) and (abs(ypacman-Posy(2))<2 or abs(ypacman-Posy(5))<2 or abs(ypacman-Posy(7))<2) then.
If keydown(200) then dirección_pacman=1.
If keydown(205) then dirección_pacman=2.
If keydown(20 then dirección_pacman=3.
If keydown(203) then dirección_pacman=4.
Endif.
If (abs(x_shadow-posx(3))<2 or abs(x_shadow-posx()<2) and (abs(y_shadow-Posy(2))<2 or abs(y_shadow-Posy(5))<2 or abs(y_shadow-Posy(7))<2) then.
If bloqueo=0 then.
Bloqueo=bloqueo+20.
Sorteo=Rand(2).
Dirección_shadow=0.
If horientación_shadow=8 then horientación_shadow=1.
If horientación_shadow=6 then.
If sorteo=1 then horientación_shadow=2 else horientación_shadow=3.
Endif.
If horientación_shadow=5 then horientación_shadow=2.
If horientación_shadow<5 then dirección_shadow=horientación_shadow.
If horientación_shadow>4 then.
If sorteo=1 then dirección_shadow=horientación_shadow-4 else dirección_shadow=horientación_shadow-6.
Endif.
If dirección_shadow=dirección_inversa_shadow then dirección_shadow=Rand(4).
While dirección_shadow=dirección_inversa_shadow.
Dirección_shadow=Rand(4).
Wend.
If status_fantasmas(1)=0 then dirección_shadow=dirección_pacman.
If status_fantasmas(1)=2 then.
If abs(x_shadow-posx(3))<2 then dirección_shadow=2.
If abs(x_shadow-posx()<2 then dirección_shadow=4.
Endif.
Endif.
Endif.
If (abs(x_spedy-posx(3))<2 or abs(x_spedy-posx()<2) and (abs(y_spedy-Posy(2))<2 or abs(y_spedy-Posy(5))<2 or abs(y_spedy-Posy(7))<2) then.
If bloqueo2=0 then.
Bloqueo2=bloqueo2+20.
Sorteo=Rand(2).
Dirección_spedy=0.
If horientación_spedy=8 then horientación_spedy=1.
If horientación_spedy=6 then.
If sorteo=1 then horientación_spedy=2 else horientación_spedy=3.
Endif.
If horientación_spedy=5 then horientación_spedy=2.
If horientación_spedy<5 then dirección_spedy=horientación_spedy.
If horientación_spedy>4 then.
If sorteo=1 then dirección_spedy=horientación_spedy-4 else dirección_spedy=horientación_spedy-6.
Endif.
If dirección_spedy=dirección_inversa_spedy then dirección_spedy=Rand(4).
While dirección_spedy=dirección_inversa_spedy.
Dirección_spedy=Rand(4).
Wend.
If status_fantasmas(2)=0 then dirección_spedy=dirección_pacman.
If status_fantasmas(2)=2 then.
If abs(x_spedy-posx(3))<2 then dirección_spedy=2.
If abs(x_spedy-posx()<2 then dirección_spedy=4.
Endif.
Endif.
Endif.
If (abs(x_bashful-posx(3))<2 or abs(x_bashful-posx()<2) and (abs(y_bashful-Posy(2))<2 or abs(y_bashful-Posy(5))<2 or abs(y_bashful-Posy(7))<2) then.
If bloqueo3=0 then.
Bloqueo3=bloqueo3+20.
Sorteo=Rand(2).
Dirección_bashful=0.
If horientación_bashful=8 then horientación_bashful=1.
If horientación_bashful=6 then.
If sorteo=1 then horientación_bashful=2 else horientación_bashful=3.
Endif.
If horientación_bashful=5 then horientación_bashful=2.
If horientación_bashful<5 then dirección_bashful=horientación_bashful.
If horientación_bashful>4 then.
If sorteo=1 then dirección_bashful=horientación_bashful-4 else dirección_bashful=horientación_bashful-6.
Endif.
If dirección_bashful=dirección_inversa_bashful then dirección_bashful=Rand(4).
While dirección_bashful=dirección_inversa_bashful.
Dirección_bashful=Rand(4).
Wend.
If status_fantasmas(3)=0 then dirección_bashful=dirección_pacman.
If status_fantasmas(3)=2 then.
If abs(x_bashful-posx(3))<2 then dirección_bashful=2.
If abs(x_bashful-posx()<2 then dirección_bashful=4.
Endif.
Endif.
Endif.
If (abs(x_pokey-posx(3))<2 or abs(x_pokey-posx()<2) and (abs(y_pokey-Posy(2))<2 or abs(y_pokey-Posy(5))<2 or abs(y_pokey-Posy(7))<2) then.
If bloqueo4=0 then.
Bloqueo4=bloqueo4+20.
Sorteo=Rand(2).
Dirección_pokey=0.
If horientación_pokey=8 then horientación_pokey=1.
If horientación_pokey=6 then.
If sorteo=1 then horientación_pokey=2 else horientación_pokey=3.
Endif.
If horientación_pokey=5 then horientación_pokey=2.
If horientación_pokey<5 then dirección_pokey=horientación_pokey.
If horientación_pokey>4 then.
If sorteo=1 then dirección_pokey=horientación_pokey-4 else dirección_pokey=horientación_pokey-6.
Endif.
If dirección_pokey=dirección_inversa_pokey then dirección_pokey=Rand(4).
While dirección_pokey=dirección_inversa_pokey.
Dirección_pokey=Rand(4).
Wend.
If status_fantasmas(4)=0 then dirección_pokey=dirección_pacman.
If status_fantasmas(4)=2 then.
If abs(x_pokey-posx(3))<2 then dirección_pokey=2.
If abs(x_pokey-posx()<2 then dirección_pokey=4.
Endif.
Endif.
Endif.
If (abs(xpacman-posx(4))<2 or abs(xpacman-posx(7))<2) and (abs(ypacman-Posy(2))<2 or abs(ypacman-Posy()<2) then.
If dirección_pacman=1 then dirección_pacman=0.
If keydown(205) then dirección_pacman=2.
If keydown(20 then dirección_pacman=3.
If keydown(203) then dirección_pacman=4.
Endif.
If (abs(x_shadow-posx(4))<2 or abs(x_shadow-posx(7))<2) and (abs(y_shadow-Posy(2))<2 or abs(y_shadow-Posy()<2) then.
If bloqueo=0 then.
Bloqueo=bloqueo+20.
Sorteo=Rand(2).
Dirección_shadow=0.
If horientación_shadow=5 then horientación_shadow=2.
If horientación_shadow=6 then horientación_shadow=2.
If horientación_shadow=7 then horientación_shadow=4.
If horientación_shadow=8 then horientación_shadow=4.
If horientación_shadow<5 then dirección_shadow=horientación_shadow.
If dirección_shadow=dirección_inversa_shadow then dirección_shadow=Rand(2,4).
While dirección_shadow=1 or dirección_shadow=dirección_inversa_shadow.
Dirección_shadow=Rand(2,4).
Wend.
If status_fantasmas(1)=2 then.
If abs(y_shadow-Posy(2))<2 then dirección_shadow=3 else dirección_shadow=2.
Endif.
Endif.
Endif.
If (abs(x_spedy-posx(4))<2 or abs(x_spedy-posx(7))<2) and (abs(y_spedy-Posy(2))<2 or abs(y_spedy-Posy()<2) then.
If bloqueo2=0 then.
Bloqueo2=bloqueo2+20.
Sorteo=Rand(2).
Dirección_spedy=0.
If horientación_spedy=5 then horientación_spedy=2.
If horientación_spedy=6 then horientación_spedy=2.
If horientación_spedy=7 then horientación_spedy=4.
If horientación_spedy=8 then horientación_spedy=4.
If horientación_spedy<5 then dirección_spedy=horientación_spedy.
If dirección_spedy=dirección_inversa_spedy then dirección_spedy=Rand(2,4).
While dirección_spedy=1 or dirección_spedy=dirección_inversa_spedy.
Dirección_spedy=Rand(2,4).
Wend.
If status_fantasmas(2)=2 then.
If abs(y_spedy-Posy(2))<2 then dirección_spedy=3 else dirección_spedy=2.
Endif.
Endif.
Endif.
If (abs(x_bashful-posx(4))<2 or abs(x_bashful-posx(7))<2) and (abs(y_bashful-Posy(2))<2 or abs(y_bashful-Posy()<2) then.
If bloqueo3=0 then.
Bloqueo3=bloqueo3+20.
Sorteo=Rand(2).
Dirección_bashful=0.
If horientación_bashful=5 then horientación_bashful=2.
If horientación_bashful=6 then horientación_bashful=2.
If horientación_bashful=7 then horientación_bashful=4.
If horientación_bashful=8 then horientación_bashful=4.
If horientación_bashful<5 then dirección_bashful=horientación_bashful.
If dirección_bashful=dirección_inversa_bashful then dirección_bashful=Rand(2,4).
While dirección_bashful=1 or dirección_bashful=dirección_inversa_bashful.
Dirección_bashful=Rand(2,4).
Wend.
If status_fantasmas(3)=2 then.
If abs(y_bashful-Posy(2))<2 then dirección_bashful=3 else dirección_bashful=2.
Endif.
Endif.
Endif.
If (abs(x_pokey-posx(4))<2 or abs(x_pokey-posx(7))<2) and (abs(y_pokey-Posy(2))<2 or abs(y_pokey-Posy()<2) then.
If bloqueo4=0 then.
Bloqueo4=bloqueo4+20.
Sorteo=Rand(2).
Dirección_pokey=0.
If horientación_pokey=5 then horientación_pokey=2.
If horientación_pokey=6 then horientación_pokey=2.
If horientación_pokey=7 then horientación_pokey=4.
If horientación_pokey=8 then horientación_pokey=4.
If horientación_pokey<5 then dirección_pokey=horientación_pokey.
If dirección_pokey=dirección_inversa_pokey then dirección_pokey=Rand(2,4).
While dirección_pokey=1 or dirección_pokey=dirección_inversa_pokey.
Dirección_pokey=Rand(2,4).
Wend.
If status_fantasmas(4)=2 then.
If abs(y_pokey-Posy(2))<2 then dirección_pokey=3 else dirección_pokey=2.
Endif.
Endif.
Endif.
If (abs(xpacman-posx(5))<2 or abs(xpacman-posx(6))<2) and (abs(ypacman-Posy(2))<2 or abs(ypacman-Posy()<2 or abs(ypacman-Posy()<2) then.
If dirección_pacman=3 then dirección_pacman=0.
If keydown(205) then dirección_pacman=2.
If keydown(200) then dirección_pacman=1.
If keydown(203) then dirección_pacman=4.
Endif.
If (abs(x_shadow-posx(5))<2 or abs(x_shadow-posx(6))<2) and (abs(y_shadow-Posy(2))<2 or abs(y_shadow-Posy()<2 or abs(y_shadow-Posy()<2) then.
If bloqueo=0 then.
Bloqueo=bloqueo+20.
Sorteo=Rand(2).
Dirección_shadow=0.
If horientación_shadow=8 then horientación_shadow=1.
If horientación_shadow=5 then horientación_shadow=2.
If horientación_shadow=6 then horientación_shadow=2.
If horientación_shadow=7 then horientación_shadow=1.
If horientación_shadow<5 then dirección_shadow=horientación_shadow.
If dirección_shadow=dirección_inversa_shadow then dirección_shadow=Rand(4).
While dirección_shadow=3 or dirección_shadow=dirección_inversa_shadow.
Dirección_shadow=Rand(4).
Wend.
If status_fantasmas(1)=2 then dirección_shadow=1.
Endif.
Endif.
If (abs(x_spedy-posx(5))<2 or abs(x_spedy-posx(6))<2) and (abs(y_spedy-Posy(2))<2 or abs(y_spedy-Posy()<2 or abs(y_spedy-Posy()<2) then.
If bloqueo2=0 then.
Bloqueo2=bloqueo2+20.
Sorteo=Rand(2).
Dirección_spedy=0.
If horientación_spedy=8 then horientación_spedy=1.
If horientación_spedy=5 then horientación_spedy=2.
If horientación_spedy=6 then horientación_spedy=2.
If horientación_spedy=7 then horientación_spedy=1.
If horientación_spedy<5 then dirección_spedy=horientación_spedy.
If dirección_spedy=dirección_inversa_spedy then dirección_spedy=Rand(4).
While dirección_spedy=3 or dirección_spedy=dirección_inversa_spedy.
Dirección_spedy=Rand(4).
Wend.
If status_fantasmas(2)=2 then dirección_spedy=1.
Endif.
Endif.
If (abs(x_bashful-posx(5))<2 or abs(x_bashful-posx(6))<2) and (abs(y_bashful-Posy(2))<2 or abs(y_bashful-Posy()<2 or abs(y_bashful-Posy()<2) then.
If bloqueo3=0 then.
Bloqueo3=bloqueo3+20.
Sorteo=Rand(2).
Dirección_bashful=0.
If horientación_bashful=8 then horientación_bashful=1.
If horientación_bashful=5 then horientación_bashful=2.
If horientación_bashful=6 then horientación_bashful=2.
If horientación_bashful=7 then horientación_bashful=1.
If horientación_bashful<5 then dirección_bashful=horientación_bashful.
If dirección_bashful=dirección_inversa_bashful then dirección_bashful=Rand(4).
While dirección_bashful=3 or dirección_bashful=dirección_inversa_bashful.
Dirección_bashful=Rand(4).
Wend.
If status_fantasmas(3)=2 then dirección_bashful=1.
Endif.
Endif.
If (abs(x_pokey-posx(5))<2 or abs(x_pokey-posx(6))<2) and (abs(y_pokey-Posy(2))<2 or abs(y_pokey-Posy()<2 or abs(y_pokey-Posy()<2) then.
If bloqueo4=0 then.
Bloqueo4=bloqueo4+20.
Sorteo=Rand(2).
Dirección_pokey=0.
If horientación_pokey=8 then horientación_pokey=1.
If horientación_pokey=5 then horientación_pokey=2.
If horientación_pokey=6 then horientación_pokey=2.
If horientación_pokey=7 then horientación_pokey=1.
If horientación_pokey<5 then dirección_pokey=horientación_pokey.
If dirección_pokey=dirección_inversa_pokey then dirección_pokey=Rand(4).
While dirección_pokey=3 or dirección_pokey=dirección_inversa_pokey.
Dirección_pokey=Rand(4).
Wend.
If status_fantasmas(4)=2 then dirección_pokey=1.
Endif.
Endif.
If abs(xpacman-posx(10))<2 and abs(ypacman-Posy(2))<2 then.
If dirección_pacman=2 then dirección_pacman=0.
If keydown(200) then dirección_pacman=1.
If keydown(20 then dirección_pacman=3.
If keydown(203) then dirección_pacman=4.
Endif.
If abs(x_shadow-posx(10))<2 and abs(y_shadow-Posy(2))<2 then.
If bloqueo=0 then.
Bloqueo=bloqueo+20.
Sorteo=Rand(2).
Dirección_shadow=0.
If horientación_shadow=2 then horientación_shadow=3.
If horientación_shadow=7 then horientación_shadow=Rand(3,4).
If horientación_shadow=8 then.
If sorteo=1 then horientación_shadow=1 else horientación_shadow=4.
Endif.
If horientación_shadow<5 then dirección_shadow=horientación_shadow.
If dirección_shadow=dirección_inversa_shadow then dirección_shadow=Rand(4).
While dirección_shadow=2 or dirección_shadow=dirección_inversa_shadow.
Dirección_shadow=Rand(4).
Wend.
If status_fantasmas(1)=2 then dirección_shadow=3.
Endif.
Endif.
If abs(x_spedy-posx(10))<2 and abs(y_spedy-Posy(2))<2 then.
If bloqueo2=0 then.
Bloqueo2=bloqueo2+20.
Sorteo=Rand(2).
Dirección_spedy=0.
If horientación_spedy=2 then horientación_spedy=3.
If horientación_spedy=7 then horientación_spedy=Rand(3,4).
If horientación_spedy=8 then.
If sorteo=1 then horientación_spedy=1 else horientación_spedy=4.
Endif.
If horientación_spedy<5 then dirección_spedy=horientación_spedy.
If dirección_spedy=dirección_inversa_spedy then dirección_spedy=Rand(4).
While dirección_spedy=2 or dirección_spedy=dirección_inversa_spedy.
Dirección_spedy=Rand(4).
Wend.
If status_fantasmas(2)=2 then dirección_spedy=3.
Endif.
Endif.
If abs(x_bashful-posx(10))<2 and abs(y_bashful-Posy(2))<2 then.
If bloqueo3=0 then.
Bloqueo3=bloqueo3+20.
Sorteo=Rand(2).
Dirección_bashful=0.
If horientación_bashful=2 then horientación_bashful=3.
If horientación_bashful=7 then horientación_bashful=Rand(3,4).
If horientación_bashful=8 then.
If sorteo=1 then horientación_bashful=1 else horientación_bashful=4.
Endif.
If horientación_bashful<5 then dirección_bashful=horientación_bashful.
If dirección_bashful=dirección_inversa_bashful then dirección_bashful=Rand(4).
While dirección_bashful=2 or dirección_bashful=dirección_inversa_bashful.
Dirección_bashful=Rand(4).
Wend.
If status_fantasmas(3)=2 then dirección_bashful=3.
Endif.
Endif.
If abs(x_pokey-posx(10))<2 and abs(y_pokey-Posy(2))<2 then.
If bloqueo4=0 then.
Bloqueo4=bloqueo4+20.
Sorteo=Rand(2).
Dirección_pokey=0.
If horientación_pokey=2 then horientación_pokey=3.
If horientación_pokey=7 then horientación_pokey=Rand(3,4).
If horientación_pokey=8 then.
If sorteo=1 then horientación_pokey=1 else horientación_pokey=4.
Endif.
If horientación_pokey<5 then dirección_pokey=horientación_pokey.
If dirección_pokey=dirección_inversa_pokey then dirección_pokey=Rand(4).
While dirección_pokey=2 or dirección_pokey=dirección_inversa_pokey.
Dirección_pokey=Rand(4).
Wend.
If status_fantasmas(4)=2 then dirección_pokey=3.
Endif.
Endif.
Fila 3----------------------------------------------
If abs(xpacman-posx(1))<2 and (abs(ypacman-Posy(3))<2 or abs(ypacman-Posy(10))<2 or abs(ypacman-Posy()<2) then.
Dirección_pacman=0.
If keydown(200) then dirección_pacman=1.
If keydown(205) then dirección_pacman=2.
Endif.
If abs(x_shadow-posx(1))<2 and (abs(y_shadow-Posy(3))<2 or abs(y_shadow-Posy(10))<2 or abs(y_shadow-Posy()<2) then.
If dirección_shadow=3 then dirección_shadow=2.
If dirección_shadow=4 then dirección_shadow=1.
Endif.
If abs(x_spedy-posx(1))<2 and (abs(y_spedy-Posy(3))<2 or abs(y_spedy-Posy(10))<2 or abs(y_spedy-Posy()<2) then.
If dirección_spedy=3 then dirección_spedy=2.
If dirección_spedy=4 then dirección_spedy=1.
Endif.
If abs(x_bashful-posx(1))<2 and (abs(y_bashful-Posy(3))<2 or abs(y_bashful-Posy(10))<2 or abs(y_bashful-Posy()<2) then.
If dirección_bashful=3 then dirección_bashful=2.
If dirección_bashful=4 then dirección_bashful=1.
Endif.
If abs(x_pokey-posx(1))<2 and (abs(y_pokey-Posy(3))<2 or abs(y_pokey-Posy(10))<2 or abs(y_pokey-Posy()<2) then.
If dirección_pokey=3 then dirección_pokey=2.
If dirección_pokey=4 then dirección_pokey=1.
Endif.
If abs(xpacman-posx(3))<2 and abs(ypacman-Posy(3))<2 then.
If dirección_pacman=2 then dirección_pacman=0.
If keydown(200) then dirección_pacman=1.
If keydown(20 then dirección_pacman=3.
If keydown(203) then dirección_pacman=4.
Endif.
If abs(x_shadow-posx(3))<2 and abs(y_shadow-Posy(3))<2 then.
If bloqueo=0 then.
Bloqueo=bloqueo+20.
Sorteo=Rand(2).
Dirección_shadow=0.
If horientación_shadow=8 then horientación_shadow=1.
If horientación_shadow=7 then horientación_shadow=3.
If horientación_shadow=6 then horientación_shadow=3.
If horientación_shadow=5 then horientación_shadow=1.
If horientación_shadow=2 then horientación_shadow=1.
If horientación_shadow<5 then dirección_shadow=horientación_shadow.
If dirección_shadow=dirección_inversa_shadow then dirección_shadow=Rand(4).
While dirección_shadow=2 or dirección_shadow=dirección_inversa_shadow.
Dirección_shadow=Rand(4).
Wend.
If status_fantasmas(1)=2 then dirección_shadow=1.
Endif.
Endif.
If abs(x_spedy-posx(3))<2 and abs(y_spedy-Posy(3))<2 then.
If bloqueo2=0 then.
Bloqueo2=bloqueo2+20.
Sorteo=Rand(2).
Dirección_spedy=0.
If horientación_spedy=8 then horientación_spedy=1.
If horientación_spedy=7 then horientación_spedy=3.
If horientación_spedy=6 then horientación_spedy=3.
If horientación_spedy=5 then horientación_spedy=1.
If horientación_spedy=2 then horientación_spedy=1.
If horientación_spedy<5 then dirección_spedy=horientación_spedy.
If dirección_spedy=dirección_inversa_spedy then dirección_spedy=Rand(4).
While dirección_spedy=2 or dirección_spedy=dirección_inversa_spedy.
Dirección_spedy=Rand(4).
Wend.
If status_fantasmas(2)=2 then dirección_spedy=1.
Endif.
Endif.
If abs(x_bashful-posx(3))<2 and abs(y_bashful-Posy(3))<2 then.
If bloqueo3=0 then.
Bloqueo3=bloqueo3+20.
Sorteo=Rand(2).
Dirección_bashful=0.
If horientación_bashful=8 then horientación_bashful=1.
If horientación_bashful=7 then horientación_bashful=3.
If horientación_bashful=6 then horientación_bashful=3.
If horientación_bashful=5 then horientación_bashful=1.
If horientación_bashful=2 then horientación_bashful=1.
If horientación_bashful<5 then dirección_bashful=horientación_bashful.
If dirección_bashful=dirección_inversa_bashful then dirección_bashful=Rand(4).
While dirección_bashful=2 or dirección_bashful=dirección_inversa_bashful.
Dirección_bashful=Rand(4).
Wend.
If status_fantasmas(3)=2 then dirección_bashful=1.
Endif.
Endif.
If abs(x_pokey-posx(3))<2 and abs(y_pokey-Posy(3))<2 then.
If bloqueo4=0 then.
Bloqueo4=bloqueo4+20.
Sorteo=Rand(2).
Dirección_pokey=0.
If horientación_pokey=8 then horientación_pokey=1.
If horientación_pokey=7 then horientación_pokey=3.
If horientación_pokey=6 then horientación_pokey=3.
If horientación_pokey=5 then horientación_pokey=1.
If horientación_pokey=2 then horientación_pokey=1.
If horientación_pokey<5 then dirección_pokey=horientación_pokey.
If dirección_pokey=dirección_inversa_pokey then dirección_pokey=Rand(4).
While dirección_pokey=2 or dirección_pokey=dirección_inversa_pokey.
Dirección_pokey=Rand(4).
Wend.
If status_fantasmas(4)=2 then dirección_pokey=1.
Endif.
Endif.
If abs(xpacman-posx(4))<2 and abs(ypacman-Posy(3))<2 then.
Dirección_pacman=0.
If keydown(200) then dirección_pacman=1.
If keydown(205) then dirección_pacman=2.
Endif.
If abs(x_shadow-posx(4))<2 and abs(y_shadow-Posy(3))<2 then.
If dirección_shadow=3 then dirección_shadow=2.
If dirección_shadow=4 then dirección_shadow=1.
Endif.
If abs(x_spedy-posx(4))<2 and abs(y_spedy-Posy(3))<2 then.
If dirección_spedy=3 then dirección_spedy=2.
If dirección_spedy=4 then dirección_spedy=1.
Endif.
If abs(x_bashful-posx(4))<2 and abs(y_bashful-Posy(3))<2 then.
If dirección_bashful=3 then dirección_bashful=2.
If dirección_bashful=4 then dirección_bashful=1.
Endif.
If abs(x_pokey-posx(4))<2 and abs(y_pokey-Posy(3))<2 then.
If dirección_pokey=3 then dirección_pokey=2.
If dirección_pokey=4 then dirección_pokey=1.
Endif.
If abs(xpacman-posx(5))<2 and abs(ypacman-Posy(3))<2 then.
Dirección_pacman=0.
If keydown(20 then dirección_pacman=3.
If keydown(203) then dirección_pacman=4.
Endif.
If abs(x_shadow-posx(5))<2 and abs(y_shadow-Posy(3))<2 then.
If dirección_shadow=2 then dirección_shadow=3.
If dirección_shadow=1 then dirección_shadow=4.
Endif.
If abs(x_spedy-posx(5))<2 and abs(y_spedy-Posy(3))<2 then.
If dirección_spedy=2 then dirección_spedy=3.
If dirección_spedy=1 then dirección_spedy=4.
Endif.
If abs(x_bashful-posx(5))<2 and abs(y_bashful-Posy(3))<2 then.
If dirección_bashful=2 then dirección_bashful=3.
If dirección_bashful=1 then dirección_bashful=4.
Endif.
If abs(x_pokey-posx(5))<2 and abs(y_pokey-Posy(3))<2 then.
If dirección_pokey=2 then dirección_pokey=3.
If dirección_pokey=1 then dirección_pokey=4.
Endif.
If abs(xpacman-posx(6))<2 and abs(ypacman-Posy(3))<2 then.
Dirección_pacman=0.
If keydown(20 then dirección_pacman=3.
If keydown(205) then dirección_pacman=2.
Endif.
If abs(x_shadow-posx(6))<2 and abs(y_shadow-Posy(3))<2 then.
If dirección_shadow=1 then dirección_shadow=2.
If dirección_shadow=4 then dirección_shadow=3.
Endif.
If abs(x_spedy-posx(6))<2 and abs(y_spedy-Posy(3))<2 then.
If dirección_spedy=1 then dirección_spedy=2.
If dirección_spedy=4 then dirección_spedy=3.
Endif.
If abs(x_bashful-posx(6))<2 and abs(y_bashful-Posy(3))<2 then.
If dirección_bashful=1 then dirección_bashful=2.
If dirección_bashful=4 then dirección_bashful=3.
Endif.
If abs(x_pokey-posx(6))<2 and abs(y_pokey-Posy(3))<2 then.
If dirección_pokey=1 then dirección_pokey=2.
If dirección_pokey=4 then dirección_pokey=3.
Endif.
If abs(xpacman-posx(7))<2 and abs(ypacman-Posy(3))<2 then.
Dirección_pacman=0.
If keydown(200) then dirección_pacman=1.
If keydown(203) then dirección_pacman=4.
Endif.
If abs(x_shadow-posx(7))<2 and abs(y_shadow-Posy(3))<2 then.
If dirección_shadow=2 then dirección_shadow=1.
If dirección_shadow=3 then dirección_shadow=4.
Endif.
If abs(x_spedy-posx(7))<2 and abs(y_spedy-Posy(3))<2 then.
If dirección_spedy=2 then dirección_spedy=1.
If dirección_spedy=3 then dirección_spedy=4.
Endif.
If abs(x_bashful-posx(7))<2 and abs(y_bashful-Posy(3))<2 then.
If dirección_bashful=2 then dirección_bashful=1.
If dirección_bashful=3 then dirección_bashful=4.
Endif.
If abs(x_pokey-posx(7))<2 and abs(y_pokey-Posy(3))<2 then.
If dirección_pokey=2 then dirección_pokey=1.
If dirección_pokey=3 then dirección_pokey=4.
Endif.
If abs(xpacman-posx()<2 and abs(ypacman-Posy(3))<2 then.
If dirección_pacman=4 then dirección_pacman=0.
If keydown(200) then dirección_pacman=1.
If keydown(20 then dirección_pacman=3.
If keydown(205) then dirección_pacman=2.
Endif.
If abs(x_shadow-posx()<2 and abs(y_shadow-Posy(3))<2 then.
If bloqueo=0 then.
Bloqueo=bloqueo+20.
Sorteo=Rand(2).
Dirección_shadow=0.
If horientación_shadow=8 then horientación_shadow=Rand(2,3).
If horientación_shadow=7 then horientación_shadow=3.
If horientación_shadow=6 then horientación_shadow=3.
If horientación_shadow=5 then horientación_shadow=Rand(1,2).
If horientación_shadow=4 then horientación_shadow=3.
If horientación_shadow<5 then dirección_shadow=horientación_shadow.
If dirección_shadow=dirección_inversa_shadow then dirección_shadow=Rand(3).
While dirección_shadow=4 or dirección_shadow=dirección_inversa_shadow.
Dirección_shadow=Rand(3).
Wend.
If status_fantasmas(1)=2 then dirección_shadow=3.
Endif.
Endif.
If abs(x_spedy-posx()<2 and abs(y_spedy-Posy(3))<2 then.
If bloqueo2=0 then.
Bloqueo2=bloqueo2+20.
Sorteo=Rand(2).
Dirección_spedy=0.
If horientación_spedy=8 then horientación_spedy=Rand(2,3).
If horientación_spedy=7 then horientación_spedy=3.
If horientación_spedy=6 then horientación_spedy=3.
If horientación_spedy=5 then horientación_spedy=Rand(1,2).
If horientación_spedy=4 then horientación_spedy=3.
If horientación_spedy<5 then dirección_spedy=horientación_spedy.
If dirección_spedy=dirección_inversa_spedy then dirección_spedy=Rand(3).
While dirección_spedy=4 or dirección_spedy=dirección_inversa_spedy.
Dirección_spedy=Rand(3).
Wend.
If status_fantasmas(2)=2 then dirección_spedy=3.
Endif.
Endif.
If abs(x_bashful-posx()<2 and abs(y_bashful-Posy(3))<2 then.
If bloqueo3=0 then.
Bloqueo3=bloqueo3+20.
Sorteo=Rand(2).
Dirección_bashful=0.
If horientación_bashful=8 then horientación_bashful=Rand(2,3).
If horientación_bashful=7 then horientación_bashful=3.
If horientación_bashful=6 then horientación_bashful=3.
If horientación_bashful=5 then horientación_bashful=Rand(1,2).
If horientación_bashful=4 then horientación_bashful=3.
If horientación_bashful<5 then dirección_bashful=horientación_bashful.
If dirección_bashful=dirección_inversa_bashful then dirección_bashful=Rand(3).
While dirección_bashful=4 or dirección_bashful=dirección_inversa_bashful.
Dirección_bashful=Rand(3).
Wend.
If status_fantasmas(3)=2 then dirección_bashful=3.
Endif.
Endif.
If abs(x_pokey-posx()<2 and abs(y_pokey-Posy(3))<2 then.
If bloqueo4=0 then.
Bloqueo4=bloqueo4+20.
Sorteo=Rand(2).
Dirección_pokey=0.
If horientación_pokey=8 then horientación_pokey=Rand(2,3).
If horientación_pokey=7 then horientación_pokey=3.
If horientación_pokey=6 then horientación_pokey=3.
If horientación_pokey=5 then horientación_pokey=Rand(1,2).
If horientación_pokey=4 then horientación_pokey=3.
If horientación_pokey<5 then dirección_pokey=horientación_pokey.
If dirección_pokey=dirección_inversa_pokey then dirección_pokey=Rand(3).
While dirección_pokey=4 or dirección_pokey=dirección_inversa_pokey.
Dirección_pokey=Rand(3).
Wend.
If status_fantasmas(4)=2 then dirección_pokey=3.
Endif.
Endif.
If abs(xpacman-posx(10))<2 and (abs(ypacman-Posy(3))<2 or abs(ypacman-Posy(10))<2 or abs(ypacman-Posy()<2) then.
Dirección_pacman=0.
If keydown(200) then dirección_pacman=1.
If keydown(203) then dirección_pacman=4.
Endif.
If abs(x_shadow-posx(10))<2 and (abs(y_shadow-Posy(3))<2 or abs(y_shadow-Posy(10))<2 or abs(y_shadow-Posy()<2) then.
If dirección_shadow=2 then dirección_shadow=1.
If dirección_shadow=3 then dirección_shadow=4.
Endif.
If abs(x_spedy-posx(10))<2 and (abs(y_spedy-Posy(3))<2 or abs(y_spedy-Posy(10))<2 or abs(y_spedy-Posy()<2) then.
If dirección_spedy=2 then dirección_spedy=1.
If dirección_spedy=3 then dirección_spedy=4.
Endif.
If abs(x_bashful-posx(10))<2 and (abs(y_bashful-Posy(3))<2 or abs(y_bashful-Posy(10))<2 or abs(y_bashful-Posy()<2) then.
If dirección_bashful=2 then dirección_bashful=1.
If dirección_bashful=3 then dirección_bashful=4.
Endif.
If abs(x_pokey-posx(10))<2 and (abs(y_pokey-Posy(3))<2 or abs(y_pokey-Posy(10))<2 or abs(y_pokey-Posy()<2) then.
If dirección_pokey=2 then dirección_pokey=1.
If dirección_pokey=3 then dirección_pokey=4.
Endif.
Fila 4----------------------------------------------
If abs(xpacman-posx(4))<2 and abs(ypacman-Posy(4))<2 then.
Dirección_pacman=0.
If keydown(20 then dirección_pacman=3.
If keydown(205) then dirección_pacman=2.
Endif.
If abs(x_shadow-posx(4))<2 and abs(y_shadow-Posy(4))<2 then.
If dirección_shadow=1 then dirección_shadow=2.
If dirección_shadow=4 then dirección_shadow=3.
Endif.
If abs(x_spedy-posx(4))<2 and abs(y_spedy-Posy(4))<2 then.
If dirección_spedy=1 then dirección_spedy=2.
If dirección_spedy=4 then dirección_spedy=3.
Endif.
If abs(x_bashful-posx(4))<2 and abs(y_bashful-Posy(4))<2 then.
If dirección_bashful=1 then dirección_bashful=2.
If dirección_bashful=4 then dirección_bashful=3.
Endif.
If abs(x_pokey-posx(4))<2 and abs(y_pokey-Posy(4))<2 then.
If dirección_pokey=1 then dirección_pokey=2.
If dirección_pokey=4 then dirección_pokey=3.
Endif.
If (abs(xpacman-posx(5))<2 or abs(xpacman-posx(6))<2) and abs(ypacman-Posy(4))<2 then.
If dirección_pacman=3 then dirección_pacman=0.
If keydown(200) then dirección_pacman=1.
If keydown(205) then dirección_pacman=2.
If keydown(203) then dirección_pacman=4.
Endif.
If abs(x_shadow-posx(5))<2 and abs(y_shadow-Posy(4))<2 then.
If bloqueo=0 then.
Bloqueo=bloqueo+20.
Sorteo=Rand(2).
Dirección_shadow=0.
If horientación_shadow=6 then horientación_shadow=2.
If horientación_shadow=5 then horientación_shadow=2.
If horientación_shadow=7 then horientación_shadow=4.
If horientación_shadow=8 then horientación_shadow=1.
If horientación_shadow<5 then dirección_shadow=horientación_shadow.
If dirección_shadow=dirección_inversa_shadow then dirección_shadow=Rand(4).
While dirección_shadow=3 or dirección_shadow=dirección_inversa_shadow.
Dirección_shadow=Rand(4).
Wend.
If status_fantasmas(1)=2 then dirección_shadow=2.
Endif.
Endif.
If abs(x_spedy-posx(5))<2 and abs(y_spedy-Posy(4))<2 then.
If bloqueo2=0 then.
Bloqueo2=bloqueo2+20.
Sorteo=Rand(2).
Dirección_spedy=0.
If horientación_spedy=6 then horientación_spedy=2.
If horientación_spedy=5 then horientación_spedy=2.
If horientación_spedy=7 then horientación_spedy=4.
If horientación_spedy=8 then horientación_spedy=1.
If horientación_spedy<5 then dirección_spedy=horientación_spedy.
If dirección_spedy=dirección_inversa_spedy then dirección_spedy=Rand(4).
While dirección_spedy=3 or dirección_spedy=dirección_inversa_spedy.
Dirección_spedy=Rand(4).
Wend.
If status_fantasmas(2)=2 then dirección_spedy=2.
Endif.
Endif.
If abs(x_bashful-posx(5))<2 and abs(y_bashful-Posy(4))<2 then.
If bloqueo3=0 then.
Bloqueo3=bloqueo3+20.
Sorteo=Rand(2).
Dirección_bashful=0.
If horientación_bashful=6 then horientación_bashful=2.
If horientación_bashful=5 then horientación_bashful=2.
If horientación_bashful=7 then horientación_bashful=4.
If horientación_bashful=8 then horientación_bashful=1.
If horientación_bashful<5 then dirección_bashful=horientación_bashful.
If dirección_bashful=dirección_inversa_bashful then dirección_bashful=Rand(4).
While dirección_bashful=3 or dirección_bashful=dirección_inversa_bashful.
Dirección_bashful=Rand(4).
Wend.
If status_fantasmas(3)=2 then dirección_bashful=2.
Endif.
Endif.
If abs(x_pokey-posx(5))<2 and abs(y_pokey-Posy(4))<2 then.
If bloqueo4=0 then.
Bloqueo4=bloqueo4+20.
Sorteo=Rand(2).
Dirección_pokey=0.
If horientación_pokey=6 then horientación_pokey=2.
If horientación_pokey=5 then horientación_pokey=2.
If horientación_pokey=7 then horientación_pokey=4.
If horientación_pokey=8 then horientación_pokey=1.
If horientación_pokey<5 then dirección_pokey=horientación_pokey.
If dirección_pokey=dirección_inversa_pokey then dirección_pokey=Rand(4).
While dirección_pokey=3 or dirección_pokey=dirección_inversa_pokey.
Dirección_pokey=Rand(4).
Wend.
If status_fantasmas(4)=2 then dirección_pokey=2.
Endif.
Endif.
If abs(x_shadow-posx(5)-27)<2 and abs(y_shadow-Posy(4))<2 then.
If status_fantasmas(1)=2 then dirección_shadow=3.
If status_fantasmas(1)=1 then.
If horientación_shadow=6 then dirección_shadow=2.
If horientación_shadow=5 then dirección_shadow=2.
If horientación_shadow=7 then dirección_shadow=4.
If horientación_shadow=8 then dirección_shadow=4.
If horientación_shadow=1 then dirección_shadow=2.
If horientación_shadow=2 then dirección_shadow=2.
If horientación_shadow=3 then dirección_shadow=4.
If horientación_shadow=4 then dirección_shadow=2.
Endif.
Endif.
If abs(x_spedy-posx(5)-27)<2 and abs(y_spedy-Posy(4))<2 then.
If status_fantasmas(2)=2 then dirección_spedy=3.
If status_fantasmas(2)=1 then.
If horientación_spedy=6 then dirección_spedy=2.
If horientación_spedy=5 then dirección_spedy=2.
If horientación_spedy=7 then dirección_spedy=4.
If horientación_spedy=8 then dirección_spedy=4.
If horientación_spedy=1 then dirección_spedy=2.
If horientación_spedy=2 then dirección_spedy=2.
If horientación_spedy=3 then dirección_spedy=4.
If horientación_spedy=4 then dirección_spedy=2.
Endif.
Endif.
If abs(x_bashful-posx(5)-27)<2 and abs(y_bashful-Posy(4))<2 then.
If status_fantasmas(3)=2 then dirección_bashful=3.
If status_fantasmas(3)=1 then.
If horientación_bashful=6 then dirección_bashful=2.
If horientación_bashful=5 then dirección_bashful=2.
If horientación_bashful=7 then dirección_bashful=4.
If horientación_bashful=8 then dirección_bashful=4.
If horientación_bashful=1 then dirección_bashful=2.
If horientación_bashful=2 then dirección_bashful=2.
If horientación_bashful=3 then dirección_bashful=4.
If horientación_bashful=4 then dirección_bashful=2.
Endif.
Endif.
If abs(x_pokey-posx(5)-27)<2 and abs(y_pokey-Posy(4))<2 then.
If status_fantasmas(4)=2 then dirección_pokey=3.
If status_fantasmas(4)=1 then.
If horientación_pokey=6 then dirección_pokey=2.
If horientación_pokey=5 then dirección_pokey=2.
If horientación_pokey=7 then dirección_pokey=4.
If horientación_pokey=8 then dirección_pokey=4.
If horientación_pokey=1 then dirección_pokey=2.
If horientación_pokey=2 then dirección_pokey=2.
If horientación_pokey=3 then dirección_pokey=4.
If horientación_pokey=4 then dirección_pokey=2.
Endif.
Endif.
If abs(x_shadow-posx(5)-27)<2 and abs(y_shadow-Posy(5))<2 then.
Status_fantasmas(1)=1.
Dirección_shadow=1.
Eyes(1)=0.
Endif.
If abs(x_spedy-posx(5)-27)<2 and abs(y_spedy-Posy(5))<2 then.
Status_fantasmas(2)=1.
Dirección_spedy=1.
Eyes(2)=0.
Endif.
If abs(x_bashful-posx(5)-27)<2 and abs(y_bashful-Posy(5))<2 then.
Status_fantasmas(3)=1.
Dirección_bashful=1.
Eyes(3)=0.
Endif.
If abs(x_pokey-posx(5)-27)<2 and abs(y_pokey-Posy(5))<2 then.
Status_fantasmas(4)=1.
Dirección_pokey=1.
Eyes(4)=0.
Endif.
If abs(x_shadow-posx(6))<2 and abs(y_shadow-Posy(4))<2 then.
If bloqueo=0 then.
Bloqueo=bloqueo+20.
Sorteo=Rand(2).
Dirección_shadow=0.
If horientación_shadow=6 then horientación_shadow=2.
If horientación_shadow=5 then horientación_shadow=1.
If horientación_shadow=7 then horientación_shadow=4.
If horientación_shadow=8 then horientación_shadow=4.
If horientación_shadow<5 then dirección_shadow=horientación_shadow.
If dirección_shadow=dirección_inversa_shadow then dirección_shadow=Rand(4).
While dirección_shadow=3 or dirección_shadow=dirección_inversa_shadow.
Dirección_shadow=Rand(4).
Wend.
If status_fantasmas(1)=2 then dirección_shadow=4.
Endif.
Endif.
If abs(x_spedy-posx(6))<2 and abs(y_spedy-Posy(4))<2 then.
If bloqueo2=0 then.
Bloqueo2=bloqueo2+20.
Sorteo=Rand(2).
Dirección_spedy=0.
If horientación_spedy=6 then horientación_spedy=2.
If horientación_spedy=5 then horientación_spedy=1.
If horientación_spedy=7 then horientación_spedy=4.
If horientación_spedy=8 then horientación_spedy=4.
If horientación_spedy<5 then dirección_spedy=horientación_spedy.
If dirección_spedy=dirección_inversa_spedy then dirección_spedy=Rand(4).
While dirección_spedy=3 or dirección_spedy=dirección_inversa_spedy.
Dirección_spedy=Rand(4).
Wend.
If status_fantasmas(2)=2 then dirección_spedy=4.
Endif.
Endif.
If abs(x_bashful-posx(6))<2 and abs(y_bashful-Posy(4))<2 then.
If bloqueo3=0 then.
Bloqueo3=bloqueo3+20.
Sorteo=Rand(2).
Dirección_bashful=0.
If horientación_bashful=6 then horientación_bashful=2.
If horientación_bashful=5 then horientación_bashful=1.
If horientación_bashful=7 then horientación_bashful=4.
If horientación_bashful=8 then horientación_bashful=4.
If horientación_bashful<5 then dirección_bashful=horientación_bashful.
If dirección_bashful=dirección_inversa_bashful then dirección_bashful=Rand(4).
While dirección_bashful=3 or dirección_bashful=dirección_inversa_bashful.
Dirección_bashful=Rand(4).
Wend.
If status_fantasmas(3)=2 then dirección_bashful=4.
Endif.
Endif.
If abs(x_pokey-posx(6))<2 and abs(y_pokey-Posy(4))<2 then.
If bloqueo4=0 then.
Bloqueo4=bloqueo4+20.
Sorteo=Rand(2).
Dirección_pokey=0.
If horientación_pokey=6 then horientación_pokey=2.
If horientación_pokey=5 then horientación_pokey=1.
If horientación_pokey=7 then horientación_pokey=4.
If horientación_pokey=8 then horientación_pokey=4.
If horientación_pokey<5 then dirección_pokey=horientación_pokey.
If dirección_pokey=dirección_inversa_pokey then dirección_pokey=Rand(4).
While dirección_pokey=3 or dirección_pokey=dirección_inversa_pokey.
Dirección_pokey=Rand(4).
Wend.
If status_fantasmas(4)=2 then dirección_pokey=4.
Endif.
Endif.
If abs(xpacman-posx(7))<2 and abs(ypacman-Posy(4))<2 then.
Dirección_pacman=0.
If keydown(20 then dirección_pacman=3.
If keydown(203) then dirección_pacman=4.
Endif.
If abs(x_shadow-posx(7))<2 and abs(y_shadow-Posy(4))<2 then.
If dirección_shadow=2 then dirección_shadow=3.
If dirección_shadow=1 then dirección_shadow=4.
Endif.
If abs(x_spedy-posx(7))<2 and abs(y_spedy-Posy(4))<2 then.
If dirección_spedy=2 then dirección_spedy=3.
If dirección_spedy=1 then dirección_spedy=4.
Endif.
If abs(x_bashful-posx(7))<2 and abs(y_bashful-Posy(4))<2 then.
If dirección_bashful=2 then dirección_bashful=3.
If dirección_bashful=1 then dirección_bashful=4.
Endif.
If abs(x_pokey-posx(7))<2 and abs(y_pokey-Posy(4))<2 then.
If dirección_pokey=2 then dirección_pokey=3.
If dirección_pokey=1 then dirección_pokey=4.
Endif.
Fila 5----------------------------------------------
If abs(xpacman-posx(4))<2 and abs(ypacman-Posy(5))<2 then.
If dirección_pacman=2 then dirección_pacman=0.
If keydown(200) then dirección_pacman=1.
If keydown(20 then dirección_pacman=3.
If keydown(203) then dirección_pacman=4.
Endif.
If abs(x_shadow-posx(4))<2 and abs(y_shadow-Posy(5))<2 then.
If bloqueo=0 then.
Bloqueo=bloqueo+20.
Sorteo=Rand(2).
Dirección_shadow=0.
If horientación_shadow=7 then horientación_shadow=Rand(3,4).
If horientación_shadow=8 then.
If sorteo=1 then horientación_shadow=1 else horientación_shadow=4.
Endif.
If horientación_shadow=5 then horientación_shadow=1.
If horientación_shadow=6 then horientación_shadow=3.
If horientación_shadow=2 or horientación_shadow=4 then.
If sorteo=1 then horientación_shadow=3 else horientación_shadow=1.
Endif.
If horientación_shadow<5 then dirección_shadow=horientación_shadow.
If dirección_shadow=dirección_inversa_shadow then dirección_shadow=Rand(4).
While dirección_shadow=2 or dirección_shadow=dirección_inversa_shadow.
Dirección_shadow=Rand(4).
Wend.
If status_fantasmas(1)=2 then dirección_shadow=1.
Endif.
Endif.
If abs(x_spedy-posx(4))<2 and abs(y_spedy-Posy(5))<2 then.
If bloqueo2=0 then.
Bloqueo2=bloqueo2+20.
Sorteo=Rand(2).
Dirección_spedy=0.
If horientación_spedy=7 then horientación_spedy=Rand(3,4).
If horientación_spedy=8 then.
If sorteo=1 then horientación_spedy=1 else horientación_spedy=4.
Endif.
If horientación_spedy=5 then horientación_spedy=1.
If horientación_spedy=6 then horientación_spedy=3.
If horientación_spedy=2 or horientación_spedy=4 then.
If sorteo=1 then horientación_spedy=3 else horientación_spedy=1.
Endif.
If horientación_spedy<5 then dirección_spedy=horientación_spedy.
If dirección_spedy=dirección_inversa_spedy then dirección_spedy=Rand(4).
While dirección_spedy=2 or dirección_spedy=dirección_inversa_spedy.
Dirección_spedy=Rand(4).
Wend.
If status_fantasmas(2)=2 then dirección_spedy=1.
Endif.
Endif.
If abs(x_bashful-posx(4))<2 and abs(y_bashful-Posy(5))<2 then.
If bloqueo3=0 then.
Bloqueo3=bloqueo3+20.
Sorteo=Rand(2).
Dirección_bashful=0.
If horientación_bashful=7 then horientación_bashful=Rand(3,4).
If horientación_bashful=8 then.
If sorteo=1 then horientación_bashful=1 else horientación_bashful=4.
Endif.
If horientación_bashful=5 then horientación_bashful=1.
If horientación_bashful=6 then horientación_bashful=3.
If horientación_bashful=2 or horientación_bashful=4 then.
If sorteo=1 then horientación_bashful=3 else horientación_bashful=1.
Endif.
If horientación_bashful<5 then dirección_bashful=horientación_bashful.
If dirección_bashful=dirección_inversa_bashful then dirección_bashful=Rand(4).
While dirección_bashful=2 or dirección_bashful=dirección_inversa_bashful.
Dirección_bashful=Rand(4).
Wend.
If status_fantasmas(3)=2 then dirección_bashful=1.
Endif.
Endif.
If abs(x_pokey-posx(4))<2 and abs(y_pokey-Posy(5))<2 then.
If bloqueo4=0 then.
Bloqueo4=bloqueo4+20.
Sorteo=Rand(2).
Dirección_pokey=0.
If horientación_pokey=7 then horientación_pokey=Rand(3,4).
If horientación_pokey=8 then.
If sorteo=1 then horientación_pokey=1 else horientación_pokey=4.
Endif.
If horientación_pokey=5 then horientación_pokey=1.
If horientación_pokey=6 then horientación_pokey=3.
If horientación_pokey=2 or horientación_pokey=4 then.
If sorteo=1 then horientación_pokey=3 else horientación_pokey=1.
Endif.
If horientación_pokey<5 then dirección_pokey=horientación_pokey.
If dirección_pokey=dirección_inversa_pokey then dirección_pokey=Rand(4).
While dirección_pokey=2 or dirección_pokey=dirección_inversa_pokey.
Dirección_pokey=Rand(4).
Wend.
If status_fantasmas(4)=2 then dirección_pokey=1.
Endif.
Endif.
If abs(xpacman-posx(7))<2 and abs(ypacman-Posy(5))<2 then.
If dirección_pacman=4 then dirección_pacman=0.
If keydown(200) then dirección_pacman=1.
If keydown(20 then dirección_pacman=3.
If keydown(205) then dirección_pacman=2.
Endif.
If abs(x_shadow-posx(7))<2 and abs(y_shadow-Posy(5))<2 then.
If bloqueo=0 then.
Bloqueo=bloqueo+20.
Sorteo=Rand(2).
Dirección_shadow=0.
If horientación_shadow=5 then horientación_shadow=Rand(1,2).
If horientación_shadow=6 then horientación_shadow=Rand(2,3).
If horientación_shadow=8 then horientación_shadow=1.
If horientación_shadow=7 then horientación_shadow=3.
If horientación_shadow=4 or horientación_shadow=2 then.
If sorteo=1 then horientación_shadow=3 else horientación_shadow=1.
Endif.
If horientación_shadow<5 then dirección_shadow=horientación_shadow.
If dirección_shadow=dirección_inversa_shadow then dirección_shadow=Rand(3).
While dirección_shadow=dirección_inversa_shadow.
Dirección_shadow=Rand(3).
Wend.
If status_fantasmas(1)=2 then dirección_shadow=1.
Endif.
Endif.
If abs(x_spedy-posx(7))<2 and abs(y_spedy-Posy(5))<2 then.
If bloqueo2=0 then.
Bloqueo2=bloqueo2+20.
Sorteo=Rand(2).
Dirección_spedy=0.
If horientación_spedy=5 then horientación_spedy=Rand(1,2).
If horientación_spedy=6 then horientación_spedy=Rand(2,3).
If horientación_spedy=8 then horientación_spedy=1.
If horientación_spedy=7 then horientación_spedy=3.
If horientación_spedy=4 or horientación_spedy=2 then.
If sorteo=1 then horientación_spedy=3 else horientación_spedy=1.
Endif.
If horientación_spedy<5 then dirección_spedy=horientación_spedy.
If dirección_spedy=dirección_inversa_spedy then dirección_spedy=Rand(3).
While dirección_spedy=dirección_inversa_spedy.
Dirección_spedy=Rand(3).
Wend.
If status_fantasmas(2)=2 then dirección_spedy=1.
Endif.
Endif.
If abs(x_bashful-posx(7))<2 and abs(y_bashful-Posy(5))<2 then.
If bloqueo3=0 then.
Bloqueo3=bloqueo3+20.
Sorteo=Rand(2).
Dirección_bashful=0.
If horientación_bashful=5 then horientación_bashful=Rand(1,2).
If horientación_bashful=6 then horientación_bashful=Rand(2,3).
If horientación_bashful=8 then horientación_bashful=1.
If horientación_bashful=7 then horientación_bashful=3.
If horientación_bashful=4 or horientación_bashful=2 then.
If sorteo=1 then horientación_bashful=3 else horientación_bashful=1.
Endif.
If horientación_bashful<5 then dirección_bashful=horientación_bashful.
If dirección_bashful=dirección_inversa_bashful then dirección_bashful=Rand(3).
While dirección_bashful=dirección_inversa_bashful.
Dirección_bashful=Rand(3).
Wend.
If status_fantasmas(3)=2 then dirección_bashful=1.
Endif.
Endif.
If abs(x_pokey-posx(7))<2 and abs(y_pokey-Posy(5))<2 then.
If bloqueo4=0 then.
Bloqueo4=bloqueo4+20.
Sorteo=Rand(2).
Dirección_pokey=0.
If horientación_pokey=5 then horientación_pokey=Rand(1,2).
If horientación_pokey=6 then horientación_pokey=Rand(2,3).
If horientación_pokey=8 then horientación_pokey=1.
If horientación_pokey=7 then horientación_pokey=3.
If horientación_pokey=4 or horientación_pokey=2 then.
If sorteo=1 then horientación_pokey=3 else horientación_pokey=1.
Endif.
If horientación_pokey<5 then dirección_pokey=horientación_pokey.
If dirección_pokey=dirección_inversa_pokey then dirección_pokey=Rand(3).
While dirección_pokey=dirección_inversa_pokey.
Dirección_pokey=Rand(3).
Wend.
If status_fantasmas(4)=2 then dirección_pokey=1.
Endif.
Endif.
If abs(xpacman-posx(1)+20)<2 and abs(ypacman-Posy(5))<2 then.
If dirección_pacman=4 then xpacman=posx(10).
Endif.
If abs(x_shadow-posx(1)+20)<2 and abs(y_shadow-Posy(5))<2 then.
Temp_velocidad_shadow=temp_velocidad_shadow/2.
If dirección_shadow=4 then x_shadow=posx(10).
Endif.
If abs(x_spedy-posx(1)+20)<2 and abs(y_spedy-Posy(5))<2 then.
Temp_velocidad_spedy=temp_velocidad_spedy/2.
If dirección_spedy=4 then x_spedy=posx(10).
Endif.
If abs(x_bashful-posx(1)+20)<2 and abs(y_bashful-Posy(5))<2 then.
Temp_velocidad_bashful=temp_velocidad_bashful/2.
If dirección_bashful=4 then x_bashful=posx(10).
Endif.
If abs(x_pokey-posx(1)+20)<2 and abs(y_pokey-Posy(5))<2 then.
Temp_velocidad_pokey=temp_velocidad_pokey/2.
If dirección_pokey=4 then x_pokey=posx(10).
Endif.
If abs(xpacman-posx(10)-20)<2 and abs(ypacman-Posy(5))<2 then.
If dirección_pacman=2 then xpacman=posx(1).
Endif.
If abs(x_shadow-posx(10)-20)<2 and abs(y_shadow-Posy(5))<2 then.
Temp_velocidad_shadow=temp_velocidad_shadow/2.
If dirección_shadow=2 then x_shadow=posx(1).
Endif.
If abs(x_spedy-posx(10)-20)<2 and abs(y_spedy-Posy(5))<2 then.
Temp_velocidad_spedy=temp_velocidad_spedy/2.
If dirección_spedy=2 then x_spedy=posx(1).
Endif.
If abs(x_bashful-posx(10)-20)<2 and abs(y_bashful-Posy(5))<2 then.
Temp_velocidad_bashful=temp_velocidad_bashful/2.
If dirección_bashful=2 then x_bashful=posx(1).
Endif.
If abs(x_pokey-posx(10)-20)<2 and abs(y_pokey-Posy(5))<2 then.
Temp_velocidad_pokey=temp_velocidad_pokey/2.
If dirección_pokey=2 then x_pokey=posx(1).
Endif.
Fila 6----------------------------------------------
If abs(xpacman-posx(4))<2 and abs(ypacman-Posy(6))<2 then.
If dirección_pacman=4 then dirección_pacman=0.
If keydown(200) then dirección_pacman=1.
If keydown(20 then dirección_pacman=3.
If keydown(205) then dirección_pacman=2.
Endif.
If abs(x_shadow-posx(4))<2 and abs(y_shadow-Posy(6))<2 then.
If bloqueo=0 then.
Bloqueo=bloqueo+20.
Sorteo=Rand(2).
Dirección_shadow=0.
If horientación_shadow=5 then horientación_shadow=Rand(1,2).
If horientación_shadow=6 then horientación_shadow=Rand(2,3).
If horientación_shadow=8 then horientación_shadow=1.
If horientación_shadow=7 then horientación_shadow=3.
If horientación_shadow=4 or horientación_shadow=2 then.
If sorteo=1 then horientación_shadow=3 else horientación_shadow=1.
Endif.
If horientación_shadow<5 then dirección_shadow=horientación_shadow.
If dirección_shadow=dirección_inversa_shadow then dirección_shadow=Rand(3).
While dirección_shadow=dirección_inversa_shadow.
Dirección_shadow=Rand(3).
Wend.
If status_fantasmas(1)=2 then dirección_shadow=1.
Endif.
Endif.
If abs(x_spedy-posx(4))<2 and abs(y_spedy-Posy(6))<2 then.
If bloqueo2=0 then.
Bloqueo2=bloqueo2+20.
Sorteo=Rand(2).
Dirección_spedy=0.
If horientación_spedy=5 then horientación_spedy=Rand(1,2).
If horientación_spedy=6 then horientación_spedy=Rand(2,3).
If horientación_spedy=8 then horientación_spedy=1.
If horientación_spedy=7 then horientación_spedy=3.
If horientación_spedy=4 or horientación_spedy=2 then.
If sorteo=1 then horientación_spedy=3 else horientación_spedy=1.
Endif.
If horientación_spedy<5 then dirección_spedy=horientación_spedy.
If dirección_spedy=dirección_inversa_spedy then dirección_spedy=Rand(3).
While dirección_spedy=dirección_inversa_spedy.
Dirección_spedy=Rand(3).
Wend.
If status_fantasmas(2)=2 then dirección_spedy=1.
Endif.
Endif.
If abs(x_bashful-posx(4))<2 and abs(y_bashful-Posy(6))<2 then.
If bloqueo3=0 then.
Bloqueo3=bloqueo3+20.
Sorteo=Rand(2).
Dirección_bashful=0.
If horientación_bashful=5 then horientación_bashful=Rand(1,2).
If horientación_bashful=6 then horientación_bashful=Rand(2,3).
If horientación_bashful=8 then horientación_bashful=1.
If horientación_bashful=7 then horientación_bashful=3.
If horientación_bashful=4 or horientación_bashful=2 then.
If sorteo=1 then horientación_bashful=3 else horientación_bashful=1.
Endif.
If horientación_bashful<5 then dirección_bashful=horientación_bashful.
If dirección_bashful=dirección_inversa_bashful then dirección_bashful=Rand(3).
While dirección_bashful=dirección_inversa_bashful.
Dirección_bashful=Rand(3).
Wend.
If status_fantasmas(3)=2 then dirección_bashful=1.
Endif.
Endif.
If abs(x_pokey-posx(4))<2 and abs(y_pokey-Posy(6))<2 then.
If bloqueo4=0 then.
Bloqueo4=bloqueo4+20.
Sorteo=Rand(2).
Dirección_pokey=0.
If horientación_pokey=5 then horientación_pokey=Rand(1,2).
If horientación_pokey=6 then horientación_pokey=Rand(2,3).
If horientación_pokey=8 then horientación_pokey=1.
If horientación_pokey=7 then horientación_pokey=3.
If horientación_pokey=4 or horientación_pokey=2 then.
If sorteo=1 then horientación_pokey=3 else horientación_pokey=1.
Endif.
If horientación_pokey<5 then dirección_pokey=horientación_pokey.
If dirección_pokey=dirección_inversa_pokey then dirección_pokey=Rand(3).
While dirección_pokey=dirección_inversa_pokey.
Dirección_pokey=Rand(3).
Wend.
If status_fantasmas(4)=2 then dirección_pokey=1.
Endif.
Endif.
If abs(xpacman-posx(7))<2 and abs(ypacman-Posy(6))<2 then.
If dirección_pacman=2 then dirección_pacman=0.
If keydown(200) then dirección_pacman=1.
If keydown(20 then dirección_pacman=3.
If keydown(203) then dirección_pacman=4.
Endif.
If abs(x_shadow-posx(7))<2 and abs(y_shadow-Posy(6))<2 then.
If bloqueo=0 then.
Bloqueo=bloqueo+20.
Sorteo=Rand(2).
Dirección_shadow=0.
If horientación_shadow=5 then horientación_shadow=1.
If horientación_shadow=7 then horientación_shadow=Rand(3,4).
If horientación_shadow=8 then horientación_shadow=Rand(4).
If horientación_shadow=6 then horientación_shadow=3.
If horientación_shadow=4 or horientación_shadow=2 then.
If sorteo=1 then horientación_shadow=3 else horientación_shadow=1.
Endif.
If horientación_shadow<5 then dirección_shadow=horientación_shadow.
If dirección_shadow=dirección_inversa_shadow then dirección_shadow=Rand(4).
While dirección_shadow=2 or dirección_shadow=dirección_inversa_shadow.
Dirección_shadow=Rand(4).
Wend.
If status_fantasmas(1)=2 then dirección_shadow=1.
Endif.
Endif.
If abs(x_spedy-posx(7))<2 and abs(y_spedy-Posy(6))<2 then.
If bloqueo2=0 then.
Bloqueo2=bloqueo2+20.
Sorteo=Rand(2).
Dirección_spedy=0.
If horientación_spedy=5 then horientación_spedy=1.
If horientación_spedy=7 then horientación_spedy=Rand(3,4).
If horientación_spedy=8 then horientación_spedy=Rand(4).
If horientación_spedy=6 then horientación_spedy=3.
If horientación_spedy=4 or horientación_spedy=2 then.
If sorteo=1 then horientación_spedy=3 else horientación_spedy=1.
Endif.
If horientación_spedy<5 then dirección_spedy=horientación_spedy.
If dirección_spedy=dirección_inversa_spedy then dirección_spedy=Rand(4).
While dirección_spedy=2 or dirección_spedy=dirección_inversa_spedy.
Dirección_spedy=Rand(4).
Wend.
If status_fantasmas(2)=2 then dirección_spedy=1.
Endif.
Endif.
If abs(x_bashful-posx(7))<2 and abs(y_bashful-Posy(6))<2 then.
If bloqueo3=0 then.
Bloqueo3=bloqueo3+20.
Sorteo=Rand(2).
Dirección_bashful=0.
If horientación_bashful=5 then horientación_bashful=1.
If horientación_bashful=7 then horientación_bashful=Rand(3,4).
If horientación_bashful=8 then horientación_bashful=Rand(4).
If horientación_bashful=6 then horientación_bashful=3.
If horientación_bashful=4 or horientación_bashful=2 then.
If sorteo=1 then horientación_bashful=3 else horientación_bashful=1.
Endif.
If horientación_bashful<5 then dirección_bashful=horientación_bashful.
If dirección_bashful=dirección_inversa_bashful then dirección_bashful=Rand(4).
While dirección_bashful=2 or dirección_bashful=dirección_inversa_bashful.
Dirección_bashful=Rand(4).
Wend.
If status_fantasmas(3)=2 then dirección_bashful=1.
Endif.
Endif.
If abs(x_pokey-posx(7))<2 and abs(y_pokey-Posy(6))<2 then.
If bloqueo4=0 then.
Bloqueo4=bloqueo4+20.
Sorteo=Rand(2).
Dirección_pokey=0.
If horientación_pokey=5 then horientación_pokey=1.
If horientación_pokey=7 then horientación_pokey=Rand(3,4).
If horientación_pokey=8 then horientación_pokey=Rand(4).
If horientación_pokey=6 then horientación_pokey=3.
If horientación_pokey=4 or horientación_pokey=2 then.
If sorteo=1 then horientación_pokey=3 else horientación_pokey=1.
Endif.
If horientación_pokey<5 then dirección_pokey=horientación_pokey.
If dirección_pokey=dirección_inversa_pokey then dirección_pokey=Rand(4).
While dirección_pokey=2 or dirección_pokey=dirección_inversa_pokey.
Dirección_pokey=Rand(4).
Wend.
If status_fantasmas(4)=2 then dirección_pokey=1.
Endif.
Endif.
Fila 7----------------------------------------------
If abs(xpacman-posx(4))<2 and abs(ypacman-Posy(7))<2 then.
If dirección_pacman=3 then dirección_pacman=0.
If keydown(205) then dirección_pacman=2.
If keydown(200) then dirección_pacman=1.
If keydown(203) then dirección_pacman=4.
Endif.
If abs(x_shadow-posx(4))<2 and abs(y_shadow-Posy(7))<2 then.
If bloqueo=0 then.
Bloqueo=bloqueo+20.
Sorteo=Rand(2).
Dirección_shadow=0.
If horientación_shadow=5 then horientación_shadow=Rand(2).
If horientación_shadow=6 then horientación_shadow=Rand(2).
If horientación_shadow=7 then horientación_shadow=4.
If horientación_shadow=8 then horientación_shadow=Rand(4).
If horientación_shadow=3 then.
If sorteo=1 then horientación_shadow=2 else horientación_shadow=4.
Endif.
If horientación_shadow<5 then dirección_shadow=horientación_shadow.
If dirección_shadow=3 then.
If sorteo=1 then horientación_shadow=4 else horientación_shadow=2.
Endif.
If dirección_shadow=dirección_inversa_shadow then dirección_shadow=Rand(4).
If dirección_shadow=3 then dirección_shadow=Rand(4).
While dirección_shadow=3 or dirección_shadow=dirección_inversa_shadow.
Dirección_shadow=Rand(4).
Wend.
If status_fantasmas(1)=2 then dirección_shadow=1.
Endif.
Endif.
If abs(x_spedy-posx(4))<2 and abs(y_spedy-Posy(7))<2 then.
If bloqueo2=0 then.
Bloqueo2=bloqueo2+20.
Sorteo=Rand(2).
Dirección_spedy=0.
If horientación_spedy=5 then horientación_spedy=Rand(2).
If horientación_spedy=6 then horientación_spedy=Rand(2).
If horientación_spedy=7 then horientación_spedy=4.
If horientación_spedy=8 then horientación_spedy=Rand(4).
If horientación_spedy=3 then.
If sorteo=1 then horientación_spedy=2 else horientación_spedy=4.
Endif.
If horientación_spedy<5 then dirección_spedy=horientación_spedy.
If dirección_spedy=3 then.
If sorteo=1 then horientación_spedy=4 else horientación_spedy=2.
Endif.
If dirección_spedy=dirección_inversa_spedy then dirección_spedy=Rand(4).
If dirección_spedy=3 then dirección_spedy=Rand(4).
While dirección_spedy=3 or dirección_spedy=dirección_inversa_spedy.
Dirección_spedy=Rand(4).
Wend.
If status_fantasmas(2)=2 then dirección_spedy=1.
Endif.
Endif.
If abs(x_bashful-posx(4))<2 and abs(y_bashful-Posy(7))<2 then.
If bloqueo3=0 then.
Bloqueo3=bloqueo3+20.
Sorteo=Rand(2).
Dirección_bashful=0.
If horientación_bashful=5 then horientación_bashful=Rand(2).
If horientación_bashful=6 then horientación_bashful=Rand(2).
If horientación_bashful=7 then horientación_bashful=4.
If horientación_bashful=8 then horientación_bashful=Rand(4).
If horientación_bashful=3 then.
If sorteo=1 then horientación_bashful=2 else horientación_bashful=4.
Endif.
If horientación_bashful<5 then dirección_bashful=horientación_bashful.
If dirección_bashful=3 then.
If sorteo=1 then horientación_bashful=4 else horientación_bashful=2.
Endif.
If dirección_bashful=dirección_inversa_bashful then dirección_bashful=Rand(4).
If dirección_bashful=3 then dirección_bashful=Rand(4).
While dirección_bashful=3 or dirección_bashful=dirección_inversa_bashful.
Dirección_bashful=Rand(4).
Wend.
If status_fantasmas(3)=2 then dirección_bashful=1.
Endif.
Endif.
If abs(x_pokey-posx(4))<2 and abs(y_pokey-Posy(7))<2 then.
If bloqueo4=0 then.
Bloqueo4=bloqueo4+20.
Sorteo=Rand(2).
Dirección_pokey=0.
If horientación_pokey=5 then horientación_pokey=Rand(2).
If horientación_pokey=6 then horientación_pokey=Rand(2).
If horientación_pokey=7 then horientación_pokey=4.
If horientación_pokey=8 then horientación_pokey=Rand(4).
If horientación_pokey=3 then.
If sorteo=1 then horientación_pokey=2 else horientación_pokey=4.
Endif.
If horientación_pokey<5 then dirección_pokey=horientación_pokey.
If dirección_pokey=3 then.
If sorteo=1 then horientación_pokey=4 else horientación_pokey=2.
Endif.
If dirección_pokey=dirección_inversa_pokey then dirección_pokey=Rand(4).
If dirección_pokey=3 then dirección_pokey=Rand(4).
While dirección_pokey=3 or dirección_pokey=dirección_inversa_pokey.
Dirección_pokey=Rand(4).
Wend.
If status_fantasmas(4)=2 then dirección_pokey=1.
Endif.
Endif.
If abs(xpacman-posx(7))<2 and abs(ypacman-Posy(7))<2 then.
If dirección_pacman=3 then dirección_pacman=0.
If keydown(205) then dirección_pacman=2.
If keydown(200) then dirección_pacman=1.
If keydown(203) then dirección_pacman=4.
Endif.
If abs(x_shadow-posx(7))<2 and abs(y_shadow-Posy(7))<2 then.
If bloqueo=0 then.
Bloqueo=bloqueo+20.
Sorteo=Rand(2).
Dirección_shadow=0.
If horientación_shadow=5 then horientación_shadow=Rand(2).
If horientación_shadow=6 then horientación_shadow=2.
If horientación_shadow=7 then horientación_shadow=4.
If horientación_shadow=8 then horientación_shadow=1.
If horientación_shadow<5 then dirección_shadow=horientación_shadow.
If dirección_shadow=dirección_inversa_shadow then dirección_shadow=Rand(4).
While dirección_shadow=3 or dirección_shadow=dirección_inversa_shadow.
Dirección_shadow=Rand(4).
Wend.
If status_fantasmas(1)=2 then dirección_shadow=1.
Endif.
Endif.
If abs(x_spedy-posx(7))<2 and abs(y_spedy-Posy(7))<2 then.
If bloqueo2=0 then.
Bloqueo2=bloqueo2+20.
Sorteo=Rand(2).
Dirección_spedy=0.
If horientación_spedy=5 then horientación_spedy=Rand(2).
If horientación_spedy=6 then horientación_spedy=2.
If horientación_spedy=7 then horientación_spedy=4.
If horientación_spedy=8 then horientación_spedy=1.
If horientación_spedy<5 then dirección_spedy=horientación_spedy.
If dirección_spedy=dirección_inversa_spedy then dirección_spedy=Rand(4).
While dirección_spedy=3 or dirección_spedy=dirección_inversa_spedy.
Dirección_spedy=Rand(4).
Wend.
If status_fantasmas(2)=2 then dirección_spedy=1.
Endif.
Endif.
If abs(x_bashful-posx(7))<2 and abs(y_bashful-Posy(7))<2 then.
If bloqueo3=0 then.
Bloqueo3=bloqueo3+20.
Sorteo=Rand(2).
Dirección_bashful=0.
If horientación_bashful=5 then horientación_bashful=Rand(2).
If horientación_bashful=6 then horientación_bashful=2.
If horientación_bashful=7 then horientación_bashful=4.
If horientación_bashful=8 then horientación_bashful=1.
If horientación_bashful<5 then dirección_bashful=horientación_bashful.
If dirección_bashful=dirección_inversa_bashful then dirección_bashful=Rand(4).
While dirección_bashful=3 or dirección_bashful=dirección_inversa_bashful.
Dirección_bashful=Rand(4).
Wend.
If status_fantasmas(3)=2 then dirección_bashful=1.
Endif.
Endif.
If abs(x_pokey-posx(7))<2 and abs(y_pokey-Posy(7))<2 then.
If bloqueo4=0 then.
Bloqueo4=bloqueo4+20.
Sorteo=Rand(2).
Dirección_pokey=0.
If horientación_pokey=5 then horientación_pokey=Rand(2).
If horientación_pokey=6 then horientación_pokey=2.
If horientación_pokey=7 then horientación_pokey=4.
If horientación_pokey=8 then horientación_pokey=1.
If horientación_pokey<5 then dirección_pokey=horientación_pokey.
If dirección_pokey=dirección_inversa_pokey then dirección_pokey=Rand(4).
While dirección_pokey=3 or dirección_pokey=dirección_inversa_pokey.
Dirección_pokey=Rand(4).
Wend.
If status_fantasmas(4)=2 then dirección_pokey=1.
Endif.
Endif.
Fila 8----------------------------------------------
If abs(xpacman-posx(2))<2 and abs(ypacman-Posy()<2 then.
Dirección_pacman=0.
If keydown(203) then dirección_pacman=4.
If keydown(20 then dirección_pacman=3.
Endif.
If abs(x_shadow-posx(2))<2 and abs(y_shadow-Posy()<2 then.
If dirección_shadow=2 then dirección_shadow=3.
If dirección_shadow=1 then dirección_shadow=4.
Endif.
If abs(x_spedy-posx(2))<2 and abs(y_spedy-Posy()<2 then.
If dirección_spedy=2 then dirección_spedy=3.
If dirección_spedy=1 then dirección_spedy=4.
Endif.
If abs(x_bashful-posx(2))<2 and abs(y_bashful-Posy()<2 then.
If dirección_bashful=2 then dirección_bashful=3.
If dirección_bashful=1 then dirección_bashful=4.
Endif.
If abs(x_pokey-posx(2))<2 and abs(y_pokey-Posy()<2 then.
If dirección_pokey=2 then dirección_pokey=3.
If dirección_pokey=1 then dirección_pokey=4.
Endif.
If abs(xpacman-posx(3))<2 and abs(ypacman-Posy()<2 then.
If dirección_pacman=4 then dirección_pacman=0.
If keydown(205) then dirección_pacman=2.
If keydown(200) then dirección_pacman=1.
If keydown(20 then dirección_pacman=3.
Endif.
If abs(x_shadow-posx(3))<2 and abs(y_shadow-Posy()<2 then.
If bloqueo=0 then.
Bloqueo=bloqueo+20.
Sorteo=Rand(2).
Dirección_shadow=0.
If horientación_shadow=5 then horientación_shadow=Rand(2).
If horientación_shadow=6 then horientación_shadow=Rand(2,3).
If horientación_shadow=8 then horientación_shadow=1.
If horientación_shadow=7 then horientación_shadow=3.
If horientación_shadow=4 or horientación_shadow=2 then.
If sorteo=1 then horientación_shadow=3 else horientación_shadow=1.
Endif.
If horientación_shadow<5 then dirección_shadow=horientación_shadow.
If dirección_shadow=dirección_inversa_shadow then dirección_shadow=Rand(3).
While dirección_shadow=dirección_inversa_shadow.
Dirección_shadow=Rand(3).
Wend.
If status_fantasmas(1)=2 then dirección_shadow=1.
Endif.
Endif.
If abs(x_spedy-posx(3))<2 and abs(y_spedy-Posy()<2 then.
If bloqueo2=0 then.
Bloqueo2=bloqueo2+20.
Sorteo=Rand(2).
Dirección_spedy=0.
If horientación_spedy=5 then horientación_spedy=Rand(2).
If horientación_spedy=6 then horientación_spedy=Rand(2,3).
If horientación_spedy=8 then horientación_spedy=1.
If horientación_spedy=7 then horientación_spedy=3.
If horientación_spedy=4 or horientación_spedy=2 then.
If sorteo=1 then horientación_spedy=3 else horientación_spedy=1.
Endif.
If horientación_spedy<5 then dirección_spedy=horientación_spedy.
If dirección_spedy=dirección_inversa_spedy then dirección_spedy=Rand(3).
While dirección_spedy=dirección_inversa_spedy.
Dirección_spedy=Rand(3).
Wend.
If status_fantasmas(2)=2 then dirección_spedy=1.
Endif.
Endif.
If abs(x_bashful-posx(3))<2 and abs(y_bashful-Posy()<2 then.
If bloqueo3=0 then.
Bloqueo3=bloqueo3+20.
Sorteo=Rand(2).
Dirección_bashful=0.
If horientación_bashful=5 then horientación_bashful=Rand(2).
If horientación_bashful=6 then horientación_bashful=Rand(2,3).
If horientación_bashful=8 then horientación_bashful=1.
If horientación_bashful=7 then horientación_bashful=3.
If horientación_bashful=4 or horientación_bashful=2 then.
If sorteo=1 then horientación_bashful=3 else horientación_bashful=1.
Endif.
If horientación_bashful<5 then dirección_bashful=horientación_bashful.
If dirección_bashful=dirección_inversa_bashful then dirección_bashful=Rand(3).
While dirección_bashful=dirección_inversa_bashful.
Dirección_bashful=Rand(3).
Wend.
If status_fantasmas(3)=2 then dirección_bashful=1.
Endif.
Endif.
If abs(x_pokey-posx(3))<2 and abs(y_pokey-Posy()<2 then.
If bloqueo4=0 then.
Bloqueo4=bloqueo4+20.
Sorteo=Rand(2).
Dirección_pokey=0.
If horientación_pokey=5 then horientación_pokey=Rand(2).
If horientación_pokey=6 then horientación_pokey=Rand(2,3).
If horientación_pokey=8 then horientación_pokey=1.
If horientación_pokey=7 then horientación_pokey=3.
If horientación_pokey=4 or horientación_pokey=2 then.
If sorteo=1 then horientación_pokey=3 else horientación_pokey=1.
Endif.
If horientación_pokey<5 then dirección_pokey=horientación_pokey.
If dirección_pokey=dirección_inversa_pokey then dirección_pokey=Rand(3).
While dirección_pokey=dirección_inversa_pokey.
Dirección_pokey=Rand(3).
Wend.
If status_fantasmas(4)=2 then dirección_pokey=1.
Endif.
Endif.
If abs(xpacman-posx()<2 and abs(ypacman-Posy()<2 then.
If dirección_pacman=2 then dirección_pacman=0.
If keydown(203) then dirección_pacman=4.
If keydown(20 then dirección_pacman=3.
If keydown(200) then dirección_pacman=1.
Endif.
If abs(x_shadow-posx()<2 and abs(y_shadow-Posy()<2 then.
If bloqueo=0 then.
Bloqueo=bloqueo+20.
Sorteo=Rand(2).
Dirección_shadow=0.
If horientación_shadow=5 or horientación_shadow=8 then horientación_shadow=1.
If horientación_shadow=6 or horientación_shadow=7 then horientación_shadow=3.
If horientación_shadow<5 then dirección_shadow=horientación_shadow.
If dirección_shadow=dirección_inversa_shadow then dirección_shadow=Rand(3,4).
While dirección_shadow=2 or dirección_shadow=dirección_inversa_shadow.
Dirección_shadow=Rand(4).
Wend.
If status_fantasmas(1)=2 then dirección_shadow=1.
Endif.
Endif.
If abs(x_spedy-posx()<2 and abs(y_spedy-Posy()<2 then.
If bloqueo2=0 then.
Bloqueo2=bloqueo2+20.
Sorteo=Rand(2).
Dirección_spedy=0.
If horientación_spedy=5 or horientación_spedy=8 then horientación_spedy=1.
If horientación_spedy=6 or horientación_spedy=7 then horientación_spedy=3.
If horientación_spedy<5 then dirección_spedy=horientación_spedy.
If dirección_spedy=dirección_inversa_spedy then dirección_spedy=Rand(3,4).
While dirección_spedy=2 or dirección_spedy=dirección_inversa_spedy.
Dirección_spedy=Rand(4).
Wend.
If status_fantasmas(2)=2 then dirección_spedy=1.
Endif.
Endif.
If abs(x_bashful-posx()<2 and abs(y_bashful-Posy()<2 then.
If bloqueo3=0 then.
Bloqueo3=bloqueo3+20.
Sorteo=Rand(2).
Dirección_bashful=0.
If horientación_bashful=5 or horientación_bashful=8 then horientación_bashful=1.
If horientación_bashful=6 or horientación_bashful=7 then horientación_bashful=3.
If horientación_bashful<5 then dirección_bashful=horientación_bashful.
If dirección_bashful=dirección_inversa_bashful then dirección_bashful=Rand(3,4).
While dirección_bashful=2 or dirección_bashful=dirección_inversa_bashful.
Dirección_bashful=Rand(4).
Wend.
If status_fantasmas(3)=2 then dirección_bashful=1.
Endif.
Endif.
If abs(x_pokey-posx()<2 and abs(y_pokey-Posy()<2 then.
If bloqueo4=0 then.
Bloqueo4=bloqueo4+20.
Sorteo=Rand(2).
Dirección_pokey=0.
If horientación_pokey=5 or horientación_pokey=8 then horientación_pokey=1.
If horientación_pokey=6 or horientación_pokey=7 then horientación_pokey=3.
If horientación_pokey<5 then dirección_pokey=horientación_pokey.
If dirección_pokey=dirección_inversa_pokey then dirección_pokey=Rand(3,4).
While dirección_pokey=2 or dirección_pokey=dirección_inversa_pokey.
Dirección_pokey=Rand(4).
Wend.
If status_fantasmas(4)=2 then dirección_pokey=1.
Endif.
Endif.
If abs(xpacman-posx(9))<2 and abs(ypacman-Posy()<2 then.
Dirección_pacman=0.
If keydown(205) then dirección_pacman=2.
If keydown(20 then dirección_pacman=3.
Endif.
If abs(x_shadow-posx(9))<2 and abs(y_shadow-Posy()<2 then.
If dirección_shadow=4 then dirección_shadow=3.
If dirección_shadow=1 then dirección_shadow=2.
Endif.
If abs(x_spedy-posx(9))<2 and abs(y_spedy-Posy()<2 then.
If dirección_spedy=4 then dirección_spedy=3.
If dirección_spedy=1 then dirección_spedy=2.
Endif.
If abs(x_bashful-posx(9))<2 and abs(y_bashful-Posy()<2 then.
If dirección_bashful=4 then dirección_bashful=3.
If dirección_bashful=1 then dirección_bashful=2.
Endif.
If abs(x_pokey-posx(9))<2 and abs(y_pokey-Posy()<2 then.
If dirección_pokey=4 then dirección_pokey=3.
If dirección_pokey=1 then dirección_pokey=2.
Endif.
Fila 9----------------------------------------------
If (abs(xpacman-posx(2))<2 or abs(xpacman-posx(9))<2) and abs(ypacman-Posy(9))<2 then.
If dirección_pacman=3 then dirección_pacman=0.
If keydown(205) then dirección_pacman=2.
If keydown(200) then dirección_pacman=1.
If keydown(203) then dirección_pacman=4.
Endif.
If (abs(x_shadow-posx(2))<2 or abs(x_shadow-posx(9))<2) and abs(y_shadow-Posy(9))<2 then.
If bloqueo=0 then.
Bloqueo=bloqueo+20.
Sorteo=Rand(2).
Dirección_shadow=0.
If horientación_shadow=3 then horientación_shadow=4.
If horientación_shadow=6 then horientación_shadow=4.
If horientación_shadow=5 then horientación_shadow=Rand(2).
If horientación_shadow=7 then horientación_shadow=4.
If horientación_shadow=8 then horientación_shadow=1.
If horientación_shadow<5 then dirección_shadow=horientación_shadow.
If dirección_shadow=dirección_inversa_shadow then dirección_shadow=Rand(2).
While dirección_shadow=dirección_inversa_shadow.
Dirección_shadow=Rand(2).
Wend.
If status_fantasmas(1)=2 then dirección_shadow=1.
Endif.
Endif.
If (abs(x_spedy-posx(2))<2 or abs(x_spedy-posx(9))<2) and abs(y_spedy-Posy(9))<2 then.
If bloqueo2=0 then.
Bloqueo2=bloqueo2+20.
Sorteo=Rand(2).
Dirección_spedy=0.
If horientación_spedy=3 then horientación_spedy=4.
If horientación_spedy=6 then horientación_spedy=4.
If horientación_spedy=5 then horientación_spedy=Rand(2).
If horientación_spedy=7 then horientación_spedy=4.
If horientación_spedy=8 then horientación_spedy=1.
If horientación_spedy<5 then dirección_spedy=horientación_spedy.
If dirección_spedy=dirección_inversa_spedy then dirección_spedy=Rand(2).
While dirección_spedy=dirección_inversa_spedy.
Dirección_spedy=Rand(2).
Wend.
If status_fantasmas(2)=2 then dirección_spedy=1.
Endif.
Endif.
If (abs(x_bashful-posx(2))<2 or abs(x_bashful-posx(9))<2) and abs(y_bashful-Posy(9))<2 then.
If bloqueo3=0 then.
Bloqueo3=bloqueo3+20.
Sorteo=Rand(2).
Dirección_bashful=0.
If horientación_bashful=3 then horientación_bashful=4.
If horientación_bashful=6 then horientación_bashful=4.
If horientación_bashful=5 then horientación_bashful=Rand(2).
If horientación_bashful=7 then horientación_bashful=4.
If horientación_bashful=8 then horientación_bashful=1.
If horientación_bashful<5 then dirección_bashful=horientación_bashful.
If dirección_bashful=dirección_inversa_bashful then dirección_bashful=Rand(2).
While dirección_bashful=dirección_inversa_bashful.
Dirección_bashful=Rand(2).
Wend.
If status_fantasmas(3)=2 then dirección_bashful=1.
Endif.
Endif.
If (abs(x_pokey-posx(2))<2 or abs(x_pokey-posx(9))<2) and abs(y_pokey-Posy(9))<2 then.
If bloqueo4=0 then.
Bloqueo4=bloqueo4+20.
Sorteo=Rand(2).
Dirección_pokey=0.
If horientación_pokey=3 then horientación_pokey=4.
If horientación_pokey=6 then horientación_pokey=4.
If horientación_pokey=5 then horientación_pokey=Rand(2).
If horientación_pokey=7 then horientación_pokey=4.
If horientación_pokey=8 then horientación_pokey=1.
If horientación_pokey<5 then dirección_pokey=horientación_pokey.
If dirección_pokey=dirección_inversa_pokey then dirección_pokey=Rand(2).
While dirección_pokey=dirección_inversa_pokey.
Dirección_pokey=Rand(2).
Wend.
If status_fantasmas(4)=2 then dirección_pokey=1.
Endif.
Endif.
If (abs(xpacman-posx(3))<2 or abs(xpacman-posx(7))<2) and abs(ypacman-Posy(9))<2 then.
Dirección_pacman=0.
If keydown(200) then dirección_pacman=1.
If keydown(203) then dirección_pacman=4.
Endif.
If (abs(x_shadow-posx(3))<2 or abs(x_shadow-posx(7))<2) and abs(y_shadow-Posy(9))<2 then.
If dirección_shadow=2 then dirección_shadow=1.
If dirección_shadow=3 then dirección_shadow=4.
Endif.
If (abs(x_spedy-posx(3))<2 or abs(x_spedy-posx(7))<2) and abs(y_spedy-Posy(9))<2 then.
If dirección_spedy=2 then dirección_spedy=1.
If dirección_spedy=3 then dirección_spedy=4.
Endif.
If (abs(x_bashful-posx(3))<2 or abs(x_bashful-posx(7))<2) and abs(y_bashful-Posy(9))<2 then.
If dirección_bashful=2 then dirección_bashful=1.
If dirección_bashful=3 then dirección_bashful=4.
Endif.
If (abs(x_pokey-posx(3))<2 or abs(x_pokey-posx(7))<2) and abs(y_pokey-Posy(9))<2 then.
If dirección_pokey=2 then dirección_pokey=1.
If dirección_pokey=3 then dirección_pokey=4.
Endif.
If (abs(xpacman-posx(4))<2 or abs(xpacman-posx()<2) and abs(ypacman-Posy(9))<2 then.
Dirección_pacman=0.
If keydown(205) then dirección_pacman=2.
If keydown(200) then dirección_pacman=1.
Endif.
If (abs(x_shadow-posx(4))<2 or abs(x_shadow-posx()<2) and abs(y_shadow-Posy(9))<2 then.
If dirección_shadow=4 then dirección_shadow=1.
If dirección_shadow=3 then dirección_shadow=2.
Endif.
If (abs(x_spedy-posx(4))<2 or abs(x_spedy-posx()<2) and abs(y_spedy-Posy(9))<2 then.
If dirección_spedy=4 then dirección_spedy=1.
If dirección_spedy=3 then dirección_spedy=2.
Endif.
If (abs(x_bashful-posx(4))<2 or abs(x_bashful-posx()<2) and abs(y_bashful-Posy(9))<2 then.
If dirección_bashful=4 then dirección_bashful=1.
If dirección_bashful=3 then dirección_bashful=2.
Endif.
If (abs(x_pokey-posx(4))<2 or abs(x_pokey-posx()<2) and abs(y_pokey-Posy(9))<2 then.
If dirección_pokey=4 then dirección_pokey=1.
If dirección_pokey=3 then dirección_pokey=2.
Endif.
Fila 10----------------------------------------------
If (abs(xpacman-posx(5))<2 or abs(xpacman-posx(6))<2) and abs(ypacman-Posy(10))<2 then.
If dirección_pacman=3 then dirección_pacman=0.
If keydown(205) then dirección_pacman=2.
If keydown(200) then dirección_pacman=1.
If keydown(203) then dirección_pacman=4.
Endif.
If (abs(x_shadow-posx(5))<2 or abs(x_shadow-posx(6))<2) and abs(y_shadow-Posy(10))<2 then.
If bloqueo=0 then.
Bloqueo=bloqueo+20.
Sorteo=Rand(2).
Dirección_shadow=0.
If horientación_shadow=5 then horientación_shadow=Rand(4).
If horientación_shadow=8 then horientación_shadow=Rand(4).
If horientación_shadow<5 then dirección_shadow=horientación_shadow.
If dirección_shadow=dirección_inversa_shadow then dirección_shadow=Rand(4).
While dirección_shadow=3 or dirección_shadow=dirección_inversa_shadow.
Dirección_shadow=Rand(4).
Wend.
If status_fantasmas(1)=2 then dirección_shadow=1.
Endif.
Endif.
If (abs(x_spedy-posx(5))<2 or abs(x_spedy-posx(6))<2) and abs(y_spedy-Posy(10))<2 then.
If bloqueo2=0 then.
Bloqueo2=bloqueo2+20.
Sorteo=Rand(2).
Dirección_spedy=0.
If horientación_spedy=5 then horientación_spedy=Rand(4).
If horientación_spedy=8 then horientación_spedy=Rand(4).
If horientación_spedy<5 then dirección_spedy=horientación_spedy.
If dirección_spedy=dirección_inversa_spedy then dirección_spedy=Rand(4).
While dirección_spedy=3 or dirección_spedy=dirección_inversa_spedy.
Dirección_spedy=Rand(4).
Wend.
If status_fantasmas(2)=2 then dirección_spedy=1.
Endif.
Endif.
If (abs(x_bashful-posx(5))<2 or abs(x_bashful-posx(6))<2) and abs(y_bashful-Posy(10))<2 then.
If bloqueo3=0 then.
Bloqueo3=bloqueo3+20.
Sorteo=Rand(2).
Dirección_bashful=0.
If horientación_bashful=5 then horientación_bashful=Rand(4).
If horientación_bashful=8 then horientación_bashful=Rand(4).
If horientación_bashful<5 then dirección_bashful=horientación_bashful.
If dirección_bashful=dirección_inversa_bashful then dirección_bashful=Rand(4).
While dirección_bashful=3 or dirección_bashful=dirección_inversa_bashful.
Dirección_bashful=Rand(4).
Wend.
If status_fantasmas(3)=2 then dirección_bashful=1.
Endif.
Endif.
If (abs(x_pokey-posx(5))<2 or abs(x_pokey-posx(6))<2) and abs(y_pokey-Posy(10))<2 then.
If bloqueo4=0 then.
Bloqueo4=bloqueo4+20.
Sorteo=Rand(2).
Dirección_pokey=0.
If horientación_pokey=5 then horientación_pokey=Rand(4).
If horientación_pokey=8 then horientación_pokey=Rand(4).
If horientación_pokey<5 then dirección_pokey=horientación_pokey.
If dirección_pokey=dirección_inversa_pokey then dirección_pokey=Rand(4).
While dirección_pokey=3 or dirección_pokey=dirección_inversa_pokey.
Dirección_pokey=Rand(4).
Wend.
If status_fantasmas(4)=2 then dirección_pokey=1.
Endif.
Endif.
Fin de los ejes-.
Desplazamientos.
If pacman_status=1 then.
If dirección_pacman=1 and keydown(20 then dirección_pacman=3.
If dirección_pacman=2 and keydown(203) then dirección_pacman=4.
If dirección_pacman=3 and keydown(200) then dirección_pacman=1.
If dirección_pacman=4 and keydown(205) then dirección_pacman=2.
If dirección_pacman=1 then ypacman=ypacman-temp_velocidad.
If dirección_pacman=2 then xpacman=xpacman+temp_velocidad.
If dirección_pacman=3 then ypacman=ypacman+temp_velocidad.
If dirección_pacman=4 then xpacman=xpacman-temp_velocidad.
If dirección_shadow=1 then y_shadow=y_shadow-temp_velocidad_shadow.
If dirección_shadow=2 then x_shadow=x_shadow+temp_velocidad_shadow.
If dirección_shadow=3 then y_shadow=y_shadow+temp_velocidad_shadow.
If dirección_shadow=4 then x_shadow=x_shadow-temp_velocidad_shadow.
If dirección_spedy=1 then y_spedy=y_spedy-temp_velocidad_spedy.
If dirección_spedy=2 then x_spedy=x_spedy+temp_velocidad_spedy.
If dirección_spedy=3 then y_spedy=y_spedy+temp_velocidad_spedy.
If dirección_spedy=4 then x_spedy=x_spedy-temp_velocidad_spedy.
If dirección_bashful=1 then y_bashful=y_bashful-temp_velocidad_bashful.
If dirección_bashful=2 then x_bashful=x_bashful+temp_velocidad_bashful.
If dirección_bashful=3 then y_bashful=y_bashful+temp_velocidad_bashful.
If dirección_bashful=4 then x_bashful=x_bashful-temp_velocidad_bashful.
If dirección_pokey=1 then y_pokey=y_pokey-temp_velocidad_pokey.
If dirección_pokey=2 then x_pokey=x_pokey+temp_velocidad_pokey.
If dirección_pokey=3 then y_pokey=y_pokey+temp_velocidad_pokey.
If dirección_pokey=4 then x_pokey=x_pokey-temp_velocidad_pokey.
Endif.
Pantalla.
Impresión en pantalla.
Drawimage pantalla,182,1,0.
Dibujando bolas---------------------------------------------------------------------------------------------
For z=1 todo 26.
If z<>13 and z<>14 then.
Drawimage bolas(z), posx(1)+(z*17.35)-8, Posy(1)+10.
If ImagesCollide (bolas(z), posx(1)+(z*17.35)-8, Posy(1)+10,0, Pacman,xpacman, ypacman,14) then.
Bolas(z)=copyimage (nullimage) :total_bolas=total_bolas-1 : puntos=puntos+10.
Playsound come.
Contador_velocidad=0.
Endif.
Endif.
Next ;llevo 26 bolas.
For z=1 todo 26.
Drawimage bolas(z+26), posx(1)+(z*17.35)-8, Posy(2)+10.
If ImagesCollide (bolas(z+26), posx(1)+(z*17.35)-8, Posy(2)+10,0, Pacman,xpacman, ypacman,14) then.
Bolas(z+26)=copyimage (nullimage) :total_bolas=total_bolas-1 : puntos=puntos+10.
Playsound come.
Contador_velocidad=0.
Endif.
Next ;llevo 50 bolas.
For z=1 todo 26.
If z<>7 and z<>8 and z<>13 and z<>14 and z<>19 and z<>20 then.
Drawimage bolas(z+52), posx(1)+(z*17.35)-8, Posy(3)+10.
If ImagesCollide (bolas(z+52), posx(1)+(z*17.35)-8, Posy(3)+10,0, Pacman,xpacman, ypacman,14) then.
Bolas(z+52)=copyimage (nullimage) :total_bolas=total_bolas-1 : puntos=puntos+10.
Playsound come.
Contador_velocidad=0.
Endif.
Endif.
Next ;llevo 70 bolas.
For z=1 todo 26.
If z<>13 and z<>14 then.
Drawimage bolas(z+7, posx(1)+(z*17.35)-8, Posy(7)+10.
If ImagesCollide (bolas(z+7, posx(1)+(z*17.35)-8, Posy(7)+10,0, Pacman,xpacman, ypacman,14) then.
Bolas(z+7 =copyimage (nullimage) :total_bolas=total_bolas-1 : puntos=puntos+10.
Playsound come.
Contador_velocidad=0.
Endif.
Endif.
Next ;llevo 94 bolas.
For z=1 todo 26.
If z<>1 and z<>4 and z<>5 and z<>22 and z<>23 and z<>26 and z<>13 and z<>14 then.
Drawimage bolas(z+104), posx(1)+(z*17.35)-8, Posy(+10.
If ImagesCollide (bolas(z+104), posx(1)+(z*17.35)-8, Posy(+10,0, Pacman,xpacman, ypacman,14) then.
Bolas(z+104)=copyimage (nullimage) :total_bolas=total_bolas-1 : puntos=puntos+10.
Playsound come.
Contador_velocidad=0.
Endif.
Endif.
Next ;llevo 112 bolas.
For z=1 todo 26.
If z<>7 and z<>8 and z<>13 and z<>14 and z<>19 and z<>20 then.
Drawimage bolas(z+130), posx(1)+(z*17.35)-8, Posy(9)+10.
If ImagesCollide (bolas(z+130), posx(1)+(z*17.35)-8, Posy(9)+10,0, Pacman,xpacman, ypacman,14) then.
Bolas(z+130)=copyimage (nullimage) :total_bolas=total_bolas-1 : puntos=puntos+10.
Playsound come.
Contador_velocidad=0.
Endif.
Endif.
Next ;llevo 132 bolas.
For z=1 todo 26.
Drawimage bolas(z+156), posx(1)+(z*17.35)-8, Posy(10)+10.
If ImagesCollide (bolas(z+156), posx(1)+(z*17.35)-8, Posy(10)+10,0, Pacman,xpacman, ypacman,14) then.
Bolas(z+156)=copyimage (nullimage) :total_bolas=total_bolas-1 : puntos=puntos+10.
Playsound come.
Contador_velocidad=0.
Endif.
Next ;llevo 156 bolas.
Bolas grandes.
Drawimage granbolas(1), posx(1)+9, Posy(1)+10+(2*18.17).
If ImagesCollide (granbolas(1), posx(1)+9, Posy(1)+10+(2*18.17),0, Pacman,xpacman, ypacman,14) then.
Granbolas(1)=copyimage (nullimage) :total_bolas=total_bolas-1 : puntos=puntos+50.
Stopchannel(fantasmas_azules).
Playsound come : status_fantasma=0 : fantasmas_azules=playsound(azules) : stopchannel(andando).
Contador_velocidad=0.
Contador_fantasmas=0.
Temp_frame=26.
If status_fantasmas(1)=1 then dirección_shadow=dirección_inversa_shadow.
If status_fantasmas(2)=1 then dirección_spedy=dirección_inversa_spedy.
If status_fantasmas(3)=1 then dirección_bashful=dirección_inversa_bashful.
If status_fantasmas(4)=1 then dirección_pokey=dirección_inversa_pokey.
For n=1 todo 4.
If status_fantasmas(n)=1 then status_fantasmas(n)=0.
Next.
Endif.
Drawimage granbolas(2), posx(10)+7, Posy(1)+10+(2*18.17).
If ImagesCollide (granbolas(2), posx(10)+9, Posy(1)+10+(2*18.17),0, Pacman,xpacman, ypacman,14) then.
Granbolas(2)=copyimage (nullimage) :total_bolas=total_bolas-1 : puntos=puntos+50.
Stopchannel(fantasmas_azules).
Playsound come : status_fantasma=0 : fantasmas_azules=playsound(azules) : stopchannel(andando).
Contador_velocidad=0.
Contador_fantasmas=0.
Temp_frame=26.
If status_fantasmas(1)=1 then dirección_shadow=dirección_inversa_shadow.
If status_fantasmas(2)=1 then dirección_spedy=dirección_inversa_spedy.
If status_fantasmas(3)=1 then dirección_bashful=dirección_inversa_bashful.
If status_fantasmas(4)=1 then dirección_pokey=dirección_inversa_pokey.
For n=1 todo 4.
If status_fantasmas(n)=1 then status_fantasmas(n)=0.
Next.
Endif.
Drawimage granbolas(3), posx(1)+(1*17.35)-8, Posy(+10.
If ImagesCollide (granbolas(3), posx(1)+(1*17.35)-8, Posy(+10,0, Pacman,xpacman, ypacman,14) then.
Granbolas(3)=copyimage (nullimage) :total_bolas=total_bolas-1 : puntos=puntos+50.
Stopchannel(fantasmas_azules).
Playsound come : status_fantasma=0 : fantasmas_azules=playsound(azules) : stopchannel(andando).
Contador_velocidad=0.
Contador_fantasmas=0.
Temp_frame=26.
If status_fantasmas(1)=1 then dirección_shadow=dirección_inversa_shadow.
If status_fantasmas(2)=1 then dirección_spedy=dirección_inversa_spedy.
If status_fantasmas(3)=1 then dirección_bashful=dirección_inversa_bashful.
If status_fantasmas(4)=1 then dirección_pokey=dirección_inversa_pokey.
For n=1 todo 4.
If status_fantasmas(n)=1 then status_fantasmas(n)=0.
Next.
Endif.
Drawimage granbolas(4), posx(10)+8, Posy(+10.
If ImagesCollide (granbolas(4), posx(10)+8, Posy(+10,0, Pacman,xpacman, ypacman,14) then.
Granbolas(4)=copyimage (nullimage) :total_bolas=total_bolas-1 : puntos=puntos+50.
Stopchannel(fantasmas_azules).
Playsound come : status_fantasma=0 : fantasmas_azules=playsound(azules) : stopchannel(andando).
Contador_velocidad=0.
Contador_fantasmas=0.
Temp_frame=26.
If status_fantasmas(1)=1 then dirección_shadow=dirección_inversa_shadow.
If status_fantasmas(2)=1 then dirección_spedy=dirección_inversa_spedy.
If status_fantasmas(3)=1 then dirección_bashful=dirección_inversa_bashful.
If status_fantasmas(4)=1 then dirección_pokey=dirección_inversa_pokey.
For n=1 todo 4.
If status_fantasmas(n)=1 then status_fantasmas(n)=0.
Next.
Endif.
For z=1 todo 27;comienza el eje Y.
If z=1 or z=3 or z=5 or z=6 or z=20 or z=21 or z=26 or z=27 then.
Drawimage bolas(z+182), posx(1)+9, Posy(1)+10+(z*18.17).
If ImagesCollide (bolas(z+182), posx(1)+9, Posy(1)+10+(z*18.17),0, Pacman,xpacman, ypacman,14) then.
Bolas(z+182)=copyimage (nullimage) :total_bolas=total_bolas-1 : puntos=puntos+10.
Playsound come.
Contador_velocidad=0.
Endif.
Endif.
Next ;llevo 164 bolas.
For z=1 todo 27.
If z=24 or z=23 then.
Drawimage bolas(z+209), posx(2)+9, Posy(1)+10+(z*18.17).
If ImagesCollide (bolas(z+209), posx(2)+9, Posy(1)+10+(z*18.17),0, Pacman,xpacman, ypacman,14) then.
Bolas(z+209)=copyimage (nullimage) :total_bolas=total_bolas-1 : puntos=puntos+10.
Playsound come.
Contador_velocidad=0.
Endif.
Endif.
Next ;llevo 166 bolas.
For z=1 todo 27.
If z=1 or z=2 or z=3 or z=5 or z=6 or (z>7 and z<19) or z=20 or z=21 or z=23 or z=24 then.
Drawimage bolas(z+236), posx(3)+8, Posy(1)+10+(z*18.17).
If ImagesCollide (bolas(z+236), posx(3)+8, Posy(1)+10+(z*18.17),0, Pacman,xpacman, ypacman,14) then.
Bolas(z+236)=copyimage (nullimage) :total_bolas=total_bolas-1 : puntos=puntos+10.
Playsound come.
Contador_velocidad=0.
Endif.
Endif.
Next ;llevo 186 bolas.
For z=1 todo 27.
If z=24 or z=23 or z=5 or z=6 then.
Drawimage bolas(z+263), posx(4)+7, Posy(1)+10+(z*18.17).
If ImagesCollide (bolas(z+263), posx(4)+6, Posy(1)+10+(z*18.17),0, Pacman,xpacman, ypacman,14) then.
Bolas(z+263)=copyimage (nullimage) :total_bolas=total_bolas-1 : puntos=puntos+10.
Playsound come.
Contador_velocidad=0.
Endif.
Endif.
Next ;llevo 190 bolas.
For z=1 todo 27.
If z=1 or z=2 or z=3 or z=26 or z=27 or z=20 or z=21 then.
Drawimage bolas(z+290), posx(5)+7, Posy(1)+10+(z*18.17).
If ImagesCollide (bolas(z+290), posx(5)+6, Posy(1)+10+(z*18.17),0, Pacman,xpacman, ypacman,14) then.
Bolas(z+290)=copyimage (nullimage) :total_bolas=total_bolas-1 : puntos=puntos+10.
Playsound come.
Contador_velocidad=0.
Endif.
Endif.
Next ;llevo 197 bolas.
For z=1 todo 27.
If z=1 or z=2 or z=3 or z=26 or z=27 or z=20 or z=21 then.
Drawimage bolas(z+317), posx(6)+6, Posy(1)+10+(z*18.17).
If ImagesCollide (bolas(z+317), posx(6)+5, Posy(1)+10+(z*18.17),0, Pacman,xpacman, ypacman,14) then.
Bolas(z+317)=copyimage (nullimage) :total_bolas=total_bolas-1 : puntos=puntos+10.
Playsound come.
Contador_velocidad=0.
Endif.
Endif.
Next ;llevo 204 bolas.
For z=1 todo 27.
If z=24 or z=23 or z=5 or z=6 then.
Drawimage bolas(z+344), posx(7)+6, Posy(1)+10+(z*18.17).
If ImagesCollide (bolas(z+344), posx(7)+5, Posy(1)+10+(z*18.17),0, Pacman,xpacman, ypacman,14) then.
Bolas(z+344)=copyimage (nullimage) :total_bolas=total_bolas-1 : puntos=puntos+10.
Playsound come.
Contador_velocidad=0.
Endif.
Endif.
Next ;llevo 208 bolas.
For z=1 todo 27.
If z=1 or z=2 or z=3 or z=5 or z=6 or (z>7 and z<19) or z=20 or z=21 or z=23 or z=24 then.
Drawimage bolas(z+371), posx(+6, Posy(1)+10+(z*18.17).
If ImagesCollide (bolas(z+371), posx(+5, Posy(1)+10+(z*18.17),0, Pacman,xpacman, ypacman,14) then.
Bolas(z+371)=copyimage (nullimage) :total_bolas=total_bolas-1 : puntos=puntos+10.
Playsound come.
Contador_velocidad=0.
Endif.
Endif.
Next ;llevo 228 bolas.
For z=1 todo 27.
If z=24 or z=23 then.
Drawimage bolas(z+39, posx(9)+5, Posy(1)+10+(z*18.17).
If ImagesCollide (bolas(z+39, posx(9)+5, Posy(1)+10+(z*18.17),0, Pacman,xpacman, ypacman,14) then.
Bolas(z+39 =copyimage (nullimage) :total_bolas=total_bolas-1 : puntos=puntos+10.
Playsound come.
Contador_velocidad=0.
Endif.
Endif.
Next ;llevo 230 bolas.
For z=1 todo 27.
If z=1 or z=3 or z=5 or z=6 or z=20 or z=21 or z=26 or z=27 then.
Drawimage bolas(z+425), posx(10)+7, Posy(1)+10+(z*18.17).
If ImagesCollide (bolas(z+425), posx(10)+5, Posy(1)+10+(z*18.17),0, Pacman,xpacman, ypacman,14) then.
Bolas(z+425)=copyimage (nullimage) :total_bolas=total_bolas-1 : puntos=puntos+10.
Playsound come.
Contador_velocidad=0.
Endif.
Endif.
Next ;llevo 240 bolas.
Frutas---------------------------
If (fruta_activa=1 or fruta_activa=2) and contador_fruta>1000 then.
Drawimage frutas, posx(5)+26, Posy(6), fruta_level.
If ImagesCollide (frutas, posx(5)+26, Posy(6),0, Pacman,xpacman, ypacman,14) then.
Puntos=puntos+puntos_fruta.
Fruta_activa=fruta_activa+1.
Contador_fruta=0.
Playsound come_fruta.
Display_puntos=1.
Endif.
Endif.
Osd.
If vidas>0 then drawimage Pacman,xpacman, ypacman, frame_pacman.
If Skipframe_muerte<60 and vidas>0 then.
Drawimage shadow,x_shadow, y_shadow, frame_shadow.
Drawimage speedy,x_spedy, y_spedy, frame_spedy.
Drawimage bashful,x_bashful, y_bashful, frame_bashful.
Drawimage pokey,x_pokey, y_pokey, frame_pokey.
Endif.
If display_puntos>0 then.
Drawimage frutas, posx(5)+26, Posy(6), fruta_level+8.
Endif.
If display_puntos_fantasmas>0 then.
Drawimage Pacman, temp_x, temp_y, temp_frame.
If display_puntos_fantasmas=10 then delay 700.
Endif.
For z=1 todo level.
If z=1 or z=2 then x=z.
If z=3 or z=4 then x=3.
If z=5 or z=6 then x=4.
If z=7 or z=8 then x=5.
If z=9 or z=10 then x=6.
If z=11 or z=12 then x=7.
If z>12 then x=0.
Drawimage frutas, posx(10)-z*32, Posy(10)+40,x.
Next.
For z=2 todo vidas.
If vidas>1 then drawimage Pacman, posx(1)+z*32-75, Posy(10)+45,15.
Next.
Score.
If puntos>récord then récord=puntos.
Color 200,200,200.
Text 90,10,score,true.
Text 90,40, puntos,true.
Text 90,80,hi-score,true.
Text 90,110, récord,true.
Text 100, Posy(10),level, true.
Text 90, Posy(10)+25,int(level),true.
Flushkeys().
If vidas=0 then.
Fileout=writefile (data, dat).
Writeint(fileout, récord).
Closefile (fileout).
Color 255,255,0 topchannel(andando): text posx(5)-32, Posy(6)+8,game over :flip : delay 1000 :waitkey() : goto menú.
Endif.
Waittimer(frametimer).
Flip.
Wend.
Fin del bucle-------
End.
Animación.
Animación del Pacman.
Skipframe_pacman=skipframe1/7.
If Skipframe_fantasma>15 and dirección_shadow=4 then frame_shadow=4.
If Skipframe_fantasma>15 and dirección_shadow=1 then frame_shadow=0.
If Skipframe_fantasma>15 and dirección_shadow=2 then frame_shadow=6.
If Skipframe_fantasma>15 and dirección_shadow=3 then frame_shadow=2.
If Skipframe_fantasma<15 and dirección_shadow=4 then frame_shadow=5.
If Skipframe_fantasma<15 and dirección_shadow=1 then frame_shadow=1.
If Skipframe_fantasma<15 and dirección_shadow=2 then frame_shadow=7.
If Skipframe_fantasma<15 and dirección_shadow=3 then frame_shadow=3.
If Skipframe_fantasma<15 and status_fantasmas(1)=0 then frame_shadow=32.
If Skipframe_fantasma>15 and status_fantasmas(1)=0 then frame_shadow=33.
If Skipframe_fantasma<15 and status_fantasmas(1)=0 and contador_fantasmas>600 then frame_shadow=33.
If Skipframe_fantasma>15 and status_fantasmas(1)=0 and contador_fantasmas>600 then frame_shadow=34.
If eyes(1)=1 and dirección_shadow=1 then frame_shadow=40.
If eyes(1)=1 and dirección_shadow=3 then frame_shadow=41.
If eyes(1)=1 and dirección_shadow=4 then frame_shadow=42.
If eyes(1)=1 and dirección_shadow=2 then frame_shadow=43.
If Skipframe_fantasma>15 and dirección_spedy=4 then frame_spedy=4+8.
If Skipframe_fantasma>15 and dirección_spedy=1 then frame_spedy=0+8.
If Skipframe_fantasma>15 and dirección_spedy=2 then frame_spedy=6+8.
If Skipframe_fantasma>15 and dirección_spedy=3 then frame_spedy=2+8.
If Skipframe_fantasma<15 and dirección_spedy=4 then frame_spedy=5+8.
If Skipframe_fantasma<15 and dirección_spedy=1 then frame_spedy=1+8.
If Skipframe_fantasma<15 and dirección_spedy=2 then frame_spedy=7+8.
If Skipframe_fantasma<15 and dirección_spedy=3 then frame_spedy=3+8.
If Skipframe_fantasma<15 and status_fantasmas(2)=0 then frame_spedy=32.
If Skipframe_fantasma>15 and status_fantasmas(2)=0 then frame_spedy=33.
If Skipframe_fantasma<15 and status_fantasmas(2)=0 and contador_fantasmas>600 then frame_spedy=33.
If Skipframe_fantasma>15 and status_fantasmas(2)=0 and contador_fantasmas>600 then frame_spedy=34.
If eyes(2)=1 and dirección_spedy=1 then frame_spedy=40.
If eyes(2)=1 and dirección_spedy=3 then frame_spedy=41.
If eyes(2)=1 and dirección_spedy=4 then frame_spedy=42.
If eyes(2)=1 and dirección_spedy=2 then frame_spedy=43.
If Skipframe_fantasma>15 and dirección_bashful=4 then frame_bashful=4+16.
If Skipframe_fantasma>15 and dirección_bashful=1 then frame_bashful=0+16.
If Skipframe_fantasma>15 and dirección_bashful=2 then frame_bashful=6+16.
If Skipframe_fantasma>15 and dirección_bashful=3 then frame_bashful=2+16.
If Skipframe_fantasma<15 and dirección_bashful=4 then frame_bashful=5+16.
If Skipframe_fantasma<15 and dirección_bashful=1 then frame_bashful=1+16.
If Skipframe_fantasma<15 and dirección_bashful=2 then frame_bashful=7+16.
If Skipframe_fantasma<15 and dirección_bashful=3 then frame_bashful=3+16.
If Skipframe_fantasma<15 and status_fantasmas(3)=0 then frame_bashful=32.
If Skipframe_fantasma>15 and status_fantasmas(3)=0 then frame_bashful=33.
If Skipframe_fantasma<15 and status_fantasmas(3)=0 and contador_fantasmas>600 then frame_bashful=33.
If Skipframe_fantasma>15 and status_fantasmas(3)=0 and contador_fantasmas>600 then frame_bashful=34.
If eyes(3)=1 and dirección_bashful=1 then frame_bashful=40.
If eyes(3)=1 and dirección_bashful=3 then frame_bashful=41.
If eyes(3)=1 and dirección_bashful=4 then frame_bashful=42.
If eyes(3)=1 and dirección_bashful=2 then frame_bashful=43.
If Skipframe_fantasma>15 and dirección_pokey=4 then frame_pokey=4+24.
If Skipframe_fantasma>15 and dirección_pokey=1 then frame_pokey=0+24.
If Skipframe_fantasma>15 and dirección_pokey=2 then frame_pokey=6+24.
If Skipframe_fantasma>15 and dirección_pokey=3 then frame_pokey=2+24.
If Skipframe_fantasma<15 and dirección_pokey=4 then frame_pokey=5+24.
If Skipframe_fantasma<15 and dirección_pokey=1 then frame_pokey=1+24.
If Skipframe_fantasma<15 and dirección_pokey=2 then frame_pokey=7+24.
If Skipframe_fantasma<15 and dirección_pokey=3 then frame_pokey=3+24.
If Skipframe_fantasma<15 and status_fantasmas(4)=0 then frame_pokey=32.
If Skipframe_fantasma>15 and status_fantasmas(4)=0 then frame_pokey=33.
If Skipframe_fantasma<15 and status_fantasmas(4)=0 and contador_fantasmas>600 then frame_pokey=33.
If Skipframe_fantasma>15 and status_fantasmas(4)=0 and contador_fantasmas>600 then frame_pokey=34.
If eyes(4)=1 and dirección_pokey=1 then frame_pokey=40.
If eyes(4)=1 and dirección_pokey=3 then frame_pokey=41.
If eyes(4)=1 and dirección_pokey=4 then frame_pokey=42.
If eyes(4)=1 and dirección_pokey=2 then frame_pokey=43.
If pacman_status=1 then.
If dirección_pacman=2 then.
If Skipframe_pacman<1 then frame_pacman=2.
If Skipframe_pacman=1 then frame_pacman=3.
If Skipframe_pacman=2 then frame_pacman=4.
Endif.
If dirección_pacman=4 then.
If Skipframe_pacman<1 then frame_pacman=2.
If Skipframe_pacman=1 then frame_pacman=0.
If Skipframe_pacman=2 then frame_pacman=1.
Endif.
If dirección_pacman=1 then.
If Skipframe_pacman<1 then frame_pacman=2.
If Skipframe_pacman=1 then frame_pacman=5.
If Skipframe_pacman=2 then frame_pacman=6.
Endif.
If dirección_pacman=3 then.
If Skipframe_pacman<1 then frame_pacman=2.
If Skipframe_pacman=1 then frame_pacman=8.
If Skipframe_pacman=2 then frame_pacman=9.
Endif.
Endif.
If pacman_status=0 then.
Skipframe_muerte=skipframe_muerte+1.
If Skipframe_muerte=50 then frame_pacman=16 : playsound dead.
If Skipframe_muerte=60 then frame_pacman=17.
If Skipframe_muerte=70 then frame_pacman=18.
If Skipframe_muerte=80 then frame_pacman=19.
If Skipframe_muerte=90 then frame_pacman=20.
If Skipframe_muerte=100 then frame_pacman=21.
If Skipframe_muerte=110 then frame_pacman=22.
If Skipframe_muerte=120 then frame_pacman=23.
If Skipframe_muerte=130 then frame_pacman=24.
If Skipframe_muerte=140 then frame_pacman=25.
If Skipframe_muerte=160 then playsound pip.
If Skipframe_muerte=170 then frame_pacman=26 : playsound pip.
If Skipframe_muerte=200 then.
Frame_pacman=26 : delay 1000 :skipframe_muerte=0 :vidas=vidas-1.
If contador_fruta>1000 then fruta_activa=fruta_activa+1.
Goto newlive.
Endif.
Endif.
https://foro3d.com/attachment.php?attachmentid=175109
Esta esto un poco abandonado
Hola Compañeros.
Soy nuevo en esto de BlitzBasic 3D y tengo muchas ganas de aprender. Saludos.
Aprovecho que se reabre el foro, para preguntar si sabéis algo de eso. Gracias a todos.