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 - Moru

Looks promising, has auto-tiling like rpg-maker and is open source.
Just in case someone has this problem again.

My daughter wanted to play around with GLBasic and created a project. She is of the younger generation that never had problems with native characters in filenames (åäö for example). We spent a few minutes searching errors and testing old projects before I saw what the name of the project was :-)

So, if you get this error message:

Please create first.

Make sure that your project name does not contain any funny characters. For safety reasons stay with A-Z,.-_ and numbers. :-)
Off Topic / Shaders
Would this be useful as a basis for learning shaders to use in GLBasic?
Discord seems to have some way to integrate games with game lobby functionality now. Mabe worth a look for multiplayer games too?

QuoteRich Presence allows you to leverage the totally overhauled "Now Playing" section in a Discord user's profile to help people play your game together. Rich game data—including duration, score, current boss or map, and so much more—lives inside Discord. You can spectate a friend's game directly from their profile popout, or party up via beautiful chat embeds with real-time information about open party slots and the party's in-game status. No more exchanging usernames and friend codes, or wondering if there's room for you to join. Rich Presence is a living invitation to play together, or to watch your friends kick butt.
Another bad vulnerability, check your linux-derivative devices, bug precent for 20 years...

Now the period comes that everyone was saying 20 years ago. Linux is only secure because not enough users to make it worthwhile to hack it. Now since every phone, server and router is running it, it's a very nice target.
Something to be aware of. Make sure your users don't get upset with you or your games :-)
Can ENCRYPT$ be made to return binary data instead of a string encoded as hexadecimal?
Can DECRYPT$ be made to accept this binary string data too?

If I'm not totally mistaken, this would lower the storage/transfer space by 50%.
Sure I can convert the hexadecimal string back to binary but this takes time and for a network application on a slow computer I would like to stay away from this :-)
Guess what? I just got my Pandora! And now I want to get something running from GLBasic. I could use some tutorial for dummies I guess. So far I have managed to compile into .pnd file format. First compile seems to always create a .pnd file that contains a PXML.xml-file that contains no data (0 size). Second compile usually manages to get the PXML.xml-file unharmed. On transfer to Pandora the file still does not show up even though I put it in /pandora/desktop/.

Only once I managed to get it to show up with the GLBasic logo as icon on desktop but I can't recreate this. And besides, it still didn't launch. None of the above files launch even if I search them out in the file explorer and start them from there. I see no logfiles in /tmp/ where they usually show up after launching a pnd file.

Any ideas/help is appreciated! :-)
There can be too much to choose from. What is the best Android regarding compatibility with GLBasic? 2D/3D?
I'm having troubles using long URL´s. When I get close to 1024 I sometimes get  "*** Unhandled exception ***" in the debug window.

This code always leads to this at output-line 950:

Code (glbasic) Select
// --------------------------------- //
// Project: netwebget_url_length
// Start: Sunday, November 20, 2011
// IDE Version: 10.159

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

LOCAL start = 910
LOCAL url$ = "/highscores/index.php/data/put/"

FOR n = 0 TO start
url$ = url$+"A"

FOR n = start TO 1024
url$ = url$ + "a"
ok$ = NETWEBGET$("", url$, 80, 5000)
DEBUG " Result: " + ok$ + "\n"

My computer runs Windows XP 32 bit.

QuoteThis is a coding competition for Caanoo, Wiz, Pandora and Dingoo's Dingux developers. With this competition we hope to generate more awesome homebrew games for our favorite consoles and our beloved communities. We hope you join and help us bring these communities together in ways never before seen.
This competition is in the spirit of community. As such, you are required to join up with one of your fellow developers / artist / coder / sound / composer / game-designer / magician etc. to create something as a team. We hope this will result in a lot of "artist/coder needed for my awesome idea" threads on the boards and people will help each other out. Remember, you can submit several entries, so your talent could be shared between teams as well.
I'm having troubles splitting strings on NULL, CHR$(0). I always end up with only the first part of the string.

Code (glbasic) Select
LOCAL a$, count, array$[]

a$ = "one"+CHR$(0)+"two"+CHR$(0)+"three"

count = SPLITSTR(a$, array$[], CHR$(0), FALSE)

DEBUG "fields: " + count + "\n"

FOREACH b$ IN array$[]
DEBUG " ["+b$ + "]\n"


fields: 1

fields: 3

How do I use the transparency correctly when making sprites with mem2sprite? I try with 0x00 and 0x0f and I only get 1 bit transparency. 0-14 makes 100% transparent, 15-255 makes 100% non-transparent. I thought it would be 8 bit? What am I missing?

Code (glbasic) Select

GLOBAL sprite%[]
GLOBAL abgr%, r, g, b, a
GLOBAL mx, my, b1, b2
DIM sprite[100*100]

FOR n = 0 TO 16
DRAWRECT RND(800), RND(600), RND(800), RND(600), RGB(RND(255), RND(255), RND(255))

FOR y = 0 TO 99
FOR x = 0 TO 99
abgr = bOR(ASL(x, 24), 0xffffff)
sprite[x + y * 100] = abgr
MEM2SPRITE(sprite[], 1, 100, 100)
MOUSESTATE mx, my, b1, b2

DRAWSPRITE 1, mx, my


I needed a simple syslog for work so I figured I would look into what is needed. Turns out it's realy simple, less than 5 min and I have something simple running :-)

This code will wait for messages on port 514 (or whatever you specify) and log them all to a file and print on screen. The program should be made as console application for output too work but can be made as a normal program too, if you rewrite the text putput.

Code (glbasic) Select
// --------------------------------- //
// Project: Syslog
// Start: Monday, July 26, 2010
// IDE Version: 8.036

GLOBAL sock%               // The socket connection
GLOBAL port% = 514        // Port number to use

LOCAL ok%, ip%, rv%, msg$

log("Receiving on UDP-port " + port)

ok = SOCK_INIT()    // Init network
IF ok
    sock = SOCK_UDPOPEN(port)    // Get the socket so we can recieve on the port
    IF sock <> -1
        WHILE rv <> -1
            rv = SOCK_RECV(sock, msg$, 1024)
            IF rv>0 THEN log("message recieved: ["+msg$+"]")
            IF rv=-1
                log(NETGETLASTERROR$())     // Didn't work, tell user why
            SLEEP 10

FUNCTION log: str$
LOCAL ok%, id%

    STDOUT "\n"+str$
    id = GENFILE()
    ok = OPENFILE(id, "syslog.log", -1)
    IF ok
    WRITELINE id, "\n"+str$
Can't believe I didn't see this until now but UCASE and LCASE does not handle international characters. Any chance of a fix or should I do it myself? :-)
Bug Reports / Editor glitch
There is no keyboard shortcut for "redo". Menu lists it as the same as "undo".
Code (glbasic) Select
DEBUG "hello"

This no longer makes the compiler complain, it used to, right? No showstopper, just caused some confusion tonight :-)