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.

Topics - Diarandor

Pages: [1] 2 3 4
Your scripts / New "debug_dialogs" script
« on: March 08, 2018, 01:45:16 am »
I made a useful script to debug dialogs in our projects: debug_dialogs.lua
I tested it and it works perfect with dialogs without extra info/variables.
I haven't tested it with dialogs that need extra info/variables, so there may be issues in those cases, and I don't know how we could avoid those errors, although I think that does not matter so much.

Game art & music / Free tileset by DragonDePlatino
« on: March 04, 2018, 01:46:40 am »
There is an unfinished artwork (tilesets) by @DragonDePlatino that is free and looks very charming:
Someone could be interested in this art to make a game with Solarus.

Development / Diagonal directions for hero
« on: March 02, 2018, 10:38:27 am »
Some devs may be interested in this. I think that it is possible (not tested yet) and easy to code directly from Lua scripts the feature of allowing animations for the movement of the hero in 8 directions (that is, including diagonal animations). The idea is as follows:

1) Use the event "hero:on_movement_changed(movement)" to get the movement, and calculate its direction from its angle.
2) Use a modification of my "direction fix" script to include all directions.

This feature could be used with all animations/actions/weapons of the hero. This includes the animations for walking/stopped, swimming, sword attacks, etc. Our hero Eldran does not have art for diagonal animations yet (so we cannot use this feature), but that may change someday. :)

General discussion / Some Zelda-like games
« on: February 14, 2018, 07:45:21 pm »
I found some interesting projects of other devs working on Zelda-like games. Some info here:

-The waking cloack (this looks a lot like Link's Awakening in style, very charming):

-This man (, a.k.a. baranot3nshi, seems to be working on a Zelda-like game too, and the art is really awesome:
but his project seems not to have a name yet.

Let's hope these Zelda-like games, and many others, get finished someday and they become as good as they seem.

Your projects / Children of Solarus [official thread]
« on: January 16, 2018, 03:08:21 pm »
Project CHILDREN OF SOLARUS (by the Solarus Team)

I think this project deserves its own topic where we, the Solarus Team, can post our progress and some screenshots, and anyone can post their comments and suggestions about it. The project "Children of Solarus", still not very known, is intended to become a 100% free (as in freedom) remake version of "Mystery of Solarus DX", which will improve its predecessor in many ways. Feedback is always welcome (testing, bug reports, translations, suggestions, etc).

This project, led by Christopho, was started millions of years ago (before the dinosaur extinction), and hopefully will be finished before the incoming apocalypse in 2023. Much progress has been done so far, including the hero sprites, 95% of the overworld tileset (still a bit experimental), some the first overworld maps (remapped recently by Chris), some NPCs and enemies, most part of of the music (composed by Eduardo DueƱas), most part of the sounds, new scripts, and much more.

This is a list of the new work that is planned to be finished for this year 2018: completion of the overworld mapping (at least the light overlworld for now, and maybe the dark overworld too), all remaining NPCs sprites, many more new enemies (art and scripts), the indoor houses tileset, the first dungeon tileset (with color variants for other dungeons), and hopefully much more (including more mapping).

News and screenshots will be posted in the Official Website:
[Some members of the Solarus Team are now secretly working on a new version of the website. Please, keep the secret.  ;)]

General discussion / Okami on Steam
« on: December 16, 2017, 01:13:56 am »
The game "OKAMI HD" is finally available on Steam!!! People say this is one of the best non-Zelda Zelda games, and it even has a bark button!!! ;D I tried it once with an emulator but it ran too slow on my computer and was unplayable... but now I will definitely buy it on Steam when I get some free time to play it.

Your scripts / New rain script
« on: November 10, 2017, 09:40:39 am »
You can download from here an updated version of my rain script:

This new version does not use custom entities anymore. It draws all rain drops on a surface, and only 1 single sprite is used for all the rain. There is also the storm mode, which is more spectacular. And the best of all is that the transition between the 3 modes ("rain", "storm" and nil) is smooth.

General discussion / DreamTales, a Zelda-like videogame
« on: October 12, 2017, 12:50:08 am »
Hi! Some news here:

It seems that some devs are working on a new Zelda-like game called DreamTales, where the main mechanic is about turning enemies into chocolate (and then they can be eaten, or pushed like statues). The graphics seem very close to ALTTP, and the plot has a lot of influence from LA too (the hero is inside a dream).

Links here (the second link is in Spanish):

EDIT: it seems that they need 25.000$ for their kickstarter before the end of this month, so it seems to me that this project will never be finished.

General discussion / What do you prefer for a shield?
« on: July 17, 2017, 07:50:49 am »
For the project Children of Solarus, which kind of shield would you prefer?

General discussion / Easter eggs in Link's Awakening
« on: July 13, 2017, 04:38:52 am »
I found a video that shows some easter eggs of Link's Awakening:
I know that there are tons of videos showing bugs and secrets of this game, but the easter eggs of this video are really interesting and some of them are not so well-known (like the one of the walrus, which I found quite surprising).

General discussion / Some selective outlining tutorials (pixel art)
« on: April 26, 2017, 09:38:16 pm »
Hi! I am posting here some links of tutorials that explain the technique of "selective outlining", also known as "selout" or "broken outlines", which is just a type of anti-aliasing in the borders of the sprites. I am still learning this useful technique, which seems complicated to master, and it may be bad to abuse too much from it.

Selective outlining is used to show borders in a good way independently of the background color. For instance, if all borders of an NPC are black, these will not be seen over a dark ground, which may make ugly "saw" borders to appear. To avoid this problem, we use color borders with a darker color very close to the inner one; some artists also use some kind of "dithering" in these darker borders, but others say that this is not very clean and bad. My guess is that if this is done in the wrong way, the result may be bad, but if done correctly and in the correct proportions, the result is impressive. Using this technique is also a choice for the pixel artist.

My current personal choice will be just to keep it simple, with just a slightly darker color border, close to the inner color (but without discontinuous color alternance in the borders because my sprites are too small and also to avoid extra-work). I don't know if color borders really are or not considered as selout (maybe that depends on the definition each artists give to the concept), but I think that using color borders, without color alternance, is good enough for very small sprites.

General discussion / Design of graphs of dungeons
« on: April 17, 2017, 05:58:19 pm »
This video explains a bit how to make a dungeon graph, which is useful to design a dungeon. It is not exactly a tutorial, but it is interesting.

Hi @Christopho! I need some help. I have a problem with my rain script. I don't kow if this is a bug or something I did wrong. I think the problem started when I began refactoring my code, but I am not sure. My (unfinished) rain script is this one:

Code: Lua
  1. -- Rain manager script.
  2. --[[
  3. To add this script to your game, call from game_manager script:
  4.     require("scripts/weather/rain_manager")
  6. The functions here defined are:
  7.     game:get_rain_type(world)
  8.     game:set_rain_type(world, rain_type)
  10. Rain types: nil (no rain), "rain", "storm".
  11. --]]
  13. -- This script requires the multi_event script:
  14. require("scripts/multi_events")
  15. local rain_manager = {}
  17. local game_meta = sol.main.get_metatable("game")
  18. local map_meta = sol.main.get_metatable("map")
  21. -- Default settings. Change these for testing.
  22. local rain_enabled = true -- Do not change this property, unless you are testing.
  23. local lightning_enabled = false
  24. local rain_speed = 100 -- Default drop speed 100.
  25. local drop_max_distance = 300 -- Max possible distance for drop movements.
  26. local drop_delay = 10 -- Delay between drops, in milliseconds.
  27. local drop_sprite_id = "test/rain"
  29. -- Initialize rain on maps when necessary.
  30. game_meta:register_event("on_map_changed", function()
  31.   if self ~= nil then
  32.     local map = self:get_map()
  33.     rain_manager:update_rain(map)
  34.   end
  35. end)
  37. -- Get the raining state for a given world.
  38. function game_meta:get_rain_type(world)
  39.   local rain_type = self:get_value("rain_state_" .. world)
  40.   return rain_enabled and rain_type
  41. end
  42. -- Set the raining state for a given world.
  43. function game_meta:set_rain_type(world, rain_type)
  44.   -- Update savegame variable.
  45.   self:set_value("rain_state_" .. world, rain_type)
  46.   -- Check if rain is necessary: if we are in that world and rain is needed.  
  47.   local current_world = self:get_map():get_world()
  48.   local rain_needed = (current_world == world) and rain_enabled and rain_type
  49.   if (not rain_needed) then return end -- Do nothing if rain is not needed!
  50.   -- We need to start the rain in the current map.
  51.   local map = self:get_map()
  52.   rain_manager:start_rain(map)
  53. end
  56. -- Create rain if necessary when entering a new map.
  57. function rain_manager:update_rain(map)
  58.   -- Get rain state in this world.
  59.   local world = map:get_world()
  60.   local rain_type = map:get_game():get_rain_type(world)
  61.   -- Start rain if necessary.
  62.   if rain_type == "rain" then
  63.     self:start_rain(map)
  64.   elseif rain_type == "storm" then
  65.     self:start_storm(map)
  66.   end
  67. end
  69. -- Define function to create splash effects.
  70. -- If no parameters x, y are given, the position is random.
  71. local function create_drop_splash(map, x, y)
  72.   local max_layer = map:get_max_layer()
  73.   local min_layer = map:get_min_layer()
  74.   local camera = map:get_camera()
  75.   local cx, cy, cw, ch = camera:get_bounding_box()
  76.   local drop_properties = {direction = 0, x = 0, y = 0, layer = max_layer,
  77.     width = 16, height = 16, sprite = drop_sprite_id}
  78.   -- Initialize parameters.
  79.   local x = x or cx + cw * math.random()
  80.   local y = y or cy + ch * math.random()
  81.   local layer = max_layer
  82.   while map:get_ground(x,y,layer) == "empty" and layer > min_layer do
  83.     layer = layer - 1 -- Draw the splash at the lower layer we can.
  84.   end
  85.   -- Do not draw splash over some bad grounds: "hole" and "lava".
  86.   local ground = map:get_ground(x, y, layer)
  87.   if ground ~= "hole" and ground ~= "lava" then
  88.     drop_properties.x = x
  89.     drop_properties.y = y
  90.     drop_properties.layer = layer
  91.     local drop_splash = map:create_custom_entity(drop_properties)
  92.     assert(drop_splash ~= nil)
  93.     local splash_sprite = drop_splash:get_sprite()
  94.     splash_sprite:set_animation("drop_splash")
  95.     splash_sprite:set_direction(0)
  96.     function splash_sprite:on_animation_finished() drop_splash:remove() end
  97.   end
  98. end
  100. -- Define function to create drops.
  101. -- If no parameters x, y are given, the position is random.
  102. local function create_drop(map, x, y)
  103.   local max_layer = map:get_max_layer()
  104.   local min_layer = map:get_min_layer()
  105.   local camera = map:get_camera()
  106.   local cx, cy, cw, ch = camera:get_bounding_box()
  107.   local drop_properties = {direction = 0, x = 0, y = 0, layer = max_layer,
  108.     width = 16, height = 16, sprite = drop_sprite_id}
  109.   -- Initialize parameters.
  110.   drop_properties.x = x or cx + cw * math.random() + 30
  111.   drop_properties.y = y or cy + ch * math.random() - 100
  112.   drop_properties.layer = max_layer
  113.   local drop = map:create_custom_entity(drop_properties)
  114.   local m = sol.movement.create("straight")
  115.   m:set_angle(7 * math.pi / 5)
  116.   m:set_speed(rain_speed)
  117.   local random_max_distance = math.random(1, drop_max_distance)
  118.   m:set_max_distance(random_max_distance)
  119.   m:set_ignore_obstacles()
  120.   function m:on_finished() drop:remove() end
  121.   function m:on_obstacle_reached() drop:remove() end
  122.   function drop:on_removed()
  123.     local x, y = drop:get_position()
  124.     create_drop_splash(map, x, y)
  125.   end
  126.   m:start(drop)
  127. end
  130. -- Start rain in the current map.
  131. function rain_manager:start_rain(map)
  132.   local max_layer = map:get_max_layer()
  133.   local min_layer = map:get_min_layer()
  134.   local camera = map:get_camera()
  135.   local drop_properties = {direction = 0, x = 0, y = 0, layer = max_layer,
  136.     width = 16, height = 16, sprite = drop_sprite_id}
  137.   -- Initialize random seed for positions.
  138.   math.randomseed(os.time())
  140.   -- Start timer to draw rain drops.
  141.   sol.timer.start(map, drop_delay, function()
  142.     -- Create drops on random positions.
  143.     create_drop(map)
  144.     -- Repeat loop.
  145.     return true
  146.   end)
  147. end
  149. -- Stop rain in the current map.
  150. function rain_manager:stop_rain(map)
  152. end
  154. -- Return rain manager.
  155. return rain_manager

The problem appears when leaving a map with rain to another (where there is no rain, but this is probably not important). The bug appears in the console (no crash) at lines 92-93, because the entity "drop_splash" does not exist in that moment. I know that this can be fixed with an extra condition "if drop_splash ~= nil then blablabla end", but I'd like to know why does this happen.

I had the same problem at lines 31-32, because the "self" variable does not exist sometimes, and the condition "if self ~= nil then" fixed this. Why do not these variables exist when these events are called? Is this a bug?
Thanks in advance for the help.

Your scripts / Animated sprites for dialogs (custom dialog script)
« on: January 08, 2017, 11:39:57 am »
I was asked by @Porksteak to explain how to use the animation sprites of my custom dialog box:
My old script does not explain how to use this feature (I forgot to add these explanations). I post this here so anyone will know how to use it:

An example would be this dialog:
Code: Lua
  1. dialog{
  2.   id = "old_man.thanks",
  3.   animation = "talking",
  4.   animation_sprite = "dialog_old_man",
  5.   text = [[
  6. Thanks for saving my
  7. cats, young man.
  8. See you later!
  9. ]]
  10. }

The (optional) sprite of the character has to be located in the path given by the concatenated string:
"dialogs/" .. dialog.animation_sprite
and the animation used is the one given by the string: dialog.animation

Your projects / A Zelda game by Kory Toombs
« on: December 05, 2016, 06:30:03 am »
Hi! I found a Zelda game made with the Solarus engine by Kory Toombs, this is the website:
I thought it would be a good idea to create a topic about this; but I have not played this game so I know nothing about it.

Pages: [1] 2 3 4