Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

Emojis again

in General Posts: 1,226

@Simeon - I was about to start seeing if I could transfer a program from the iPad with Codea to my Mac or PC. The program uses emojis and I have a table of emojis that I use on my Codea project. I transferred the file to my PC by exporting as a Zip and unzipped to load the files into an editor. There I noticed that the table data consists of a number of non-alphanumeric characters which you can’t relate to the emojis directly. Are emoji classifications universal? Would it be possible to load emojis on another system from a Codea data table?

If not I need to totally re-think my approach. May have a few emoji ideas to feed back soon, busy trying to finish my current project now.

Tagged:

Comments

  • edited July 9 Posts: 1,226

    All - just a brief piece of code to demonstrate the benefits of emojis in Codea.

    I tried posting this directly as code but ran into a problem in that the markdown editor showed the post correctly but as soon as I tried to post the entry it corrupted the post. So I have included a picture with the small piece of code I used to demonstrate what I found with emojis in Codea.

    You may have found this before so if you have please ignore this post. But, previous examples with emojis posted in the forum used control characters to include the emojis. I found that a little tedious to use. So I tried building a table with emojis added between inverted commas like text. Then addressing the emoji needed via the table and it’s index. It worked.

    So I have now built up a table containing all the emojis available to Codea from the editor - which means I can now address all the emojis in the table with its index and —- use it as a dependency. Or you can make a small table up of selections, like the example code in the attached image, as a table within your code.

    All you need now is a way to convert vector images into emojis and the world is your oyster.

  • dave1707dave1707 Mod
    Posts: 7,605

    @Bri_G Trying to have emoji's in the forum code doesn't work very well.

  • Posts: 1,226

    @dave1707 - yeah, found that out pretty quick but the code is small and shows how to build the table up - easy peas!!!

  • dave1707dave1707 Mod
    edited July 11 Posts: 7,605

    @Bri_G Here some code that will show you the value of emoji's. Bring up the emoji keyboard and tap on one of them. It shows the size, the values, and the emoji. The largest one I found was 28 values long.

    displayMode(FULLSCREEN)
    
    function setup()
        showKeyboard()
        fill(255)
    end
    
    function draw()
        background(94, 83, 31, 255)    
        if keyVal~=nil then
            fontSize(120)
            text(keyVal,WIDTH/2,HEIGHT-250)
            fontSize(12)
            str=""
            for z=1,#keyVal do
                str=str..string.byte(string.sub(keyVal,z,z)).." "
            end
            text(str,WIDTH/2,HEIGHT-100)
            text("size  "..#keyVal,WIDTH/2,HEIGHT-50)
        end
    end
    
    function keyboard(key)
        keyVal=key  
    end
    
  • Posts: 1,226

    @dave1707 - interesting, most of the simpler ones are size 4. It's when you get the family pictures with images of up to four people that the numbers go up. Also the numbers in those cases repeat - say two mums and two kids give two sets of 4 numbers - I think this must be coordinate data from vector images and may be due to different layers in a vector image.

Sign In or Register to comment.