BASIC

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

Pages: [1] 2 3 ... 6
1
Off Topic / Shaders
« on: 2019-May-13 »
Would this be useful as a basis for learning shaders to use in GLBasic?

https://news.ycombinator.com/item?id=19895218

2
Off Topic / Discord - Multiplayer join games
« on: 2017-Nov-11 »
Discord seems to have some way to integrate games with game lobby functionality now. Mabe worth a look for multiplayer games too?

https://discordapp.com/rich-presence

Quote
Rich 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.

4
Another bad vulnerability, check your linux-derivative devices, bug precent for 20 years...

http://soylentnews.org/article.pl?sid=14/09/25/0010205

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.

5
Something to be aware of. Make sure your users don't get upset with you or your games :-)

http://soylentnews.org/article.pl?sid=14/09/19/133213

6
GLBasic - en / ENCRYPT$ output binary data?
« on: 2013-Nov-21 »
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 :-)

7
GLBasic - en / Pandora - compile
« on: 2012-Dec-11 »
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! :-)

10
GLBasic - en / Best Android for GLBasic?
« on: 2011-Nov-27 »
There can be too much to choose from. What is the best Android regarding compatibility with GLBasic? 2D/3D?

11
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/"
LOCAL ok$

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

FOR n = start TO 1024
        url$ = url$ + "a"
        DEBUG LEN(url$)
        ok$ = NETWEBGET$("gamecorner.110mb.com", url$, 80, 5000)
        DEBUG " Result: " + ok$ + "\n"
        SHOWSCREEN
NEXT
 


My computer runs Windows XP 32 bit.

12
http://www.riotdigital.com/ttcc2011/

Quote
This 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.

13
Bug Reports / SPLITSTR and NULL \0
« on: 2011-Mar-26 »
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"
NEXT

END
 

Result:
fields: 1
 [one]

Expected:
fields: 3
 [one]
 [two]
 [three]


14
GLBasic - en / MEM2SPRITE and transparency
« on: 2011-Mar-15 »
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
ALPHAMODE 0.9
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))
NEXT
USEASBMP

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

        DRAWSPRITE 1, mx, my

        SHOWSCREEN
WEND
 

15
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
                SOCK_CLOSE(sock)
            ENDIF
            SLEEP 10
        WEND
    ELSE
        log(NETGETLASTERROR$())
    ENDIF
ELSE
    log(NETGETLASTERROR$())
ENDIF
KEYWAIT



FUNCTION log: str$
        LOCAL ok%, id%
       
    STDOUT "\n"+str$
    id = GENFILE()
    ok = OPENFILE(id, "syslog.log", -1)
    IF ok
            WRITELINE id, "\n"+str$
            CLOSEFILE id
        ENDIF
ENDFUNCTION
 

Pages: [1] 2 3 ... 6