Menu

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

Messages - Kitty Hello

#10591
GLBasic - de / Linux IDE
2004-Apr-27
OK. Ich lass' mir was einfallen.
#10592
Quote from: UserN//Anim Example
X_LOADOBJ  "moon.ddd", 1
LOADSPRITE "moon.bmp", 1

X_LOADOBJ  "sun.ddd", 2
LOADSPRITE "sun.bmp", 2
WHILE TRUE
   X_MAKE3D 1, 1200, 60
   X_CAMERA 0, 0, 100, 0, 0, 0
   X_SPOT_LT 0, RGB(255,255,255), 0,50,100,0,10,100,180

   phi=phi+GETTIMER()/10
   permil=permil+GETTIMER()/20000;
   IF permil>=1 THEN permil=0
   
   X_MOVEMENT 30, 0, 0
   
   X_ROTATION 270, 1,0,0
   X_ROTATION phi, 0,-1,0

   X_SETTEXTURE 1, -1
   X_DRAWANIM 1, 0, 128, permil, TRUE

// Draw Object #2...
   X_MOVEMENT 80, 0, 0 // This will reset X_ROTATIONs
   X_SETTEXTURE 2, -1   // Set Texture for object #2
   X_DRAWANIM 2, 0, 128, permil, TRUE // Render Object #2
Quote from: UserNSHOWSCREEN
WEND
#10593
GLBasic - en / Future
2004-Apr-11
Hi,

well, first: GLBasic should be a very easy programming language with wich you can write semi-professinoal games in no time. This is the most important thing. Less typing, less reading docs, faster releases. Of couse working on newer technologies will occour. We had VBO last time and will get cell (cartoon) shading soon. Also a port to Mac OS X is desired. More, the compilation for Linux binaries will be sped up. If there's no chance on getting the compiler working on Windows, a web-server will be created that does the job automatically.
If you wish to have any particular feature, please give a hint. Usually user request are implemented within a week or 2.

Have a nice day,
#10594
Hi,

Ich hab' einen Export-filter, der ausgewählte oder alle Objekte in das GLBasic .ddd Dateiformat konvertiert. Das Plugin kann hier heruntergeladen werden:
http://www.glbasic.com/files/ac3d-ddd-plugin.zip

Weitere Informationen über AC3D auf www.AC3D.org.

AC3D ist der empfehlenswerteste 3D Modeller für GLBasic Spiele.
#10595
Hi,

I've written an export plugin that exports all or all selected objects to the GLBasic .ddd file format. You can download the source code and the windows plugin from here:
http://www.glbasic.com/files/ac3d-ddd-plugin.zip

More information about AC3D on www.AC3D.org.

AC3D is the best reccomended 3D modeller for GLBasic games.
#10596
GLBasic - en / mouse cursor
2004-Apr-05
Either draw a sprite or print somethins to the mouse location:

Code (glbasic) Select
LOADSPRITE "MyPointer.bmp", 12
start:
MOUSESTATE mx, my, b1, b2
SPRITE 12, mx, my
SHOWSCREEN
GOTO start

or:

Code (glbasic) Select
start:
MOUSESTATE mx, my, b1, b2
PRINT "X", mx, my
SHOWSCREEN
GOTO start

Have fun,
Gernot
#10597
Na, wie wär's mit schönen 3D-Bäumen mit Blättern usw...? Hier ist ein einfaches Grundgerüst dafür:

Code (glbasic) Select
// --------------------------------- //
// Project:
// Start: Monday, March 29, 2004
// IDE Version: 1.40327


// rule = “l [ + l ] l [ - l] l” [Jürgens Hartmut, Peitgen Heinz-Otto, Saupe Dietmar:
//                                Fraktale - eine neue Sprache für komplexe Strukturen,
//                                Spektrum der Wissenschaft (9/1989), p.62.] with
// l = line
// + = +28.58 degrees
// - = -28.58 degrees
// [ = start of a branch
// ] = end of a branch


    NewBranch(200,200,0, 0, -90, 0, 10)
SHOWSCREEN
MOUSEWAIT

// ------------------------------------------------------------- //
// -=#  NEWBRANCH  #=-
// ------------------------------------------------------------- //
FUNCTION NewBranch: x, y, z, phi, psi, depth, maxdepth

LOCAL ex, ey, ez, px, py, pz, lngth, ln_bottom, dphi, dpsi
LOCAL n, nbranches, col
lngth = 100/(1+depth)
ln_bottom = lngth*COS(psi)
nbranches = 2

ex = x + COS(phi)*ln_bottom
ey = y + SIN(psi)*lngth
ez = z + SIN(phi)*ln_bottom

IF (depth FOR n=1 TO nbranches
pos = n/(nbranches+1)
px = x+(ex-x)*pos
py = y+(ey-y)*pos
pz = z+(ez-z)*pos

dphi = phi + (RND(2)-1)*28.58
dpsi = psi + (RND(2)-1)*28.58
NewBranch(px, py, pz, dphi, dpsi, depth+1, maxdepth)
NEXT
ENDIF

col = RGB(200 - 200*(depth/maxdepth), 64+128*(depth/maxdepth), 0)
// Front
DRAWLINE x, y, ex, ey, col
// Left
DRAWLINE z+120, y, ez+120, ey, col
// Top
DRAWLINE x, z+320, ex, ez+320, col
ENDFUNCTION


Und ein Bild:
#10598
Code Snippets / Factal Trees
2004-Mar-29
Well, how about drawing some nice 3D Trees with leaves and so on? Here's the basic framework needed:

Code (glbasic) Select
// --------------------------------- //
// Project:
// Start: Monday, March 29, 2004
// IDE Version: 1.40327


// rule = “l [ + l ] l [ - l] l” [Jürgens Hartmut, Peitgen Heinz-Otto, Saupe Dietmar:
//                                Fraktale - eine neue Sprache für komplexe Strukturen,
//                                Spektrum der Wissenschaft (9/1989), p.62.] with
// l = line
// + = +28.58 degrees
// - = -28.58 degrees
// [ = start of a branch
// ] = end of a branch


    NewBranch(200,200,0, 0, -90, 0, 10)
SHOWSCREEN
MOUSEWAIT

// ------------------------------------------------------------- //
// -=#  NEWBRANCH  #=-
// ------------------------------------------------------------- //
FUNCTION NewBranch: x, y, z, phi, psi, depth, maxdepth

LOCAL ex, ey, ez, px, py, pz, lngth, ln_bottom, dphi, dpsi
LOCAL n, nbranches, col
lngth = 100/(1+depth)
ln_bottom = lngth*COS(psi)
nbranches = 2

ex = x + COS(phi)*ln_bottom
ey = y + SIN(psi)*lngth
ez = z + SIN(phi)*ln_bottom

IF (depth FOR n=1 TO nbranches
pos = n/(nbranches+1)
px = x+(ex-x)*pos
py = y+(ey-y)*pos
pz = z+(ez-z)*pos

dphi = phi + (RND(2)-1)*28.58
dpsi = psi + (RND(2)-1)*28.58
NewBranch(px, py, pz, dphi, dpsi, depth+1, maxdepth)
NEXT
ENDIF

col = RGB(200 - 200*(depth/maxdepth), 64+128*(depth/maxdepth), 0)
// Front
DRAWLINE x, y, ex, ey, col
// Left
DRAWLINE z+120, y, ez+120, ey, col
// Top
DRAWLINE x, z+320, ex, ez+320, col
ENDFUNCTION


And an image:
#10599
Hallo,

Die Grafikkartentreiber müssen OpenGL unterstützen. Man lädt einfach beim Hersteller den aktuellsten Treiber herunter. Auf keinen Fall den von Microsoft mitgelieferten verwenden, da der spätestens ab WindowsXP nur Software-Rendering unterstützt (1-2 FPS maximal).
Welche Grafikkarte man hat ewrfährt man, indem man Systemsteuerung/Anzeige öffnet und dann den Tab:Einstellungen, Knopf: Erweitert, wieder Tab:Grafikkarte öffnet. Grundsätzlich bekommt man diese Treiber auch für Windows NT4.0, was bei DirectX ein Problem darstellt.

Einen Vergleich mit anderen Basics möchte ich nicht geben, das muss jeder selbst ausprobieren. Die Geschwindigkeit von GLBasic ist jedoch eine seiner Stärken.

Fenster und Buttons in Windows wird es nicht geben. Es bleibt ein Game-BASIC. Wir arbeiten jedoch an solchen Funktionen innerhalb von GLBasic mit den DRAWLINE und FILLRECT Befehlen.

DLL's wären einfach zu implementieren, jedoch kann man dann das Spiel nicht so einfach nach Linux konvertieren. Und darum kommt es wohl nicht. Alle Befehle funktionieren unter allen Plattformen. Derzeit Win32 und Linux.
#10600
Ein, wie ich finde, sehr interessanter Wettbewerb, bei dem man auch mit der kostenlosen Demo-Version von GLBasic  zu den Gewinnern gehören kann.

Hier geht's zu den Details

Viel Erfolg
#10601
GLBasic - de / MipMapping
2004-Mar-23
Holt euch die Internet-Updates regelmäßig. Diesmal (V1.40323) gibt's MipMapping:
Code (glbasic) Select
X_MIPMAPPING 1 // an
X_DRAWOBJ 1,0

Viel Spaß,
Gernot
#10602
Announcements / MipMapping
2004-Mar-23
Get the internet updates frequently. Featuring mipmapping this time (V1.40323)
Code (glbasic) Select
X_MIPMAPPING 1 // on
X_DRAWOBJ 1,0
Have fun,
Gernot
#10603
GLBasic - en / Linux IDE
2004-Mar-17
Well, you can run the IDE with WINE, but that's not intended. Also, there's a Compiler/Make Linux-Script button and a Install_linux script. Basically you should write your game on Win32, then send the source code in and get a (tested) linux binary back.
I will put up a compilation service soon, that will allow you to do this in the IDE on Win32 and receive the bin wihtin an hour or so...

Sorry for inconveniences. Porint the IDE to Linux seems too much work for me.
#10604
OK, ganz langsam.
Die Schuhschachteln, das sind komprimierte, verschlüsselte Ordner. Wie ein zip-Atchiv etwa. Die kann GLBasic dann mit dem Befeehl SETSHOEBOX verwenden, um Grafiken, Musiken usw. zu laden. Die .sbx (also Schuhschachtel) - Dateien werden jedoch von hinten her gelesen. D.h. hinten ist das Inhaltsverzeichnis, kurz davor die Daten. Die .exe Dateien sind anders herum. Also, erst .exe Infos, dann die Daten. Jetzt kann man mit dem DOS-Befehl copy die Beiden zusammen in eine Datei packen, die dann etwa so aussieht:

.exe - Info
.exe - Programm
.sbx - Daten
.sbx - Info

Und kann diese .exe Datei mit SETSHOEBOX (vorher natürlich) anstatt einer .sbx angeben. Voilar, man hat nur eine .exe Datei in der alle Resourcen (Grafik, Sound, Musik...) sind.
#10605
Noch ein paar Helix-Varianten:

Code (glbasic) Select
// ------------------------------------------------------------- //
// -=#  CREATEHELIX  #=-
// Creates a helix aka. spiral object
// R1    : Raduis of Helix
// R2    : Radius of Helix Intersection
// Nu    : Number of elemtents along helix
// Nv    : Number of elements around intersection
// cycles: Number or spiral repetitions
// height: Complete length of the helix
// col   : Color of Helix-Material
// ------------------------------------------------------------- //
FUNCTION CreateHelix: num, R1, R2, Nu, Nv, cycles, height, col
LOCAL du, dv, u, v, x, y, z, tx, ty, q, nu, nv
du = cycles * 360 / Nu
dv = 360 / Nv

X_OBJSTART num
FOR i=0 TO Nu-1
u = i * du
FOR j=0 TO Nv-1
v = j * dv
FOR q = 0 TO 3
nu=0; nv=0 // Use next u/next v

IF q=0 OR q=3 THEN nu=1
IF q>1 THEN nv=1
nu = MOD(q, 2)
nv=INTEGER(q / 2)
qu = u+nu*du
qv = v+nv*dv

x = R1 * COS(qu) * (1 + COS(qv) * R2/R1)
z = R1 * SIN(qu) * (1 + COS(qv) * R2/R1)
y = SIN(qv)*R2 + qu*height/(360 * cycles)
tx = (i+nu)/Nu * cycles
ty = (j+nv)/Nv
X_OBJADDVERTEX x, y, z, tx, ty, col
NEXT
NEXT
X_OBJNEWGROUP
NEXT
X_OBJEND
ENDFUNCTION

Helicoid
Code (glbasic) Select
// ------------------------------------------------------------- //
// -=#  CREATEHELICOID  #=-
// Creates a helicoid - minimal surface of a helix
// R1    : Raduis of Helix
// Nu    : Number of elemtents along helix
// Nv    : Number of elements around intersection
// cycles: Number or spiral repetitions
// height: Complete length of the helix
// col   : Color of Helix-Material
// ------------------------------------------------------------- //
FUNCTION CreateHelicoid: num, R1, Nu, Nv, cycles, height, col
LOCAL du, dv, u, v, x, y, z, tx, ty, q, nu, nv
du = cycles*360 / Nu
dv = R1 / Nv

X_OBJSTART num
FOR i=0 TO Nu-1
u = i * du
FOR j=0 TO Nv-1
v = j * dv
FOR q = 0 TO 3
nu=0; nv=0 // Use next u/next v

IF q=0 OR q=3 THEN nu=1
IF q>1 THEN nv=1
nu = MOD(q, 2)
nv=INTEGER(q / 2)
qu = u+nu*du
qv = v+nv*dv

x = qv * COS(qu)
z = qv * SIN(qu)
y = qu/(cycles*360) * height
tx = (i+nu)/Nu * cycles
ty = (j+nv)/Nv
X_OBJADDVERTEX x, y, z, tx, ty, col
NEXT
NEXT
X_OBJNEWGROUP
NEXT
X_OBJEND
ENDFUNCTION