User Tag List

Results 1 to 8 of 8

Thread: Replace Colour RGB on iOS

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module
    Diablohead's Avatar
    Join Date
    Jun 2006
    Posts
    478
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Replace Colour RGB on iOS

    I don't know if this is related to beta 3 I have installed right now or just how it works but I am using the replace colour option at the start of frame event to change some shades on my characters clothing, on the pc it works fine (apart from a very minor pause while it does the changes) but on iOS it seems only change the first colour in the event, and only for the animation playing at the time, so once my character starts running the colours in that animation are not changed on iOS.

    Is this a limit or just how it works with the exporter? If I set the replace colour event to loop on the pc it really slows the game down and I expect it to do the same on iOS so that would not be a work around.

    I have only just started to use this over the week so never knew about the limits until now.

  2. #2
    Clickteam Clickteam
    Anders's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, ┼rhus
    Posts
    3,455
    Mentioned
    2 Post(s)
    Tagged
    1 Thread(s)
    It should still work the same as on PC so you are welcome to send an example file to me to show the problem.

    The iOS runtime is hardware accelerated and that has some interesting quirks when it comes to replacing the color. iOS doesn't keep the images in normal RAM - it is all on the graphics card. It can't keep images in RAM because of memory constraints.

    When you call the 'replace color' action it has to:
    1) Add the color to the list of colors to replace for that paticular active object
    2) Reload the image from the .cci file into system RAM
    3) Replace all the colors in the list
    4) Reupload the image to the graphics card as a texture
    5) Delete the image from RAM again (or you get memory warnings)

    As you can see that is a lot of work for something that is simple to do in a normal software accelerated runtime. There you simply just keep the images in RAM and replace the colors as you go.

    A problem with the HWA version of the color replacement:
    It would be a very bad idea to program a color-cycle using the color replacement as the list of colors to replace just gets faster and faster. To be 100% compatible with the PC runtime I have to replace the colors in the same order from scratch.

    One thing we could do to speed it up is to let the iOS runtime keep sprites in system memory that has their colors replaced but users need to be very careful with this option as you can run into memory problems quick (if your sprites are big or have many animation frames and directions). I do not know if such a change is worth it if people just run into memory problems later.

    Another method you can use for clothing colors is to set the RGB blending color of them (if they are seperate actives). Then you can turn them into any color you want without any speed penalty. To set the RGB blending color at runtime you need to set the graphics mode to Direct3D 8 or 9 so that it enables some of the HWA features for the iOS runtime.

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module
    Diablohead's Avatar
    Join Date
    Jun 2006
    Posts
    478
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you for explaining in detail Andos, always interesting to know how things work.

    So does this mean I need to set an event for each animation change for iOS or it should be automatic?

  4. #4
    Clickteam Clickteam
    Anders's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, ┼rhus
    Posts
    3,455
    Mentioned
    2 Post(s)
    Tagged
    1 Thread(s)
    It is automatic We aim to make the runtimes work exactly the same no matter the platform.

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module
    Diablohead's Avatar
    Join Date
    Jun 2006
    Posts
    478
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello again Andos, after playing around all day with this and trying things like a pause before colour swapping, separate events per colour on the same sprite etc I am still having problems, only one colour will change and only on the base animation which is Stopped.

    I can't send you my exact game file as it's rather big and had now over a year of work put into it but I can make an example mmf file showing the problem.

  6. #6
    Clickteam Clickteam
    Anders's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, ┼rhus
    Posts
    3,455
    Mentioned
    2 Post(s)
    Tagged
    1 Thread(s)
    That would be great, thanks
    I do prefer small example files over huge games (much faster to debug)

  7. #7
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export Module
    craigeatscrayons's Avatar
    Join Date
    Jan 2014
    Posts
    47
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Was this ever resolved? I really need to find out what to do about this, my game really depends on the replace colour action and I can't find help on this anywhere.

  8. #8
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    JoeRoth12's Avatar
    Join Date
    Feb 2013
    Location
    California
    Posts
    55
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm also having this issue. Color change only affects Stopped animation. Some of the colors aren't replaced with the correct color, either. Has anyone come up with a good workaround?

Similar Threads

  1. replace colour pretty definitely doesnt work on droid
    By Harry))) in forum Android Export Module Version 2.0
    Replies: 9
    Last Post: 3rd September 2015, 03:35 PM
  2. Replace colour RGB not working?
    By butterfingers in forum iOS Export Module Version 2.0
    Replies: 5
    Last Post: 11th June 2012, 09:23 AM
  3. Bug Report - RGBat and Replace colour
    By MattEsch in forum Android Export Module Version 2.0
    Replies: 0
    Last Post: 20th May 2011, 01:27 PM
  4. Replace colour
    By Nick in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 17th February 2007, 03:49 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •