lunes, 27 de julio de 2009

Tutorial de EFS

En principio pretendia ir subiendo partes del tutorial de efs y después subir el fichero a pdf, pero con lo ocupado que estube no tube tiempo así que al final hice directamente el tutorial en pdf. Este tutorial incluye:
* Cargar paletas con efs
* Cargar sprites con efs
* Cargar fondos con efs
* Cargar ficheros mod con efs
* Cargar ficheros raw con efs
* Cargar ficheros mp3 con efs
De momento el tutorial sólo esta en español y en unos días espero subirlo en inglés. El link es el siguiente: http://www.mediafire.com/?iyh50wdmbat.

jueves, 23 de julio de 2009

EFS Capítulo Uno / EFS Chapter One

Como habia dicho unos días antes voy a comenzar a realizar un tutorial de EFS que haré en varias etapas y que una vez acabado subiré en un archivo pdf. Aunque se pueden usar las funciones de fat, yo prefiero la libertad que me da trabajar con mis propias funciones y de esta forma será como lo explique.
Para empezar hay que saber que significa eso de EFS. EFS son las siglas de Embedded File System, en castellano "sistema de archivos embebido", que nos va a permitir poner los recursos que utilizamos en los juegos dentro de la rom de nds sin necesidad de usar la fat para cargar fondos, musica, etc.
Para poder utilizar EFS debemos de hacer unos pasos antes de programar:
1) Copiar los archivos efs_lib.h y efs_lib.c en nuestra carpeta source y añadirlos al proyecto. Estos archivos los podemos encontrar en los ejemplos de palib.
2) Copiar tambien la aplicacion efs en la carpeta anterior a donde esta el source.
3) Por ultimo abrimos el make del proyecto y buscamos #USE_EFS = YES y le quitamos el #.
Con todo esto ya podremos usar el sistema de archivos embebido y terminamos la explicacion de hoy. En el proximo capítulo: Inicializar EFS y Obtener un puntero para trabajar con los archivos.



A few days mentioned that I will begin to make a EFS tutorial that I will do in phases and once finished take a pdf file. Although, you can use the functions of fat, I prefer the freedom that I get to work with my own functions and thus be like him to explain.
First, one must know that this means of EFS, it stands for Embedded File System, it will allow us to put the resources we use in the games in the rom nds with no need to use fat to load sprites, music...
To use EFS must make a few steps before programming:
1) Copy files efs_lib.h and efs_lib.c in your project folder source and add to project. These files can be found in the examples palib.
2) Copy the application efs folder in preceding source folder.
3) Finally we open the project and seek to make #USE_EFS = YES and remove the #.
In the next chapter: Initialize SAI and Get a pointer to work with the files.

lunes, 20 de julio de 2009

Trabajando en el juego / Working in game

En estos 15 dias desde que publiqué la última entrada, he estado trabajando durante mi poco tiempo libre en el juego, no hay mucho que contar que sea de relevancia realmente más que nada publico mis avances para que no penseis que he abandonado el juego.
Ahora mismo me encuentro haciendo un lenguaje de scripts que hace lo basico: animar sprites, moverlos, mostrar textos por pantalla, mostrar mensajes, aumentar/disminuir el dinero y algunas cosas más. Tambien estoy realizando los primeros enemigos para completar el sistema de combates que aún anda a medio hacer.
De momento nada más que decir, salvo que dentro de poco espero poder subir un tutorial sobre efs, adios.


15 days have passed since I published the last post, I have been working during my spare time in the game, there's not much to tell who is really more important than anything my progress so that the public does not think I left the game.
Right now I'm making a scripting language that makes the basics: sprites animate, move, display text on screen, display messages, increase / decrease the money and more. I also made enemies for the first complete system of fighting still going to do half.
For the moment nothing else to say except that I hope will soon be able to upload a tutorial on EFS, bye.

domingo, 5 de julio de 2009

Hacer Reflejos / Making Reflections

Después de pensarlo he hallado la manera de hacer un reflejo del protagonista sobre una superficie de suelo. Los pasos que he hecho son los siguientes:
1) Eliminar en el fondo (en mi caso Lihr) toda el agua y ponerla transparente (yo uso el magenta). Un ejemplo sería así:
Y esta imagen la cargamos en el fondo número 2, también se podría cargar en el 0 o en el 1. Yo lo cargo sobre el dos porque sobre el primero tengo la imagen de Lihr con las partes que hacen que el protagonista desaparezca de la pantalla: árboles y las señales.

2) Ahora hacemos un fondo del mismo tamaño que el anterior todo y ponerlo todo transparente menos el agua:

Y éste lo cargamos en un fondo con prioridad inferior al anterior, en mi caso el 3.

3) Y por último, cargamos otro sprite del personaje, y añadimos una distancia en la posición y, sino quedará un reflejo muy raro. Una vez creado usamos la función PA_SetSpritePrio y le ponemos el numero de prioridad del fondo, después lo volteamos con PA_SetSpriteVflip y activamos el efecto de transparencia, obviamente no será nítido de todo, con PA_SetSpriteMode, PA_EnableSpecialFx y PA_SetSFXAlpha.

Para acabar no os olvideis de mover al sprite del reflejo junto con el se va viendo por pantalla y animarlo. Con ésto tendreis un reflejo sobre cualquier superficie que queda bastante bien. En caso de alguna duda o problema postearlo en los comentarios.

He aquí el resultado:
Bye.



I have found a way to make a reflection of the protagonist on a surface of soil. The steps I've done are:
1) Delete (in my case Lihr) all water from background and it make transparent (I use magenta). An example would look like this:

And this picture the charge number in the bottom 2, it could also load in the 0 or 1. I carried on about the first two because I Lihr image with the parties that make the player disappears from the screen as trees and signs.

2) Now do a background the same size as above everything and put everything transparent less water:
And this is a load fund with lower priority to the former, in my case 3.

3) And finally, load other character's sprite, and you add y position distance, but it is rarely a reflection. Once we created the role PA_SetSpritePrio and put the priority number of the background, then turned and PA_SetSpriteVflip to activate the effect of transparency, of course not everything will be clear with PA_SetSpriteMode, PA_EnableSpecialFx and PA_SetSFXAlpha.

You not forget to move the sprite along with the reflection is seeing on screen and cheer. With this may be getting a reflection on anything that is pretty good. In case of any doubt or problem posted in the comments.

Result is:


Bye.

jueves, 2 de julio de 2009

Primera zona, Lihr / First zone, Lihr

Tras más de una semana sin poder actualizar el blog del juego, debido a que tenia mis últimos examenes y empiezo las vacaciones de verano, paradojicamente quizás es cuando menos tiempo tenga.
Después de macharme la cabeza un rato, he decidido usar para el diseño las zonas los tiles que habia realizado cuando tonteaba un poco con el hacking de pokémon. Por ahora la primera pantalla del juego es ésta:
La zona no esta acabada, pero es una aproximacion de lo que me propongo a hacer, y me servira para ir viendo el funcionamiento de mi juego. Aquí nuestro personje comenzará su historia.
El desarrollo del juego que llevo hecho hasta el momento es el siguiente:
* Sistema de guardado. De momento es capaz de salvar la partida mediante la fat. Aunque es posible que sufra algunos cambios para mejorarlo, de momento me parece suficiente.
* Colisiones. El personaje ya no se sale de los bordes y desaparece detras de árboles, etc. Pronto empezaré a trabajar en un reflejo sobre el agua, aunque no se ni por donde empezar.
* Uso de EFS. He pasado de romperme la cabeza y empezar ya desde el principio con el sistema de efs, ya me he hecho mis propias funciones para sprites, fondos y música.

En cuanto acabe el diseño del personaje y el sistema de colisiones básico, subiré no será una beta, puesto que los combates aún no estarán listos, pero al menos se verá los movimientos del personaje.

Es todo por ahora, bye.


After more than a week without being able to update the blog of game, because I had my final exams and start summer vacations, when perhaps paradoxically have less time.
I decided to use design for the areas that had made the tiles when I hacking around with the Pokémon. For now, the first screen of the game is this:

The area is not finished, but it is an approximation of what I intend to do, and I will be watching the performance of my game.
The development of the game that I have done so far is as follows:
* System saved. Currently is able to save the game through the fat. Although you may suffer some changes to improve it, I think enough for now.
* Collisions. The character is no longer taken from the edge and disappears behind trees, etc.. Soon begin work on a reflection on water, but is not, nor where to start.
* EFS System. I have gone to break the head and start from the beginning with the EFS, and I have done my own functions for sprites, backgrounds and music.

When I finish of the character design and basic collision system, I go up not a beta of game, because the fighting would not be ready yet, but at least will be the movements of the character.

Bye friends.