Menu

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.

Show posts Menu

Topics - Kitty Hello

#21
I've got good news and bad news. Good news first.

Compiling for Android no longer is a pain (for you). The kids got older and I start finding some more time for GLBasic, slowly. Spacefractal and me, we took the long route to recreate the Android build totally from scratch. Starting with a new template project based on SDL2, we adjusted and expanded this project to include all the GLBasic sources and thus compile all stuff only using Android Studio, now.
Then, we wrote a program in GLBasic, that prepares and updates this project in your project's distribute folder and starts Android Studio for you.
You just press "run" and really, you project runs on the emulator or your connected device.
You need help with some Android specific stuff? Google/Stack Overflow answers will perfectly work for your problem.
Joypads were always a pain on Android. Spacefractal remapped them for you. You can produce KEY() codes and/or GETJOY... codes.
The Android TV remote control? Works out of the box.
Google requires your native code (NDK) to be built for several platforms, now. (x86, ARM64, ...). It's all done for you. Even the SDL2 code gets compiled, so we can bring important updates just in time. Even YOU can do this - you are completely in control of your project. We're ready for any changes Google requires from us in the future.
The update will be on Steam, soon.

Which takes me to the bad news.
GLBasic V16 will from now on only be available on Steam. If you don't have a Steam version yet, please consider getting one. It's cheaper than the V1-V15 original versions, and honestly, you got free updates until now from day one. That is nineteen years! Do you know any other software, like that?
See, many game devs using GLBasic made more money with their games, than I did with GLBasic. I am happy about that. GLBasic gave me good money to always buy testing hardware and keep the servers running. It still is - don't worry. But it was always a hobby, never a commercial success. That might be, because I'm an engineer, not a business man. And that's often what makes a great product, isn't it.
So, if you want to support me further, get the Steam version. Otherwise be welcome to stay here with your V15 support.
Also, if you are on a social network, don't hessitate to post what you did with GLBasic or what you like about it. I, again, am not good at that kind of stuff.
#22
The attached GLBasic project creates all assets required for your STEAM page.
You just replace the files "banner.png", "logo.png" and "font.png" with your stuff and in the source change the app$.
It will proportionally scale the banner background, add the logo at the left side and scale the app name to the right side for the capsule graphics.
That's handy, ain't it!?

Updated. Uses ReSampler lib for high quality images and a DDgui.

#23
OK. after another sleepless night, I can print to the bluetooth printer on windows. (V16 will feature this).
http://www.glbasic.com/forum/index.php?topic=11212.0

I kept it quite abstract, so you can talk to any bluetooth device and it should be fully cross platform.
Also, you can use the COM interfaces to talk to RS232 devices with this library. I use parts of the LGPL library from http://bitalino.com/
#24
Folks, I'm so amazed about my new gadget. A thermal printer (see attached image).

I've got GLBasic code running, that can send a sprite image to that printer via bluetooth on your Android device. (You can use the BT library to talk to any bluetooth device, btw.)

For the competition you get a few functions in a library and this test project:
Code (glbasic) Select

LOADSPRITE "Media/test.png", 101

LOCAL printer_pixels_width% = 384 // must be editable by user. Default = 384
DitherSprite(101, printer_pixels_width) // id%, cut_width%

// Show the dithered image - you can save or use that for debugging/preview
DRAWSPRITE 101,0,32
SHOWSCREEN


// List all paired BT devices - user must pick one from the list
LOCAL devs$[]
BT_ListDevices(devs$[])

// connect to one of the string in devs$[]
BT_connect("BlueTooth Printer")

// do print the image pixels
BT_print_image(101)

// close connection
BT_close()

// some more paper and cut (if device lets you do this)
BT_FeedPaperAndCut()

MOUSEWAIT


You will also get a function to pick a picture from camera or from the gallery.

The BlueTooth-Library attached is cross-platform and can talk to any BlueTooth device with raw data streams.



That's all you need. Now join the competition and write a software for that printer with the given functions. A demo project is attached. It might not compile for Android, but the function names wil stay as they are. I did tests and all is working great. Ready? Set? GO!

Do samething amazing. Something creative. Something funny. Something that makes one want to get such a printer.

The 1st prize is such a printer. Shiny new device, sparkling on your table, purring in your pocket.
2nd to 3rd price: Printer paper

Competition ends at March, 1st 2019.

PS.Spread the word - I'm not very connected in social media anymore  :good:

Edit - See my test project and the final libraries attached.

#25
https://play.google.com/store/apps/details?id=com.glbasic.wumbo

Should be free for a frew days. I'd welcome you to put a positive feedback on the play store :)
#26
Bug Reports / Android crash
2018-May-18
This time it's me :(

I have one app that runs perfectly, and one that does not even start:

05-18 16:35:16.670 12570 12570 E AndroidRuntime: FATAL EXCEPTION: main
05-18 16:35:16.670 12570 12570 E AndroidRuntime: Process: com.glbasic.bobbleheads, PID: 12570
05-18 16:35:16.670 12570 12570 E AndroidRuntime: java.lang.UnsatisfiedLinkError: dlopen failed: library "libcutils.so" not found
05-18 16:35:16.670 12570 12570 E AndroidRuntime:        at java.lang.Runtime.loadLibrary0(Runtime.java:989)
05-18 16:35:16.670 12570 12570 E AndroidRuntime:        at java.lang.System.loadLibrary(System.java:1562)
05-18 16:35:16.670 12570 12570 E AndroidRuntime:        at org.libsdl.app.SDLActivity.<clinit>(SDLActivity.java:259)
05-18 16:35:16.670 12570 12570 E AndroidRuntime:        at java.lang.Class.newInstance(Native Method)
05-18 16:35:16.670 12570 12570 E AndroidRuntime:        at android.app.Instrumentation.newActivity(Instrumentation.java:1079)
05-18 16:35:16.670 12570 12570 E AndroidRuntime:        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2591)
05-18 16:35:16.670 12570 12570 E AndroidRuntime:        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2766)
05-18 16:35:16.670 12570 12570 E AndroidRuntime:        at android.app.ActivityThread.-wrap12(ActivityThread.java)
05-18 16:35:16.670 12570 12570 E AndroidRuntime:        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1507)
05-18 16:35:16.670 12570 12570 E AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:102)
05-18 16:35:16.670 12570 12570 E AndroidRuntime:        at android.os.Looper.loop(Looper.java:154)
05-18 16:35:16.670 12570 12570 E AndroidRuntime:        at android.app.ActivityThread.main(ActivityThread.java:6236)
05-18 16:35:16.670 12570 12570 E AndroidRuntime:        at java.lang.reflect.Method.invoke(Native Method)
05-18 16:35:16.670 12570 12570 E AndroidRuntime:        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:891)
05-18 16:35:16.670 12570 12570 E AndroidRuntime:        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:781)


What could that be?

Edit: removing -lcutils in platforminfo.txt fixed the problem. But... why did it work in the first project?
#27
FAQ / Forum Access Password
2018-May-05
** EN
Since 2018-05-05, new users are only allowed to join and post at the forums, after a purchase. You will get the access code in the email with your registration code.
Background: 1) I have to pay for the servers and 2) the spam flood was immense.

** DE
Seit 2018-05-05 ist es neuen Benutzern nur gestattet sich im Forum anzumleden und zu schreiben, nach einem Kauf. Den Zugangscode (Forum Access Code) erhält man dann in der Registrierungs-E-Mail.
Begründung: 1) Ich muss für den Server bezahlen und 2) die Spam-Flut war immens.
#28
The attached library can load converted TTF fonts and render them in real time. This gives the option to dynamically scale fonts and use colours.
I've not done any performance tests on mobile devices, yet.

I also attached a tiny command line program that generates the font from your installed ttf files in windows.
Just run:
TTF-create.exe arial
and it will create an arial.glbvf file (GLBasic Vector Font).
Characters 33 to 255 are supported. The font must be available as C:\Windows\Fonts\****.ttf

#29
Announcements / GLBasic v15
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
#30
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

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.
#31
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.
#32
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)
#33
Have you seen Santa Connor?
#34
Announcements / New website
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.
#35
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

#36
Off Topic / MSPaint 3D
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.
#37
Show Off / GigaMan
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.
#38
Announcements / Update
2016-Aug-17
This fixes the libPNG issue for the play store and also brings support for IPv6.
#39
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
#40
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