Foros DeCeMuLaDoReS

Retroceder   Foros DeCeMuLaDoReS > Diseño de Juegos > Juegos en general

Juegos en general Si el tema que buscas trata de diseño y la creación de juegos, este es tu foro

Respuesta
 
LinkBack Herramientas
  #1 (permalink)  
Antiguo 26-Jan-2007, 00:04
Avatar de Triforce
Triforce está en el buen camino
DC Junior
 
Fecha de Ingreso: 24-January-2007
Mensajes: 42
Posts agradecidos: 0
Agradecido 3 veces en 2 posts
Predeterminado ayuda en game maker

necesito ayuda para hacer un juego de peleas necesito saber como programar

disparar
saltar
vida
Responder Citando
  #2 (permalink)  
Antiguo 09-Feb-2007, 20:15
Avatar de Triforce
Triforce está en el buen camino
DC Junior
 
Fecha de Ingreso: 24-January-2007
Mensajes: 42
Posts agradecidos: 0
Agradecido 3 veces en 2 posts
Predeterminado

Create Game Maker sprites with Charas [V2]

Introduction
In this article we will see a way to create big sprites to be used in Game Maker, using Charas.
This method guarantee best results than the ones of the integrated exporter, and require less time!
First of all, a list of what we need.

To create a sprite you need…
· Obviously Charas
· A graphic application which is able to convert from PNG to TGA
· The magnification program we will see in the next paragraph

High quality Magnifications
To obtain high quality magnifications we will use three tools downloadable from
http://www.hiend3d.com/demos.html
The tools we are interested in are:
· hq3x Magnification filter
· hq4x
· hq2x
As the names say, these tools permits 2x, 3x and 4x image magnifications.
In the site you can see example of the magnification quality.
There tools have to be runned in Dos. Here you have a syntax example:

hq2x little_image.tga new_image.tga

This command will create a new image (new_image.tga) magnifying 2 times the original one (little_image.tga).

The work begins
First of all we have to create our character using charas. When done, save it on your PC.
Here is my character, a girl with green eyes and blonde hairs:

Now open the image with the graphic application and substitute to the white background a color really near to black (or, in general, very near to edges’s color). This little trick permits to avoid edge errors in magnification stage.
Now save the image in TGA format.
Open a Dos prompt and type the command you want, based on the magnification you need.
This is what i did:

hq2x chara.tga chara2x.tga

And my character now have good dimensions for Game Maker resolutions!

The image is ready to be used in GM. Open it, add a new sprite and click on Edit Sprite.
From the File menu choose Create from Strip and choose your file.
In my case, with a 2x magnification, single frames have a pixel size of 48x64. Use these values as image width and image height.
For the 3x magnification, sizes are 73x96, for the 4x they are 96x128.
Create the sprites for all the four directions, remembering to duplicate the second frame and to place the copy in the first place.
This way the animation will be fluid, and we can use the frame number 0 as standing pose.
Here you can see my character used in a little test:

Obviously we can add some detail manually: here i’ve added pupils, knees, fingers, a ribbon and a necklace:


Thank you for your attention, have good creation times!

Thanksgiving
Thanks to Alex for creating Charas, setting up also one of the more beautiful online communities.
Thank to Highend3D webmaster, because he created and distribuited these little but powerful tools, relesing also the sources.
Thanks to NikyAT1 because he introduced me in GM world, and because he is a great person.

Giovy LoCa

If you want more informations on Game Maker, my site is www.gamemaker.2ya.com
__________________
Firma retirada. Lee las normas del foro. Primer aviso.
Responder Citando
  #3 (permalink)  
Antiguo 09-Feb-2007, 20:44
Dmonk llegará a ser famoso muy pronto Dmonk llegará a ser famoso muy pronto
Especialista DC
 
Fecha de Ingreso: 15-January-2007
Ubicación: Santo Domingo, Republica Dominicana
Mensajes: 105
Posts agradecidos: 0
Agradecido 4 veces en 3 posts
Predeterminado

Cita:
Iniciado por Triforce
necesito ayuda para hacer un juego de peleas necesito saber como programar

disparar
saltar
vida
Hola.

Para programar se necesita saber lo que estas haciendo, osea, Si no has creado un plataforma no crearas un fighting, entiendes?, Con esto no quiero decir que no sepas lo que haces, pero hay que empezar desde lo basico...

1Ro: Para Saltar:
vamos al evento create y ponemos el siguiente codigo
Código:
jump=false
Bien, ahora, Aqui lo que haremos es agregar este codigo en el evento STEP.
Código:
gravity_direction = 270;

  if place_free(x,y+1)
    {gravity = 0.7 jump=1}
  else
    {gravity = 0 jump=0}
Ahora ponemos este codigo debajo de ese que acabamos de poner:
Código:
if (keyboard_check(vk_up)) 
{
  if (jump==false){vspeed=-14}
}
Hay lo que hace cuando presiones la flecha arriba, saltara...

Ahora, me inmagino que tienes echar las variables de mirar ahcia los lados, asi que no te la dare...

2Do. Como Disparar:
en el vento create ponemos el siguiente codigo
Código:
disparo=10
Ahora bien, Aqui ponemos el codigo de disparar

Código:
if (jump==false and keyboard_check_pressed(vk_numpad3))
{
if disparo>1
{
 {sprite_index=shuriken_aire //sprite cuando este disparando
id_instancia = instance_create(x+5,y+6, Nombre_Del_Objeto_a_Disparar);
id_instancia.speed = 15; // velocidad a la que ira la bala
id_instancia.direction = 310;} // dirreccion a la que ira la bala
3ro. La Vida....

Vamos al evento create y ponemos
Código:
Vida=10
Ahora, solo haces que cuando algun objeto toque tu personaje le reste una vida a la varaible

Código:
Vida=-1
, asi hasta que tenga 0

Código:
If Vida=0
{
game_restart
}
Cuando no tenga vida resetea el juego


Hasta Otra
Responder Citando
Respuesta


(0 miembros y 1 visitantes)
 
Herramientas

Normas de Publicación
No puedes crear nuevos temas
No puedes responder mensajes
No puedes subir archivos adjuntos
No puedes editar tus mensajes

Los Códigos BB están Activado
Las Caritas están Activado
[IMG] está Activado
El Código HTML está Desactivado
Trackbacks are Activado
Pingbacks are Activado
Refbacks are Activado

Ir al Foro


Torneo DC 2012
Torneo DC 2012

La franja horaria es GMT +1. Ahora son las 10:59.


Desarrollado por: vBulletin® Versión 3.8.2
Derechos de Autor ©2000 - 2012, Jelsoft Enterprises Ltd.
Traducido por mcloud de vBhispano.com
 

Content Relevant URLs by vBSEO 3.2.0