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

#1
Hi guys!

i'm always converting my libs (to semplify some things like, collision, alimation sprites list, bitmapfont, etc) originally writted for bmax...

now i added support for sprite animations...

all my sprites are in a single png with inside the frames of the animation...
i'm drawing it using polyvectos...
with previus version of glbasic is all ok even if i move the sprites 0.1 pixel
with 8.036 then sprites look like this (with a little blue border) (image attached).
the sprite sheet is png with alphachannel.. (image attached)

how do you think? is my fault?
PS: if i move the sprites exactly 1 pixel each time the blue border do not appears!.




[attachment deleted by admin]
#2
Off Topic / Sud africa 2010
2010-Jul-11
best compliments to spain!
:)
#3
ok.
i'm back to convert my libs with v8.006 beta...  =D

I think that i found "the bug"in glbasic that is going me crazy for a few days ...
is related to folding and unfolding functions....

try this...

Code (glbasic) Select

FUNCTION test:




ENDFUNCTION

GLOBAL t = 1



now "close" the function and (f5) compile... all is ok ...

now try this... (add some comments)

Code (glbasic) Select

  FUNCTION test:

// some innocent comment here.


  ENDFUNCTION


now "close" the function and try to compile (f5)

and... tada!!!!

Code (glbasic) Select

_______________________________________
*** Configuration: WIN32 ***
precompiling:
GPC - GLBasic Precompiler V.6.972 SN:ac0044df - 3D, NET
Wordcount:0 commands
compiling:
C:\Users\Gianluca\AppData\Local\Temp\glbasic\gpc_temp0.cpp: In function `DGInt __GLBASIC__::test()':
C:\Users\Gianluca\AppData\Local\Temp\glbasic\gpc_temp0.cpp:74: error: a function-definition is not allowed here before '{' token
C:\Users\Gianluca\AppData\Local\Temp\glbasic\gpc_temp0.cpp:81: error: a function-definition is not allowed here before '{' token
C:\Users\Gianluca\AppData\Local\Temp\glbasic\gpc_temp0.cpp: At global scope:
C:\Users\Gianluca\AppData\Local\Temp\glbasic\gpc_temp0.cpp:94: error: expected `}' at end of input
*** FATAL ERROR - Please post this output in the forum
_______________________________________
*** Finished ***
Elapsed: 1.1 sec. Time: 00:56
Build: 0 succeeded.


:rant: :rant: :rant: :rant: :rant:

it seems that if you add some comments inside a function then "close" the function and compile the compiler don't like it!!!

...  :'(

and... when will be possible to compile for iphone with the extended type (functions inside a type) ?


thanks...

Gianluca. (ps: sorry for the bad translation!!!)
CIAO!
#4
why GLBasic crasch with this code ?

Code (glbasic) Select

SETCURRENTDIR("Media") // seperate media and binaries?
global sp1GFX = geSprite_LoadGFX("1.png")

FUNCTION geSprite_LoadGFX: Filename$
LOCAL gfxID = GENSPRITE() //geID_GetFreeGFX(gfxIsSprite%)
LOADSPRITE Filename$, gfxID
RETURN gfxID
ENDFUNCTION


if the var sp1GFX is LOCAL no crash!!! if it's Global it CRASH!!! why?  :noggin:

thanks!
#5
Excuse the beginner question ....  ::)
What are the advantages of using PolyVector instead of DrawSprite?
There are advantages in terms of speed? (and if there are ... as you can 'optimize everything to get the maximum speed of drawing?)

Thanks to all who have the time and patience to answer me ...  :P
#6
sorry for my continuous questions ....  ;/

I have the main development computer  where everything works perfectly ... virtual machine in Parallels ... compile ... go on osx Xcode compile for iphone and everything is running smoothly ...  (osx 10.6.2)  =D

Yesterday I set up my MacBook (osx 10.6.2) with the same configuration of main computer ... everything seems to work fine ... compile in glbasic (under parallels)... compile in Xcode my game (which works perfectly when compiled by the main computer) Xcode install the game on iphone with no errors.... but the game when start on iphone displays only a black screen!!  :rant:

why?? HELP ME!
I have no idea what could have happened!
Some advice? Thanks to all!
#7
sorry, i just downloaded the last version of GLBasic 7.230
recompiled my game (for iPhone) and now when i compile with xcode i get this error...  :rant:

Quote

Build iPhone of project iPhone with configuration Release

Check dependencies

[WARN]Warning: The Copy Bundle Resources build phase contains this target's Info.plist file 'iPhone-Info.plist'.

Ld build/Release-iphoneos/iBreaker.app/iBreaker normal armv6
cd /Users/gregbug/Desktop/GregBugWork/iBreaker/XCode/GLBasic
setenv IPHONEOS_DEPLOYMENT_TARGET 3.0
setenv MACOSX_DEPLOYMENT_TARGET 10.5
setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 -arch armv6 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk -L/Users/gregbug/Desktop/GregBugWork/iBreaker/XCode/GLBasic/build/Release-iphoneos -L/Users/gregbug/Desktop/GregBugWork/iBreaker/XCode/GLBasic/Lib -F/Users/gregbug/Desktop/GregBugWork/iBreaker/XCode/GLBasic/build/Release-iphoneos -filelist /Users/gregbug/Desktop/GregBugWork/iBreaker/XCode/GLBasic/build/iPhone.build/Release-iphoneos/iPhone.build/Objects-normal/armv6/iBreaker.LinkFileList -mmacosx-version-min=10.5 -dead_strip -lstdc++ -miphoneos-version-min=3.0 -framework Foundation -framework UIKit -framework OpenGLES -framework QuartzCore -framework AudioToolbox -framework CoreLocation -framework OpenAL -lGLBasiciPhone-egl -lpng-gf -lPROGRAM -o /Users/gregbug/Desktop/GregBugWork/iBreaker/XCode/GLBasic/build/Release-iphoneos/iBreaker.app/iBreaker

Undefined symbols:
  "_MPMoviePlayerPlaybackDidFinishNotification", referenced from:
      _MPMoviePlayerPlaybackDidFinishNotification$non_lazy_ptr in libGLBasiciPhone-egl.a(iPhoneAppController.o)
  "_OBJC_CLASS_$_MPMoviePlayerController", referenced from:
      __objc_classrefs__DATA@0 in libGLBasiciPhone-egl.a(iPhoneAppController.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status

any ideas?

PS: with older (7.206) version it compile just fine and work perfect!  :O


thanks!
#8
iphone vibration is possible in glbasic? 

how can i call an sdk api? is possible ?

thanks.  =D
#9
hi!

i'm trying to make a game for my iPhone...  ;)

which it is the better method in order to understand if the home button (iphone home button)
is on the left, right, up or down...

i coded this and it works discreetly...  :-[

Code (glbasic) Select

CONSTANT iPhone_HomeDown%  = 1
CONSTANT iPhone_HomeUp%    = 2
CONSTANT iPhone_HomeLeft%  = 3
CONSTANT iPhone_HomeRight% = 4

// ********************************************************** //
// iPhone_Get_CurrentPosition                                 //
// Rilascia la posizione corrente dell'iPhone                 //
// 1 iPhone_HomeDown%  iPhone con il pulsante Home in basso   //
// 2 iPhone_HomeUp%    iPhone con il pulsante Home in alto    //
// 3 iPhone_HomeLeft%  iPhone con il pulsante Home a sinistra //
// 4 iPhone_HomeRight% iPhone con il pulsante Home a destra   //
// ********************************************************** //
FUNCTION iPhone_Get_CurrentPosition:
STATIC LastPosition%
LOCAL XForce# = GETJOYX(0)
LOCAL YForce# = GETJOYY(0)
LOCAL ZForce# = GETJOYZ(0)
IF (XForce# >= -75) AND (XForce# < 75) AND (YForce# < 45) AND (ZForce# > -75)
LastPosition% = iPhone_HomeDown%
RETURN iPhone_HomeDown%
ENDIF
IF (XForce# >= -75) AND (XForce# < 75) AND (YForce# > 45) AND (ZForce# > -75)
LastPosition% = iPhone_HomeUp%
RETURN iPhone_HomeUp%
ENDIF
IF (XForce# > 75) AND (YForce# > -30) AND (ZForce# > -75)
LastPosition% = iPhone_HomeLeft%
RETURN iPhone_HomeLeft%
ENDIF
IF (XForce# <-75) AND (YForce# > -30) AND (ZForce# > -75)
LastPosition% = iPhone_HomeRight%
RETURN iPhone_HomeRight%
ENDIF
RETURN LastPosition%
ENDFUNCTION



some suggestion/optimization/other methods?

...and it is possible to get the current angle of the iPhone ?

thanks!
#10
is there a way to flush MouseState (only mouse button1 and button 2) ?  :blink:

thanks.
#11
sorry...

but GlBasic not support Repeat Until Loop?  :o

and Not Operator ?  :o

thanks.
#12
Hi i'm very new to GLBasic (and basic in general)  ;/

i selected in my project "explicit declaration"

Code (glbasic) Select

CONSTANT MaxXBalls% = 7
CONSTANT MaxYBalls% = 7

DIM BallTable%[MaxXBalls%][MaxYBalls%]


in the code glBasic says " variable is not explicitly defined : BallTable%"  :rant:
why ?  O_O
how can explicit define the BallTable array ? "dim" is not enough?

thanks.
and sorry for my stupid question...
#13
Hi! this i my first post!!!

one question...

i'm interested to buy glbasic, (mainly for the iphone support) which version I must buy?
sdk premium include the iphone compiler?

thanks
gianluca.