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

Topics - François Vanzeveren

#1
GLBasic - en / GWC Zero
2016-Mar-12
Hello

I am wondering whether it is possible to use GLBasic to build a game for the open console GWC Zero?

Possibly via the Linux plateform support?

Regards

François
#2
Dear all,

I need your help to explain me the bug I found.

The attached file is the source of the game I wrote "SimOniZ".
THe attached version has no problem... after I discovered a workaround for the bug.

In the source files, I declares global constants for the sprite ids of the grafix components.
e.g. in the play.gbas file
Code (glbasic) Select

// grafix components
GLOBAL GFX_GREEN% = 0 ;  // Green button
GLOBAL GFX_YELLOW% = 1 ;
GLOBAL GFX_BLUE% = 2 ;
GLOBAL GFX_RED% = 3 ;
GLOBAL GFX_PAUSE% = 4 ; // Pause button
GLOBAL GFX_STATUS% = 5 ;
GLOBAL GFX_FONT15% = 100 ;


To reproduce the bug, open the project and edit the credits.gbas file
Code (glbasic) Select
//-----------------------------------------------------------------------------
// C O N S T A N T S
//-----------------------------------------------------------------------------

// menu states
GLOBAL MS_NONE% = 0;
GLOBAL MS_BACK% = 1 ;

// grafix components
GLOBAL GFX_BACK% = 0 ; // Bouton "Back"
GLOBAL GFX_FONT15% = 100 ;


Replace the line
Code (glbasic) Select
GLOBAL GFX_FONT15% = 100 ;
by
Code (glbasic) Select
GLOBAL GFX_FONT15% = 1 ;

This change generates the following problem:
* in the play screen, the yellow button is not displayed
* in the pause screen, the abort button is not displayed

Doing the same change in the highscores.gbas does not cause the bug!

I am completely lost.

Thanks for the time you will spent to explain me what is going wrong!

François

[attachment deleted by admin]
#3
Hello,

Is it possible to define variables local to a source file, i.e. only accessible by functions defined in the same source file?

Thank you.

François
#4
Hello

I am running GLBasic under Windows 7 64bits Home Edition. When trying to compile a game for GP2X-WIZ, g++.exe crashes and I get a dialog box warning me that g++.exe has stopped working.

When I run GLBasic under a virtualized windows XP on the same machine, everything works fine.

Regards

Here is the output
Code (glbasic) Select

_______________________________________
*** Configuration: GP2X-WIZ ***
precompiling:
GPC - GLBasic Precompiler V.6.922 SN:126b5585 - 3D, NET
Wordcount:678 commands
compile+link:
     34 [main] g++ 4884 child_info::sync: wait failed, pid 3900, Win32 error 1812
   2290 [main] g++ 4884 fork: child -1 - died waiting for longjmp before initialization, retry 10, exit code 0x1000000, errno 11
     30 [main] ? (-6364) Q:\Compiler\platform\WIZ\Bin\g++.exe: *** fatal error - cygheap base mismatch detected - 0x15C88E0/0x16588E0.
This problem is probably due to using incompatible versions of the cygwin DLL.
Search for cygwin1.dll using the Windows Start->Find/Search facility
and delete all but the most recent version.  The most recent version *should*
reside in x:\cygwin\bin, where 'x' is the drive on which you have
installed the cygwin distribution.  Rebooting is also suggested if you
are unable to find another cygwin DLL.
37581188 [main] g++ 4884 fork: child -1 - died waiting for longjmp before initialization, retry 0, exit code 0xC0000005, errno 11
50328506 [main] g++ 4884 fork: child -1 - died waiting for longjmp before initialization, retry 0, exit code 0xC0000005, errno 11
     30 [main] ? (6420) Q:\Compiler\platform\WIZ\Bin\g++.exe: *** fatal error - cygheap base mismatch detected - 0x15C88E0/0x14F88E0.
This problem is probably due to using incompatible versions of the cygwin DLL.
Search for cygwin1.dll using the Windows Start->Find/Search facility
and delete all but the most recent version.  The most recent version *should*
reside in x:\cygwin\bin, where 'x' is the drive on which you have
installed the cygwin distribution.  Rebooting is also suggested if you
are unable to find another cygwin DLL.
74842880 [main] g++ 4884 fork: child -1 - died waiting for longjmp before initialization, retry 0, exit code 0xC0000005, errno 11
g++: fork: Resource temporarily unavailable
*** FATAL ERROR - Please post this output in the forum
_______________________________________

#5
GLBasic - en / GL Basic 6
2008-Oct-03
Hello,

I see in the glbasic website that there is a version 6. How can we get it?

Regards
#6
Hello all,

I am looking how to handle the duration of a sound.
The idea is to play a sound (a beep) when the player touch the screen (on a GP2X). As long as the player keeps touching the screen, I want the sound to be played without interruption. When the player releases the screen, then the sound stops.

It should sound like:

beep (short)
beeeep (longer)
beeeeeep (even longer)
beeee..........eeeeeeep (very long)

Thanks for your help!

François
#7
Hello,

Is there GLBasic logos available for download.
In the Credits screen of the game I am currently developping, I would like to add a GLBasic logo.
Ideally, the logo should be in SVG format so we can resize it at will with inkscape :)

Regards

François
#8
Hello marvellous GLBasic developpers....

I would lke to mention an error in the help file for the command CLOSEFILE:
the help file mention the following syntax:
Code (glbasic) Select

CLOSEFILE(channel#)

while it actually is
Code (glbasic) Select

CLOSEFILE channel#

without parentheses.

I mention this because it took me some times before to find this out...

François
#9
Hello all,

In the help, I read for "FOREACH" the following
Quote
FOREACH ref in feld[]
...
NEXT

During the loop, "ref" will be a pointer (BYREF) variable to each element in the array.
You do not need to define "ref" as LOCAL.
It will be done automatcally, and it will invalid after the corresponding NEXT command.

I am wondering wether it is also the case with the "FOR" command: do we need to define the counter as LOCAL or is it done automatically?

Best regards

François
#10
I would like to announce the very soon availability of SimOniZ for GP2X (F100 & F200) with full support of the touchscreen on the F200.

Pictures are available here

Of course, it is being developped with GLBasic... ;)
#11
Hello,

I am wondering how to define a local array within a function.
I tried this
Code (glbasic) Select

LOCAL DIM myArray[10];

but this does not work. If i left out the word LOCAL, then it looks ok. Is it normal? Is myArray still local?

Secondly, is it ok to return a local array from a function like this:

Code (glbasic) Select

FUNCTION BuildSequence: pLevel
// These values are defined LOCAL:
// pLevel
DIM tSequence[pLevel+2];

FOR i = 0 TO pLevel+1
tSequence[i] = RND(7);
NEXT
RETURN tSequence
ENDFUNCTION


How should the "receiving" variable look like?

Thanks for your help.

François
#12
Announcements / Bombs Panic
2008-Apr-28
Hello everybody

From now, I will edit this post to give you updates on "Bombs Panic", a Nintendo DS mini-game clone for the GP2X-F200

The latest version (0.3.0) features a first attempt of level management! I would really appreciate if you could give some feedback on its suitability.

What's next?
- Bonus/malus management
- Music!

Enjoy ;)

Download Bombs Panic
Version History
---------------
0.3.0 (02/05/2008)
Level management.

0.2.2 (01/05/2008)
* BUG: Pause mode did not stop the clock
* BUG: When a bomb exploded, it was still possible to drag and drop it in the containment zone!

0.2.1 (01/05/2008)
* BUG: menu Pause/Restart Game was unreachable with the joypad

0.2.0 (29/04/2008)
* Game Over screen
* Different sizes for bombs

0.1.0 (27/04/2008)
Alpha version

#13
Hello,

How can I get the serial number of the gp2x on which the game is running? I would like to develop an "on line" score system. Of course, the GP2X does not support network gaming (as far as I know), but the idea is to generate a code base on the serial number and the score. The player then enters the code on the web site. The code is interpreted and the 'on line" scores are updated!

BTW: Anyone knows how I could develop the appropriate algorithms?

Thanks a lot!

François
#14
Hello,

I have started to code a mini-game designed for the GP2X-F200 and facing some performance issues. I beleive this is because I am new on GLBasic AND game programming.
Currently, bombs are just moving on the screen and bouncing against the borders. With 12 or more bombs on the screen moving simultaneously, performance is decreasing sharply.
In the code, I tried to appy "fixed point" calculation instead of "floating point" to improve performance (as the GP2X does not have a floating point unit), but I feel that the way i applied it in GLBasic might be wrong.

Therefore, I would really appreciate if some more experienced game programmers could review my code and explain me what I am doing wrong.

PS: another problem is the  display of png images on the GP2X: the quality is poor compared to a "windows" build

Here is the whole projet in its latest state: bombsorting_build2008042001.rar - 0.56MB

Thanks a lot to those you will help me to improve my skills and the project.

François
#15
Hello,

With build 5.235, the PLATFORMINFO$ function generates a freeze on a black screen with the GP2X:
The code below only works when commenting the line with PLATFORMINFO$ (the fourth line of code)...
Code (glbasic) Select
SETSCREEN 320, 240, 0; // Set the screen size (not full screen)
LIMITFPS 60; // Limit to 60 frames per second
ALLOWESCAPE TRUE; // Disable instant Esc function

GLOBAL gDevice$ = PLATFORMINFO$("DEVICE");
//IF gDevice$ = "POCKETPC" OR gDevice$ = "F200"
// SYSTEMPOINTER FALSE; // device with touchscreen!
//ELSE
// SYSTEMPOINTER TRUE; // device without touchscreen --> simulate pen with the mouse!
//ENDIF

LoadMedia(); // Call function to load media files

// Boucle principale.
// Quitter la boucle --> quitter le jeu et revenir au menu GP2X
WHILE TRUE
// Affichage et gestion de l'écran de démarrage
LOCAL touchedMenu, highlightedMenu;
LOCAL isMenuSelected = FALSE, dpad = FALSE, pen = FALSE;

LOADBMP "resources/home.bmp";
DrawHomeMenu(0);
SHOWSCREEN;

WHILE isMenuSelected = FALSE
touchedMenu = GetTouchedHomeMenu();
IF pen = FALSE AND touchedMenu > -1
// L'utilisateur vient tout juste de pointer un menu avec le stylet/la souris
highlightedMenu = touchedMenu;
pen = TRUE
ELSEIF pen = TRUE AND touchedMenu = -1
// L'utilisateur vient de relacher la pression sur un menu avec son stylet.
isMenuSelected = TRUE;
pen = FALSE;
ELSEIF dpad = FALSE AND (KEY(200) OR KEY(208))
IF KEY(200) THEN highlightedMenu = MAX(0, highlightedMenu-1); // up arrow
IF KEY(208) THEN highlightedMenu = MIN(4, highlightedMenu+1); // down arrow
dpad = TRUE;
ELSEIF KEY(200) = 0 AND KEY(208) = 0
dpad = FALSE;
ENDIF
DrawHomeMenu(highlightedMenu);
SHOWSCREEN;

// les boutons 'SELECT' (15) et 'B' (45) provoquent
// la sélection du menu en surbrillance.
IF KEY(45) OR KEY(15) THEN isMenuSelected = TRUE;
// Le bouton 'HOME' (F200) permet de quitter le jeu.
IF KEY(28)
isMenuSelected = TRUE;
highlightedMenu = 4;
ENDIF

WEND

IF highlightedMenu = 4 THEN END // Quit game
WEND

END // End the program

FUNCTION LoadMedia:
LOADANIM "resources/font-15px.png", 0, 15, 15;
LOADANIM "resources/home-menu.png", 1, 180, 30;
LOADANIM "resources/pause-menu.png", 2, 180, 30;
LOADANIM "resources/bombs-20px.png", 10, 20, 20;
ENDFUNCTION

FUNCTION DrawHomeMenu: tSelectedMenu
LOCAL offset;
FOR i = 0 TO 4
offset = 0;
IF tSelectedMenu = i THEN offset = 1;
DRAWANIM 1, 2*i+offset, (320-180)/2, 60+30*i;
NEXT
ENDFUNCTION

FUNCTION DrawPauseMenu: tSelectedMenu
LOCAL offset;
FOR i = 0 TO 1
offset = 0;
IF tSelectedMenu = i THEN offset = 1;
DRAWANIM 1, 2*i+offset, (320-180)/2, 60+30*i;
NEXT
ENDFUNCTION

FUNCTION GetTouchedHomeMenu:
LOCAL retval = -1;
MOUSESTATE mx, my, b1, b2;
IF b1 = 1 // pushed
FOR i = 0 TO 4
IF IsPointInRect(mx,my, (320-180)/2, 60+30*i, 180, 30) THEN retval = i;
NEXT
ENDIF
RETURN retval;
ENDFUNCTION

FUNCTION IsPointInRect: px,py, rx,ry,rw,rh
LOCAL retval = FALSE;
IF px > rx AND px < rx + rw AND py > ry AND py < ry + rh
retval = TRUE;
ENDIF
RETURN retval;
ENDFUNCTION