Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Kitty Hello

Pages: [1] 2 3 ... 36
1
Announcements / GLBasic v15
« on: 2017-Aug-04 »
Hi,

I'm presenting you v15 - codename "Unicorn" (because unicorns sell!).

After some nights of coding and I present you a new version of the SDK. Mainly the debugging was improved, but also KEYWAIT and other issues were fixed.
I wanted to implemet serializtion for types, but it was a bit too much work for now.

Usually, I wanted to have an upgrade fee for this version, since the web-server costs are currently not covered by the GLBasic sells. But I gave up this idea, because it would be too complicted to implement. Maybe some day later.
But if anyone likes the new debugger and wants to donate some upgrade fees, I'm going to say "thank you"  <3.

You can find a link for the donate button on:
http://www.glbasic.com/main.php?site=paypal

2
Announcements / GLBasic old SDK versions
« on: 2017-Aug-04 »
Current is always at:
http://www.glbasic.com/files/glbasic_sdk.exe

Archive:
http://www.glbasic.com/files/glbasic_sdk-v14.exe
http://www.glbasic.com/files/glbasic_sdk-v12.exe

Edit by Space Fractal
my Mirror to the Archive v12 + v14, includning newest Android Extras and iOS10 projects:
http://www.spacefractal.com/glbasic/

Let me know for older versions of glbasic, im happy to host them as archive. This is my way to donate bandwidth for Gernot. Im later upload v15 as well.

3
With Hemlos' lib you can interpolate spline curves, if you know the control points. http://www.glbasic.com/forum/index.php?topic=3839.msg28012#msg28012
I continued this and will generate the control points for a polygonal line, so the curve touches all your input points in order.

See the example - just click points with your mouse, the spline will be generated interactively.

It's very useful to generate racing tracks or curves for cars that follow a route.

4
Off Topic / Forum spams my email inbox
« on: 2017-May-20 »
I get dozents of mails like below now. Is there anything I can do?

The mail system

<xxxxsuperlate22@gmail.com>: host gmail-smtp-in.l.google.com[64.233.184.26]
    said: 550-5.1.1 The email account that you tried to reach does not exist.
    Please try 550-5.1.1 double-checking the recipient's email address for
    typos or 550-5.1.1 unnecessary spaces. Learn more at 550 5.1.1
    https://support.google.com/mail/?p=NoSuchUser z133si25218144wmb.39 - gsmtp
    (in reply to RCPT TO command)

5
Off Topic / Christmas about to terminated
« on: 2016-Dec-24 »
Have you seen Santa Connor?

6
Announcements / New website
« on: 2016-Nov-19 »
I updated the website to a more modern html5/css3 layout. Eas the best I could come up with :(
I hope it also works for mobile now.

7
Code Snippets / IRC chat protocol / ChatBot
« on: 2016-Oct-30 »
Here is a basic framework for an IRC chat bot. I hope to use this for a clinet/server application one day.... Just have to deal with "flood posting" errors.

Code: GLBasic [Select]
// --------------------------------- //
// Project: IRC
// Start: Sunday, October 30, 2016
// IDE Version: 14.401


// SETCURRENTDIR("Media") // go to media files


IRC_connect("irc.freenode.org", "Chatbot", "glbasic")


IRC_send("I'm a bot ask me something")

WHILE TRUE
//      LOCAL msg$ = STDIN$()
        LOCAL what$, sender$, text$
        IF IRC_recv(what$, sender$, text$)
                STDOUT "From: "+sender$+": what:" + what$+" text:"+text$+"\n"
        ENDIF
        IF what$="NOTICE"
                IRC_send(sender$ + ", ask me anything but " +text$)
       
        ENDIF



WEND



GLOBAL gIRC_sock%=-1
GLOBAL gIRC_nick$
GLOBAL gIRC_channel$
GLOBAL gIRC_server$
FUNCTION IRC_connect%: server$, nick$, channel$

        SOCK_INIT()
        gIRC_sock% = SOCK_TCPCONNECT(server$, 6667)
        IF gIRC_sock%=-1
                STDOUT "Error - connect\n"
                STDOUT NETGETLASTERROR$()+"\n"
        ENDIF
        SOCK_SETBLOCKING gIRC_sock%, TRUE

        LOCAL what$, sender$, text$
        gIRC_nick$ = nick$
        gIRC_channel$ = channel$
        gIRC_server$ = server$

//      SOCK_TCPSEND(gIRC_sock%, "PASS *\r\n")
        SOCK_TCPSEND(gIRC_sock%, "NICK " + nick$+"\r\n")
        IRC_recv(what$, sender$, text$)
        SLEEP 2000
        IRC_recv(what$, sender$, text$)
        SOCK_TCPSEND(gIRC_sock%, "USER " + nick$+" 8 * :"+nick$+" v1.0 (glbasic.com)\r\n")
        IRC_recv(what$, sender$, text$)

       
        STDOUT "**** JOIN *****\n"
        IRC_recv(what$, sender$, text$)

//      SOCK_TCPSEND(gIRC_sock%, "QUIT\r\n")

//      SOCK_TCPSEND(gIRC_sock%, "PRIVMSG NickServ register password test@gmail.com\r\n")

        SOCK_TCPSEND(gIRC_sock%, "JOIN #"+channel$+"\r\n")

        SOCK_SETBLOCKING gIRC_sock%, FALSE
        STDOUT "**** reading *****\n"

ENDFUNCTION


FUNCTION IRC_send%: text$

        SOCK_TCPSEND(gIRC_sock%, "PRIVMSG #"+gIRC_channel$+" :"+text$+"\r\n")

ENDFUNCTION



FUNCTION IRC_parse%: BYREF msg$, BYREF what$, BYREF sender$, BYREF text$
        LOCAL cmd$ = LEFT$(msg$, 4)
        IF cmd$ = "PING"
                STDOUT "pong:"+MID$(msg$, 5)+"\n"
                SOCK_TCPSEND(gIRC_sock%, "PONG "+MID$(msg$, 5) + "\r\n")
        ENDIF

// message
// :KungPhoo!~kungphoo@p548E4C59.dip0.t-ipconnect.de PRIVMSG #glbasic :test

// private message
// :KungPhoo!~kungphoo@p548E4C59.dip0.t-ipconnect.de NOTICE Chatbot :xxx

// KunhPhoo joined
// :KungPhoo!~kungphoo@p548E4C59.dip0.t-ipconnect.de JOIN #glbasic

// KungPhoo left
// :KungPhoo!~kungphoo@p548E4C59.dip0.t-ipconnect.de PART #glbasic

// Chatbot quit
// :Chatbot!~Chatbot@p548E4C59.dip0.t-ipconnect.de QUIT :Ping timeout: 268 seconds

// KungPhoo kicked Chatbot
// :KungPhoo5!~kungphoo@p548E4C59.dip0.t-ipconnect.de KICK #MinionsDomain Chatbot :KungPhoo5

// Excess flooding:
// ERROR :Closing Link: Chatbot by dreamhack.se.quakenet.org (Excess Flood)

        IF LEN(msg$)
                LOCAL tok$[]
                SPLITSTR(msg$, tok$[], " ")
               
                IF LEN(tok$[]) > 2
                        LOCAL who$[]
                        SPLITSTR(tok$[0], who$[], ":!")
                        IF LEN(who$[]) THEN sender$ = who$[0]
                       
                        LOCAL pos% = INSTR(msg$, ":", 1) + 1
               
                        // Message
                        IF tok$[1] = "PRIVMSG"
                                what$ = "MSG"
                                text$ = MID$(msg$, pos)
                                RETURN TRUE
                        ENDIF

                        // whisper
                        IF tok$[1] = "NOTICE"
                                what$ = "NOTICE"
                                text$ = MID$(msg$, pos)
                                IF sender$ = gIRC_server$
                                        STDOUT "Msg from server: "+msg$+"\n"
                                        RETURN FALSE // skip them
                                ENDIF
                               
                                RETURN TRUE
                        ENDIF
               
                        IF tok$[1] = "JOIN"
                                what$ = "JOIN"
                                text$ = MID$(msg$, pos)
                                RETURN TRUE
                        ENDIF
                       
                        IF tok$[1] = "KICK" AND LEN(tok$[])>3 AND tok$[3]=gIRC_nick$
                                STDOUT "*** got kicked ***\n"
                                tok$[1]="QUIT"
                                sender$ = gIRC_nick$
                       
                       
                        ENDIF

                        IF tok$[1] = "PART" OR tok$[1] = "QUIT"
                                what$ = "QUIT"
                               
                                IF sender$ = gIRC_nick$
                                        STDOUT "*** RECONNECT ***\n"
                                        SOCK_TCPSEND(gIRC_sock%, "JOIN #"+gIRC_channel$+"\r\n")
                                ENDIF
                               
                                RETURN TRUE
                        ENDIF
               
                ENDIF
               
        ENDIF

ENDFUNCTION




FUNCTION IRC_recv%: BYREF what$, BYREF sender$, BYREF text$

        what$=""
        sender$=""
        text$=""


        IF gIRC_sock% =-1 THEN RETURN FALSE
        STATIC msg$
        msg$=""
        SOCK_RECV(gIRC_sock%, msg$, 8*1024)
        IF NOT LEN(msg$) THEN RETURN FALSE

        LOCAL rv% = FALSE
        LOCAL tok$[]
        SPLITSTR(msg$, tok$[], "\r\n")
        FOREACH t$ IN tok$[]
                IF IRC_parse(t$, what$, sender$, text$)
                        rv%=TRUE
                        STDOUT t$+"\n"
                ENDIF
        NEXT
       
        RETURN rv%
ENDFUNCTION

 

8
Off Topic / MSPaint 3D
« on: 2016-Oct-27 »
You read right. MSPaint gets an update so you can make 3D objects.
Please post some news here when you have a preview version. Especially the file format is interesting.

9
Show Off / GigaMan
« on: 2016-Oct-01 »
This little jump&run is a port of one of my old Amiga games I wrote back in the 90s.
It's to show what the new version of GACK will be able to produce.

10
Announcements / Update
« on: 2016-Aug-17 »
This fixes the libPNG issue for the play store and also brings support for IPv6.

11
Excellent. Can you send me the changes made to the GLBasic code? I found you have a new function: float AndroidFloatCode(int skey)
Where do you use it?

Also, I can't seem to load some resources. And I don't seem to be able to write to DOCUMENTS (Android 6.0 here).

I get:
07-20 21:53:15.807 13711 13739 I glbasic : /data/data/com.glbasic.gacknonfree/files/Media/projects/version.txt
07-20 21:53:15.807 13711 13739 I glbasic : /storage/emulated/0/Documents/GACK/version.txt

12
Code Snippets / Wildcard string compare/search
« on: 2016-Apr-22 »
Code: GLBasic [Select]

LOCAL pp% = WildcardTextCompare("abcdefg", "*d*g*") // returns "3" -> where the "d" is




// case sensitive!
IMPORT int WildcardTextCompare(const char*, const char*)


INLINE
// #NEED find first non* character match
//---------------------------------------------------------------//
// This function compares text strings, one of which can have wildcards ('*').
// http://www.drdobbs.com/architecture-and-design/matching-wildcards-an-algorithm/210200888
// GF: improved version
// returns 0..x -> position of first non wildcard character
//         -1   -> no match
//---------------------------------------------------------------//
int WildcardTextCompare(
        const char* pTameText,             // A string without wildcards
        const char* pWildText              // A (potentially) corresponding string with wildcards
        )
{
        const char* pOrigTame=pTameText;
        const char* pFirstMatch=NULL;
        int bMatch = TRUE;
        const char* pAfterLastWild = NULL; // The location after the last '*', if we’ve encountered one
        const char* pAfterLastTame = NULL; // The location in the tame string, from which we started after last wildcard
        char t, w;

        // Walk the text strings one character at a time.
        for(;;)
        {
                t = *pTameText;
                w = *pWildText;

                // How do you match a unique text string?
                if (!t)
                {
                        // Easy: unique up on it!
                        if (!w)
                        {
                                break;                                   // "x" matches "x"
                        }
                        else if (w == '*')
                        {
                                pWildText++;
                                continue;                           // "x*" matches "x" or "xy"
                        }
                        else if (pAfterLastTame)
                        {
                                if (!(*pAfterLastTame))
                                {
                                        bMatch = FALSE;
                                        break;
                                }
                                pTameText = pAfterLastTame++;
                                pWildText = pAfterLastWild;
                                continue;
                        }

                        bMatch = FALSE;
                        break;                                           // "x" doesn't match "xy"
                }
                else
                {
                        if(!pFirstMatch && w==t)
                                pFirstMatch = pTameText;
                        // How do you match a tame text string?
                        if (t != w)
                        {
                                // The tame way: unique up on it!
                                if (w == '*')
                                {
                                        pAfterLastWild = ++pWildText;
                                        pAfterLastTame = pTameText;
                                        w = *pWildText;

                                        if (!w )
                                        {
                                                break;                           // "*" matches "x"
                                        }
                                        continue;                           // "*y" matches "xy"
                                }
                                else if (pAfterLastWild)
                                {
                                        if (pAfterLastWild != pWildText)
                                        {
                                                pWildText = pAfterLastWild;


                                                w = *pWildText;

                                                if (t == w)
                                                {
                                                        pWildText++;
                                                }
                                        }
                                        pTameText++;
                                        continue;                           // "*sip*" matches "mississippi"
                                }
                                else
                                {
                                        bMatch = FALSE;
                                        break;                                   // "x" doesn't match "y"
                                }
                        }
                }

                pTameText++;
                pWildText++;
        }

        if(bMatch)
        {
                if(pFirstMatch)
                        return (int)(pFirstMatch-pOrigTame); // return position of first match
                return 0; // match at first character
        }
        return -1; // no match
}
ENDINLINE

 

13
Announcements / GLBasic V14
« on: 2015-Aug-13 »
The cleanup process is coninuing. The new v14 will be the next platform that will get long-time support.
This time the setup only contains the Win32 compilers, but with all headers. You can get the platform packages, that YOU need.
Each of the packages is able to compile the GLBasic source code, thus it's easy to start adding new platforms if you dare or help me fix problems.

The folder structure is a lot clearer now, I think you get the idea easily.

The news:
PRESCALER (read the manual) offers you a way to bring your Caanoo games to Android with one line of code: PRESCALER 320,240 // done!

Also for TYPEs, each TYPE has a function dbg(), that uses DEBUG to print all type variables.

Furthermore, I fixed a few bugs. Also for v12! Get the update if you don't want to try v14.

14
GLBasic - en / Windows 8 / Multitouch
« on: 2015-Jun-12 »
Hi,

does this work? It works for mouse input. I don't have a Win8 tabalet with touchscreen.

15
Off Topic / Amiga disc to adf
« on: 2015-Feb-21 »
Hi
at mom's attic, I found a bunch of old Amiga discs with games I once programmed. Does anyone here have the tools to create disk file or copy the data to a PC? It's about 10 discs that are of interest.

Gesendet von meinem GT-N7100 mit Tapatalk


Pages: [1] 2 3 ... 36