Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Doesn't look the same on iOS compared to Desktop — Gideros Forum

Doesn't look the same on iOS compared to Desktop

JohnJohn Member
edited 1:55AM in Bugs and issues
I tried all sort to get this looking the same and I am out of ideas. Any tip on why this might happen.

The issue is the red bit, on the desktop, left hand side image, it is solid red and on the ipad it got some alpha applied to it.

The code base is on the large side and I would not be able to get a repeatable working example. It currently uses mesh for those rectanges.

https://www.sphericalgames.co.uk/images/renderingIssue.png

I wouldn't spend any time on this given I've changed the way it is stored in a sprite. If I get a chance I'll try and reproduce this and provide some example code. I've not touched this in 3 years and it did work back then but something changed since. It also flashes when filling shapes, I can live with that, that effect never happened before and doesn't happen on mac desktop version.

Comments

  • JohnJohn Member
    I had another attempt to fix this correctly. I cannot be 100% sure without creating minimum code to prove this is the issue, because there is a lot more code involved and it could easily be something else involved, but it is something along the lines of….

    local mesh = Mesh.new()
    mesh:setAlpha(0.5) << Remove this and it is solved.


    Initialise mesh...
    mesh:setVertex(...
    mesh:setIndex(...
    mesh:setColor(...


    Somewhere later on….

    If (some flag setting….)
    mesh:setAlpha(1) <<< Does not work. Well it does on my Mac but not work on iOS devices
    end
  • MoKaLuxMoKaLux Member
    edited 6:38PM
    you may want to use https://wiki.gideros.rocks/index.php/Mesh:setColor

    Something along the lines:
    for i = 1, #self._ia do -- the mesh index array
    	self:setColor(i, color, alpha or 1) -- (i,color,alpha)
    end
    I believe in your case, you can replace #self._ia by 4 since your mesh should have 4 vertices?
    for i = 1, 4 do -- the mesh index array
    	mesh:setColor(i, color, alpha or 1) -- (i,color,alpha)
    end
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
  • JohnJohn Member
    edited 8:57PM
    I didn't put full code there it is stripped down of what I have and it is just there for reference. There is a loop in my code. If you go to my home page {Deleted Link} you can watch the video of this game - All those lines and shapes aren't using the shape API or images.

    It is using the mesh class to draw them instead. I am doing it this way in order to have antialias lines. I've created a line/shape editor along with a key frame animator for this game.

    I've not touched this game for 3 years and only got around to buy the iOS developer license this week. Last time I saw it running on iOS was 3 years ago it was working and I haven't touched the source code since then.

    It is not important given I've found a work around.

    I'll delete the link in 24 hours so it does not look like I am promoting my site.

    Likes: MoKaLux

    +1 -1 (+1 / -0 )Share on Facebook
  • MoKaLuxMoKaLux Member
    edited 8:46PM
    looks pretty nice and seems fun to play 😉
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
Sign In or Register to comment.