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 - Christopho

#1111
Development / Re: Collision detection
July 28, 2014, 09:31:47 AM
Hi,

You are mixing two separate notions:
1) Collision detection: detecting when two entities overlap each other.
2) Obstacles: allowing or not an entity to traverse another one.

In your case, you are interested in 2).
(Indeed, you could also use 1) to detect the overlapping *after* it happened and force the hero to move back. This is complicated and seems like a dirty hack).

For custom entities, 1) is add_collision_test() and 2) is set_can_traverse() and set_traversable_by().

You can do
your_custom_entity:set_traversable_by("hero", false)
but here, the rectangle (the bounding box) of the custom entity will entirely be an obstacle.
It is possible to do something more elaborate by passing a function instead of a boolean:
your_custom_entity:set_traversable_by("hero", function(custom_entity, hero)
  local hero_x, hero_y = hero:get_position()
  local traversable = ......... -- some kind of elaborate test here depends on the exact position of the hero on the custom entity
  return traversable
end)

I use this kind of code in the engine to implement complex traversable properties of diagonal jumpers. But this is quite advanced. If you really need that, there is usually something wrong.

I'm not sure it is a good idea to make a sprite that blocks the hero depending on the exact pixels that overlap him. It is very strange that the obstacle part of the sprite changes at each frame. What if the hero is outside the sprite during one frame, and at the next frame blocked by it? This is weird. The hero should never be inside an obstacle. Plus, there is no easy way to implement that with the API. Also, it would be slow.

For example, if your entity a big sprite of 64x64, most of the time you can give the entity a smaller (fixed) bounding box, like 48x32 or something else and you  will be okay with obstacles. You don't need another entity to act as a protection square.

If your entity is really too irregular for that, can you tell me more? What kind of entity are you making?
#1112
This is apparently a bug. It works with holes, and it should also work with lava, water and prickles too.
I have just fixed the problem, it will be fixed in Solarus 1.3: https://github.com/christopho/solarus/issues/567
Thanks for the report!
#1113
Bugs & Feature requests / Re: strange bug.
July 27, 2014, 10:00:39 PM
Hum, if you are playing on GCW-Zero, ZSDX 1.8 is not available yet.
If you are stuck because you saved there, you can send me your savegame and I will fix it.
#1114
Hi,
It might be because this chapter of the tutorial was made with an old release (1.0). The dialog system was built-in at that time. Since 1.1, it is customizable. It is your responsibility to pass any value to the callback, by calling game:stop_dialog(). If you don't use a customized dialog system, then a default, built-in dialog box is shown instead, but nothing is passed to the callback.

More details here:
http://www.solarus-games.org/doc/1.2/lua_api_game.html#lua_api_game_start_dialog

See also the tutorial about how to upgrade your quest from 1.0 to 1.1: https://www.youtube.com/watch?v=PKuc54i81GY&list=PLzJ4jb-Y0ufySXw9_E-hJzmzSh-PYCyG2&index=22
#1115
You need Java 7, but you are using Java 6. So you have to install Java 7.
#1116
To run a jar file, the command is:
java -jar solarus-editor.jar
#1117
Hi,
This is good news!

I just opened an issue to force fullscreen mode at compilation time, because this is not currently possible:
https://github.com/christopho/solarus/issues/560
#1118
Your projects / Re: Solarus - Rogue Like Features
July 09, 2014, 12:44:24 PM
tinyweldingtorch: it's done. String tile pattern ids are now supported in the master branch. They can be changed from the quest editor.
#1119
Your projects / Re: Solarus - Rogue Like Features
July 07, 2014, 05:42:27 PM
tinyweldingtorch: I merged your change in a branch string_tile_id: https://github.com/christopho/solarus/tree/string_tile_id
I simplified some code, in particular I removed unnecessary int to string conversions from Lua.
And I started to update the editor in that branch. The editor works with string tile ids now. The GUI does not allow to change them yet (it continues to generate auto-incremented ids). But I think it will be done very soon, possibly tonight. Stay tuned!
#1120
Ok I will fix the crash, thanks for the report.
Yes, you can get the name of any enemy with enemy:get_name(), like for any entity.
#1121
Hi,

You can, and mentioning us in your game credits is always appreciated.

The license of all data files of the game is here: https://github.com/christopho/zsdx/blob/master/license.txt
Some data files are from Nintendo. Others are from us with an open license.
#1122
You mean how to be informed about our future game(s)? Stay tuned on the news part of the website: http://www.solarus-games.org/blog/

About your bug with timers, we fixed timers precision issues in Solarus 1.2, but the Android version still uses 1.1 (we still have to port it to 1.2).
Actually, it is good news that you went that far on Android. We did not test the whole game (I don't have a smartphone :)) so it is nice to know that the game is playable without other major issues.
#1123
Your projects / Re: Solarus - Rogue Like Features
July 03, 2014, 11:49:14 AM
Hi!
String tile ids are a nice change. It will help users modify tilesets more easily without breaking maps. The hard work is to update the editor to support them though :)

To make dynamic maps, you can use the file API. It allows you load data files from the saves directory instead of from the ususal data directory.
#1124
General discussion / Re: openSUSE package
July 03, 2014, 11:44:37 AM
Thanks!
I added your solarus packages on the download pages.
#1125
General discussion / Re: Gamepad support?
June 20, 2014, 08:59:56 AM
We fixed a similar bug in the development version: https://github.com/christopho/solarus/issues/513
So hopefully things will be better in the next release.