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

Topics - Diarandor

#41
Development / Creating a custom jump
August 04, 2015, 02:22:07 PM
Greetings! I always wanted to script a jump like in Zelda games (the one given by the engine is too limited), where you can control the hero during the jump. I had an idea of how we could program this (although there may be other better ways).

The idea is, when using the item to jump, we first create a custom entity with transparent sprite and solid ground that follows the hero under him, and we start the jumping animation on the hero. (The custom entity would allow to move over holes, water and lava while we are jumping, because it has solid ground. It should have smaller size than the hero to avoid traversing walls.) When the jump animation finishes, we destroy the custom entity. It would be necessary to use the save solid ground function before the jump, just in case the hero ends in bad ground, and reset the solid ground function when the jump ends.

One of the advantages (or disadvantages) of doing it this way is that it allows the hero to jump over lower layers (in case that the current layer ends) without falling to the lower ones until the end of the jump. In other words, this would allow to jump between solid grounds on the same layer that have "empty" grounds (not holes!) between them without falling to lower layers. (I was planning to use this to make puzzles where you move boxes of the low layer to make a way on the middle layer where you can jump over the boxes without falling to the lower layer.)

I have not programmed this yet (someday I wil try it) so I am not sure if this will work as I expect. Anyway, I have hope in this trick to program the jump, so I wanted to share the idea.
#42
Greetings! I'm working on a solarus game where you can control 3 heroes that have different abilities and weapons, and switch between them using the menu (or pressing space bar if they are in the same map). I have not worked much on the plot, but I will explain now a bit about the gameplay.

The main heroes will be:

-An archer, the only one who can jump over holes (and water and lava), and has a bow with wooden arrows, a crossbow with metal quarrels, a shovel (that can be used to obtain metal quarrels from the ground and the usual uses), a sickle that can be used to obtain wooden arrows from certain plants (which unlike the sword, cannot cut solid plants), running boots (that can be used with the ability of jumping), etc.
-A swordsman, the only one who can swim on water, and uses short range weapons like a sword, spear, shield, a magneto (that can be used to deflect the metal quarrels a certain angle, and other uses), etc.
-A mysterious wizard (with short range spells) who has lost his memory, that can throw fire (to burn plants, or to combine it with the arrows of the archer to produce fire arrows), throw electricity (which paralizes enemies, turns on machines, hurts water-type enemies, and also can be combined with metal quarrels to electrify them), swimming in lava, mind reading of npcs (and even the other heroes), teleporting all heroes to the entrance of the dungeon or certain place of the map, etc.

I have also finished the scripts to change control between heroes, but it remains to make the menu to change between them from different maps. In maps where one of the main heroes is left, the position and state of everything must be saved to avoid solid entities to reappear overlapping some hero (this is necessary, but easier than it seems).

Also, I made a script to carry custom entities (although I still have to solve some problems and improve it). These portable entities can be thrown from one hero to another (useful if there is a hole or thin wall between heroes, or if they are moving in platforms, etc). Keys will be custom entities that will be carried, which is something unusual, and will allow to make enemies that steal the key, or annoy in other different ways (like changing the color of the key, but I don't want to give more spoilers). A key will open only a door of its color. There could also be magnetic keys (to use the magneto with them), and other types. Some portable items can be used to push buttons, and they are always moved by platforms.

The symbol of the game will be a clover (instead of the triforce), there will be secret clovers in the island that can be collected for something good to happen (like the secret seashells in Link's awakening), and a dark/light magic clovers which will be part of the main plot.

There are huge possibilities for the puzzles in a game like this. But the hardest part will be to design the island (not the dungeons), since sometimes the heroes will need to take different paths to arrive to the same place, and other times you can cross some road if you take two or all the heroes at the same time in that way (cooperation between them is needed). There will be parts of the game when you don't have the three heroes (at the begining you only have one of them). Etc.

This are the main ideas for my game. This is maybe too ambitious, but it is possible, and the hardest part of the scripting is almost done, although it still remains to make most of the graphics and start making all the maps and dungeons. I would be grateful if someone wants to cooperate with this project or contribute with some more ideas.
#43
Development / Carrying custom entities
July 27, 2015, 05:07:47 AM
I have created this post just to talk about the scripts I made to allow carrying custom entities (not working correctly yet), just in case someone is interested. A conversation about this was started here:
http://forum.solarus-games.org/index.php/topic,297.0.html
#44
Development / About color text dialogs
July 10, 2015, 04:29:00 PM
Hi there!

I have modified Christopho's dialog_box.lua file so that the dialog box allows some commands for colored text.

For this to work correctly it is required that all letters have the same width (which happens for the font I am using, but may not be true for some of the fonts you use), because letters of different colors are drawn in different text surfaces, and to align the letters I use spaces when necessary.

The syntax of the new commands is the following:

${surface_name}: change to other surface. This allows to use several colors at the same time, one for each surface. The original one is "${default}". (These surfaces are destroyed after the dialog and the default one is reseted to white color.)

$[color] or $[(r,g,b)]: name of a color (red, blue,...) predefined in the function dialog_box:set_color(color), or RGB coordinates of some color. These commands only affect to the current surface.

(I was thinking that these surfaces could also be used to program other commands, for example to move letters up and down and make text vibration. I'll try to make this when I have some time.)

I'd like to share the code of the script. Should I post it here? Or maybe in the libsolarus-mudora repository?
#45
General discussion / Music loops?
June 26, 2015, 04:54:08 PM
Hi! I was wondering if it is possible to make a loop on the music with the loop starting point in the middle of the song. Is this possible? (I am using music with ogg extension.)

I found in some forums that it is possible to make this in RPG Maker, setting some properties on the ogg file. You can check it in the link below:

http://www.rpgmakervxace.net/topic/3825-make-looping-bgm-part-1-ogg-vorbis/

Is it possible to make something like this in Solarus? It could be useful.
#46
Hi,

I am creating a game with Solarus (which is still at a very early stage). I would like the game to be free (free as in freedom), but I need some advice (I am new to these things). Do you recommend me to use github to store all the data files?

I am creating all resources such as sounds, music and sprites for the game, so I am afraid of loosing my work if someone steals registers these resources (in case this is possible for a free game that uses them). Would it be safe if I just put all the data on github? Or must I do something more to make these other resources (not the code) to be free (as in freedom) too?

PS: of course, I know that if the game is free and open-source anyone could use my resources for a game (and even sell them), I don't mind that. The point is that I want to avoid someone to register these resources as his property, which would make me loose the right of using them in my game. (I want these resources to be free, so anyone can use them.)

Thanks in advance!
#47
Hi, I have the following problem (it is quite a bit hard to explain), and it could be a bug.
I made scripts for platforms and wind that move the hero changing his coordinates.

-For the platforms, I change the coordinates of the hero using the event on_position_changed of the platform (the platform is moved with a movement of the engine). The problem appears when the hero is carrying an object (a pot for example) and the camera is moving following the hero at the same time (to test this the map must be big). Sometimes, the sprite of item that is being carried is showed like vibrating (from left to right to left, etc, if the direction of the movement is horizontal). This only happens sometimes (and the camera must be moving to make this happen). Maybe the sprite of the carried item is not refreshed in the correct time, or something like that... (I tested a script of wind, using the same method and the same happens, obviously.)

-I made another script of wind using a different method: the position of the hero is changed using a timer with a loop. In this case, when the camera is moving after the hero, the carried item is moved smoothly, but the sprite of the hero appears like vibrating (the same problem as above but in the sprite of the hero in this case). The same happens when I apply the movement to other custom entities that are not the hero (I emphasize that the camera must be moving to make this happen).

Obviously, my aim is to make the movement smooth for the hero, carried items, and other entities where I apply the movement, when the camera is moving, if this is possible. Do you have the same problem? (Maybe I am doing something wrong) Could this be a bug of the engine? I would like to find a solution for this... or I will be forced to use small maps when I use this kind of entities.

Thanks in advance for your help!
#48
Bugs & Feature requests / Misprint in Lua API - Enemy
February 25, 2015, 07:18:08 AM
There is a misprint in the Lua API of "enemy" (here: http://www.solarus-games.org/doc/latest/lua_api_enemy.html)
in the last lines of the example of the Overview, it should be written m:start(self) instead of  self:start_movement(m).
I suppose that was the old syntax. That misprint could give problems for beginners of solarus.
#49
Hi! I have the following problem:

The animation for  the sprite "carrying_walking" that I am using has 8 frames. But the carried object bounces each 3 frames (this was the behaviour in ALTTP), so  the animations are not synchronized. (I would like to keep the number of frames to keep quality of the animation.)

Could this be made more customizable in future versions of solarus?
I suggest using a variable in the engine to set the number of bounces on each loop, which should be 1 by default (in my case I would need to set it to 2 times for each loop since in the walking animation the hero moves both legs on each loop).

Thanks a lot!
#50
Development / Question: mirrors and reflections
February 03, 2015, 08:49:13 PM
Would it be possible (in the current or future versions of solarus) to program scripts for mirrors showing a reflected image of what is next to them, or water reflecting the image of what is above?

(It's just out of curiosity. I don't need these entities for the game I'm working on, but it would be cool if possible.)
#51
Hi! I was trying to execute a function (for example, to open a menu in the game) when the "action" button is pressed, but only in case the hero is not performing another action (talking, lifting,...). To do that, I tried to use the function:

function game:on_command_pressed(command)
  if command == "action" and game:get_command_effect("action") == nil then
     ---- ...my function...
  end
end

The problem is that this does not work when interacting with custom entities because the function game:get_command_effect("action") returns nil, and I think it is not possible to assign a command effect when the hero is close to a custom entity before the "action" command is pressed (maybe I'm wrong).

Could you help me to solve this problem?
Thanks in advance!
#52
Development / Help with light and darkness
September 20, 2014, 03:28:31 AM
Hi,

I would like to know if it is possible to program dark rooms where there are several sources of light (including the hero, some moving enemies, and torches on walls). Outside the illuminated areas there would be opaque darkness. Is it possible to do this? And how?

Thanks for your help!!!
#53
Hi! I have the following problem:

After changing the hero's sprite with the function hero:set_tunic_sprite_id("tunic_name"), the hero is not hurt when colliding with an enemy. I realized that this only happens when the name of the tunic is not of the form "tunicX". Could this be a bug?

Thanks in advance for your help!