Recent Posts

Pages: 1 [2] 3 4 ... 10
11
GLBasic - en / Question...
« Last post by Snoopy on 2019-May-17 »
I don't have the power to make a poll, so I ask :

Are you interested in a version of this beautiful language (but with a little more advanced possibilities, especially in 3D) only for Mac, Linux and Windows but not on mobile?

Thank you for your answers.
12
Competitions / Re: GLBasic Contest 02: 2D Art
« Last post by dreamerman on 2019-May-16 »
@WPShadow - for me sounds ok.

@Snoopy - true console mode sounded original, we can have this earlier or later and another contest with limitations for only SetPixel.
For moment I was thinking that we are limited to standard console colors but:

main file
Code: GLBasic [Select]
// project -> options -> console program
LOCAL i1%, i2%
FOR i2 = 0 TO 15
        FOR i1 = 0 TO 15
                ConsoleSetColor(i1, i2)
                STDOUT "test"
        NEXT
        STDOUT "\n"
NEXT
KEYWAIT
second file
Code: GLBasic [Select]
IMPORT "C" int __stdcall GetStdHandle(int nStdHandle)
IMPORT "C" int __stdcall SetConsoleTextAttribute(int hConsoleOutput, int wAttributes)

FUNCTION ConsoleSetColor: fg_color%, bg_color%
        LOCAL console_handle% = GetStdHandle(-11)
        SetConsoleTextAttribute(console_handle, bg_color% * 16 + fg_color%)
ENDFUNCTION

only question is how fast console window can be refreshed, and some functions to print at selected X,Y position would be also usefully.
Another thing is that you need to have idea for demo that would fit into console/text mode nicely, this may be an issue for me hehe... :D
13
Announcements / Re: Geek Audiobook out now!
« Last post by MrPlow on 2019-May-16 »
If anyone claims the codes please post to let others know :)
14
Off Topic / Re: Shaders
« Last post by dreamerman on 2019-May-15 »
Was it this topic? I think that there was also another one, but maybe not started by You, it had shaders included as sources not as attachments (that are now unavailable). Still this topic also gives some important info :)
15
Off Topic / Re: Shaders
« Last post by Hemlos on 2019-May-15 »
hmm oh ya, i started this thread when i started playing with the shaders in glb

https://www.glbasic.com/forum/index.php?topic=3148.msg22927#msg22927

note: its 10 years old thread with some relevent information tho, however, i dont know if the code still works the same.
gernot helped share some important info there too
16
Off Topic / Re: Shaders
« Last post by dreamerman on 2019-May-15 »
Already available shaders can be some base if you need basic/simple effects, only issue is that they are scattered on different forum threads.
Helmos I saw that topic some time ago but forgot to mark it, and now I can't find it :D
17
Imho if You want to delete elements by index/id in basic type array (int, float, string) and want to preserve elements position do something like this:

Code: GLBasic [Select]
// compile in Debug mode

GLOBAL myarray%[], elems2del%[], i1%, i2%, txt$
DIM myarray%[0]
DIM elems2del%[0]

SEEDRND 1
txt$ = ""
FOR i1 = 0 TO 20
        i2 = RND(100)
        DIMPUSH myarray[], i2
        INC txt$, i2 + ", "
NEXT
txt$ = LEFT$(txt$, LEN(txt$) - 2)

DEBUG txt$ + "\n"


DIMDATA elems2del[], 7, 14, 9   // or use DimPush
SORTARRAY elems2del[], 0        // ascending order

FOR i1 = LEN(elems2del[]) - 1 TO 0 STEP -1
        DIMDEL myarray[], elems2del[i1]
NEXT


txt$ = ""
FOR i1 = 0 TO LEN(myarray[]) - 1
        INC txt$, myarray[i1] + ", "
NEXT
txt$ = LEFT$(txt$, LEN(txt$) - 2)

DEBUG txt$ + "\n"


END

For dealing with UDT's I use 'toDelete%' flag, or approach similar to this, separate array with indexes to delete - depending on game logic, and if I don't need to preserve elements order just do elem[del_id] = elem[len[elem]-1], dec elem_count -> as this should be faster than multiple dimdel/push on large arrays.
18
GLBasic - en / Re: Remove a number (integer) out of an array
« Last post by Moru on 2019-May-14 »
Use DELETE inside a FOREACH loop.

Type "DELETE" in the editor and press F1 and then ENTER. Gives you the manual with a nice example how to do it:

Code: GLBasic [Select]
// Make an array of numbers
DIMDATA a[], 3,4,5,  12,13,  6

// Enumerate the numbers
FOREACH num IN a[]
   // throw out numbers bigger than 10, and continue
   IF num>10 THEN DELETE num
   a$=a$ + num + ", "
NEXT
PRINT a$, 0,0

SHOWSCREEN
MOUSEWAIT


 
19
GLBasic - en / Re: Message to Kitty
« Last post by spacefractal on 2019-May-14 »
the above should pretty been more automatic to detect the version with Android Studio..... But its not a priotiy by now and im will close this topic.
20
GLBasic - en / Re: Android Studio Progress......
« Last post by spacefractal on 2019-May-14 »
Howover the editor in Android Studio has a bit too much auto correction im cant disable, which annoying me quite a bit and backspace does not do what excpeted (curser often move up intead deleting).

Howover assest loading do now works again and tilt hopefully works again. Also GameInputAPI code im have did will break combatible and needs a update to get it working. But the official JOY commands should also works throught as well KEY() commands (which im choosen to change them to a float rather than int, which allways have annoying med, property due back in the iOS game controller days).

So its a nice progress, even the help documents is require updating and Android Studio is HUGE! Howover its doess seen Android Studio automatic download the eventuelly missing files and combonents in a project.

Admob as well inapp purchase wont been in this first release, so dont bugger me with that. Its better to get thing working again. But admob should been pretty easy to reimplements again throught as we now can use the newest google services api again, which can improve the stability a lots.

Im & Gernot have still not integrate the project to glbasic yet, but its a nice progressing throught.

Just to note, Android TV is supported and Fire TV should been supported out of the box as well (as long you does not uses Google Service for those devices), and you have full access to the source code for Android version. There is no So libs used this time, that is include glbasic source code its self. Of course landscape suppot is required.

Im do havent take a look into Ouya as well gameStick. Ouya was such a great test console prior to Android TV really. Here the Ouya SDK is required to been implemented, which im think should do that as a own project really.

The project is still works on a Android 5.1 emulator and on a Android 8 phone as im have, so api 16 would been the minimumsdk required while im currectly using api 28 as target sdk (Android 9). Arm 32, 64 + Intel 32+64 bit should all been supported (the emulator im uses is Intel based). So the future 64bit requirements would not been a issue.
Pages: 1 [2] 3 4 ... 10