Recent Posts

Pages: [1] 2 3 ... 10
1
GLBasic - en / Re: Anyone got code for a 3D(or flat) Hexagon?
« Last post by Snoopy on Today at 12:08 AM »
A 3D hexagon (or hexagonal prism) is just a particular cylinder.
If you use this function with slices=6, you normally get a hexagonal prism (I have not tested).

CreateCylinder(0,  16, 16, 16,  6, 1,  RGB(255, 0, 0))

Code: GLBasic [Select]

FUNCTION CreateCylinder: num, baseRadius, topRadius, height, slices, stacks, col
LOCAL da, r, dr, dz, x, y, z, i, j
LOCAL x1, y1, x2, y2
        da = 360 / slices
        dr = (topRadius-baseRadius) / stacks
        dz = height / stacks

        X_AUTONORMALS 2
        X_OBJSTART num
        FOR i=0 TO slices-1
                x1 = COS(i*da)
                y1 = SIN(i*da)
                x2 = COS((i+1)*da)
                y2 = SIN((i+1)*da)
                z = 0
                r = baseRadius

                // Bottom lid
                IF baseRadius>0
                        X_OBJADDVERTEX 0, 0, 0,  .5, .5, col
                        X_OBJADDVERTEX x1*r, y1*r, 0, x1/2+.5, y1/2+.5, col
                        X_OBJADDVERTEX x2*r, y2*r, 0, x2/2+.5, y2/2+.5, col
                        X_OBJNEWGROUP
                ENDIF
                // side
                FOR j=0 TO stacks
                        X_OBJADDVERTEX x2*r, y2*r, z, (i+1)/slices,  j/stacks, col
                        X_OBJADDVERTEX x1*r, y1*r, z,  i   /slices,  j/stacks, col
                        z = z+dz
                        r = r+dr
                NEXT
                // Top lid
                IF topRadius>0
                        X_OBJNEWGROUP
                        X_OBJADDVERTEX x2*r, y2*r, height, x2/2+.5, y2/2+.5, col
                        X_OBJADDVERTEX x1*r, y1*r, height, x1/2+.5, y1/2+.5, col
                        X_OBJADDVERTEX 0, 0, height,  .5, .5, col
                ENDIF
                X_OBJNEWGROUP
        NEXT
        X_OBJEND
ENDFUNCTION

 
2
GLBasic - en / Re: GLBasic
« Last post by Snoopy on Yesterday at 11:28 PM »
currectly im heard he is more focus on the HTML5/Javascript port, which is ace. Its a platform that got more more supported by various devices. Etc easier to ports really.
Hmm, I remember we talked a lot about this famous HTML5/Javascript port  ;)
Like you, I always thought it was the best and simplest solution (although for 3D, there will be big difficulties).
3
GLBasic - en / Re: GLBasic
« Last post by spacefractal on Yesterday at 02:10 PM »
we let see what happens, its would been cool :-).
4
GLBasic - en / Re: GLBasic
« Last post by bigsofty on Yesterday at 01:50 PM »
Good to hear Gernot!  :booze:
5
GLBasic - en / Re: GLBasic
« Last post by spacefractal on Yesterday at 10:11 AM »
currectly im heard he is more focus on the HTML5/Javascript port, which is ace. Its a platform that got more more supported by various devices. Etc easier to ports really.

Currectly im did not do so much glbasic or used a competer. Has been focus on various Spectrum Next projects such,
6
Announcements / Re: TH_AVOCADO MAYHEM
« Last post by Snoopy on Yesterday at 12:12 AM »
Damn! How did I miss this? :|
Thanks (late) for this discovery Bigsofty, I didn't know at all.

Thank you Bigsofty's daughter :)
7
GLBasic - en / Re: GLBasic
« Last post by Snoopy on 2019-Oct-12 »
In fact, I'm still afraid that Gernot can not continue or worse, that he gives up because of the lack of interest of new users (I really thought that the Steam version would attract more new users, and maybe Gernot too).
This is also one of the reasons why I launched a 3D demo (yes I know, a lot of delay :P the return of the holidays is more difficult than expected at my job), hoping to show with this demo all the power, despite its simplicity at first glance, of GLBasic to motivate new users.

In any case, it's very good news that everything works for new servers :good:
8
Announcements / Re: New Version - Android Support
« Last post by spacefractal on 2019-Oct-12 »
please note:

Android 5.X and below is not supported for Android Studio version of glbasic. The app can run, but you can run into issues. Etc PNG, JPG and SOUND is not working for those platforms. This is property due change of a newer compiler. Im have not seen issues with Android 6 throught, but if you see glbasic bugs in those Android versions, submit them :-).

API 23 is required.
9
To been clear:
Android 5 is very hard to get working in Android Studio and will currectly not to to get it working again as threre too many issues. So please do NOT ask me about Android 5.0 issues as im will skip it and delete them in the future. If its should beenfixed, im/Gernot will let you know.

But if there is some issues in Android 6+ etc, let me know of course. Android is strange beast, so there is allways some issues.

So API23 (Android 6.0+) is required as minimum with Glbasic and Android Studio!
10
GLBasic - en / Re: Android - has anyone tried yet?
« Last post by spacefractal on 2019-Oct-12 »
learn Java, hehe. Im did do some java games back in about 20 years ago or such. Acticity is a little bit strange on Android, but property do have better time in this week.

Howover what im seen is its a issue with the newer compiler used with libpng, but no idea how to fix as im dont know hot to do a error handing. In Android Studio 3.5.1, the SDL Sound does no longer works, which seens to been a bug in the emulator? Im do easy can skip it as im did as SDL Sound is actuelly not important and eventuelly could use SoundPool instead.

Howover we dont have all those grandle update issues as im previous sat in 3.5.0 at all. Took some time, but was no problem when first finished updated.

!!! Btw for Android 5.0, PNG, JPG and SOUND does NOT work for Android 5.X !!!
The app can do run !!! Have not seen issues yet with API23+
Pages: [1] 2 3 ... 10