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

#1
Ok, that did the trick. Thank you very much.
#2
Hello,

My GLBasic is crashing. If i start GLB then it opens the editor and the welcom screen appears. Direct there is a window that has a title "Microsoft visual C++ runtime library". In that window these is a warning sign telling me that there is a runtime error. It says "program C:\Program Files\GLBasic\EditorE.exe" and "This application has requested the Runtime to terminate it in a unusual way. please contact the applications support team ......". I deleted GLBasic in the system software.
I dowloaded the new GLBasic and installed it. I keep getting the same error. After i clicked the "OK" button on this windows. The Editor is closing.

What should i do.
#3
Where can I find then log glbasic posts
#4
Yes, that does it for me too.
#5
No it makes no difference. The falling Cubies are to be seen on te top off the stairs but they are moving behind and not in front of the stairs as in Windows 7.
#6
Hello,

When I compile Cubies posted in the showroom by Gernot Frish, it comes out beatifull. I mean the stairway not the Cubies. The Cubies are all gone behind the stairs. This is totaly unlike Windows 7 i compiled it with. What is the difference between Windows and Android in this 3D program. I have a ASUS eeepad transformer tablet.
#7
Thanks it worked like a charm.
#8
Hi i am programming GLBASIC for Android and it works great with my ASUS Transformer.
I want to know is ther a way to include a map in the APK. Glbasic makes a map for windows myprog.app and in there a map called media.
i must copy the map media to the android device. I have a program that uses the media map. So i want to ask if i can include it in the apk.
#9
Thanks that did the trick. :good:
#10
I want to get a string filled with numbers (like "1234.45") in a number.
I used it in other BASIC's with a=VAL("1234.45") but it isn't working in GLBASIC.
What am i missing.
#11
Hallo,

Ich habe es getested  auf meine wiz version 1.1.0 linux 2.6.24 Rev. 222, und er erscheint eine gelben smiley mit rote augen  und mond auf ein swartze background. Das is gleich als mit Windows.

Grusse Goos
#12
Question! What is a MMO or what does it stand for?
#13
Here's the program too.
Code (glbasic) Select
// --------------------------------- //
// Project: life
// Start: Saturday, August 29, 2009
// IDE Version: 7.088
// lKvfKn

LOADFONT "font.png",1
SETFONT 1
SETCURRENTDIR("Media")
info$=PLATFORMINFO$("")
GOSUB menu
GETSCREENSIZE xs%,ys%


LIMITFPS 11
generatie%=0
fps%=11
width%=xs%
heigt%=ys%
small%=0
A$=""
DIM pl%[width%][heigt%]
DIM pld%[width%][heigt%]

GOSUB rrand

WHILE KEY(29)=0


GOSUB nextgen

GOSUB showplay
dtime = GETTIMER()
Tfps% = ((1000/dtime)+Tfps%)/2
PRINT "TrueFPS="+Tfps%,80,30
SHOWSCREEN

GOSUB letters

WEND
END

SUB showplay:
life%=0
FOR y%=0 TO heigt%-1
FOR x%=0 TO width%-1
IF pl%[x%][y%]=1
IF small%=0
SETPIXEL x+small*40,y+small*40,RGB(255,255,255)
ELSE
vx%=small%*2
DRAWRECT x%*vx%,y%*vx%,vx%,vx%,RGB(255,255,255)
ENDIF
life%=life%+1
ENDIF
NEXT
NEXT
generatie%=generatie%+1
PRINT "Aantal levende cellen="+life%,0,10
SELECT small%
CASE 1
PRINT "BIG",0,ys%-30
CASE 0
PRINT "SMALL",0,ys%-30
CASE 2
PRINT "EXTRA",0,ys%-30
ENDSELECT



PRINT "            Generatie="+generatie%,0,20
PRINT "fps="+fps%,0,30
ENDSUB

SUB nextgen:
FOR y%=0 TO heigt%-1
FOR x%=0 TO width%-1
x1%=x%-1
x2%=x%+1
y1%=y%-1
y2%=y%+1
IF x%=0 THEN x1%=width%-1
IF x%=width%-1 THEN x2%=0
IF y%=0 THEN y1%=heigt%-1
IF y%=heigt%-1 THEN y2%=0
numbers%=pl%[x1%][y1%]+pl%[x%][y1%]+pl%[x2%][y1%]+pl%[x%][y2%]+pl%[x2%][y2%]+pl%[x1%][y2%]+pl%[x1%][y%]+pl%[x2%][y%]
IF (numbers%<2) OR (numbers%>3)
pld%[x%][y%]=0
ELSEIF numbers%=2 AND pl%[x%][y%]=1
pld[x%][y%]=1
ENDIF
IF numbers%=3 THEN pld%[x%][y%]=1
NEXT
NEXT

pl%=pld%

ENDSUB

SUB rrand:
generatie%=0
FOR y%=0 TO heigt%-1
FOR x%=0 TO width%-1
pl%[x%][y%]=RND(1)
NEXT
NEXT
ENDSUB



SUB letters:

IF KEY(28)
WHILE KEY(28)
WEND
LIFMENU()
ENDIF

IF KEY(200)
fps%=fps%+1
LIMITFPS fps%
ENDIF
IF KEY(208)
fps%=fps%-1
IF fps%<1 THEN fps%=1
LIMITFPS fps%
ENDIF
IF KEY(205)
IF small%=0

small%=1
width%=width%/2
heigt%=heigt%/2
ELSEIF small%=1
small%=2
width%=width%/2
heigt%=heigt%/2
ELSEIF small%=2
small%=0
width%=width%*4
heigt%=heigt%*4
ENDIF



loos:
IF KEY(205) THEN GOTO loos
ENDIF
IF KEY(15) THEN GOSUB menu
pause:
IF KEY(203) THEN GOTO pause

ENDSUB

SUB menu:
IF info$="WIN32"
PRINT "Press <ENTER> to select a *.LIF file",0,30
PRINT "Press Up or Down to set the fps",0,60
PRINT "Press <ESC> to stop the program",0,90
PRINT "Press left to Pause",0,120
PRINT "Press right to Toggle Big or Small",0,150
PRINT "Push a key to begin",0,190



ELSE

PRINT "Press Menu to select a *.LIF file",0,30
PRINT "Press Up or Down to set the fps",0,60
PRINT "Press X to stop the program",0,90
PRINT "Press left to Pause",0,120
PRINT "Press right to Toggle Big or Small",0,150
PRINT "Push a key to begin",0,190
ENDIF
SHOWSCREEN
lp:
IF KEY(15) THEN GOTO lp
KEYWAIT

ENDSUB

FUNCTION lifload: filename$
// load and interpret a Game of Life pattern file (*.lif)

LOCAL str$, px$, py$
LOCAL i
LOCAL x%, y%, scrx%, scry%

// clear
FOR y%=0 TO heigt%-1
FOR x%=0 TO width%-1
pl%[x%][y%] = 0
NEXT
NEXT

// get middle of screen
scrx%=width%
scry%=heigt%

generatie%=0

// open and read file
IF OPENFILE(1, filename$, 1)
WHILE (ENDOFFILE(1) = FALSE)
// read next line
READLINE 1, str$
str$ = str$ + "\n"
// command
IF (MID$(str$, 0, 1) = "#")
// P = position command, for example "#P -3 -1"
IF (MID$(str$, 1, 1) = "P")
str$ = MID$(str$, 3)
i = INSTR(str$, " ")
IF (i <> -1)
// get positions
px$ = MID$(str$, 0, i)
py$ = MID$(str$, i+1)
// string to int
x% = INTEGER(px$) + (scrx% / 2)
y% = INTEGER(py$) + (scry% / 2)
ENDIF
ENDIF
// TODO: display comment lines on screen? "#D blah bla"
//IF (MID$(str$, 1, 1) = "D")
//ENDIF
ELSE
// cells, for example "*...***"
FOR i = 0 TO LEN(str$)
IF (MID$(str$, i, 1) = "*")
// not out of bounds
IF (x%+i >= 0) AND (y% >= 0) AND (x%+i < scrx%) AND (y% < scry%)
pl%[x%+i][y%] = 1
ENDIF
ENDIF
NEXT //i
y% = y% + 1
ENDIF
WEND
ENDIF

ENDFUNCTION

FUNCTION LIFMENU:
LIMITFPS 10
LOCAL xz%,yz%
GETFONTSIZE font_x, font_y
GETSCREENSIZE xz%,yz%
iopen=0
ifile=2
infile=2
num = GETFILELIST("*.LIF", files$[])
WHILE TRUE
tprint=0
IF infile*font_y<(yz%-10)
ifile=infile
ENDIF
DRAWRECT 0,(ifile*font_y),320,font_y,RGB(255,255,255)
PRINT ifile*font_y,100,0
PRINT ifile*font_y+font_y,100,font_y
FOR i=iopen TO BOUNDS(files$[], 0)-1 // BOUNDS(files$[], 0)-1 = num = num_dir+num_file

IF tprint*font_y<(yz%-10)
PRINT files$[i], 0, tprint*font_y
ENDIF
tprint=tprint+1
NEXT


SHOWSCREEN

IF KEY(208)
infile=infile+1
IF infile*font_y>(yz%-10) THEN iopen=iopen+1
ENDIF

IF KEY(200)
IF infile>3
infile=infile-1
IF infile*font_y>(yz%-10) THEN iopen=iopen-1
ENDIF
ENDIF
IF KEY(28)
WHILE KEY(28)=TRUE
WEND
lifload(files$[infile])
LIMITFPS fps%
BREAK
ENDIF
WEND


ENDFUNCTION
#14
I am sory my mistake.
I now have updated the folder. It should have the GLBasic program and a GP2X-WIZ and a WIN32 EXE.
I also put de *.LIF files in the <Media> folder.
Thanks for your input.

Goos
#15
Hello BdR,

I was not aware of any .LIF files are out there. But i like the concept and in one evening i trew up this code.
I love to use your lifload code and i made one to read a *.LIF-file from the folder ypu start LIFE from.
I have upgraded then program to the showroom
I  am indeed Dutch.
Greetings from Goos :)