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.


Messages - bricky91

Pages: [1] 2 3 4
1
GLBasic - en / Re: MinGW problem
« on: 2010-Nov-14 »
Oh great, thank you, I installed the previous version of minGW and now it works. Thanks!  :good:

2
GLBasic - en / MinGW problem
« on: 2010-Nov-14 »
Hi guys, I have a problem. I installed minGW in order to get Netbeans work (well, and I didn't even mange to get it wrok...), but now when I try to compile I get this output:
Code: (glbasic) [Select]
/mingw/lib/crt2.o:crt1.c:(.text+0x28): undefined reference to `___dyn_tls_init_callback'Any ideas on how to fix this?  :(

3
GLBasic - en / Re: Game slow on gp2x F200
« on: 2010-Feb-10 »
I have win xp, but I create the sprites with game maker 8 (which has a useful and simple sprite editor) and I noticed that it creates a 32bit image. So, problem probably solved! Thanks very much!  :good:

4
GLBasic - en / Re: Game slow on gp2x F200
« on: 2010-Feb-10 »
I solved the first problem, but there is another one. If I draw a sprite it works well, but the problem is that the program draws also the parts in color (255, 0, 128) in stead of making them transparent. I just load the sprite (.png file) and draw it with the command DRAWSPRITE as I always did. What's the problem this time?

5
GLBasic - en / Re: Game slow on gp2x F200
« on: 2010-Feb-10 »
Oh, thank you very much! By the way, very stange, because in GL Basic 6 DRAWLINE worked well also on gp2x, I never had any probem. I wrote this same game on version 6 and it worked well (I am now re-writing it).

6
GLBasic - en / Re: Game slow on gp2x F200
« on: 2010-Feb-10 »
Well, as you can see I don't draw any spirte in the game yet. And the game runs slowly even if I don't load them. So I don't think sprites can be the problem at all. Could you test the code (even without sprites, because as I said on my gp2x the game runs slowly even if I don't draw or load any sprite) on your gp2x just to see if it's a problem related to my console?

7
GLBasic - en / Game slow on gp2x F200
« on: 2010-Feb-10 »
Hey guys! I have a problem. I'm currently using GL Basic 7.250 and on my gp2x F200 the game I'm making runs very very slow, but I don't know why! Here's the code I wrote, just in case:

Code: (glbasic) [Select]
SETSCREEN 320, 240, FALSE

//------------------------------------------------------
//----------------------RISORSE-------------------------
//------------------------------------------------------
LOADSPRITE "sprites/sp_block-mondo1_sopra.png", 0
LOADSPRITE "sprites/sp_block_mondo1_sotto.png", 1



//------------------------------------------------------
//----------------------VARIABILI-----------------------
//------------------------------------------------------
GLOBAL mx, my, b1, b2
GLOBAL stato_gioco, stato_livello, stato_menu


GLOBAL map_w, map_h
GLOBAL map[], map_red[] //map_red[x][y]=1 -> non si può mettere nulla (nell'editor chiaraente)
GLOBAL ed_item[], ed_item_num, ed_item_timer
GLOBAL scroll_x, scroll_y


//------------------------------------------------------
//----------------------COSTANTI------------------------
//------------------------------------------------------
GLOBAL KEY_RIGHT=205
GLOBAL KEY_LEFT=203
GLOBAL KEY_UP=200
GLOBAL KEY_DOWN=208
GLOBAL KEY_ENTER=28
GLOBAL KEY_SHIFT_DX=54
GLOBAL KEY_SHIFT_SX=42
GLOBAL KEY_TAB=15
GLOBAL KEY_PAGE_UP=201
GLOBAL KEY_PAGE_DOWN=209
GLOBAL KEY_ESC=1

GLOBAL T_SIZE=20
GLOBAL ED_ITEM_MAX=5



DIM ed_item[ED_ITEM_MAX]
DIM map[32][24]
DIM map_red[32][24]




//provvisori------------------
stato_gioco=2
ed_item_num=0
scroll_x=0
scroll_y=0
map_w=32
map_h=24



//------------------------------------------------------
//----------------------MAN LOOP------------------------
//------------------------------------------------------
WHILE stato_gioco<>-1
SELECT stato_gioco
CASE 0 //menu, scelta livello, settaggio editor, carica livello da editor
GOSUB scegli_menu
CASE 1 //gioco vero e proprio
GOSUB ingame
CASE 2 //editor
GOSUB editor
ENDSELECT
SHOWSCREEN
WEND
END





// ------------------------------------------------------------- //
// ---  SCEGLI_MENU  ---
// ------------------------------------------------------------- //
SUB scegli_menu:



ENDSUB // SCEGLI_MENU




// ------------------------------------------------------------- //
// ---  INGAME  ---
// ------------------------------------------------------------- //
SUB ingame:



ENDSUB // INGAME




// ------------------------------------------------------------- //
// ---  EDITOR  ---
// ------------------------------------------------------------- //
SUB editor:


// disegno delle robe dell'edior tipo linee guida e spazi rossi---------------------------------------------
DRAWRECT 0, 0, map_w*T_SIZE, map_h*T_SIZE, RGB(255, 255, 255)

FOR x=0 TO map_w-1
FOR y=0 TO map_h-1
IF map[x][y]=0 //quadratini rossi-> non ci si può piazzare sopra oggetti!
IF y<24-1
IF map[x][y+1]<>map_h-1
DRAWRECT x*T_SIZE-scroll_x, y*T_SIZE-scroll_y, T_SIZE, T_SIZE, RGB(255, 0, 0)
ENDIF
ELSE
DRAWRECT x*T_SIZE-scroll_x, y*T_SIZE-scroll_y, T_SIZE, T_SIZE, RGB(255, 0, 0)
ENDIF
ENDIF


DRAWLINE x*T_SIZE-scroll_x, 0-scroll_y, x*T_SIZE-scroll_x, map_h*T_SIZE-scroll_y, RGB(128, 128, 128) //linee per i quadrati
DRAWLINE x*T_SIZE-1-scroll_x, 0-scroll_y, x*T_SIZE-1-scroll_x, map_h*T_SIZE-scroll_y, RGB(128, 128, 128)
DRAWLINE 0-scroll_x, y*T_SIZE-scroll_y, map_w*T_SIZE-scroll_x, y*T_SIZE-scroll_y, RGB(128, 128, 128)
DRAWLINE 0-scroll_x, y*T_SIZE-1-scroll_y, map_w*T_SIZE-scroll_x, y*T_SIZE-1-scroll_y, RGB(128, 128, 128)
NEXT
NEXT



//fai scorrere gli oggetti dell'editor------------------------------------------------------------------------
IF ed_item_timer>0
DEC ed_item_timer, 1
ELSE
IF KEY(KEY_SHIFT_DX)
IF ed_item_num<ED_ITEM_MAX THEN INC ed_item_num, 1
ed_item_timer=10
ELSEIF KEY(KEY_SHIFT_SX)
IF ed_item_num>0 THEN DEC ed_item_num, 1
ed_item_timer=10
ENDIF
ENDIF



//scrlling----------------------------------------------------------------------------------------------------
IF KEY(KEY_RIGHT)
IF scroll_x<(map_w/2-1)*T_SIZE
INC scroll_x, 4
ELSE
scroll_x=(map_w/2-1)*T_SIZE
ENDIF
ENDIF


ENDSUB // EDITOR

Hwever, I don't think the problem can be realted to the code... Any ideas?

8
Feedback / Re: Nintendo DS compiler
« on: 2010-Jan-18 »
Oh, I'm sorry, I didn't know... Well, never mind!

9
Feedback / Nintendo DS compiler
« on: 2010-Jan-17 »
Hey, do you think it could be possible to add the possibility to compile for Nintendo DS? Since I just bought a DS, I thought about this, it would be great! But I don't know if there would be trouble because of the double screen...

10
GLBasic - en / Re: TYPEs question
« on: 2009-Jul-01 »
Code: (glbasic) [Select]
For mastercheck=0 to bounds(players[],0)-1

 if mastercheck<bounds(players[],0)-1
  For slavecheck=mastercheck+1 to bounds(players[],0)-1
   //blabla... check collision...
  next
 endif
next

Thats how i would do it. This way every combination of players will just be checked once, because the second "For to..." starts one step after the mastercheck.
With 4 Players it would look like this:

1+2
1+3
1+4

2+3
2+4

3+4

Pretty cool, works great! Thanks a lot!  :good:

11
GLBasic - en / TYPEs question
« on: 2009-Jul-01 »
Hey guys, here I am again. I'll try to explain what I want to do. I'm making a game like "mario vs donkey kong 2" (for the DS). So I sometimes have more than one player to control. The problem is that I have to make them change their direction when they hurt each other. But I can't understad how to do it. I tried to do like this

FOREACH player in players[]
//code...
FOREACH player2 in players[]
//code to reverse the horizontal direction
NEXT
//other code...
NEXT

but, it doesn't work well. I think it's because in the second FOREACH is included also the player of the first FOREACH... So bsically the object checks for collisions with itself, and obviously the object always collides with itself... Any ideas on how to check this kind of collisions?

12
GLBasic - en / ZOOMSPRITE doesn't work
« on: 2009-Jun-28 »
Why doesn't ZOOMSPRITE work on gp2x? Works fine on PC, but when I play the game on gp2x it doesn't work.  :O

13
GLBasic - en / Re: Files reading
« on: 2009-Jun-23 »
worm.zip contains a source.zip file, unpack this and load it up in GLBasic and you should see the load_level function. It reads the size and some options and then the level data. draw_screen draws the map on the screen.

Now I found it, I downloaded the game yesterday, but there were no zip files. Anyways, now I found it. Thank you very much, it is better with a practical example! Thank you  :good:


EDIT: I finally did it. Works fine, thank you again!  =D

14
GLBasic - en / Re: Files reading
« on: 2009-Jun-23 »
Thank you, but I think that if anyone could make me a little example it would be better, bcause Theese are many different ways of doing this thing and I think I' going mad...  :whistle:

And sorry for my english...  :whistle:

15
GLBasic - en / Re: Files reading
« on: 2009-Jun-22 »
Read a text file to an array:

Code: (glbasic) [Select]
LOCAL map%[]

DIM map%[11][11]

IF OPENFILE 0, "the.map"
   FOR y%=0 to 10 // 11 lines
       READLINE 0, line$
       FOR x%=0 TO 10 // 11 coloums - change to fit your file
           map%[x][y] = mid$(line$, x, 1) // convert one digit to a number - adjust to your needs. Maybe 2 digits per whatever...
       NEXT
   NEXT
ENDIF


Improvements: Read/write binary data, maybe?
Read 2 digits for a number instead
read/write the width/height of the map at the top of the file
read and compare a file header

I don't understand why you write

Code: (glbasic) [Select]
IF OPENFILE...
...
ENDIF


Why do you use the "IF" statement?
And it gave me an error to the "IF OPENFILE..." line, probably because the last argument was missing.
Anyways, I can't open my map again, could you please explain me a bit more precisely how to do that? Sorry, I am really a noob...  :whistle:

Pages: [1] 2 3 4