Please login or register.

Login with username, password and session length
Advanced search  

News:

IRC channel - server: waelisch.de  channel: #wme (read more)

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Juan Bonair

Pages: 1 [2] 3
16
Foro técnico / Re: Empezando y con problemas.
« on: December 11, 2010, 03:56:32 AM »
Hombre, que no es molestia.
Sólo para saber cómo contestarte: ¿este script que acabás de postear te funciona? Es decir, ¿el personaje empieza en posiciones diferentes dependiendo de la escena en la que estuvo antes?
Porque primero que estemos hasta ahí y luego sí empezamos a pensar en lo de las dos entradas alternativas.

17
Foro técnico / Re: Empezando y con problemas.
« on: December 08, 2010, 08:50:54 PM »
Bien, vamos por partes que si no me mareo.

¿Podría, desde la entrada X de la scene A llegar a la entrada X de la scene B y viceversa? ¿Podría hacer lo mismo con el camino Y, en ambas direcciónes (de A a B y de B a A)?

Es perfectamente posible, yo lo solucionaría con una variable global común y silvestre. Supongamos que tu entrada/salida X (de la escena A) es un objeto... cliqueable, si es que la palabra existe. Tons en su script deberías escribir algo así:

Code: [Select]

on "LeftClick"    // Al cliquear la salida...
    {
        global Entrada = "X";    // Declarar la variable global "Entrada" y darle el valor "X".
        Game.ChangeScene("scenes\B\B.scene");    // Cambiar a la escena B.
    }


Y en la entrada/salida Y (de la escena A) deberías escribir lo mismo, pero cambiando global Entrada = "X"; por global Entrada = "Y";. Luego, en el script de inicialización de la escena B...

Code: [Select]

global Entrada;    // Declarar la variable "Entrada". Esto es sólo para poder usarla en el resto de este script.

switch(Entrada)    // Acá establecés "Entrada" como la variable a comparar.
    {
        case "X":    // Si "Entrada" tiene el valor "X"...
            actor.SkipTo(40, 267);    // Llevar al personaje a la entrada X de la escena B.
            actor.Direction = DI_UP;
            Game.Msg("¡Está en la entrada equis!");    // Líneas adicionales que lo hacen a uno sentirse mejor cuando el código funciona bien.
            actor.Talk("¡Estoy en la entrada equis!");
            break;    // ¡Esta línea es muy importante! Si no el código no va a saber dónde termina el "case X".

        case "Y":   // Si, en cambio, tiene el valor "Y"...
            actor.SkipTo(303, 86);
            actor.Direction = DI_DOWN;
            break;    // Este "break" es opcional, ya que acá termina el comando "switch", no hay necesidad real de decirle a WME que se detenga.
    }


Y calculo que más o menos se entiende cómo es que se hace. Al comenzar la escena B, coloca al personaje dependiendo de si la variable Entrada vale X o Y. Si el jugador ha cliqueado X, la variable valdrá X y entonces el personaje aparecerá en las coordenadas señaladas en el case "X":. La variable Entrada tranquilamente podría llevar los valores true y false, pero me parece que poner el nombre de la entrada a la que nos estamos refiriendo hace el código más entendible.
Las entradas X e Y de la escena B pueden llevar exactamente el mismo código que las de la escena A. En este caso, el scene_init de la escena A debería llevar un código casi igual al de B, sólo que con otras coordenadas y direcciones. Ah, y si A es la primera escena del juego, además de case "X": y case "Y": deberías agregar un default: para cuando el juego recién comienza y la variable Entrada todavía no tiene asignado ningún valor.

La pantalla empieza en la izquierda, y se desliza hasta la derecha, hasta que se encuentra con el personaje y luego sigue normal. No es que sea especialmente molesto, ya que el personaje sigue respondiendo y demás, pero me gustaría saber cómo colocar desde el comienzo la pantalla en el lugar adecuado.

Esta es fácil. En la inicialización de tu escena grande tendrías que agregar la siguiente línea:

Code: [Select]

Scene.SkipTo(actor);


No sé mucho de sonidos en WME así que no sabría qué decirte con respecto a lo de la fuente. Deberías poner acá en el foro el código que estás usando, así sería más fácil ubicar algún error, si lo hay.

El código que te mando lo escribí de memoria y no lo probé, de modo que si bien debería funcionar puede tener errores de tipeo o algo que se me haya olvidado (espero que no, cualquier cosa avisá si algo no funcionó como debía). Ojalá hayas entendido algo de lo que escribí. ¡Suerte!

18
Foro técnico / Re: Empezando y con problemas.
« on: December 08, 2010, 02:01:47 AM »
Por lo de las entradas múltiples, una solución más práctica vendría a ser algo así:

Code: [Select]
switch(Game.PrevScene)    // Acá establecés la variable a comparar, en este caso "Game.PrevScene".
    {
        case "UnaEscena":    // Si la escena anterior se llamaba "UnaEscena", ejecutar el código siguiente hasta "break;".
            actor.SkipTo(40, 267);    // Llevar al personaje a las coordenadas señaladas (en este caso "40,267").
            actor.Direction = DI_UP;    // Poner al personaje mirando hacia arriba (de espaldas al jugador).
            break;

        case "OtraEscena":   // Si, en cambio, se llamaba "OtraEscena", ejecutar el código siguiente hasta "break;"
            actor.SkipTo(303, 86);    // Llevar al personaje a estas otras coordenadas.
            actor.Direction = DI_DOWN;    // Ponerlo mirando hacia abajo (de cara al jugador).
            break;

        case "UnaEscenaMas": actor.SkipTo(27, 86);
            actor.Direction = DI_LEFT;
            break;

        default:    // Si la escena anterior no se llama "UnaEscena" ni "OtraEscena" ni "UnaEscenaMas", ejecutar el código siguiente hasta el final.
            actor.SkipTo(23, 112);
            actor.Direction = DI_RIGHT;
    }

Espero se entienda.

19
Foro técnico / Re: Dudas sobre wintermute
« on: November 25, 2010, 01:33:47 AM »
Wintermute es perfectamente capaz de hacer más o menos cualquier cosa, desde aventura/acción hasta juegos de plataformas a teclado puro.

Por supuesto, su finalidad principal son las aventuras a ratón, así que para hacer lo tuyo tendrás que investigar un poco en la documentación y en el foro. Bueno, y eventualmente usar el foro para consultar tus dudas específicas.

Pero para un estudiante de diseño y desarrollo de videojuegos no creo que sea demasiado complicado.

20
Technical forum / Re: delay scrolling
« on: October 20, 2010, 05:12:17 AM »
Wintermute automaticaly scrolls to the Game.MainObject, wich is assigned to the actor

Code: [Select]
Game.MainObject = actor;
in "game.script" right before loading the first scene. Just delete that line and put it wherever you want it, or whenever, like after a Sleep(ms) in the "scene_ini.script" of your first scene. That is, if I understood you correctly.

Hope it helps.

EDIT: Oh, well, I supose

Code: [Select]
Scene.AutoScroll = false;
at the beginning of a scene and then return it to true would also work.

21
Technical forum / Re: Question about keyboard support
« on: April 27, 2010, 06:02:05 PM »
OK, I see where this is going. I will not be able to easily customize the movement of my character for any irregular curve I may want to have as floor.

My bad, I asked for a simple (at least I thought it was) shape, assuming I could adapt the same concept to any shape.

Thanks anyway meta, you rock! And, well, if you come up with something more about this, let me know, I'm all ears.

22
Technical forum / Re: Question about keyboard support
« on: April 23, 2010, 05:46:26 PM »
Good Lord, fast answer!

K, I don't quite get the S movement yet, but I guess that's just because I don't get this all Trigonometry functions, so I'll have to investigate that myself.

The circular thing works like a charm (thank you!), but I would like to control certain things and I don't know how.

1) The circle coordinates. How do I control where in the scene is this circle going to be placed?

2) The initial entity coordinates. Every time y press the key to make my entity move, it skips to the bottom of the circle. How do I change that? It has something to do whit the var degree = 0; line?

3) The movement speed. Right now, directly from the code you gave me, the entity moves at some speed for a second or so, and after that it goes wildly fast.

Oh, and where do I put the code? Just for the quick test I made and attached directly to the game a mov.script that goes like this:

Code: [Select]
#include "scripts\base.inc"
#include "scripts\keys.inc"

var ent = Scene.GetNode("CosaQueGira");
 
var radiusWidth = 300;
var radiusHeight = 200;
 
var degree = 0; // IMPORTANT! wme Math.Sin and Math.Cos works with degrees NOT radians !IMPORTANT
 
var centerX = ent.X;
var centerY = ent.Y;

on "Keypress"
{
  while(Keyboard.IsKeyDown(VK_LEFT))
  {
   degree = degree + 1;
   if (degree == 360) degree = 0;
 
   ent.X =  centerX + Math.Sin(degree) * radiusWidth;
   ent.Y = centerY + Math.Cos(degree) * radiusHeight;
 
   Sleep(10);
  }
 
  while(Keyboard.IsKeyDown(VK_RIGHT))
  {
   degree = degree - 1;
   if (degree == 360) degree = 0;
 
   ent.X =  centerX + Math.Sin(degree) * radiusWidth;
   ent.Y = centerY + Math.Cos(degree) * radiusHeight;
 
   Sleep(10);
  }
}

How could I do it better or, as you folks say, more elegant? Because I want to change the movement behavior depending on the scene, and probably there's a better way to script it.

23
Technical forum / Question about keyboard support
« on: April 22, 2010, 09:04:17 PM »
Hi y'all!

Some weeks ago I came up with this idea for the movement of a character in a game, and I wanted to know if it was possible to make it with Wintermute (I've been reading the forums for a year or so, so by now I don't think anything is impossible with Wintermute).

I've seen this, so I know the arrow keys can make my actor walk (and they do, flawlessly). But what if the floor region was circular (I mean, like a circle with a smaller and also circular not-walkable region inside)?

1) Could I make my actor (or some entity) walk clockwise with, say, the right arrow key, and counterclockwise with the left arrow?

2) And if my floor region was a big S that connects the bottom left corner of the scene with the top right, could I make my actor go through the S with one key, even if it means that it must go right and left and right again (and, of course, stop anywhere when the arrow key is released and go back with the other arrow)?

I guess that, if possible, it has something to do with waypoints, but I really don't know.
So basically I'm asking if this kind of movement is possible and how could I make it happen, and if it's not then what would you suggest as a workaround.

Nothing more, nothing less.
And I guess you get this a lot, but I'll say it anyway: sorry for my bad English and ask again if you didn't get the question.

24
Game announcements / Re: The Driller Incident
« on: March 07, 2010, 05:03:06 PM »
Very fun game!

How long it took you to make it?

25
Foro general / Re: PANGEA 1/2 disponible para descarga
« on: November 17, 2009, 04:31:18 AM »
La verdad es que el trámite específico para aparecer no lo sé.
Supongo que no debe ser más complicado que entrar en la página de juegos que hay en los recursos, iniciar sesión con tu cuenta del foro y editar el artículo.

Yo igual le preguntaría a Mnemonic.

26
Foro general / Re: PANGEA 1/2 disponible para descarga
« on: November 06, 2009, 03:27:39 AM »
¿Qué hace este juego que no está ya mismo en la lista de juegos de WME?

27
Game design / Re: Swearing in adventures.
« on: September 19, 2009, 04:03:02 PM »
I would say just write the best you can and don’t cut a rich part of your vocabulary just because good manners says you should.

I swear a lot when playing adventure games (especially hard ones) and I don’t expect the game doing something different than me.

28
Technical forum / Re: Four-directional movement
« on: July 31, 2009, 09:13:43 PM »
There's a much more simpler solution to this, it's in the WME documentation.

Quote
Also, remember the actor is able to walk into eight directions, therefore you may need up to eight versions of each animation type for different directions. You don't necessarily need to define all eight directions if you don't want to, though. For example if your actor can only walk to four directions (common for smaller games), you can only define the four directions necessary. The engine will automatically choose the nearest defined direction. You should define at least one direction for each sprite set, though.

29
Game design / Re: Gameplay Evolution
« on: July 17, 2009, 09:08:51 PM »
Just for the record, the action coin was first used in Full Throttle.

30
Oh, and I guess you already know about Ron Gilbert's Why adventure games suck and Old Man Murray's Who killed adventure games. Not very up to date, but still good.

And Messman, even tough I never played it, what you say about Diablo might be right (just don't confuse complex with complicated), and that's probably the reason why that game has captured Ron Gilbert's attention.
And one more thing: Grim Fandango does have some kind of pixel hunting and/or hot spot spotting. It's not an only with point-and-click thing. Love the game, but I have to admit it. Escape from Monkey Island (I need to take it out of my system: horrible, horrible game) solved that problem with the subtitles that showed you what object were you looking at (a solution much more annoying than the problem, in my opinion).

Pages: 1 [2] 3

Page created in 0.095 seconds with 20 queries.