Solarus Forum

Community => Your projects => Topic started by: Ezka on December 29, 2016, 12:38:13 am

Title: Remap of Zelda 1
Post by: Ezka on December 29, 2016, 12:38:13 am
Hi guys, recently I was interested in actually learning how to use the solarus editor rather than just playing games people made with it. Because of that, I am currently working on remapping all of zelda 1: the over world, dungeons, and secrets. I will only be making it so you can walk around and explore, however I may(small chance) try and turn it into a remake further down the line. I have currently made a tiles for the over world, and mapped around 20 game screens.  I will keep you guys updated and how it goes.
Title: Re: Remap of Zelda 1
Post by: MetalZelda on December 29, 2016, 02:12:01 am
The first Zelda isn't so hard to remake, in fact it is more easier to remake the NES Zelda on solarus then remaking ALTTP, but t's a good example to learn how the engine works.

Good luck.
Title: Re: Remap of Zelda 1
Post by: Ezka on December 29, 2016, 09:35:30 pm
Alright halfway done with mapping the over world. Also, quick question. Is it possible to move a map into a folder after it has been made? I have tried clicking and dragging but it hasn't been working. It isn't necessary but I like to organize. Thanks!
Title: Re: Remap of Zelda 1
Post by: Diarandor on December 29, 2016, 10:10:59 pm
Try to change the "id" of the map. That's actually the folder location if I am not wrong.
Title: Re: Remap of Zelda 1
Post by: MetalZelda on December 29, 2016, 10:41:08 pm
If you plan to organize your maps, in your maps folder, you need to have in the same folder,

map.dat
map.lua (if using a script)

Then declare it in the map editor
Title: Re: Remap of Zelda 1
Post by: Ezka on December 30, 2016, 07:56:50 pm
I have completed mapping the over world, and am in the process of linking the maps together and making them all traversable. However I have come across a problem after finishing link's sprite.

In "game_manager.lua", I changed hero:set_tunic_sprite_id from hero:set_tunic_sprite_id("main_heroes/eldran")
to links sprite i made: hero:set_tunic_sprite_id("Link/link").

When running the game, the sprite moves around fine but I can't get links head to touch anything. I think it might be because the original sprite used was 24 by 24, however links is only 16 by 16. If someone could provide some insight that would be nice, thanks!
Title: Re: Remap of Zelda 1
Post by: Ezka on December 30, 2016, 08:02:11 pm
Update, I just found out that the whole sprite is off. The sprite can also walk into wall blocks by the same amount it can't touch the other blocks
Title: Re: Remap of Zelda 1
Post by: Diarandor on December 30, 2016, 08:18:16 pm
You have to modify the origin point of your sprites, in the sprites editor; that will shift the images and solve your problem. The best option for the "origin_y" coordinate is usually 13, but I can't confirm in your case.

I quote from the Lua API:
"The origin is the point of synchronization for sprites that have several animations or directions of different sizes, and for entity sprites that are larger than the entity itself."
(see http://www.solarus-games.org/doc/1.5/lua_api_sprite.html#lua_api_sprite_get_origin ).
Title: Re: Remap of Zelda 1
Post by: Ezka on December 30, 2016, 10:03:49 pm
Thanks, I was a bit confused at first because the origin was centered. However I had to change it to 8 13 for it to work right.
Title: Re: Remap of Zelda 1
Post by: MetalZelda on December 31, 2016, 03:46:31 am
Most of the time the correct origin is the center of the sprite (x), and the knee (y)
Title: Re: Remap of Zelda 1
Post by: ffomega on December 31, 2016, 06:06:51 am
According to Chris, the default origin of a sprite is usually one half the distance of x, and 3 pixels from the bottom of y.

example:

16 x 16 - origin is 8 x 13
32 x 32 - origin is 16 x 29

etc.
Title: Re: Remap of Zelda 1
Post by: Ezka on January 09, 2017, 10:38:11 pm
So I am currently working on moving the maps I have made into the alttp dev pack so I have more to relate to with christophos tutorials. However I have come across a problem when trying to start the game. I have changed the game:set_starting_location to h8 in initial_game.lua. However when starting the game nothing appears. Any suggestions?
Title: Re: Remap of Zelda 1
Post by: MetalZelda on January 11, 2017, 12:05:21 am
Is there any error ? What happen? Are you on a map or black screen ?
Title: Re: Remap of Zelda 1
Post by: Ezka on January 11, 2017, 12:35:08 am
Their are two things i have tried since

1) I have kept the normal game manager script from the original alttp. With that, nothing shows up on the game screen when I press play and two error messages show up on console:
Error: Failed to load script 'scripts/game_manager': [string "scripts/game_manager.lua"]:3: '(' expected near ':'
Error: In main: [string "main.lua"]:6: module 'scripts/game_manager' not found:

2) I copied the game maneger script from my original game file over and with that, the solarus logo shows up then disappears on the game screen, and 1 error message appears on console:
Error: In on_finished: [string "scripts/game_manager.lua"]:18: Cannot check savegame: no write directory was specified in quest.dat


Also, with both of the game manager scripts, this warning appears:

Warning: Cannot use quest size 320x240: this quest only supports 256x176 to 256x176. Using 256x176 instead.

I do not understand this however because I have set the minimum and maximum  to 256x176 making the normal size just that.
Title: Re: Remap of Zelda 1
Post by: MetalZelda on January 11, 2017, 02:30:24 pm
So, as you might see, there is something in game_manager that interrupt the process

There is a missing thing on the line 3 in your game_manager

and there is no folder set to save your savegame.
To do it, just do the following

(http://i.imgur.com/6d0duAR.png)

If there is nothing, just put whatever you wat
Title: Re: Remap of Zelda 1
Post by: Christopho on January 11, 2017, 03:02:04 pm
"no write directory was specified in quest.dat" -> Did you create your quest as a copy of the ALTTP pack? If yes, you probably forgot to set a write directory in the quest properties.
Title: Re: Remap of Zelda 1
Post by: Ezka on February 04, 2017, 07:11:59 pm
Just a little project update here. I have now mapped all of dungeon 1 and two and both are traversable. Next I will be working on dungeons 3, then 4...etc... until I finish them all which is when I will start working on all the hidden secrets on the overworld. However  I can't figure out how to add music to the quest. I downloaded a music file and put it in the music directory so I can add it to the quest. And when I did that, and pressed play, nothing happened. I tried that with both the .mp3 format and the .ogg format and both ended up with the same outcome of nothing happening. If someone could help me out here that would be awesome, thanks! Also, how can you create your own font using the editor, I can't seem to figure it out by myself.

Thanks, Ezka
Title: Re: Remap of Zelda 1
Post by: Christopho on February 04, 2017, 08:13:13 pm
Ogg Vorbis musics should work.
The quest editor does not support the edition of fonts, you have to use external tools to create them. Just like PNG images, actually.
Title: Re: Remap of Zelda 1
Post by: Ezka on February 05, 2017, 01:40:23 am
I get that you have to make a png of it, but how would you format that picture. Would you make a grid and put the letters in their? Should i use the image that holds the ALTTP font as the layot for making my own font?
Title: Re: Remap of Zelda 1
Post by: Christopho on February 05, 2017, 09:22:02 am
What I mean with PNG is just that the quest editor does not support the edition of image files (you have to use external image software), like it does not support the edition of font files (you have to use external font tools).

Now about fonts, you can either use a regular font file (common formats are accepted, like .TTF) or a PNG image containing the letters in a grid. More details here: http://www.solarus-games.org/doc/1.5/quest_fonts.html
Title: Re: Remap of Zelda 1
Post by: Ezka on February 05, 2017, 07:01:50 pm
Thanks, I got the fact that I would have to use a image editor such as GIMP to make the file, I was just wondering how to format that image. The link really helped.
Title: Re: Remap of Zelda 1
Post by: Ezka on February 05, 2017, 07:51:05 pm
This is probably a dumb question but I just can't seem to figure out how to change the font in the game. Any help is appreciated.
Title: Re: Remap of Zelda 1
Post by: Christopho on February 05, 2017, 08:41:35 pm
There is a fonts folder, just like tilesets, maps, sounds, etc. You can add more fonts there.
Then when you display a text surface, you can choose its font.
Title: Re: Remap of Zelda 1
Post by: Ezka on November 22, 2017, 11:02:34 pm
Just a little update saying this project is dead. I learned all I could from this and stopped working on it a while back. I finished the overworld and 2 dungeons which are fully explorable. It isn't that interesting but I wanted to upload what I had in case someone wanted to build off it. This is far from perfect but enjoy.

https://drive.google.com/open?id=1JEjIMxjuKEGJDU2siuvcHLw8bvCV3y42