solarus-games / solarus

This repository was moved to GitLab: https://gitlab.com/solarus-games/solarus
http://www.solarus-games.org
Other
712 stars 134 forks source link

MultiRequest: improve conveyor belts #288

Closed Diarandor closed 10 years ago

Diarandor commented 11 years ago

Conveyor belts could be customized to create air/water streams, but more properties are needed. Other solution is to add a new object to use streams. These are some ideas of how it could work:

-Add a property to customize the speed of the conveyor belt. -Allow to customize the sprite of the conveyor belt (with an animation if desired), or allowing to make it transparent. -Add a property to allow the hero move over conveyor belts: The hero should be able to move perpendicularly to the movement of the conveyor. Allow the hero to increase (resp. decrease) his speed when he moves in the same (resp. opposite) direction of the conveyor belt (this could be done adding/subtracting the speed of the conveyor belt with the walking speed of the hero). -Add properties for allowing/not allowing movement in opposite direction, and also to block the movement of the hero (as in the current conveyor belts).

Thanks!!

christopho commented 11 years ago

Issue also related to #119 and #281.

Very good proposal! We could just rename conveyor belts to streams and add these properties. (I always hated the name conveyor belt.) What do you think?

Thanks for this very nice improvement request. I'll do it for 1.2.

Diarandor commented 11 years ago

It would be great!!! Thanks for your work!!!!!!! :+1:

christopho commented 10 years ago

Merging issues #119 and #321:

ekureina commented 10 years ago

What else needs to be done to close this issue?

christopho commented 10 years ago

I have to implement the new features of streams. They can be customized in the editor and in data files, but this has no effect yet. For now streams are always blocking. I will work on this today and the next few days.

ekureina commented 10 years ago

If there is something you think might help you that I can do, today is the day for me to do it.

christopho commented 10 years ago

This is a complex work. It involves disruptive changes in the C++ logic of the engine. We need the hero to have somehow two movements at the same time. I am working on this in a separate branch (branch stream). I have committed stuff today, but this is not working well yet, I have to test and fix all of this.

I have reimplemented streams outside hero states. In 1.1 and before, streams are implemented as a hero state. So for example, you cannot use your sword while being on a stream. You are in the stream state, and going to the sword state would stop the effect of the stream. You cannot move either: there is already the movement of the stream. To allow the player to use his sword or to force streams, we need to change that. So streams are no longer a state, they are now somethng additional to the state.

This is essentially done in the stream branch, but buggy. First, I need to fix blocking streams (to get the old behavior okay again), and then, I will take care of non-blocking ones. I will continue to work on this today, but if you want to have a look at the code, I guess it cannot hurt :) To avoid conflicts, we can talk on IRC (chat.solarus-games.org #solarus) if you want to contribute.

christopho commented 10 years ago

Blocking streams are now okay in branch stream. What could help is to test them in ZSDX (use branch master of zsdx). And see if you find bugs, glitches that allow to skip parts of stream mazes, or situations where the player gets stuck.

ekureina commented 10 years ago

Ok, I can test.

ekureina commented 10 years ago

Going to the sword cavern's stream is not blocked. I saw a weird rendering glitch (also on solarus master see christopho/zsdx#79) that may have nothing to do with streams. I don't have a save file near a stream maze, if you have one I can test with that may be beneficial.

christopho commented 10 years ago

Thanks for the bug report, I will have a look. Here is a savegame file of ZSDX with everything unlocked: http://www.solarus-games.org/tmp/save1.dat

To enable the debug keys, put a file called "debug" in your savegames directory. Then you can traverse walls with Ctrl, run with R, skip dialogs with Shift, and more.