Author Topic: Original art  (Read 7260 times)

Diarandor

  • Hero Member
  • *****
  • Posts: 745
  • Cats are cool! (ΦωΦ)
    • View Profile
Re: Original art
« Reply #60 on: January 29, 2017, 06:09:03 am »
Thanks again for the feedback! I named the song "Castle Theme", not very original XD ;D it can be downloaded from the sample quest repo, but Christopho renamed it to castle.ogg, I think. A few days ago I asked to E. Dueñas if he could remake the song with real instruments and improve it, but he has not answered yet... :(

Diarandor

  • Hero Member
  • *****
  • Posts: 745
  • Cats are cool! (ΦωΦ)
    • View Profile
Re: Original art
« Reply #61 on: February 12, 2017, 07:48:04 pm »
Hi, I made an experimental rain script that now has 2 modes: "rain" and "storm", but future versions may include "snow" and "hail". Using custom entities for the drops is probably a bad idea since it might run slow for slow computers, but for now it is ok since I am just testing.
Link: https://youtu.be/nDjgBTQbBug

MetalZelda

  • Sr. Member
  • ****
  • Posts: 499
    • View Profile
Re: Original art
« Reply #62 on: February 12, 2017, 08:16:33 pm »
I like it a lot, it's superb, but the use of custom entities isn't recommended, we should wait set_pixel(), I already planned to port one of the most advanced weather script made for RPG Maker

Diarandor

  • Hero Member
  • *****
  • Posts: 745
  • Cats are cool! (ΦωΦ)
    • View Profile
Re: Original art
« Reply #63 on: February 12, 2017, 08:43:54 pm »
I like it a lot, it's superb, but the use of custom entities isn't recommended, we should wait set_pixel(), I already planned to port one of the most advanced weather script made for RPG Maker

Yeah, you are right. I have tested this script with a map of Mercuris Chest and it runs too slow (with big maps it becomes very slow), which is really bad; so the script is useless as it is. I may try to use a surface and draw the sprites above it, but I am not sure if this will work as it should... Maybe you are right, and we should wait for that new feature "set_pixel()", I don't know.

zutokaza

  • Full Member
  • ***
  • Posts: 146
  • Active - Making stories can take the most time.
    • View Profile
Re: Original art
« Reply #64 on: February 13, 2017, 06:28:26 am »
It is good for small maps. Are you gonna post it?

MetalZelda

  • Sr. Member
  • ****
  • Posts: 499
    • View Profile
Re: Original art
« Reply #65 on: February 13, 2017, 12:32:56 pm »
I like it a lot, it's superb, but the use of custom entities isn't recommended, we should wait set_pixel(), I already planned to port one of the most advanced weather script made for RPG Maker

Yeah, you are right. I have tested this script with a map of Mercuris Chest and it runs too slow (with big maps it becomes very slow), which is really bad; so the script is useless as it is. I may try to use a surface and draw the sprites above it, but I am not sure if this will work as it should... Maybe you are right, and we should wait for that new feature "set_pixel()", I don't know.

https://github.com/MetalES/Project-Zelda/blob/master/%5BTODO%5D%20Port%20Weather%20Script

The clock script for my project is also a reconversion of a RPG Maker script, as well as the tone system, so porting this script to Solarus might not be hard, the only thing needed here is surface:set_pixel()

You can see how set_pixel is used here
https://github.com/MetalES/Project-Zelda/blob/master/%5BTODO%5D%20Port%20Weather%20Script#L2304

At least my first try with this would be only to get rain, snow and rain droplets to work, other things can be omnitted
« Last Edit: February 13, 2017, 12:34:40 pm by MetalZelda »

Diarandor

  • Hero Member
  • *****
  • Posts: 745
  • Cats are cool! (ΦωΦ)
    • View Profile
Re: Original art
« Reply #66 on: February 13, 2017, 12:49:09 pm »
https://github.com/MetalES/Project-Zelda/blob/master/%5BTODO%5D%20Port%20Weather%20Script

The clock script for my project is also a reconversion of a RPG Maker script, as well as the tone system, so porting this script to Solarus might not be hard, the only thing needed here is surface:set_pixel()

You can see how set_pixel is used here
https://github.com/MetalES/Project-Zelda/blob/master/%5BTODO%5D%20Port%20Weather%20Script#L2304

At least my first try with this would be only to get rain, snow and rain droplets to work, other things can be omnitted

Well, actually it was not my intention to "port" things from RPG Maker, this was intended to be something different and better. Yes, I don't hide that I really hate RPG Maker! (RPG Maker is too expensive, it has too many limitations, it is annoying to use if you know programming, their community is our rival 8) heheh, and that engine and its graphics are not free!)

Diarandor

  • Hero Member
  • *****
  • Posts: 745
  • Cats are cool! (ΦωΦ)
    • View Profile
Re: Original art
« Reply #67 on: February 13, 2017, 12:58:37 pm »
It is good for small maps. Are you gonna post it?

Ok, sorry, I intended to post it later when it worked better. Here you have my current script (a working one), but not the last version if I update it later. (You will need the multi_events script that Christopho made.) Put my script in a file "scripts/weather/rain_manager.lua" or a similar place.
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")
  5.  
  6. The functions here defined are:
  7.     game:get_rain_type(world)
  8.     game:set_rain_type(world, rain_type)
  9.  
  10. Rain types: nil (no rain), "rain", "storm".
  11. --]]
  12.  
  13. -- This script requires the multi_event script:
  14. require("scripts/multi_events")
  15. local rain_manager = {}
  16.  
  17. local game_meta = sol.main.get_metatable("game")
  18. local map_meta = sol.main.get_metatable("map")
  19.  
  20.  
  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 = true
  24. local rain_speed = 100 -- Default drop speed 100.
  25. local storm_speed = 300 -- Default drop speed 300.
  26. local drop_speed -- Local variable to store the speed.
  27. local drop_max_distance = 300 -- Max possible distance for drop movements.
  28. local rain_drop_delay = 10 -- Delay between drops for rain, in milliseconds.
  29. local storm_drop_delay = 5 -- Delay between drops for storms, in milliseconds.
  30. local min_lightning_delay = 2000
  31. local max_lightning_delay = 10000
  32. local drop_sprite_id = "weather/rain"
  33. local thunder_sounds = {"thunder1", "thunder2", "thunder3", "thunder_far", "thunder_double"}
  34. local flash_surface -- Surface to draw the lightning flash.
  35. local draw_flash_surface = false -- Used by the lightning menu.
  36. local timers = {}
  37.  
  38.  
  39. -- Initialize rain on maps when necessary.
  40. game_meta:register_event("on_map_changed", function(game)
  41.     local map = game:get_map()
  42.     rain_manager:update_rain(map)
  43. end)
  44.  
  45. -- Get the raining state for a given world.
  46. function game_meta:get_rain_type(world)
  47.   local rain_type = nil
  48.   if world then
  49.     rain_type = self:get_value("rain_state_" .. world)
  50.   end
  51.   return rain_enabled and rain_type
  52. end
  53. -- Set the raining state for a given world.
  54. function game_meta:set_rain_type(world, rain_type)
  55.   -- Update savegame variable.
  56.   self:set_value("rain_state_" .. world, rain_type)
  57.   -- Check if rain is necessary: if we are in that world and rain is needed.  
  58.   local current_world = self:get_map():get_world()
  59.   local rain_needed = (current_world == world) and rain_enabled and rain_type
  60.   if (not rain_needed) then return end -- Do nothing if rain is not needed!
  61.   -- We need to start the rain in the current map.
  62.   local map = self:get_map()
  63.   rain_manager:update_rain(map)
  64. end
  65.  
  66. -- Define on_draw event for the rain_manager menu (if it is initialized).
  67. function rain_manager:on_draw(dst_surface)
  68.   if draw_flash_surface then
  69.     flash_surface:draw(dst_surface) -- Draw lightning flash if necessary.
  70.   end
  71. end
  72.  
  73. -- Create rain if necessary when entering a new map.
  74. function rain_manager:update_rain(map)
  75.   -- Get rain state in this world.
  76.   local world = map:get_world()
  77.   local rain_type = map:get_game():get_rain_type(world)
  78.   -- Start rain if necessary.
  79.   if rain_type == "rain" then
  80.     self:start_rain(map)
  81.   elseif rain_type == "storm" then
  82.     self:start_storm(map)
  83.   end
  84. end
  85.  
  86. -- Define function to create splash effects.
  87. -- If no parameters x, y are given, the position is random.
  88. local function create_drop_splash(map, x, y)
  89.   local max_layer = map:get_max_layer()
  90.   local min_layer = map:get_min_layer()
  91.   local camera = map:get_camera()
  92.   local cx, cy, cw, ch = camera:get_bounding_box()
  93.   local drop_properties = {direction = 0, x = 0, y = 0, layer = max_layer,
  94.     width = 16, height = 16, sprite = drop_sprite_id}
  95.   -- Initialize parameters.
  96.   local x = x or cx + cw * math.random()
  97.   local y = y or cy + ch * math.random()
  98.   local layer = max_layer
  99.   while map:get_ground(x,y,layer) == "empty" and layer > min_layer do
  100.     layer = layer - 1 -- Draw the splash at the lower layer we can.
  101.   end
  102.   -- Do not draw splash over some bad grounds: "hole" and "lava".
  103.   local ground = map:get_ground(x, y, layer)
  104.   if ground ~= "hole" and ground ~= "lava" then
  105.     drop_properties.x = x
  106.     drop_properties.y = y
  107.     drop_properties.layer = layer
  108.     local drop_splash = map:create_custom_entity(drop_properties)
  109.     local splash_sprite = drop_splash:get_sprite()
  110.     splash_sprite:set_animation("drop_splash")
  111.     splash_sprite:set_direction(0)
  112.     function splash_sprite:on_animation_finished() drop_splash:remove() end
  113.   end
  114. end
  115.  
  116. -- Define function to create drops.
  117. -- If no parameters x, y are given, the position is random.
  118. local function create_drop(map, x, y)
  119.   local max_layer = map:get_max_layer()
  120.   local min_layer = map:get_min_layer()
  121.   local camera = map:get_camera()
  122.   local cx, cy, cw, ch = camera:get_bounding_box()
  123.   local drop_properties = {direction = 0, x = 0, y = 0, layer = max_layer,
  124.     width = 16, height = 16, sprite = drop_sprite_id}
  125.   -- Initialize parameters.
  126.   drop_properties.x = x or cx + cw * math.random() + 30
  127.   drop_properties.y = y or cy + ch * math.random() - 100
  128.   drop_properties.layer = max_layer
  129.   local drop = map:create_custom_entity(drop_properties)
  130.   local m = sol.movement.create("straight")
  131.   m:set_angle(7 * math.pi / 5)
  132.   m:set_speed(drop_speed)
  133.   local random_max_distance = math.random(1, drop_max_distance)
  134.   m:set_max_distance(random_max_distance)
  135.   m:set_ignore_obstacles()
  136.   function m:on_finished()
  137.     local x, y = drop:get_position()
  138.     create_drop_splash(map, x, y)
  139.     drop:remove()
  140.   end
  141.   function m:on_obstacle_reached()
  142.     local x, y = drop:get_position()
  143.     create_drop_splash(map, x, y)
  144.     drop:remove()
  145.   end
  146.   m:start(drop)
  147. end
  148.  
  149. -- Stop rain effects for the current map.
  150. function rain_manager:stop()
  151.   -- Stop rain timers if already started.
  152.   for k, timer in pairs(timers) do
  153.     timer:stop()
  154.     timers[k] = nil
  155.   end
  156. end
  157.  
  158. -- Start rain in the current map.
  159. function rain_manager:start_rain(map)
  160.   local max_layer = map:get_max_layer()
  161.   local min_layer = map:get_min_layer()
  162.   local camera = map:get_camera()
  163.   local drop_properties = {direction = 0, x = 0, y = 0, layer = max_layer,
  164.     width = 16, height = 16, sprite = drop_sprite_id}
  165.   -- Initialize drop speed.
  166.   drop_speed = rain_speed
  167.   -- Initialize random seed for positions.
  168.   math.randomseed(os.time())
  169.  
  170.   -- Stop rain timers if already started.
  171.   self:stop()
  172.   -- Start timer to draw rain drops.
  173.   timers["drop_timer"] = sol.timer.start(map, rain_drop_delay, function()
  174.     -- Create drops on random positions.
  175.     create_drop(map)
  176.     -- Repeat loop.
  177.     return true
  178.   end)
  179. end
  180.  
  181. -- Start lighnings in the current map.
  182. local function create_lightnings(map)
  183.   -- Play thunder sound after a random delay.
  184.   local lightning_delay = math.random(min_lightning_delay, max_lightning_delay)
  185.   timers["lightning_timer"] = sol.timer.start(map, lightning_delay, function()
  186.     -- Create lightning flash.
  187.     draw_flash_surface = true
  188.     sol.timer.start(map, 150, function()
  189.       draw_flash_surface = false -- Stop drawing lightning flash.
  190.     end)
  191.     -- Play random thunder sound after a delay.
  192.     local thunder_delay = math.random(200, 1500)
  193.     sol.timer.start(map, thunder_delay, function()
  194.       local random_index = math.random(1, #thunder_sounds)
  195.       local sound_id = thunder_sounds[random_index]
  196.       sol.audio.play_sound(sound_id)
  197.     end)
  198.     -- Prepare next lightning.
  199.     create_lightnings(map)
  200.   end)
  201. end
  202.  
  203. -- Start storm in the current map.
  204. function rain_manager:start_storm(map)
  205.   -- Initialize drop speed.
  206.   drop_speed = storm_speed
  207.   -- Initialize random seed for positions.
  208.   math.randomseed(os.time())
  209.   -- Stop rain timers if already started.
  210.   self:stop()
  211.   -- Create lightning surface.
  212.   local camera = map:get_camera()
  213.   local cx, cy, cw, ch = camera:get_bounding_box()
  214.   flash_surface = sol.surface.create(cw, ch)
  215.   flash_surface:fill_color({255, 255, 100})
  216.   flash_surface:set_opacity(170)
  217.   -- Initialize menu to draw lightning surface.
  218.   sol.menu.start(map, rain_manager)
  219.  
  220.   -- Start timer to draw rain drops.
  221.   timers["drop_timer"] = sol.timer.start(map, storm_drop_delay, function()
  222.     -- Create drops on random positions.
  223.     create_drop(map)
  224.     -- Repeat loop.
  225.     return true
  226.   end)
  227.   -- Start lightning effects.
  228.   create_lightnings(map)
  229. end
  230.  
  231. -- Return rain manager.
  232. return rain_manager
  233.  

Other required files:
-Sound files: I made 5 thunder sounds that you can download from the solarus-free-resource-pack repo or from my diarandor-art repo, in github. These can be replaced by other files if you want your custom thunder sounds.
-Rain sprite: put the png and dat files in "sprites/weather". The files are attached.
« Last Edit: February 13, 2017, 01:00:43 pm by Diarandor »

MetalZelda

  • Sr. Member
  • ****
  • Posts: 499
    • View Profile
Re: Original art
« Reply #68 on: February 13, 2017, 04:46:01 pm »
https://github.com/MetalES/Project-Zelda/blob/master/%5BTODO%5D%20Port%20Weather%20Script

The clock script for my project is also a reconversion of a RPG Maker script, as well as the tone system, so porting this script to Solarus might not be hard, the only thing needed here is surface:set_pixel()

You can see how set_pixel is used here
https://github.com/MetalES/Project-Zelda/blob/master/%5BTODO%5D%20Port%20Weather%20Script#L2304

At least my first try with this would be only to get rain, snow and rain droplets to work, other things can be omnitted

Well, actually it was not my intention to "port" things from RPG Maker, this was intended to be something different and better. Yes, I don't hide that I really hate RPG Maker! (RPG Maker is too expensive, it has too many limitations, it is annoying to use if you know programming, their community is our rival 8) heheh, and that engine and its graphics are not free!)

Oh, I don't like RPG Maker in term of it's limitations eigher, but the scripting community is fantastic and most of the time it's easy to adapt a script from RUBY to Lua (At least RGSS1).
The clock script and the tone calculation is RPG Maker's code rewritten in pure Lua  ;D

Yet, this is not RPG Maker hate, the script is a nice base to start with, pretty sure something incredible can be achieved if rewritten correctly.

Diarandor

  • Hero Member
  • *****
  • Posts: 745
  • Cats are cool! (ΦωΦ)
    • View Profile
Re: Original art
« Reply #69 on: February 26, 2017, 01:46:16 pm »
Hey listen!

A new remastered/enhanced version of Eldran is in progress! This might be the final version for this hero, and the one that will be used in the project CoS. In this first video I show some of the new animations for "stopped", "walking", "carrying", "carrying_walking" and "lifting". The remaining animations will be shown in the next videos.  ;D
https://youtu.be/fZhthAIhldk

Zefk

  • Sr. Member
  • ****
  • Posts: 492
  • Just helping Solarus
    • View Profile
    • Zelzec Business
Re: Original art
« Reply #70 on: February 26, 2017, 07:16:35 pm »
Wow! That is a drastic improvement! I like the blending and darker color.

Diarandor

  • Hero Member
  • *****
  • Posts: 745
  • Cats are cool! (ΦωΦ)
    • View Profile
Re: Original art
« Reply #71 on: February 26, 2017, 08:31:24 pm »
The colors were chosen by Neovyse, and he also gave me wise advices of how to improve these animations. The final result is awesome, but it has been many hours of work (almost every pixel has been redrawn from scratch).

Diarandor

  • Hero Member
  • *****
  • Posts: 745
  • Cats are cool! (ΦωΦ)
    • View Profile
Re: Original art
« Reply #72 on: March 18, 2017, 11:44:44 pm »
New testing video with new remastered animations for our hero Eldran!
The new remastered animations include "grabbing", "pushing", "pulling", "jumping", "plunging" (not shown in the video) and "swimming". In addition, a new "sleeping" animation in a confortable bed is shown.

Eldran Link here: https://youtu.be/LIAuW8O1jtY

More animations coming in a few weeks!

Diarandor

  • Hero Member
  • *****
  • Posts: 745
  • Cats are cool! (ΦωΦ)
    • View Profile
Re: Original art
« Reply #73 on: April 14, 2017, 10:55:08 am »
A few more animations are finished for the remastered Eldran. These include "sword_loading_stopped", "sword_loading_walking" and "sword_brandish". Link here:
https://youtu.be/ar3OJIuHJac

Zefk

  • Sr. Member
  • ****
  • Posts: 492
  • Just helping Solarus
    • View Profile
    • Zelzec Business
Re: Original art
« Reply #74 on: April 14, 2017, 11:26:46 am »
That sleep animation in your previous update reminded me of Secret of Mana and sequels. I really like this remastered version. You did a great job on the animation improvements.