gfxgfxFreeBASIC Games Directory Forumgfxgfx
gfx gfx
gfx
Welcome, Guest. Please login or register. October 15, 2018, 10:15:10 AM

Login with username, password and session length
14.10.2018 - We are currently running a game dev competition with a 300 USD first prize, up until 14th of January, 2019. Check the official competition thread here: http://games.freebasic.net/forum/index.php?topic=623.0
gfx
gfx
*
gfxgfx
gfxgfx gfxgfx
gfxgfx Home Help Search Login Register   gfxgfx
gfx gfx
gfx
Pages: [1]
Print
Author Topic: Numbers  (Read 2554 times)
Pritchard
Global Moderator
Forum Howler
*****
Posts: 158



View Profile Email
« on: September 15, 2014, 11:18:45 AM »

dim shared as string textSequence
dim shared as string currentLetter
dim shared as integer currentLetterAsc = 0
dim shared as integer currentDelay = 0
dim shared as integer numberDelay = 400
dim shared as integer periodDelay = 300
dim shared as integer lowerLetterDelay = 65
dim shared as integer upperLetterDelay = 100
dim shared as integer spaceDelay = 65
dim shared as integer exclamationDelay = 500
dim shared as integer colonDelay = 500
dim shared as integer quoteDelay = 30
dim shared as integer hyphenDelay = 30
dim shared as integer equalsDelay = 50

function getDelay( byval characterAsc as integer ) as integer
    var currentDelay = 0
   
    select case currentLetterAsc
    case ASC("a") to ASC("z")
            currentDelay = lowerLetterDelay
        case ASC("A") to ASC("Z")
            currentDelay = upperLetterDelay
        case ASC(" ")
            currentDelay = spaceDelay
        case ASC("!")
            currentDelay = exclamationDelay
        case ASC(":")
            currentDelay = colonDelay
        case ASC("1") to ASC("0")
            currentDelay = numberDelay
        case ASC("'")
            currentDelay = quoteDelay
        case ASC(!"\"")
            currentDelay = quoteDelay
        case ASC(".")
            currentDelay = periodDelay
        case ASC("-")
            currentDelay = hyphenDelay
        case ASC("=")
            currentDelay = equalsDelay
    end select
   
    return currentDelay
end function

sub printTextSequence( byval textSequence as string)
    for i as integer = 0 to len(textSequence) - 1
        currentLetterAsc = textSequence[i]
        currentLetter = chr(currentLetterAsc)
        print currentLetter;
       
        currentDelay = getDelay( currentLetterAsc )
        sleep currentDelay, 1
    next
end sub

sub printTextSequenceLine( byval textSequence as string, byval lineDelay as integer = 1000)
    printTextSequence(textSequence)
   
    sleep lineDelay, 1
    print ""
end sub

printTextSequenceLine(!"Power supply from remote source detected.....")
printTextSequenceLine(!"Initiating protocols.....")
printTextSequenceLine(!"WARNING!  END USER MUST BE PRESENT TO COMPLETE SEQUENCE INITIATION!")
printTextSequenceLine(!"Initiating sequence:")
printTextSequenceLine(!"3...", 500)
printTextSequenceLine(!"2...", 500)

var textInput1 = ""
while( len(inkey) > 0 )
wend
input ; "", textInput1
if( textInput1 <> "1") then
    printTextSequenceLine(!"What?  Are you stupid or something?")
    sleep
    end
end if

printTextSequenceLine(!"...", 300)
printTextSequenceLine(!"!!! SEQUENCE INITIATED !!!", 1500)
printTextSequenceLine(!"!!! WARNING !!!", 500)
printTextSequenceLine(!"!!! SEQUENCE INITIATED !!!", 1500)

printTextSequenceLine(!"--- WARNING ---", 500)
printTextSequenceLine(!"All life forms should leave the habitable zone immediately.")
printTextSequenceLine(!"REPEAT:  All life forms, immediately exit the habitable zone.")
printTextSequenceLine(!"--- END WARNING ---", 500)

printTextSequenceLine(!"== Destination (In Order of Solar Distance) ==")
printTextSequenceLine(!"0 = Sol")
printTextSequenceLine(!"1 = HSIV Beta")
printTextSequenceLine(!"2 = Mercury")
printTextSequenceLine(!"3 = Venus")
printTextSequenceLine(!"4 = Earth")
printTextSequenceLine(!"5 = Mars")
printTextSequenceLine(!"6 = Jupiter")
printTextSequenceLine(!"7 = Saturn")
printTextSequenceLine(!"8 = Uranus")
printTextSequenceLine(!"9 = HSIV Alpha II")
printTextSequenceLine(!"10 = Neptune")
printTextSequenceLine(!"11 = HSIV Alpha I")

var textInput2 = ""
while( len(inkey) > 0 )
wend
input ; "", textInput2

printTextSequenceLine(!" You selected: " & textInput2 & ", ""Some Planet"".", 1500)

PRINT ""
PRINT "THANK YOU FOR PLAYING THE ULTRA-TEASER."
PRINT "GOOD BYE!"
PRINT ""
sleep
Logged
Lachie Dazdarian
Double dipper
Administrator
Forum Sage
*****
Gender: Male
Posts: 1264


lachie13
View Profile WWW Email
« Reply #1 on: September 21, 2014, 02:40:20 PM »

Not sure what you are trying to say with this teaser. Care to elaborate?
Logged

"Things like Basic and Free Basic provide much-needed therapy and a return to sanity and a correct appreciation of people. The arrogant folk really hate a word like 'Basic' - fine, and good riddance." ~ pragmatist
Pritchard
Global Moderator
Forum Howler
*****
Posts: 158



View Profile Email
« Reply #2 on: September 21, 2014, 06:55:02 PM »

You type in numbers and hit enter to play.  It was supposed to be my entry for the Numbers competition.  This is a seriously, awesomely watered down version of what I wanted to do, but I don't think I'll ever finish a game.

A Barren/Myst/Dystopian type of console puzzle game, but everything is numbers.  All of the puzzles.  I had some ideas going for where I was going to take this, but I feel as though I've spoiled enough already just with the teaser.  (Even though I probably didn't).  I only posted because it currently seems like there's no hope of me finishing within my lifetime.
« Last Edit: September 21, 2014, 06:56:25 PM by Pritchard » Logged
Lachie Dazdarian
Double dipper
Administrator
Forum Sage
*****
Gender: Male
Posts: 1264


lachie13
View Profile WWW Email
« Reply #3 on: September 21, 2014, 11:10:54 PM »

I know that. I was just saying that I'm getting very little from the teaser, which kind beats its purpose.

I guess it supposed to be Myst type of adventure game? With math puzzles? Text only?
Logged

"Things like Basic and Free Basic provide much-needed therapy and a return to sanity and a correct appreciation of people. The arrogant folk really hate a word like 'Basic' - fine, and good riddance." ~ pragmatist
Pritchard
Global Moderator
Forum Howler
*****
Posts: 158



View Profile Email
« Reply #4 on: September 22, 2014, 07:43:51 AM »

Yes.
Logged
Pritchard
Global Moderator
Forum Howler
*****
Posts: 158



View Profile Email
« Reply #5 on: September 22, 2014, 08:02:58 AM »

Yes.
But to clarify, not the normal type of math puzzles.  There would be a clear connection between what is going on (aka words, letters, numbers, even "typing speeds") and the numbers.
Logged
Pages: [1]
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines
Cerberus design by Bloc
Valid XHTML 1.0! Valid CSS!
gfx
gfxgfx gfxgfx