Topic: Water (I know it has bugs but I hope they will be fixed soon)

I started playing with the object editor last night, and managed to create something which I think level designers will find useful, water.  Now before you start celebrating and using it in your levels you should know that it has several bugs which I will list below.  If any of you have a solution to one of these bugs which can be implemented in the object editor which came with version 0.2.0 please let me know.

Warning: to use this object you must be using build 430 or higher.

How to download:
1. Visit the download page.
2. Click the download link below Water.zip.
3. Follow directions in READ ME to install.
Download page: https://sites.google.com/site/thereallu … le-cabinet

How to use:
1. Place exactly one of the Blackbox objects in the level in which you intend to use water.  I'm not positive if placing more will cause any strange errors, however I know that if you place too many it will make an enormous amount of objects which generally causes the game to freeze.
2. Place water objects wherever you wish to place them.
3. Ensure that the player touches an "out" object upon leaving the water.

Known bugs:
1. Unable to set player x and y speeds without forcing the player to keep moving through the water and making the player unable to enter the water from one side. (In Progress)
2. Placing more than one water in a row without putting an out on the inside edge of each block will result in death, yet doing this will save the player from drowning. (fixed, new object created which is destroyed by waterremover)
3. Unable to use hide_unless_in_editor_mode in the code, so once you place a water remover it becomes invisible. (fixed, placed before object states)
4. No available code to instantly kill a player, so once drowned state is hit the player is "hit" to death (Solved, thanks SilverstepP)
5. Any char which drowns turns into sonic for a few moments...(Fixed, thanks for the example SilverstepP)
6. Water causes knock-back of player if they enter with a fireshield.(Found by SilverstepP)
7. Shield protects player from death for a moment, and because of this they may escape drowning. (Found by SilverstepP)(Fixed using new kill code)
8. Hitting an "out" object after drowning_a stage is hit but before drowning_b is hit causes the game to freeze (Found by ssdw)(Solved using solution 1)

Possible solutions:
1. Make set_player_xspeed and set_player_yspeed variables which determine the speed of the player without forcing the player to move, possibly make new commands instead of changing these.  Use new button system to develop a different platforming system for use in water.
6. New object ability, remove_shield.

Planned features:
1. Sound effect upon entering the water.
2. New object designed to imitate the look of waves for use on top of current water. (Finished, acts as an alternate out object.)
3. Bubble object, meant to allow the player to survive longer under water.(Finished)
4. Change sprite to drowning and play drowning sound effect. (finished sprite, but is...interesting)(added sfx, thanks KZR)(Finished)
5. If player hits "out" after drowning they are saved.(Voted on by members)(Fixed and Finished)
6. Better zindex rendering.(Finished)
7. Bell sound effects in water (Suggested by ssdw)(In Progress, looking for "free" SFX)

Change-log:
09/29/2010: Beta released, bugs made known.
09/29/2010: Update, bugfix, new feature sprite drowning.  New bug, sonic drown.
09/30/2010: Major bugfix
10/19/2010: New features, bugfix.
10/20/2010: New feature, [if...then...else]
01/03/2010: Bugfix, New feature: Waves.

Last edited by lunarrush (2011-01-04 16:55:45)

If I knew then what I know now I'd tell you that the story's true.  Cause whatever you do, it comes back to you.  -Slaughter, Burning Bridges

Re: Water (I know it has bugs but I hope they will be fixed soon)

lunarrush wrote:

4. No available code to instantly kill a player, so once drowned
state is hit the player is "hit to death.

add_rings -999
hit_player

Re: Water (I know it has bugs but I hope they will be fixed soon)

SilverstepP wrote:
lunarrush wrote:

4. No available code to instantly kill a player, so once drowned
state is hit the player is "hit to death.

add_rings -999
hit_player

Problem solved and new version posted, thanks SilverstepP.

If I knew then what I know now I'd tell you that the story's true.  Cause whatever you do, it comes back to you.  -Slaughter, Burning Bridges

Re: Water (I know it has bugs but I hope they will be fixed soon)

very nice smile
it would be nice if the player before he is dead gasping for air and a Sound effect (just like the old sonic games).

http://ssdw.nl/forum/getforumpic.php

Re: Water (I know it has bugs but I hope they will be fixed soon)

ssdw wrote:

very nice smile
it would be nice if the player before he is dead gasping for air and a Sound effect (just like the old sonic games).

Lol, 'disable_player_movement + change_animation 'drowning' = on_timeout 2 "Die"....'

It can be done. I may modify this.

Also, combine your three sprs into one. It's much simpler, and all it requires is to put all the data into one file. Same with the objs.

Last edited by SilverstepP (2010-09-29 17:40:37)

Re: Water (I know it has bugs but I hope they will be fixed soon)

lunarrush wrote:
SilverstepP wrote:
lunarrush wrote:

4. No available code to instantly kill a player, so once drowned
state is hit the player is "hit to death.

add_rings -999
hit_player

Problem solved and new version posted, thanks SilverstepP.

Oops, forgot to factor in the shield possibility. x_X Is there any way to remove the shield without damaging the player?

Re: Water (I know it has bugs but I hope they will be fixed soon)

SilverstepP wrote:
lunarrush wrote:
SilverstepP wrote:

add_rings -999
hit_player

Problem solved and new version posted, thanks SilverstepP.

Oops, forgot to factor in the shield possibility. x_X Is there any way to remove the shield without damaging the player?

I'm not sure how to get rid of the fireshield without hitting the player, added this to the list of glitches.
On another note, I did another release which gives characters a drowning animation, however this caused an interesting glitch...

Edit: if you had a previous version of this object, please ensure that you erase all the files from the old version before copying the new files, the sprite sheets and object sheets have been combined in the new version, so failure to erase the old data will result in your game not being able to run.

Last edited by lunarrush (2010-09-29 19:21:45)

If I knew then what I know now I'd tell you that the story's true.  Cause whatever you do, it comes back to you.  -Slaughter, Burning Bridges

Re: Water (I know it has bugs but I hope they will be fixed soon)

ssdw wrote:

very nice
it would be nice if the player before he is dead gasping for air and a Sound effect (just like the old sonic games).

here's one:

http://www.fileden.com/files/2007/6/4/1 … /drown.zip

https://image.ibb.co/kuSYrm/SD_sml.pnghttps://image.ibb.co/kHq8P6/SeD_sml.pnghttps://image.ibb.co/cJf8P6/LTot_W_sml.png

Re: Water (I know it has bugs but I hope they will be fixed soon)

KZR wrote:
ssdw wrote:

very nice
it would be nice if the player before he is dead gasping for air and a Sound effect (just like the old sonic games).

here's one:

http://www.fileden.com/files/2007/6/4/1 … /drown.zip

Ok, added to the object.

If I knew then what I know now I'd tell you that the story's true.  Cause whatever you do, it comes back to you.  -Slaughter, Burning Bridges

Re: Water (I know it has bugs but I hope they will be fixed soon)

KZR wrote:
ssdw wrote:

very nice
it would be nice if the player before he is dead gasping for air and a Sound effect (just like the old sonic games).

here's one:

http://www.fileden.com/files/2007/6/4/1 … /drown.zip

sounds good smile .

http://ssdw.nl/forum/getforumpic.php

Re: Water (I know it has bugs but I hope they will be fixed soon)

Ok, today I did a major bugfix, now the water almost works like it should (see first post).  I have a few bugs left, however I am stumped as to how I'm going to remove those right now.  If any of you have a solution to one of the remaining bugs please let me know.

If I knew then what I know now I'd tell you that the story's true.  Cause whatever you do, it comes back to you.  -Slaughter, Burning Bridges

Re: Water (I know it has bugs but I hope they will be fixed soon)

I found a bug!
if the player jumps and below the jump, the player too little air, he is not dead and the player is no longer moving.

http://ssdw.nl/forum/getforumpic.php

Re: Water (I know it has bugs but I hope they will be fixed soon)

ssdw wrote:

I found a bug!
if the player jumps and below the jump, the player too little air, he is not dead and the player is no longer moving.

I tried to imitate your glitch, however I was unable to make it happen.  Can you please describe what you did in detail so that it can be imitated and I can try to see what is wrong with the code.

If I knew then what I know now I'd tell you that the story's true.  Cause whatever you do, it comes back to you.  -Slaughter, Burning Bridges

Re: Water (I know it has bugs but I hope they will be fixed soon)

Nice object. It will certainly help many users once it gets completed. smile

5. Any char which drowns turns into sonic for a few moments...

You can fix this by reading the cooperative play section of the api reference.

Unfortunately you can't remove the shield of the player without hitting it, but we can add a command for that. smile

Re: Water (I know it has bugs but I hope they will be fixed soon)

lunarrush wrote:
ssdw wrote:

I found a bug!
if the player jumps and below the jump, the player too little air, he is not dead and the player is no longer moving.

I tried to imitate your glitch, however I was unable to make it happen.  Can you please describe what you did in detail so that it can be imitated and I can try to see what is wrong with the code.

Go into the water and keep the space key down.
wait until the player dies.
The bug only occurs if the player sprint up (go up).
if the player dies, but didn't jump up (go up), then try again.

http://ssdw.nl/forum/getforumpic.php

Re: Water (I know it has bugs but I hope they will be fixed soon)

Alexandre wrote:

Nice object. It will certainly help many users once it gets completed. smile

5. Any char which drowns turns into sonic for a few moments...

You can fix this by reading the cooperative play section of the api reference.

Unfortunately you can't remove the shield of the player without hitting it, but we can add a command for that. smile

Quick question, is there any way to do something similar to an [if...then...else] statement in an object?  Currently, when the player hits the drown section of the code I have it switch the player animation to "SD_SONIC" 9.  If I had If...Then...Else statements and an ability to detect which character is currently the observed one then I could have it use different animations.

ssdw wrote:

Go into the water and keep the space key down.
wait until the player dies.
The bug only occurs if the player sprint up (go up).
if the player dies, but didn't jump up (go up), then try again.

This was almost an intended feature, the sprite for drowning was almost meant to be the character's last desperate struggle for oxygen.  I have a couple of ways that this bug could be fixed, however I want to hear from the people who will be using this brick to determine which will be best.
1. Add an enable_player_movement action to the out objects so that if the sprite manages to touch the top before the drowning sequence is finished they will live.
2. Add an unsympathetic state to the water removers, meaning that if the sprite floats out of the water before the drowning sequence is finished the out objects will not be activated.  This will, of course, require a newer version of the object editor, however it may work out for the best.

If you want your input into which method will be used please let me know what you think.  In a few days I will add one of these two solutions to the object depending on what the community wants.

Last edited by lunarrush (2010-09-30 21:16:32)

If I knew then what I know now I'd tell you that the story's true.  Cause whatever you do, it comes back to you.  -Slaughter, Burning Bridges

Re: Water (I know it has bugs but I hope they will be fixed soon)

lunarrush wrote:

Quick question, is there any way to do something similar to an [if...then...else] statement in an object?  Currently, when the player hits the drown section of the code I have it switch the player animation to "SD_SONIC" 9.  If I had If...Then...Else statements and an ability to detect which character is currently the observed one then I could have it use different animations.

Yes, there is. You just need to model these as a state machine.

Re: Water (I know it has bugs but I hope they will be fixed soon)

my preference goes to 1.
because in this way, the player has a chance to live.

http://ssdw.nl/forum/getforumpic.php

Re: Water (I know it has bugs but I hope they will be fixed soon)

I have developed a new version of the water object.  It uses the set_zindex tag, so you will need the latest bleeding edge to use it.  I have also included a bubble maker object which runs on a random timer and produces bubbles which save a player from drowning.  Any input on the new version will be appreciated.  It can be downloaded from the same site as the last version.

Last edited by lunarrush (2010-10-19 16:18:16)

If I knew then what I know now I'd tell you that the story's true.  Cause whatever you do, it comes back to you.  -Slaughter, Burning Bridges

Re: Water (I know it has bugs but I hope they will be fixed soon)

lunarrush wrote:

I have developed a new version of the water object.  It uses the set_zindex tag, so you will need the latest bleeding edge to use it.  I have also included a bubble maker object which runs on a random timer and produces bubbles which save a player from drowning.  Any input on the new version will be appreciated.  It can be downloaded from the same site as the last version.

it gets better and better, I love those bubbles smile .
the machine must be invisible, or was it the intention?
if that so then it might be better to also make an invisible, it can be placed on the floor.
and a sound of the bells is also a good idea for later wink .

http://ssdw.nl/forum/getforumpic.php

Re: Water (I know it has bugs but I hope they will be fixed soon)

Added hide_unless_in_editor_mode tag to the bubbler, now the designer can see it but not the player.

If I knew then what I know now I'd tell you that the story's true.  Cause whatever you do, it comes back to you.  -Slaughter, Burning Bridges

Re: Water (I know it has bugs but I hope they will be fixed soon)

Thanks to SilverstepP for allowing me to study your code, it helped me to make the player's drowning sprite specific to the player.  You can download the latest version which is nearly all that it needs to be to be water from the link in post 1.

If I knew then what I know now I'd tell you that the story's true.  Cause whatever you do, it comes back to you.  -Slaughter, Burning Bridges

Re: Water (I know it has bugs but I hope they will be fixed soon)

I have another big update today.  Yesterday's final release of this project had only one bug, it made all three character's die and this could cause bugs.  Last night, however, I came up with a way to use [if...then...else] statements under the current object creator engine.  If you would like to know how I did it, please study my code.  It is the first four objects, and though it took a while to figure out, it can be used in several different situations.  Just remember to change the name of the objects and the Black box sprite, otherwise if the player has both my object and your object installed they will run into nanoparser errors.

How to use:
1. Place exactly one of the water selector objects in the level in which you intend to use water.  I'm not positive if placing more will cause any strange errors, however I know that if you place too many it will make an enormous amount of objects which generally causes the game to freeze.
2. Place water objects wherever you wish to place them.
3. Ensure that the player touches an "out" object upon leaving the water.

If you would like to see a feature added which is not on the planned features, please request it.

Last edited by lunarrush (2010-10-20 14:27:02)

If I knew then what I know now I'd tell you that the story's true.  Cause whatever you do, it comes back to you.  -Slaughter, Burning Bridges

Re: Water (I know it has bugs but I hope they will be fixed soon)

what are the plans for the future?

edit: because it looks completely

Last edited by ssdw (2010-10-21 15:14:26)

http://ssdw.nl/forum/getforumpic.php

Re: Water (I know it has bugs but I hope they will be fixed soon)

ssdw wrote:

what are the plans for the future?

edit: because it looks completely

Well, the first thing I want to do is add various sound effects and some sort of music which lets you know when the player is about to drown.  The next thing I want to do will probably require a newer version of the object scripting engine, I want to be able to slow down the player while they are in the water.  There are a few other things, such as small bugfixes, however I am also open to any ideas that anybody would like to see implemented with this idea.

I probably won't be working on anything for the water for a while though, I have an idea for a few things I would like to script for Halloweeen, and I would like to have them done in time to release a special level...

Edit: I just made another spritesheet for the blackbox objects, so that they are modular for anybody's use.  If you download the newest version of this object, ensure that you delete any of the old black box objects from your levels before you install the update.  I will include the blackbox with anything it needs that requires it, however I will also provide the blackbox alone on my website.

Last edited by lunarrush (2010-10-22 20:32:37)

If I knew then what I know now I'd tell you that the story's true.  Cause whatever you do, it comes back to you.  -Slaughter, Burning Bridges