Menu

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.

Show posts Menu

Messages - Diarandor

#691
I agree with Satoh that the problem is probably that each time an entity that cannot interact is checked, then the method return_no_effect() is being called. So kudos to Satoh. (By the way, is it "e:return_no_effect()" or "self:return_no_effect()? Well, it does not matter.) I propose a similar code (using a return instead of using the "overlapping" variable), although this code would not allow to activate several interactive entities at the same time:

Code (Lua) Select

-- Ocarina script.
local item = ...
local m = item:get_map()
local h = m:get_hero()

function item:activate_ocarina_entities()
  for e in m:get_entities("ocarina_zelda") do
    if h:overlaps(e) then
      e:on_zelda_lullaby_interaction()
      return
    end
  end
  self:return_no_effect()
end
#692
Development / Re: Lifting a custom_entity?
July 11, 2016, 06:26:54 AM
Yes, everything has to be scripted since there is no way to carry custom entities at present, and it is not easy. I had some scripts which used to work (I have some issues now and things in the code that I want to improve and simplify), but since I am currently working on pixel-art and have other priorities, I do not know when I will finish the next version of these scripts.

Anyway, in order to integrate the scripts, you would need to modify several important events of your main scripts to allow a correct behavior, which is not trivial. For instance:
1) To allow carrying custom entities between maps or not, so you need to define some built-in events.
2) To allow some of them to save position in a map when you leave them (I call these "independent" entities like the metal ball in LA). These need to be created by your code if necessary, when the map is created.
3) To make them unique or not (this is always the case of "independent" entities, but also of some "non-independent" ones if you do not want to allow cloning them when carrying one then going to a new map and then coming back to the original map), etc.
3) You need to fix the carrying animation for the hero, which is not trivial. There are already scripts in this forum to allow to fix animations (and directions) for the hero.
4) If you want the HUD to display a "carry" text when you can carry a custom entity, then more annoying code has to be modified. (Remark: note that you need to detect the entity in front of the hero, which is currently easy thanks to the new functions "entity:get_facing_entity()" that allow to get the entity facing the hero; but this was a pain and more complicated some time ago, and I still have to simplify my scripts using that function.)
#693
Ok, I guess I was wrong about a custom entity detecting itself during collisions (or maybe you have some extra code).

To change the custom entity from traversable to solid and viceversa you can use the event: "entity:on_position_changed(x, y, layer)".
But be careful when you change your entities to solid, because other entities (like the hero) may overlap them and be stuck. (What you are doing may be more complicated than it seems.)
#694
I think you are changing the position of your custom entity instead of the position of the hero, i.e., the collision test is probably detecting the custom entity as colliding with itself, so the layer of the custom entity is changed and then there is no collision with the hero since they are in different layers. I might be wrong with this, so you have to check if this is what is happening. In that case, you will need to add a condition in the collision test to check that the other entity is the hero, something like: "if other:get_type() == "hero" then ....blablabla".

Anyway, as Starlock says, the simplest way is probably to use a sensor instead of a custom entity with a collision test, unless you need to make more things that cannot be done with a sensor entity.

There is a nice tutorial made by ffomega which shows how to make bridges, which use sensors to change the layer of the hero. If you are having problems, then you should take a look (it is exactly the same link that Starlock has given above):
http://solarus_resource.site88.net/tutorial/bridges.htm
http://forum.solarus-games.org/index.php/topic,654.msg3361.html#msg3361

EDIT: Another possible cause of your problem could be if the ground on the second layer is of type "empty". That would make the hero fall automatically to the low layer again, because that is the behavior coded in the engine. However, other entities do not fall to lower layers if they are over an "empty" ground, so this would explain your problem too.
#695
Hi there! I would try to use diagonal walls instead of coding that.
Since the movement of the hero is smooth (I think), that wall should force the hero to move diagonally.
#696
I guess this is intentional since otherwise some functions and events, like get/set_xy and on_obstacle_reached, would have no sense for several entities at the same time. If you still need help to do something with movements, then just explain a bit what you are trying to do :).

For the last question: yes and no. Both functions are called when an obstacle is reached, but as you know they are defined on different entities. So, depending on if you need the event to be called always or only for the current movement (when an obstacle is reached), you should use the corresponding one. The event defined on the movement will be destroyed when the movement does, obviously. Do not worry to ask, even if it seems something silly, because it is not.

In this case, I think it should be said explicitly in the API that a movement can be attached, at most, to only one entity.
#697
Well... sfxr is actually to create sounds (and not music). There are another 2 programs that are very useful to create sounds: bfxr and LabChirp. Bfxr is like an improved version of sfxr, it has more features and things so it is better, but it is more overwhelming  if you are learning how to create sounds (that is why I preferred sfxr, but I may consider using bfxr someday since now I got some experience).

I have never used LabChirp, but I have read that it is more customizable than bfxr, but less casual and less user friendly. Bfxr and LabChirp may be complementary, and using both of them at the same time may be a good choice.
#698
Game art & music / Re: Original art
June 21, 2016, 12:47:59 AM
Finally I realized that LMMS has some sounds of timbales and drums, which must be free since LMMS is free. I will try to reduce their quality, convert them into dcm format, and then add them to the FamiTracker file to replace the previous recorded samples. That should work.

Anyway, a composer that makes SNES-like music has told me that it's highly unlikely that I would run into any legal problems with those tracks, that most of the samples used in SNES games were actually down-sampled freely usable libraries, and that many people have used samples from real SNES games in commercially released soundtracks. Who knows if this is really true...

But in any case, since I am quite paranoid, I am gonna take the slow but safe and legal way of replacing all recorded samples.
#699
Congratulations Christopho! ;D
#700
Game art & music / Re: Original art
June 19, 2016, 05:36:43 AM
Thanks Zefk! Those links are very useful and there are lots of free FamiTracker instruments there.

However I have not found any DPCM with a similar "high quality" sound for the drums and timbales that I used in the song, so I will have to use some of these chippy sounds to replace them and the song may become worse... but at least this time the licenses will be fully respected and it will be free with no uncertainty. (I will upload the new versions of the two songs as soon as I get time to make them.)
#701
Game art & music / Re: Original art
June 19, 2016, 12:33:22 AM
Bad news. I will need to replace some of my FamiTracker instruments to avoid copyright problems (some of them were not made by me). There should not be any problem for purely synthesized instruments, since these can be easily and quickly done and they always sound similar (and these have very simple wave forms). However the DPCM channel uses samples (i.e., sound recordings), so I should replace these instruments in my compositions, just to avoid legal problems. I will need new drum and timbale DPCM sounds (I think these have "dmc" extension). This is soooo frustrating... :(

Can someone help me to find some free FamiTracker instruments for the drums and timbale?
#702
Game art & music / Re: Original art
June 18, 2016, 10:44:04 PM
I think it was 2 or 3 hours of work aproximately.
#703
Game art & music / Re: Original art
June 18, 2016, 10:29:16 PM
Well, two of my first compositions (all is always CC-BY-SA 4.0):

Boss Theme v1.0.
https://www.youtube.com/watch?v=k2qjlB7_KwU

Castle Theme v1.0.
https://www.youtube.com/watch?v=tn0r2WjhZhc

I made the second one today.
They may be a bit repetitive, so I may improve them someday.
#704
Hi @Starlock. Thanks for the feedback! :)

I put the link to the "Boss Theme" song that I have uploaded:
https://www.youtube.com/watch?v=k2qjlB7_KwU

I will upload more music from time to time.
(I have done a few more, but some of them need to be improved and others are not so good.)
#705
General discussion / chip music vs non-chip music?
June 18, 2016, 03:46:14 AM
Hi comrades!

Some time ago I made a few compositions with Famitracker. These are 16-bit music.
I was wondering if it would be better to try to remake these songs with LMMS (so the sounds would have "higher quality", i.e., it will be non-chip music).

Well, 8/16-bit music was a limitation of old consoles, but it is nowadays a style with a lot of charm (in the same way pixel art is for the graphics). There are impressive compositions made with 16-bit style in recent games (you can listen to Shovel Knight OST for instance), so chip music should not be considered bad quality music. (Unfortunately, many people do not understand this style of music of video games nowadays.)

Since I need to take a decision, I opened this poll. You can change your vote if you change your mind.
I will post later some of my few and rudimentary compositions. :P