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.


Messages - Diarandor

Pages: [1] 2 3 ... 54
1
Development / Re: Randomnize table ?
« on: December 10, 2017, 05:46:42 pm »
Remember to initialize a random seed once, and only once (the recommended way is to use the time as seed). This could be done in your main script.

2
Development / Re: Randomnize table ?
« on: December 10, 2017, 05:13:24 pm »
That depends on what you want to do.

1) If you want to show only the treasure of the chest you opened and not the others, then you only need a random number between 1 and #minigame_prizes (remember to rename your list "minigame_prices" to "minigame_priZes", because it's not the same thing). You can use:
Code: [Select]
local index = math.random(1, #minigame_prizes)
local prize = minigame_prizes[index]

2) If you want to show where all prizes are after you open the chest, then you need to code a random permutation. I would use the "Knuth shuffles" permutation algorithm (it is very simple and the code is short); you can adapt the code from here:
https://en.wikipedia.org/wiki/Random_permutation
You can either permute the prizes list directly, or permute a list with numbers from 1 to #minigame_prizes and then use the permuted indices list to associate the prizes to the corresponding chests.

We all enjoy games with chests. Does that mean we are all perverts?  :o

3
Development / Re: [SOLVED]Change map graphics during play
« on: December 08, 2017, 05:05:49 pm »
I am not sure, but maybe shaders are already functional in the development version of the engine. Chris can tell you that. I don't know if that is included in the last snapshots.

In my opinion, duplicating all tilesets and sprites is too crazy and bad. Don't do it in that way. Wait 2-3 months until shaders are finished and do it with clean code.

4
Development / Re: Besoin d'aide pour le dialogue de début
« on: December 07, 2017, 08:48:10 pm »
It can be done in some of your initialization scripts, like the scripts main.lua or game_manager.lua, or other similar script.
Check the API to know how to do it: http://www.solarus-games.org/doc/1.5/lua_api_language.html
In your case, this line should be enough for now:
Code: Lua
  1. sol.language.set_language("fr")

5
Development / Re: Besoin d'aide pour le dialogue de début
« on: December 07, 2017, 08:21:24 pm »
As Chris says, you may have forgotten to activate a language, or maybe you have activated English instead of French (which does not exist in your project).

6
Game art & music / Re: Original art
« on: December 07, 2017, 08:12:31 pm »
Another video: testing new bridge tiles that I made for our light overworld tileset.
I may add some new bridge tiles if necessary, maybe for borders.
https://youtu.be/07RY2YfoMy0

7
Development / Re: Besoin d'aide pour le dialogue de début
« on: December 07, 2017, 07:41:01 pm »
As the error says, your dialog with id "link_house.zelda_message" is missing.

8
Development / Re: Moving the player around without taking away control
« on: December 06, 2017, 10:27:55 pm »
For a platform, easy way: use the event on_position_changed to find all movable entities over the platform and move them. Note that you need to check the entities in the rectangle corresponding to the bounding box but before the platform had moved. Use test_obstacles to know if entities can be moved. Check the ground position, instead of the usual position, to know if entities are over the platform (at least for the hero, or you will have problems).

For enemies pushing the hero you need something different.

9
Development / Re: Remove keys after using
« on: December 06, 2017, 07:52:10 am »
Which errors do you get?

10
Development / Re: Change map graphics during play
« on: December 04, 2017, 07:45:29 am »
It is possible with the development version, with shaders. Today I think that Chris will stream a new development video about shaders, and I recommend you to watch the last one too, because he explains and shows many things.

11
Game art & music / Re: Need help with sound effects.
« on: December 02, 2017, 03:33:37 pm »
If you want 16-bit sounds, sfxr and bfxr are good programs to create them. I usually use sfxr, but bfxr has more options. You can convert (and/or edit) the wav files into ogg format with other programs, like Audacity. To compose 16-bit chiptunes, Famitracker is a good option, but it takes some time to learn it and you may need to look for decent tutorials or examples made by others. Famitracker can be used too for more complex sounds that you cannot do with sfxr/bfxr, and later you can edit them with Audacity.

12
General discussion / Re: How Can I use a Sword in Solarus?
« on: November 30, 2017, 08:25:02 pm »
The easiest and fastest way is to copy a project of the Solarus Team and modify the art files.

13
Game art & music / Re: Original art
« on: November 29, 2017, 07:23:22 am »
Testing pterobat enemies. Warning: These are so stupid and annoying as hell!
https://youtu.be/1Oi5fZOV90M

14
Bugs & Feature requests / Re: Sword tapping crash
« on: November 29, 2017, 02:09:48 am »
I put a link to the issue that you've opened: https://github.com/solarus-games/solarus/issues/1117

15
Bugs & Feature requests / Re: Sword tapping crash
« on: November 29, 2017, 12:57:33 am »
This bug seems really weird. Does this happen if both the hero and sword have a tapping animation of 2 frames and same animation properties? Maybe this happens if the sword and the hero have different number of frames. I haven't tested this bug though. You should open an issue in the solarus repo: https://github.com/solarus-games/solarus

Pages: [1] 2 3 ... 54