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

#1486
All good as I see glass gl3D objects on the iphone now.  :whistle: I've got it working now as I realised the function does load the frag file but because there is no vert file in this case, will return false even though the frag file is loaded with no error in the xcode debugger.
#1487
On Win32 it's fine but the iPhone can't find the shader fragment file whether it's in the app or media folder (always false).

IF X_LOADSHADER(12, "", "multitexture.frag")=FALSE THEN DEBUG "File not found"
IF X_LOADSHADER(12, "", "Media/multitexture.frag")=FALSE THEN DEBUG "File not found"
SETCURRENTDIR("Media") : IF X_LOADSHADER(12, "", "multitexture.frag")=FALSE THEN DEBUG "File not found - help!"

#1488
The original image dimensions are 2400x320px. When this is resized to 1020x100 and 2 lines of code changed shows that 1023px width is the limit.
   LOADANIM "transition.png", ANI_TRANSITION, 204, 100
      STRETCHANIM ANI_TRANSITION, i, 0,0, 480,320

I suppose you could just tile anim plot it but what about poly map plot?
#1489
//-- X_CAMERAUP  banking solution required!

Banking_Test()

FUNCTION Banking_Test:
   // basic first person inside room scene
   LOCAL px1,py1,pz1,px2,py2,pz2,angle

   SETCURRENTDIR("Media")
   SETSCREEN 640,480,0
   LOADSPRITE "testmap.png",0
   funCreateCube(0, 0,0,0, 100,100,10) // room
   WHILE TRUE
      angle=angle+MOUSEAXIS(0)
      px1=10                     // player
      py1=10
      pz1=10
      px2=px1+(COS(angle)*10)
      py2=8
      pz2=pz1-(SIN(angle)*10)
      X_MAKE3D 1, 100, 45
      // X_CAMERAUP              // banking ?
      X_CAMERA px1,py1,pz1, px2,py2,pz2
      X_SETTEXTURE 0,0
      X_MOVEMENT px1,py1,pz1
      X_DRAWOBJ 0,-1
      SHOWSCREEN
   WEND
ENDFUNCTION

FUNCTION funCreateCube: num, x,y,z, l,w,h
   LOCAL c

   c=RGB(0xff,0xff,0xff)
   l=l*0.5
   w=w*0.5
   h=h*0.5
   X_OBJSTART num
      X_OBJADDVERTEX x-l,y+h,z+w,0,0,c
      X_OBJADDVERTEX x+l,y+h,z+w,1,0,c
      X_OBJADDVERTEX x-l,y-h,z+w,0,1,c
      X_OBJADDVERTEX x+l,y-h,z+w,1,1,c
      X_OBJNEWGROUP
      X_OBJADDVERTEX x+l,y+h,z-w,0,0,c
      X_OBJADDVERTEX x-l,y+h,z-w,1,0,c
      X_OBJADDVERTEX x+l,y-h,z-w,0,1,c
      X_OBJADDVERTEX x-l,y-h,z-w,1,1,c
      X_OBJNEWGROUP
      X_OBJADDVERTEX x-l,y+h,z+w,0,0,c
      X_OBJADDVERTEX x-l,y+h,z-w,1,0,c
      X_OBJADDVERTEX x+l,y+h,z+w,0,1,c
      X_OBJADDVERTEX x+l,y+h,z-w,1,1,c
      X_OBJNEWGROUP
      X_OBJADDVERTEX x-l,y-h,z-w,1,1,c
      X_OBJADDVERTEX x-l,y-h,z+w,0,1,c
      X_OBJADDVERTEX x+l,y-h,z-w,1,0,c
      X_OBJADDVERTEX x+l,y-h,z+w,0,0,c
      X_OBJNEWGROUP
      X_OBJADDVERTEX x+l,y-h,z-w,1,0,c
      X_OBJADDVERTEX x+l,y-h,z+w,0,1,c
      X_OBJADDVERTEX x+l,y+h,z-w,1,0,c
      X_OBJADDVERTEX x+l,y+h,z+w,0,1,c
      X_OBJNEWGROUP
      X_OBJADDVERTEX x-l,y-h,z+w,1,1,c
      X_OBJADDVERTEX x-l,y-h,z-w,0,1,c
      X_OBJADDVERTEX x-l,y+h,z+w,1,0,c
      X_OBJADDVERTEX x-l,y+h,z-w,0,0,c
      X_OBJNEWGROUP
   X_OBJEND
ENDFUNCTION   
#1490
Thanks for code snip. For me, that doesn't get result I'd like as the roll doesn't stay fixed. As I move the camera target, the roll is maximum (camera tilted to side) but when face the roll angle, the there is no tilt. Perhaps I'll post sample code later.
#1491
It's a bit tricky as I've tried. Anyone care to complete this routine?

SUB RollCamera: cameraRollAngle, cameraPosX, cameraPosY, cameraPosZ, cameraTargetX, cameraTargetY, cameraTargetX
   // x=?
   // y=?
   // z=?
   X_CAMERAUP x,y,z
ENDSUB
#1492
Off Topic / Re: IRC Chat
2009-Nov-02
Another day still down.  :'(
#1493
"Guess Who" sounds interesting. Not sure which I'll do yet as I'm still researching.
So far on my choice list I have Snakes & Ladders, Pictionary and Snap.
#1494
Generally, I have found that I need to run a "Clean" in xcode Build menu that will reload all the updated resource media files to the device.
#1495
My test shows this is working fine on the iPod touch.
#1496
Scotland yard is a really good game and there is a Nintendo DS version of it.
#1497
Very exciting developments.  =D
#1498
That's great. I'd like to see a Pocket PC version. :)
#1499
Cool keyboard....well done!!
#1500
Update: This clicking noise occurs in the Windows also but only for some wavs.