Author Topic: New to Solarus {couple of questions}  (Read 172 times)

Constantkaos

  • Newbie
  • *
  • Posts: 4
    • View Profile
New to Solarus {couple of questions}
« on: April 28, 2017, 07:39:13 am »
Hey guys,

I just found this engine and I am really looking forward to producing content with it. I figured id pop on here and ask a few quick questions before I started my project. I will be creating all original assets in gimp. By creating my own character sprite this weekend. I wanted to know if there are set animations that the sprite needs to have in order to work properly?. Also if I was to create a new sword attack. Could this be done in lau scripting or would you have to make changes to the engine itself? ty for your time and help looking forward to spending a lot of time on the forums. :D

Zefk

  • Sr. Member
  • ****
  • Posts: 482
  • Just helping Solarus
    • View Profile
    • Zelzec Business
Re: New to Solarus {couple of questions}
« Reply #1 on: April 28, 2017, 08:25:51 am »
Quote
Also if I was to create a new sword attack.

Solarus has a sprite editor to setup animations and you can make as many as you want. You can activate your custom animations for the hero with hero:set_animation("name_of_animation.")

Solarus goes by 8x8 formatting and it would be best to make a grid for proper positioning. The sprite can be any size, but only the bounding box size can be changed for the entities "enemy" and "custom entity."  The other entities bounding box is 16x16. The hero, NPC, ect.

You can make more animations and code them using the sprite drawable functions, but I will cover most of the default animations built into the engine. You can make any sword attack for the hero. As far as I know.

Sword:

You will need to create a file called "sword1" and it can contain the following animations.
  • spin_attack
  • super_spin_attack
  • sword
  • sword_loading_stopped
  • sword_loading_walking
  • sword_running
  • sword_tapping
  • victory
Shield:

It is the similar for the file "shield1".
  • stopped
  • walking
  • sword
  • sword_loading_stopped
  • sword_loading_walking
  • sword_running
  • sword_tapping
Quote
I wanted to know if there are set animations that the sprite needs to have in order to work properly

The following.

NPC:

A NPC needs two animations:
  • stopped
  • walking
Enemy:

You honestly only need animations "hurt" and "walking".
  • hurt
  • walking
  • immobilized
  • shaking
Basic hero tunic animations:

The hero file is called, "tunic1."

This is a list of most default hero animations, but there are more. You do not need them all. For example, the hero can still work without swimming, the spin attack can be disabled, and so on. The hero I recently made might be a good reference for you: Here
  • boomerang1
  • boomerang2
  • bow
  • carrying_stopped
  • carrying_walking
  • falling
  • grabbing
  • hookshot
  • hurt
  • jumping
  • lifting
  • plunging_water
  • pulling
  • pushing
  • running
  • spin_attack
  • super_spin_attack
  • stopped
  • swimming_fast
  • swimming_slow
  • swimming_stopped
  • sword
  • sword_loading_stopped
  • sword_loading_walking
  • sword_tapping
  • throw
  • walking
  • walking_with_shield
« Last Edit: April 30, 2017, 12:33:19 am by Zefk »

Diarandor

  • Hero Member
  • *****
  • Posts: 701
  • Cats are cool! (ΦωΦ)
    • View Profile
Re: New to Solarus {couple of questions}
« Reply #2 on: April 28, 2017, 11:56:14 am »
Zefk has already explained that perfectly, but note that you can find that info, and much more, in the Solarus Lua API website.

Constantkaos

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: New to Solarus {couple of questions}
« Reply #3 on: April 30, 2017, 01:05:14 am »
Thanks guys that helps alot!!!!!!!!!!!!!! very cool indeed. I want my knight to be able to use different weapons, spear, crossbow,ect