blitzbasic

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 ... 15
1
Bug Reports / V11 Beta bugreports!
« on: Today at 10:15 am »
Pls post all possible bugs in this thread to keep it clear!

Makro not work:
http://www.glbasic.com/forum/index.php?topic=9214.0

Sprite hole don't work:
http://www.glbasic.com/forum/index.php?topic=9213.0

Android - polygons rendered in wrong order and glDrawElements issue:
http://www.glbasic.com/forum/index.php?topic=9091.0

Android accelerometer issue:
http://www.glbasic.com/forum/index.php?topic=8824.0

project resolution 768x1024 gives 320x480 on iPhone4/iPod4:
http://www.glbasic.com/forum/index.php?topic=8847.0

REDIM + FOREACH:
http://www.glbasic.com/forum/index.php?topic=8862.0

2
Off Topic / come to the chat today!
« on: 2013-Apr-30 »
Hi my friends,

let's chat together:


IRC-Link:
irc://irc.freenode.org/glbasic

Webchat:
http://webchat.freenode.net/?channels=glbasic

3
So,
um ein bisschen Spaß ins Deutsche Forum zu bringen mache ich hier diesen Fred auf!
Was macht ihr heute noch so, also wo GOTO ihr heute nich hin:)

Also bei mir schauts so aus:
(Reihenfolge absichtlich durcheinander, ist ja GOTO ;D )

Code: [Select]
GOTO Home

Kuehlschrank:
IF Bier_im_Sack > 0 THEN Stelle_Bier_In_Den_Kuehlschrank = 1
IF kuehlschrank = TRUE AND Bier > 0
   GOTO Sofa
ELSE
   Ragemode = TRUE
   GOTO Tankstelle
ENDIF

Bierkaufen:
IF money > 1.00 AND LieblingsBier = TRUE
   Bier_im_Sack = 5
   GOTO Home
ENDIF

Home:
GOTO Kuehlschrank

Tankstelle:
GOTO Bierkaufen

Hmmm... unterm rumspinnen ist mir grad ne lustige Idee gekommen...

Eine GOTO-Geschichte in Codeform :)

Ich habe fertig!

4
Hi Leute,


hier ein kleines "Game of Life" nach Art von Conway ( link )
Ihr könnte ein bisschen mit den Parametern rumspielen, tilesize z.B :)
Code: [Select]
// GAME OF LIFE
//
//###### REGELN ##################################
//
// Tote Zelle mit >= 3 Nachbarn = neugeboren
// lebende Zelle mit < 2 Nachbarn = tot
// lebende Zelle mit 2/3 Nachbarn = bleibt leben
// lebende Zelle mit  > 3 = tot
//
// Lebenscheck = tmp_Leben[x][y][live]
// AnzeigeArray = Leben[x][y][live]
//
// werte%:
// --------
// 0 = lebt, true oder false
// 1 = lebensdauer 0-127 für die farbe :)


GLOBAL SX%= 640, SY%= 480, werte% = 2
GLOBAL Leben%[], tmp_Leben%[]
GLOBAL tilesize = 4

REDIM Leben[SX/tilesize+2][SY/tilesize+2][werte]
REDIM tmp_Leben[SX/tilesize+2][SY/tilesize+2][werte]

FOR x = 1 TO SX/tilesize
FOR y = 1 TO SY/tilesize

LOCAL rand = RND(2)
IF rand = 1
Leben[x][y][0]= 1
ENDIF

NEXT
NEXT 


LOCAL timer, verzoegerung = 150


WHILE TRUE

IF timer < GETTIMERALL()
Array_Swap()
timer = GETTIMERALL()+verzoegerung
ENDIF

FOR x = 1 TO SX/tilesize
FOR y = 1 TO SY/tilesize

IF Leben[x][y][0] = 1
DRAWRECT x*tilesize,y*tilesize,tilesize,tilesize, RGB(255, 255-Leben[x][y][1]*2, 255-Leben[x][y][1]*2)
ENDIF

NEXT
NEXT


SHOWSCREEN
WEND
END

FUNCTION Array_Swap:

tmp_Leben[] = Leben[]

FOR x = 1 TO SX/tilesize
FOR y = 1 TO SY/tilesize

Check_Nachbarn(x,y)

NEXT
NEXT

Leben[] = tmp_Leben[]

ENDFUNCTION

FUNCTION Check_Nachbarn: x, y

LOCAL nachbarn%, es_lebt%
es_lebt = Leben[x][y][0]

// links
IF Leben[x-1][y][0] THEN INC nachbarn, 1
// rechts
IF Leben[x+1][y][0] THEN INC nachbarn, 1
// oben
IF Leben[x][y-1][0] THEN INC nachbarn, 1
// unten
IF Leben[x][y+1][0] THEN INC nachbarn, 1
// linksoben
IF Leben[x-1][y-1][0] THEN INC nachbarn, 1
// rechtsoben
IF Leben[x+1][y-1][0] THEN INC nachbarn, 1
// linksunten
IF Leben[x-1][y+1][0] THEN INC nachbarn, 1
// rechtsunten
IF Leben[x+1][y+1][0] THEN INC nachbarn, 1

// Tote Zelle mit = 3 Nachbarn = neugeboren
// lebende Zelle mit < 2 Nachbarn = tot
// lebende Zelle mit 2/3 Nachbarn = bleibt leben
// lebende Zelle mit  > 3 = tot

IF tmp_Leben[x][y][1] < 127 THEN INC tmp_Leben[x][y][1], 1

IF nachbarn < 2 AND es_lebt = TRUE THEN tmp_Leben[x][y][0] = FALSE
IF nachbarn = 2 OR nachbarn = 3
IF nachbarn = 3 AND es_lebt = FALSE
tmp_Leben[x][y][0] = TRUE
tmp_Leben[x][y][1] = 0
ENDIF

IF nachbarn = 2 AND es_lebt = TRUE
//nix los hier!
ENDIF
ENDIF
IF nachbarn > 3 AND es_lebt = TRUE THEN tmp_Leben[x][y][0] = FALSE

ENDFUNCTION

5
Hi freakz :)

I have a gameidea, not realy new, but i think it's a cool gamemode:

<a href="http://www.youtube.com/watch?v=iDBFWQ-9uWw" target="_blank">http://www.youtube.com/watch?v=iDBFWQ-9uWw</a>

This kind of game in GLBasic with maybe NewtonSDK would be cool!
You welcome to help!

A little community game?!

6
GLBasic - de / Coding Livestream?!
« on: 2013-Mar-10 »
Hi Leute,

wär interesse an einen Livestream da, der sich rund um GLbasic 2D/3D dreht?
Ich würde das alles über Twitch machen und gleichzeitig die folgen noch auf Youtube raufladen...

Was denkt ihr?!
"Mitprogrammierer" könnte ich dann auch noch gebrauchen  :D

Denke das es ne coole Sache für GLBasic sein könnte, wenn man das entstehten von einem Spiel komplett verfolgen kann!

7
Hi there,

can pls anyone with some experience in signing android games write a little howto?
Create a marketkey is easy but then, have no clue... :/

8
GLBasic - en / Android compiling problems :(
« on: 2012-Nov-02 »
Hi my friends,
I have now a Samsung Galaxy S3 and can't compile for Android  :'(

ANDROID_SWT = C:\Program Files (x86)\Android\android-sdk\tools\lib\x86
JAVA_HOME =  C:\Program Files (x86)\Java\jdk1.6.0_35

In GLBasic(V11.163) Beta, project -> Options: I set platform to android

gbas:
Code: [Select]
WHILE TRUE


PRINT "TEST", 10,10


SHOWSCREEN
WEND
END

create Multiplatform and doubleclick on Android...

Result ( SRY, german version ):

Code: [Select]
_______________________________________
*** Configuration: ANDROID ***
precompiling:
GPC - GLBasic Precompiler V.10.060 SN:3554e9fd - 3D, NET
Wordcount:4 commands
compile+link:
running Android build-script...
BUILD STAGE 1: Compile and pack RELEASE
Der Befehl "xcopy" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
ERROR: SWT folder 'C:\Program Files (x86)\Android\android-sdk\tools\lib\x86' does not exist.
Please set ANDROID_SWT to point to the folder containing swt.jar for your platform.
Das System kann den angegebenen Pfad nicht finden.
.
BUILD STAGE 2: Build DEBUG and install on device
Das System kann den angegebenen Pfad nicht finden.
finished Android build-script.
Android=C:\Users\sliver\Documents\GLBasic\Android App\distribute\Android
erfolgreich
_______________________________________
*** Fertig ***
Dauer: 3.4 sek. Zeit: 17:00
Erstellen: 1 erfolgreich.


9
Hi, here a *.OBJ-File (Wavefront OBJ file) loader for GLBasic.

See attachment

sourcecode:
Code: [Select]
// --------------------------------- //
// Project: OBJ Loader
// Start: Sunday, September 02, 2012
// IDE Version: 10.283


TYPE TVector3
x#;y#;z# // position
ENDTYPE

TYPE TVector2
x#;y#
ENDTYPE

TYPE TFace
vertex[3] AS TVector3
tex_coord[3] AS TVector2
vertex_norm[3] AS TVector3
ENDTYPE


TYPE TObj

filename$
texturename$

vertex[] AS TVector3
tex_coord[] AS TVector2
vertex_norm[] AS TVector3
faces[] AS TFace

filehandle%
tex_handle%
XObj_handle%

FUNCTION LOAD: name$

self.filehandle = GENFILE() // set the filehandle
self.filename$ = name$  //set filename

// if file exist

IF DOESFILEEXIST(self.filename$) AND OPENFILE(self.filehandle, self.filename$, 1)
//DEBUG "All OK, file exist!\n"

WHILE ENDOFFILE(self.filehandle) = 0
LOCAL tmp$, check$, splt$[]

READLINE self.filehandle, tmp$
check$ = MID$(tmp$, 0, 2)

SELECT check$
CASE "v "
SPLITSTR(tmp$,splt$[]," ")
//DEBUG "->"+splt$[1]+" : "+splt$[2]+" : "+splt$[3]+"<-\n"
LOCAL v AS TVector3

v.x = splt$[1]
v.y = splt$[2]
v.z = splt$[3]

DIMPUSH self.vertex[], v

CASE "vt"
SPLITSTR(tmp$,splt$[]," ")
//DEBUG "->"+splt$[1]+" : "+splt$[2]+"<-\n"
LOCAL v AS TVector2

v.x = splt$[1]
v.y = splt$[2]

DIMPUSH self.tex_coord[], v
CASE "vn"
SPLITSTR(tmp$,splt$[]," ")
//DEBUG "->"+splt$[1]+" : "+splt$[2]+" : "+splt$[3]+"<-\n"
LOCAL v AS TVector3

v.x = splt$[1]
v.y = splt$[2]
v.z = splt$[3]

DIMPUSH self.vertex_norm[], v
CASE "us"
SPLITSTR(tmp$,splt$[]," ")
self.texturename$ = splt$[1]
//DEBUG self.texturename$+"\n"
CASE "f "
LOCAL s$[]
SPLITSTR(tmp$,splt$[]," ")

LOCAL t AS TFace

FOR i = 1 TO 3
SPLITSTR(splt$[i],s$[],"/")
//DEBUG "->"+s$[0]+" : "+s$[1]+" : "+s$[2]+"<-\n"
LOCAL v=s$[0] , vt=s$[1], vn=s$[2]

t.vertex[i-1] = self.vertex[v-1]
t.tex_coord[i-1] = self.tex_coord[vt-1]
t.vertex_norm[i-1] = self.vertex_norm[vn-1]

NEXT

DIMPUSH self.faces[], t
ENDSELECT

WEND

// free some memory!
REDIM self.vertex[0]
REDIM self.tex_coord[0]
REDIM self.vertex_norm[0]

self.tex_handle = GENSPRITE()
LOADSPRITE self.texturename$, self.tex_handle

self.XObj_handle = GENX_OBJ()

X_OBJSTART self.XObj_handle
FOREACH t IN self.faces[]
X_OBJNEWGROUP
FOR i = 0 TO 2
X_OBJADDVERTEX t.vertex[i].x, t.vertex[i].y, t.vertex[i].z, t.tex_coord[i].x, t.tex_coord[i].y, RGB(0xff, 0xff, 0xff)
NEXT
NEXT
X_OBJEND

ENDIF
ENDFUNCTION

FUNCTION DRAW:
X_SETTEXTURE self.tex_handle, -1
X_DRAWOBJ self.XObj_handle, 0
ENDFUNCTION

ENDTYPE

10
Off Topic / KICKSTARTER.com best projects!
« on: 2012-Sep-01 »
First a REALY F***ing nice game :) :

http://www.kickstarter.com/projects/project-giana/project-giana

Next a realy cool idea for a RTS-Game:

http://www.kickstarter.com/projects/659943965/planetary-annihilation-a-next-generation-rts?ref=live


What you guys think about that games?
Any other cool projects ?

Lets talk about that side!

11
Ok guys,

I write a simple test to get something simular to minecraft ( very very veeeeeeeery basic! )
It occurred to me that i have problems if i draw a block twice ( same objectID ) and use a pickroute(X_COLLISIONRAY) -> i select both of them.... :/

No problem so far, i can load for each cube a new object with new ID, but is this the best solution?

The real problem is that i have to set a ObjectID to use X_COLLISIONRAY :(
I'm realy pissed off and have no idea for a good way to do this...

Sad moment :/

14
Off Topic / Just to let you know!
« on: 2012-Jul-08 »
Chuck Norris doesn't get compiler errors, the language changes itself to accommodate Chuck Norris

15
GLBasic - en / MOVED: SDL Access
« on: 2012-Jul-03 »

Pages: [1] 2 3 ... 15