Recent Posts

Pages: 1 [2] 3 4 ... 10
11
Development / Re: Side scrolling functionality
« Last post by Zefk on August 09, 2018, 01:14:13 am »
@Christopho
Ah, I had no idea.

Updated:
  • Added facing direction option when jumping
  • Added a fix for when the hero gets stuck on a ladder when using the bow
  • Added fixes for sword
  • Added fixes for tapping
  • Added fixes for running
  • Added fixes for lifting
  • Added fixes for water - needs to be converted to dynamic and named water
  • Added fixes for block
  • Added fixes for carrying destructible entities
  • Added fixes for boomerang
  • Added fixes for hookshot
  • Added fixes for opening chest
  • Added fixes for hole or falling
  • Added fake death
  • Added script and comment clean up
  • Added fixes for holding multiple keys when carrying

Download Quest: here




The thing I cannot figure out. The hero jumps faster and faster after every death. The only thing I can think of is to use a fake game:start().

Code: Lua
  1.         local map = game:get_map()
  2.         --Fake death
  3.         --map1
  4.         if game:get_value("map1") == true and map:get_id() == "first_map" then
  5.           if game:get_life() == 1 then
  6.             hero:teleport("first_map", "map1", "fade")
  7.             game:set_life(game:get_max_life())
  8.           end
  9.          --map2
  10.          elseif game:get_value("map2") == true and map:get_id() == "map_leave_test" then
  11.           if game:get_life() == 1 then
  12.             hero:teleport("map_leave_test", "map2", "fade")
  13.             game:set_life(game:get_max_life())
  14.           end
  15.         end

12
Development / Re: Problem with thrown enemies after pause
« Last post by Max on August 09, 2018, 12:38:28 am »
I also have this problem in my game, which I think is 1.5.3? I don't think I ever solved the issue, but I'll look into what I found out once I get home.
13
Your projects / Re: New Debian/Ubuntu Package Location
« Last post by alexgleason on August 08, 2018, 07:40:25 pm »
Installation Instructions

1. Install the repository

Depending on your Ubuntu version, run the command below in your terminal.

Ubuntu 18.xx / Linux Mint 19.x
Code: [Select]
sudo echo "deb http://download.opensuse.org/repositories/home:/nate-devv:/solarus-debian/xUbuntu_18.04/ ./" > /etc/sources.list.d/solarus.list
Ubuntu 17.xx
Code: [Select]
sudo echo "deb http://download.opensuse.org/repositories/home:/nate-devv:/solarus-debian/xUbuntu_17.10/ ./" > /etc/sources.list.d/solarus.list
Ubuntu 16.xx / Linux Mint 18.x / elementary OS 0.4.x Loki
Code: [Select]
sudo echo "deb http://download.opensuse.org/repositories/home:/nate-devv:/solarus-debian/xUbuntu_16.04/ ./" > /etc/sources.list.d/solarus.list
Other version
If your Linux distribution is based on Ubuntu or Debian, it's possible you can still make this repository work. You'll need find which version of Ubuntu your OS is based on, and then follow the instructions for that. If not, you'll have to compile the program manually, with the source code from GitLab.



2. Install the engine

Now you must update your package lists. Run this in your terminal.

Code: [Select]
sudo apt update
Finally, install the Solarus engine and Quest Editor.

Code: [Select]
sudo apt install -y solarus solarus-quest-editor
You should now be able to launch the Solarus Quest Launcher (which helps you play games) and the Solarus Quest Editor (which helps you make games) from your applications menu.



3. Install games

At this point, you can install the games below.

Installing all games
If you run this, it will install all the games below in a single command.
Code: [Select]
sudo apt install -y zsdx zsxd zelda-roth-se zbom tunics
Zelda Solarus DX
Code: [Select]
sudo apt install -y zsdx
Zelda Solarus XD
Code: [Select]
sudo apt install -y zsxd
Zelda Return of the Hylian Solarus Edition
Code: [Select]
sudo apt install -y zelda-roth-se
Zelda Book of Mudora
Code: [Select]
sudo apt install -y zbom
Tunics!
Code: [Select]
sudo apt install -y tunics


4. Playing games

After installing games, you can launch them from the Solarus Quest Launcher in your applications menu.
14
Development / Re: Problem with thrown enemies after pause
« Last post by Christopho on August 08, 2018, 06:36:40 pm »
The bug also happens in my games and still with 1.6. I guess we had never noticed before :)
https://gitlab.com/solarus-games/zelda-xd2-mercuris-chess/issues/133
15
Development / Re: Problem with thrown enemies after pause
« Last post by Starlock on August 08, 2018, 04:47:32 pm »
I'm using 1.5.0, since any version higher than that causes an issue with one of my custom entities. It's a problem happening on my own game.
16
Development / Re: Side scrolling functionality
« Last post by Christopho on August 08, 2018, 09:11:43 am »
This is a known issue. The side-scrolling script does not support jumping correctly yet.
17
Development / Re: Problem with thrown enemies after pause
« Last post by Christopho on August 08, 2018, 09:08:24 am »
Which Solarus version are you using? Which game and which version of that game?
18
Development / Re: Side scrolling functionality
« Last post by Zefk on August 08, 2018, 08:14:53 am »
Here is a little patch until wrightmat fixes the problem. The hero will not float and get stuck on the jumping animation. Although, it will not prevent the hero from standing still and moving when the right/down or left/down is being pressed at the same time.

Wrightmat's sidescroller script: here
Wrightmat's monster script: here



I think I heard a key on_pressing function was being made. Maybe that could fix the problem.

Patch for game:on_started():
Code: Lua
  1.   function game:on_started()
  2.    local hero = game:get_hero()
  3.     hero:set_tunic_sprite_id("main_heroes/eldran")
  4.     sol.timer.start(gravity, function()
  5.       if self:get_map() ~= nil then
  6.         -- Gravity: move entities down one pixel on every update if there's no collision.
  7.         --   (like with the ground or a platform) and hero not jumping or on a ladder.
  8.         local hero = self:get_hero()
  9.         local x, y, l = hero:get_position()
  10.         if state ~= "jumping" and self:get_map():get_ground(hero:get_position()) ~= "ladder" then
  11.           if not hero:test_obstacles(0, 1) then hero:set_position(x, (y + 1), l) end
  12.         elseif state == "jumping" then
  13.           for i = 1, jump_height do
  14.             if not hero:test_obstacles(0, -1) then hero:set_position(x, (y - 1), l) end
  15.           end
  16.           sol.timer.start(gravity * jump_height, function()
  17.             if self:is_command_pressed("right") or self:is_command_pressed("left") then
  18.               state = "walking"
  19.             else
  20.               state = "stopped"
  21.             end
  22.             --right
  23.             if self:is_command_pressed("right") and self:is_command_pressed("left") then
  24.               hero:set_animation("walking")
  25.               state = "walking"
  26.             else
  27.               state = "stopped"
  28.             end
  29.             if self:is_command_pressed("right") and self:is_command_pressed("up") then
  30.               hero:set_animation("walking")
  31.               state = "walking"
  32.             else
  33.               state = "stopped"
  34.             end
  35.             --left
  36.             if self:is_command_pressed("left") and self:is_command_pressed("right") then
  37.               hero:set_animation("walking")
  38.               state = "walking"
  39.             else
  40.               state = "stopped"
  41.             end
  42.             if self:is_command_pressed("left") and self:is_command_pressed("up") then
  43.               hero:set_animation("walking")
  44.               state = "walking"
  45.             else
  46.               state = "stopped"
  47.             end
  48.             --up
  49.             if self:is_command_pressed("up") and self:is_command_pressed("right") then
  50.               hero:set_animation("walking")
  51.               state = "walking"
  52.             else
  53.               state = "stopped"
  54.             end
  55.             if self:is_command_pressed("up") and self:is_command_pressed("left") then
  56.               hero:set_animation("walking")
  57.               state = "walking"
  58.             else
  59.               state = "stopped"
  60.             end
  61.             if self:is_command_pressed("up") and self:is_command_pressed("down") then
  62.               hero:set_animation("walking")
  63.               state = "walking"
  64.             else
  65.               state = "stopped"
  66.             end
  67.           end)
  68.           hero:set_animation(state)
  69.         end
  70.  
  71.   function game:on_key_pressed(key)
  72.     local hero = game:get_hero()
  73.  
  74.     if key == "up" and key == "down" and key == "left" and key == "right"  then
  75.       hero:set_animation("walking")
  76.     else
  77.       hero:set_animation("walking")
  78.     end
  79.   end

Explanation:

I added some checks function game:on_started() to prevent the hero from floating around.

Code: Lua
  1.             --right
  2.             if self:is_command_pressed("right") and self:is_command_pressed("left") then
  3.               hero:set_animation("walking")
  4.               state = "walking"
  5.             else
  6.               state = "stopped"
  7.             end
  8.             if self:is_command_pressed("right") and self:is_command_pressed("up") then
  9.               hero:set_animation("walking")
  10.               state = "walking"
  11.             else
  12.               state = "stopped"
  13.             end
  14.             --left
  15.             if self:is_command_pressed("left") and self:is_command_pressed("right") then
  16.               hero:set_animation("walking")
  17.               state = "walking"
  18.             else
  19.               state = "stopped"
  20.             end
  21.             if self:is_command_pressed("left") and self:is_command_pressed("up") then
  22.               hero:set_animation("walking")
  23.               state = "walking"
  24.             else
  25.               state = "stopped"
  26.             end
  27.             --up
  28.             if self:is_command_pressed("up") and self:is_command_pressed("right") then
  29.               hero:set_animation("walking")
  30.               state = "walking"
  31.             else
  32.               state = "stopped"
  33.             end
  34.             if self:is_command_pressed("up") and self:is_command_pressed("left") then
  35.               hero:set_animation("walking")
  36.               state = "walking"
  37.             else
  38.               state = "stopped"
  39.             end
  40.             if self:is_command_pressed("up") and self:is_command_pressed("down") then
  41.               hero:set_animation("walking")
  42.               state = "walking"
  43.             else
  44.               state = "stopped"
  45.             end

I added this function to prevent the hero from being stuck on the jumping animation.

Code: Lua
  1.   function game:on_key_pressed(key)
  2.     local hero = game:get_hero()
  3.  
  4.     if key == "up" and key == "down" and key == "left" and key == "right"  then
  5.       hero:set_animation("walking")
  6.     else
  7.       hero:set_animation("walking")
  8.     end
  9.   end
19
Development / Problem with thrown enemies after pause
« Last post by Starlock on August 08, 2018, 04:37:45 am »
When I lift a destructible object, and then pause and check the Info of an item, the action command no longer allows the hero to thrown the object. This only seems to happen when the info message is used. Does anybody have any idea what could be a likely cause of this?

EDIT: I've tested it further, and this will happen no matter what whenever any dialog is opened while paused
20
Development / Re: Side scrolling functionality
« Last post by Zefk on August 08, 2018, 02:40:59 am »
I found a bug when holding down keys.  The hero glides around if I continue to hold the up and right keys at the same time and the hero retains the jump animation if I were to jump while holding the keys.

You can see it near the end of the gif. Ignore the water....I was testing something with a black tile.
Pages: 1 [2] 3 4 ... 10