Recent posts

#61
Development / Avoiding two sprite animation ...
Last post by hyrule_forest - February 15, 2023, 10:33:59 PM
Hi everyone,

I have a problem with 2 animations which overlap. As you can see in attached file, and didn't arrive to have only one sprite at the same time,
I would like to have either the mob with hands in air, or the mob in appearing mode ...
Bellow my code part for changing sprite/animation:


sprite:register_event("on_frame_changed", function(sprite, animation, frame)
  sprite:stop_animation()
  if enemy:get_distance(hero) < waiting_distance then
    sprite:set_animation("waiting",
      function()
        is_underground = false
        enemy:set_hero_weapons_reactions({
          arrow = 2,
          boomerang = 2,
          explosion = 2,
          sword = 1,
          thrown_item = 2,
          fire = 2,
          jump_on = "ignored",
          hammer = 2,
          hookshot = 2,
          magic_powder = 2,
          shield = "protected",
          thrust = 2
        })
        enemy:set_can_attack(true)
      end
    )
  elseif enemy:get_distance(hero) < appearing_distance then
    sprite:set_animation("appearing",
      function()
        is_underground = false
        enemy:set_hero_weapons_reactions({
          arrow = 2,
          boomerang = 2,
          explosion = 2,
          sword = 1,
          thrown_item = 2,
          fire = 2,
          jump_on = "ignored",
          hammer = 2,
          hookshot = 2,
          magic_powder = 2,
          shield = "protected",
          thrust = 2
        })
        enemy:set_can_attack(true)
      end
    )
  else
    sprite:set_animation("walking",
      function()
        is_underground = false
        enemy:set_hero_weapons_reactions({
          arrow = "ignored",
          boomerang = "ignored",
          explosion = "ignored",
          sword = "ignored",
          thrown_item = "ignored",
          fire = "ignored",
          jump_on = "ignored",
          hammer = "ignored",
          hookshot = "ignored",
          magic_powder = "ignored",
          shield = "protected",
          thrust = "ignored",
        })
        enemy:set_can_attack(true)
      end
    )
  end
end)


Anyone can help me plz ?

Thank you so much  :) (I precise that I'm a beginner)
#62
Development / Re: Importing images higher th...
Last post by PhoenixII54 - January 31, 2023, 09:31:50 AM
Hello,

Technically, you can use the whole 32-bit color palette for your images, and sprites size have no limitation. However, you must be aware that by default, the game uses a 16*16 pixels collision box for the hero and most entities, so if you want hi-res sprites, you'll need to use Lua scripting to change the entities' size as well as their origin point (which also defines their map coordinates). This includes their sprites too, to keep things aligned.
However, doing so is likely to cause collision bugs, so be careful to stay in multiples of 8 pixels for the collision boxes (sprites don't matter).
Tiles can also be of any size as long as they respect the 8-pixels rule (the editor forces you in this direction anyway).
#63
Bugs & Feature requests / Re: Unable to Run Program
Last post by AnotherHooligan - January 07, 2023, 10:38:06 PM
Tried direct download as well... progress? lul
#64
Bugs & Feature requests / Unable to Run Program
Last post by AnotherHooligan - January 07, 2023, 07:37:26 PM
Installed Version: 1.6.5
Snap Store Version: 1.6.5 (Stable and Edge)
OS: Ubuntu 20.04.1 LTS

I don't know if this is a bug -  in technical terms, but it is a problem. Left a review before I realized there is a whole forum for this. There's a whole forum!!

Anyways, I can't run the program. Either, actually... Uninstalled, reinstalled twice. Doing so for a third time as I'm typing this just to be sure. Only tried Snap Store (Edge) once. The other two were from the stable version. Both the launcher and editor installed through the store successfully. Upon clicking the launcher for the first time, brief wheel then it disappears. Wheel reappears when I move my mouse over the side bar (place by icons) but otherwise nothing happens. Same result when I clicked the editor. Pictures are cool so gave the review 3-stars. Anyone else experiencing this issue? I'm going to browse around, but on initial inspection found nothing related (lately).

PS. Third installation, can confirm results the same. Acts like its running, but doesn't. Nothing in system monitor either so I can't "force close" the program if it is.
#65
Game art & music / Re: Lake Tileset with Animatio...
Last post by Laverne Hoffman - January 04, 2023, 05:56:01 AM
I find it quite similar to the interface of the old ninjaschool I used to play, it's the best games online I've ever played.
#66
Development / Importing images higher than 1...
Last post by Babaoee - December 31, 2022, 06:15:06 PM
Hello everyone! I'm new here in this community. I found the Solarus engine a few days ago and saw the potential it had to make a really great game. I've been watching the official tutorials and have found them very helpful. (I'm on my way to making my childhood dream game. LOL.) But my problem is the 16-bit sprite art that Solarus seemingly requires. I love sprite art, but drawing it myself is very difficult. I'm much more experienced in higher resolution art. So I was wondering—is it possible to import high resolution art into Solarus? Or can only 16-bit art be imported?

Thank you for reading, and I would appreciate any help!
#67
Development / Re: how do you activate a func...
Last post by ameliacarey - December 23, 2022, 09:11:01 AM
Quote from: PeterB on January 04, 2022, 10:01:23 PM
https://forum.solarus-games.org/en/index.php/topic,1044.0.html/geometry dash

This thread in Your Scripts also details this, there are also many other scripts here which may help you out as well.

Thanks!
#68
Development / Re: does anyone know what this...
Last post by ameliacarey - December 23, 2022, 09:04:32 AM
Thanks for sharing this article with us!

drift hunters
#69
Your projects / Re: Minish Cap Maps in Solarus
Last post by JustAnArtisticPagan - December 18, 2022, 05:22:28 AM
I found some images that seem to show the animation of the water in minish cap:
https://www.purezc.net/Tiles/t1257s1.gif
#70
Development / Re: Playable Ocarina and Day a...
Last post by Christopho - December 13, 2022, 04:48:12 PM
Hi! Nice to see that you enjoy creating your game with Solarus and that you are making progress :)

One way to create a day and night cycle is to use timers. You can create a timer that fires every X milliseconds, where X is the length of a day in your game. When the timer fires, you can increment the current time of day and update the lighting and music in your game accordingly.

To create a playable ocarina, you can use the input system to detect when the player presses certain buttons on the keyboard or gamepad. You can then use that information to play a sound effect and display a visual effect on the screen to simulate the ocarina being played.

If you have not programmed in Lua before, it may take some time to learn the language and understand how to use it with Solarus. I recommend the Programming in Lua online book for that. Once you know some basics about Lua, good places to help you get started are the Solarus tutorials and documentation, the forums here and Discord.

I hope this helps and good luck with your game!