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

Pages: [1] 2 3 ... 13
1
GLBasic - de / Compile Zeit
« on: 2019-Aug-10 »
Hallo zusammen,

ist es nur bei mir so, dass das Compilieren ewig dauert auch bei kleinen Programmen?
Ich bin auf der Steam-Version unterwegs...
Ein Programm wie:

Code: GLBasic [Select]
TYPE Blub
        Bla% = 10
        FUNCTION Blabla:
                RETURN self.Bla
        ENDFUNCTION
ENDTYPE


LOCAL b AS Blub


WHILE TRUE


        PRINT b.Bla, 20, 20


SHOWSCREEN
WEND
END
 

braucht 12 - 14 Sek...
Das ging mal alles um einiges schnell oder nicht?

2
Now it's time for the next step of GLBasic!

GLBasic v16 hit the Steam-Market right now.
And thats not all:

Gernot decided to give the lowered price (from ~70€ to ~42€) a -50% discount!
You can get the Steamversion for 20.99€ right now (till 14th of January)

Steamlink: https://steamcommunity.com/app/819510/





3
Bug Reports / WinCE compile errors!
« on: 2017-Dec-31 »
Hi, WinCE is broken?

This is the compile-Output:

Code: GLBasic [Select]
*** Configuration: WINCE ***
precompiling:
GPC - GLBasic Precompiler V.14.721 SN:fb943093 - 3D, NET
Wordcount:4 commands
compile+link:
/cygdrive/Q/Compiler/platform/WinCE/Lib/libGLBasicWinCE.a(OpenGLRainbows.o)(.text+0x4334):OpenGLRainbows.cpp: undefined reference to `sinf'
/cygdrive/Q/Compiler/platform/WinCE/Lib/libGLBasicWinCE.a(OpenGLRainbows.o)(.text+0x4340):OpenGLRainbows.cpp: undefined reference to `cosf'
/cygdrive/Q/Compiler/platform/WinCE/Lib/libGLBasicWinCE.a(Rainbows3D.o)(.text+0x4a58):Rainbows3D.cpp: undefined reference to `tanf'
/cygdrive/Q/Compiler/platform/WinCE/Lib/libGLBasicWinCE.a(Rainbows3D.o)(.text+0x7214):Rainbows3D.cpp: undefined reference to `tanf'
/cygdrive/Q/Compiler/platform/WinCE/Lib/libGLBasicWinCE.a(Rainbows3D.o)(.text+0x7644):Rainbows3D.cpp: undefined reference to `cosf'
/cygdrive/Q/Compiler/platform/WinCE/Lib/libGLBasicWinCE.a(3DMath.o)(.text+0x520):3DMath.cpp: undefined reference to `acosf'
/cygdrive/Q/Compiler/platform/WinCE/Lib/libCxImageWinCE.a(pngread.o)(.text+0x324):pngread.c: undefined reference to `ExitProcess'
/cygdrive/Q/Compiler/platform/WinCE/Lib/libCxImageWinCE.a(pngerror.o)(.text+0x38):pngerror.c: undefined reference to `ExitProcess'
/cygdrive/Q/Compiler/platform/WinCE/Lib/libCxImageWinCE.a(pngerror.o)(.text+0x108):pngerror.c: undefined reference to `ExitProcess'
/cygdrive/Q/Compiler/platform/WinCE/Lib/libCxImageWinCE.a(pngwrite.o)(.text+0xa74):pngwrite.c: undefined reference to `ExitProcess'
/cygdrive/Q/Compiler/platform/WinCE/Lib/libCxImageWinCE.a(pngset.o)(.text+0x68):pngset.c: undefined reference to `lstrlenA'
/cygdrive/Q/Compiler/platform/WinCE/Lib/libCxImageWinCE.a(pngset.o)(.text+0xc4):pngset.c: undefined reference to `lstrlenA'
/cygdrive/Q/Compiler/platform/WinCE/Lib/libCxImageWinCE.a(pngset.o)(.text+0x164):pngset.c: undefined reference to `lstrlenA'
/cygdrive/Q/Compiler/platform/WinCE/Lib/libCxImageWinCE.a(pngset.o)(.text+0x540):pngset.c: undefined reference to `lstrlenA'
/cygdrive/Q/Compiler/platform/WinCE/Lib/libCxImageWinCE.a(pngset.o)(.text+0x71c):pngset.c: undefined reference to `lstrlenA'
/cygdrive/Q/Compiler/platform/WinCE/Lib/libCxImageWinCE.a(pngset.o)(.text+0x8d8):pngset.c: more undefined references to `lstrlenA' follow
*** FATAL ERROR - Bitte die Compiler-Ausgabe ins Forum kopieren
_______________________________________
*** Fertig ***
Dauer: 3.7 sek. Zeit: 11:32
Erstellen: 0 erfolgreich.
*** 1 FEHLGESCHLAGEN ***

4
GLBasic - en / Visual Studio Code possible?
« on: 2017-Dec-30 »
Hi there,

did anyone tried to run GLB with Visual Studio Code ?

5
GLBasic - de / MOVED: 2 Bugs
« on: 2017-Nov-10 »

6
Off Topic / Twitch API v5 anyone have a clue?
« on: 2017-May-30 »
Hi guys,

anyone have a clue how to get the access-token from the TwitchAPI v5?
This is the link: https://dev.twitch.tv/docs/v5/guides/authentication/

I have all things together to sent my stuff to Twitch, but HOW? :D

NETWEBGET is not working for me...
I don't know,is it possible with Sockets?

For the case i/we can send it to twitchAPI, we need the returned URL with the access-token in it.  :puke:

Connection to the TwitchIRC was easy, but this...

7
Bug Reports / Color themes
« on: 2016-Dec-09 »
Hi,

i guess the color themes in GLBasic are broken?!
If i create a new one and go to the Regedit and export it, then go to GLBasic and change it then close it.
Load the colors back into the Regedit and then start GLB nothing happens...
I wanna save that color theme  :'( :'(

9
What you guys think about it?
Is it a good way to get more Power ( FPS ) and nicer Shadersupport to make the game more fancy?!

http://www.minecraftforum.net/news/59892-shaders-coming-in-1-9

10
Hi my friends,

i will share with you guys my litte 3D test with OpenGL in GLbasic.
It's just a start on how to use a "Camera" to move like in Minecraft (Creativemode).
I update the gl.gbas a bit to make it possible to use RenderLists in GLB, the only thing i add was:

Code: GLBasic [Select]
INLINE
} extern "C" { GLuint __stdcall glGenLists( GLuint range );; }; namespace __GLBASIC__{
ENDINLINE
FUNCTION glGenLists: range
        INLINE
                return OGL glGenLists(range);
        ENDINLINE
ENDFUNCTION
 

RenderLists speed up the rendering by ->>>  :o  ... :D
It give you a good start on how to use OpenGL and on how to create objects!

Maybe it gives you a start for youre next game ( hope so ), let me know it!

if you have any questions, ask me.


Maybe i code some more features into it like a  OBJ loader, that was my next point on the list :D


EDIT: Fix the upload, now its working sry! 

11
Hey my friends,

i have a question about OpenGL:
If i try to set a texture (100x100 pixel) to  GL_QUADS it works fine.
But if i try to draw only 1/4 of the texture (25x25 pixel) it doesen't work anymore...

If i try a texture in Power of Two it works fine.

My head begins to explode :D

texturecoords are:

0, 0
0.25, 0
0.25, 0.25
0, 0.25


any ideas?

12
3D-snippets / Mousepickup a cube in a array
« on: 2014-Apr-21 »
Hi,

this is a litte snippet on how to mousepick a cube from a array of cubes.
Some basic "Minecraft-Style"  picking.

TAGS(for the searchmaschine) :) :
mousepick, pick, picking, minecraft, 3D-picking, collisionray, ray

Code: GLBasic [Select]
// --------------------------------- //
// Project: Picktest
// Start: Monday, April 21, 2014
// IDE Version: 12.096



// use systempointer
SYSTEMPOINTER TRUE



GLOBAL array[]
REDIM array[3][3][3]

// normal Cube
CreateCube(1,1,RGB(0x00, 0xff, 0x00))

// debug cube ( RED )
CreateCube(2,1.01,RGB(0xff, 0x00, 0x00))


// fill up
FOR x = 0 TO 2
        FOR y = 0 TO 2
                FOR z = 0 TO 2
                       
                        array[x][y][z] = 1     
                                       
                NEXT
        NEXT
NEXT




WHILE TRUE
        LOCAL mx,my,b1,b2
        LOCAL wx1#,wy1#,wz1#, wx2#,wy2#,wz2#    // screen2world variables
        LOCAL cx%,cy%,cz%                                               // collision-position in array
        LOCAL closest_coll# = 100                               // set max coll distance
        LOCAL coll                                                              // collision variable
        MOUSESTATE mx,my,b1,b2 
       
        // make the window 3D and set up the Cam, position of the cam doesen't matter
        X_MAKE3D 1,1000,45
        X_CAMERA 5,5,-5, 0.7,0,1.5
       
        // 2 times screen2world, second is Z = 1 to set the direction !
        X_SCREEN2WORLD mx,my,0, wx1, wy1, wz1
        X_SCREEN2WORLD mx,my,1, wx2, wy2, wz2
       

        FOR x = 0 TO 2
                FOR y = 0 TO 2
                        FOR z = 0 TO 2
               
                                IF array[x][y][z]

                                        // move cube and draw
                                        X_MOVEMENT x, y, z
                                        X_DRAWOBJ 1, 0
                                       
                                        // check coll
                                        coll = X_COLLISIONRAY(1,0, wx1,wy1,wz1, wx2,wy2,wz2)    // shoot up the RAY
                                        IF coll
                                                IF closest_coll > coll  // is closest coll larger then coll then set as closest
                                                        closest_coll = coll
                                                       
                                                        // save position in array
                                                        cx = x
                                                        cy = y
                                                        cz = z
                                                ENDIF
                                               
                                        ENDIF
                                                 
                                               
                                ENDIF
                                                                               

                                       
                        NEXT
                NEXT
        NEXT
       
        // draw the debugcube
        IF closest_coll < 100
                X_MOVEMENT cx, cy, cz
                X_DRAWOBJ 2, 0
        ENDIF
       
       
        // some 2D stuff
        X_MAKE2D
       
        PRINT  "X: "+mx+" Y: "+my,10,10
        PRINT closest_coll,10,20

SHOWSCREEN
WEND
END


// ------------------------------------------------------------- //
// -=#  CREATECUBE  #=-
// -= by KittyHello =-
// ------------------------------------------------------------- //
FUNCTION CreateCube: num, sz, col
        // Diese Variablen sind als LOCAL definiert:
        // num, sz,
        X_AUTONORMALS 1 // For a cube, hard edges
        sz=sz/2
        X_OBJSTART num
                // Front Face
                X_OBJADDVERTEX  sz, -sz,  sz, 1, 0, col
                X_OBJADDVERTEX -sz, -sz,  sz, 0, 0, col
                X_OBJADDVERTEX  sz,  sz,  sz, 1, 1, col
                X_OBJADDVERTEX -sz,  sz,  sz, 0, 1, col
                X_OBJNEWGROUP
                // Back Face
                X_OBJADDVERTEX -sz,  sz, -sz, 1, 1, col
                X_OBJADDVERTEX -sz, -sz, -sz, 1, 0, col
                X_OBJADDVERTEX  sz,  sz, -sz, 0, 1, col
                X_OBJADDVERTEX  sz, -sz, -sz, 0, 0, col
                X_OBJNEWGROUP
                // Top Face
                X_OBJADDVERTEX -sz,  sz,  sz, 0, 0, col
                X_OBJADDVERTEX -sz,  sz, -sz, 0, 1, col
                X_OBJADDVERTEX  sz,  sz,  sz, 1, 0, col
                X_OBJADDVERTEX  sz,  sz, -sz, 1, 1, col
                X_OBJNEWGROUP
                // Bottom Face
                X_OBJADDVERTEX  sz, -sz, -sz, 0, 1, col
                X_OBJADDVERTEX -sz, -sz, -sz, 1, 1, col
                X_OBJADDVERTEX  sz, -sz,  sz, 0, 0, col
                X_OBJADDVERTEX -sz, -sz,  sz, 1, 0, col
                X_OBJNEWGROUP
                // Right face
                X_OBJADDVERTEX  sz,  sz, -sz, 1, 1, col
                X_OBJADDVERTEX  sz, -sz, -sz, 1, 0, col
                X_OBJADDVERTEX  sz,  sz,  sz, 0, 1, col
                X_OBJADDVERTEX  sz, -sz,  sz, 0, 0, col
                X_OBJNEWGROUP
                // Left Face
                X_OBJADDVERTEX -sz, -sz,  sz, 1, 0, col
                X_OBJADDVERTEX -sz, -sz, -sz, 0, 0, col
                X_OBJADDVERTEX -sz,  sz,  sz, 1, 1, col
                X_OBJADDVERTEX -sz,  sz, -sz, 0, 1, col
                X_OBJNEWGROUP
        X_OBJEND

ENDFUNCTION // sz

13
Inline / 3rd party / SQLite wrapper
« on: 2013-Oct-30 »
Hi folks,

this is a simple wrapper for SQLite (just the beginning), maybe someone can use/need it....

14
IDE/Syntax / CONSTANT in TYPES!
« on: 2013-Oct-12 »
Hi Gernot,


is it possible to initialize the CONSTANTS before the TYPES?
So that we can do this:

Code: GLBasic [Select]
CONSTANT MaxX = 12
CONSTANT MaxY = 14
CONSTANT MaxZ = 16

TYPE Whatever
    Map[MaxX][MaxY][MaxZ]
ENDTYPE

15
Hi,

Anyone try to create a simple project directry with the gpc.exe?

I create a new project, named it Hello.gbap.


Code in it:

Code: GLBasic [Select]
WHILE TRUE

        PRINT "Hello world",10,10

SHOWSCREEN
WEND
END

make a batchfile(StartConsole.bat) in the same directory from the project:
Code: Text [Select]
cd /d %~dp0
cmd.exe
 


make another batch(hello.bat):
Code: Text [Select]
"C:\Program Files (x86)\GLBasic_v11\Compiler\platform\gpc" -N "C:\Users\sliver\Documents\GLBasic\Hello\Hello.gbap" -O"test"  -D -X800 -Y600 -R60 -M0 -pWin32=1
 


console output is this:

Code: Text [Select]
C:\Users\sliver\Documents\GLBasic\Hello>"C:\Program Files (x86)\GLBasic_v11\Comp
iler\platform\gpc" -N "C:\Users\sliver\Documents\GLBasic\Hello\Hello.gbap" -O"te
st"  -D -X800 -Y600 -R60 -M0 -pWin32=1
GPC - GLBasic Precompiler V.9.921 SN:c5e0e24b - "C:\Users\sliver\Documents\GLBas
ic\Hello\Hello.gbap"(1) error : GPC0001 syntax error

:/
it's just to play with, but now i will see it running :D

Pages: [1] 2 3 ... 13