SuperTux Bug Tracker
SuperTux logo


View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000524supertuxGame Enginepublic2009-11-27 10:212012-09-08 05:27
Reporterocto 
Assigned Toocto 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
Platformx86_64 (AMD64, 64-bit)OSLinuxOS Version2.6
Product Version 
Target VersionFixed in Version0.3.3 
Summary0000524: [PATCH] Fading TileMaps may change solidity of the TileMap.
DescriptionWhen the alpha value of a layer is changed to > .75, the solid flag will be set. When the alpha value of a layer is changed to < .25, the slid flag is cleared. This prevents hiding background / foreground layers at the beginning of the level and display them as a result to some action of the player.
Steps To Reproduce* Create a tilemap MyTileMap with solid=false, alpha=0.0
* Call MyTileMap.fade(1.0, $seconds) or MyTileMap.set_alpha(1.0)
Additional InformationThe attached patch introduces the notion of "real" and "effective" solidity: "real" solidity is not effected by the alpha value, "effective" solidity is. The level designer and the ->set_solid method set the "real_solid" property, the "effective_solid" property is based on the current alpha value. A layer is reported to be solid by ->is_solid if (real_solid && effective_solid) evaluates to true.
TagsAttachedFiles
Fixed in GIT revision
Fixed in subversion revision6342
Attached Filespatch file icon supertux-tileset-solid-alpha.patch [^] (4,899 bytes) 2009-11-27 10:21 [Show Content]
patch file icon supertux-tileset-solid-alpha-r6249.patch [^] (4,217 bytes) 2010-01-12 02:10 [Show Content]
patch file icon supertux-tileset-solid-alpha-r6254.patch [^] (4,629 bytes) 2010-01-15 08:00 [Show Content]
patch file icon supertux-tileset-solid-alpha-r6341.patch [^] (4,523 bytes) 2010-02-21 00:09 [Show Content]

- Relationships

-  Notes
(0001446)
octo (administrator)
2010-01-12 02:11

Updated patch for SVN revision 6249.
(0001452)
MMlosh (administrator)
2010-01-12 12:09

seems like a good idea to me.. tilemaps defined as not-solid shouldn't turn solid

curiosity: what happens to speed_x and speed_y when paralax tilemap gets solid this way?
(0001453)
mattmccutchen2 (administrator)
2010-01-12 12:50

It looks like parallax tilemaps will have real_solid == false, so they can never become solid no matter what alpha is.

Better question: are there any known levels that use the scripting interface to tilemap alpha (originally introduced in r4956)? None of the levels in the current SVN use it.
(0001455)
octo (administrator)
2010-01-12 13:07

I wanted to use this in a level, that's how I stumbled upon this: When a switch is activated, the entire level shall turn from ice to wood - this includes background and foreground layers. With the current implementation (i.e. without the patch) this is not possible because my background becomes solid.
(0001456)
mattmccutchen2 (administrator)
2010-01-12 13:22

Of course. I wasn't thinking. What I meant to ask was, are there any levels that rely on the effective solidity feature? The levels in the SVN don't, because they don't use the scripting interface and I just checked that all the fade-tilemaps for secret areas have (solid #f). Maybe we could just remove the feature.
(0001459)
octo (administrator)
2010-01-15 08:00

Updated the patch: One occurrence of the "solid" member variable had been forgotten.
(0001460)
octo (administrator)
2010-01-15 08:06

I don't think this patch will cause any problems with secret areas: When the alpha value drops below a certain level the tilemap will become non-solid, like before.

It might be necessary to adapt levels which activate a tilemap at a later point, for example a bridge that is faded in due to a button being pressed. Previously, the tilemap would automatically get solid. With the patch, the tilemap has to be defined with (solid #t). I'm not aware of any levels using this, though.
(0001702)
octo (administrator)
2010-02-21 00:17

Since no level currently in SVN uses the TileMap.fade() method, I think this patch can't do any harm. It's applied to SVN. If you experience any problems, please feel free to reopen this bug.

- Issue History
Date Modified Username Field Change
2009-11-27 10:21 octo New Issue
2009-11-27 10:21 octo File Added: supertux-tileset-solid-alpha.patch
2010-01-12 02:09 octo Issue Monitored: octo
2010-01-12 02:10 octo File Added: supertux-tileset-solid-alpha-r6249.patch
2010-01-12 02:11 octo Note Added: 0001446
2010-01-12 12:09 MMlosh Note Added: 0001452
2010-01-12 12:50 mattmccutchen2 Note Added: 0001453
2010-01-12 12:54 mattmccutchen2 Issue Monitored: mattmccutchen2
2010-01-12 13:07 octo Note Added: 0001455
2010-01-12 13:22 mattmccutchen2 Note Added: 0001456
2010-01-15 08:00 octo File Added: supertux-tileset-solid-alpha-r6254.patch
2010-01-15 08:00 octo Note Added: 0001459
2010-01-15 08:06 octo Note Added: 0001460
2010-02-21 00:09 octo File Added: supertux-tileset-solid-alpha-r6341.patch
2010-02-21 00:09 octo Status new => assigned
2010-02-21 00:09 octo Assigned To => octo
2010-02-21 00:17 octo Fixed in subversion revision => 6342
2010-02-21 00:17 octo Note Added: 0001702
2010-02-21 00:17 octo Status assigned => resolved
2010-02-21 00:17 octo Resolution open => fixed
2010-03-07 02:13 octo Status resolved => closed
2010-03-07 02:13 octo Fixed in Version => 0.3.3
2012-09-08 05:27 superdev Tag Attached: AttachedFiles


Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker