Howdy, Stranger!

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

Texting with a digital girlfriend

edited April 2015 in Code Sharing Posts: 167

Something I whipped up at school during an hour of free time and bug fixed at home.
http://pastebin.com/LP66nfdL

Tagged:

Comments

  • Posts: 2,042

    =))

  • edited April 2015 Posts: 2,042

    You might want to try something using tables like this, so it is easier to designate the response to a certain message:

    -- texting
    
    -- Use this function to perform your initial setup
    function setup()
        girls = {
            "Trisha",
            "Maria",
            "Stacy",
            "Piper"
        }
        messages = {
            { you = "Let's break up.", girl = {
                "Ok, I understand. :(",
                "Why! We were so happy! :("
            } },
            { you = "Come over to my house, i'm having a party.", girl = {
               "Sure, I'll come around 6.",
               "Sounds like fun! I'll be there :)"
            }},
            { you = "Don't keep a secret from me, I watch you sleep at night.", girl = {
                "That's kind of creepy...",
                "Uhh... That's a little weird for me.."
            }}
        }
    
        girl_chosen = girls[math.random(1, #girls)]
    
        print("Now chatting with: " ..girl_chosen)
    
        you = false
        parameter.action("Send a message", function() messager() end) 
        parameter.action("Ditch girl", function() ditch() end)
    
        print("Girl: Hey babe!")
    end
    
    -- This function gets called once every frame
    function draw()
        -- This sets a dark background color 
        background(40, 40, 50)
    end
    
    function messager()
        local chosen = messages[math.random(1, #messages)]
    
        print("You: " .. chosen.you)
    
        local girl = chosen.girl[math.random(1, #chosen.girl)]
        print("Girl: " .. girl)
    end
    
    function ditch()
        restart()
    end
    
  • Posts: 167

    Wow, the texts you put in look so more realistic.

  • Posts: 167

    Lol, I'm probably the youngest coder on this app. I'm in my very early double digits so, I've never had a girlfriend (yet, someone likes me LOL)

  • Posts: 167

    I'll copy your code and do an update. I'm gonna add more texts.

  • Posts: 835

    This reminds me a lot of Clever Bot, man, that guy was random! =))

  • Posts: 289

    make an ai gf

  • Jmv38Jmv38 Mod
    edited April 2015 Posts: 3,295

    i thought i'll make a male chauvinist pig comment, but i eventually decided not to...
    ;-)

  • Posts: 167

    Maby I'll add a girl's face on the screen (by god all means, it's gonna be hot, not scarring)

  • edited April 2015 Posts: 835

    @code_maker, why not make text bubbles?

  • Posts: 289

    add a girl's expression´╝čsmile happy angry´╝č

  • Posts: 167

    Ok. I will look for some images for that (they will be appropriate and hot.)

Sign In or Register to comment.